# Calibrating Generative Models to Feature Distributions with MMD Finetuning

*Nathaniel L Diamant, Brian L Trippe*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148368) · [OpenReview](https://openreview.net/forum?id=yNxOZb4Mxr) · [alphaXiv](https://www.alphaxiv.org/abs/2606.19496) · [Open on the map](../papers.html#p148368)

Category: [AI for Molecules, Materials & Genomics](../pcat/8.md) › [Equivariance and Invariance in Deep Learning](../pgroup/384.md) · Type: new method · Keywords: generative model calibration, feature distribution matching, maximum mean discrepancy, KL regularization, molecular generation, protein generation

Areas: [Generative Models (Diffusion & Flows)](../areas/generative-models.md) › Flow Matching and Diffusion › Training-Free Generative Guidance; [AI for Science](../areas/ai-for-science.md) › Molecular Systems Modeling › Constrained Generative Flows

## Summary
kCGM calibrates generative models to match feature distributions of a reference set by minimizing a maximum mean discrepancy with KL regularization, improving both feature matching and sample validity.

## Explained to a 5-year-old
Computers can draw or create things that look okay but might not have the right qualities for a special group. For example, they might make molecules that don't match the features of useful medicines like antibiotics. We teach the computer a new way to check if the things it makes are similar to the target group and also keep the knowledge it already has. This helps the computer make better and more useful things without forgetting what it learned before. It works for many kinds of creation, like making molecules, proteins, or DNA.

## Explained to a 5-year-old, longer
Computers can create things like pictures, molecules, or text that look realistic. Sometimes these things are okay individually, but they don't match the overall pattern of a particular group. For instance, a computer might generate chemicals that don't have the features of real antibiotics. We give the computer a new training method that checks how close its outputs are to the desired group while keeping the knowledge it already has. This helps the computer make things that are both realistic and have the right characteristics. The method works for many types of generative models, such as those that build molecules, proteins, or DNA sequences. It also avoids overfitting, which means the computer doesn't just memorize the examples but learns a general way to match features. By using a special loss that measures differences in feature distributions and a regularization that stays close to the original model, the computer can adapt to new tasks without losing its original abilities. This makes it useful for designing new medicines, understanding biological sequences, and other areas where specific features matter.

## For a technical reader
The paper addresses the issue of generative models producing samples that are individually plausible but do not match the desired feature distribution. It proposes a calibration technique that uses a distribution-matching loss with KL regularization to align generated features with a reference set while preserving the pretrained model’s knowledge. Experiments on antibiotic molecules, proteins, and DNA show that this method improves feature alignment and sample validity compared to standard finetuning. The approach is model-agnostic and can be applied to autoregressive, diffusion, and discrete generative models.

## Problem
Generative models can produce plausible samples that still deviate from a target feature distribution, making it hard to align generated outputs with a reference set without sacrificing quality or overfitting.

## Method
The approach minimizes a discrepancy between generated and reference feature distributions using an unbiased estimator, while adding a KL regularization term to keep the model close to its pretrained parameters. This allows feature-level supervision without overfitting, enabling adaptation of various generative architectures.

## Results
The approach improves target feature matching and chemical validity compared to direct finetuning, which otherwise sacrifices validity.

## Contributions
A method that calibrates generative models to reference feature distributions using a distribution-matching loss with KL regularization, enabling feature-level adaptation across autoregressive, diffusion, and discrete models while preserving sample validity.

## Research questions this paper is counted under

- [How can we align generative models to a desired target distribution without extensive retraining or reference data?](../q/265.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148368)
