{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2510-10020","title":"Calibrating Generative Models to Distributional Constraints","arxiv_id":"2510.10020","date":"2025-10-11","proceeding":"ICML","authors":["Henry D. Smith","Nathaniel L. Diamant","Brian L. Trippe"],"abstract":"Generative models frequently suffer miscalibration, wherein statistics of the sampling distribution, such as the fraction of generations in a given class, deviate from desired values. We frame calibration as a constrained optimization problem and seek the closest model in Kullback-Leibler divergence satisfying a calibration constraint. To address the intractability of imposing these constraints exactly, we introduce two surrogate objectives for fine-tuning: (1) the relax loss, which replaces the constraint with a miscalibration penalty, and (2) the reward loss, which converts calibration into a reward fine-tuning problem. We demonstrate that these approaches substantially reduce calibration error across hundreds of simultaneous constraints and models with up to nine billion parameters, spanning applications in protein design, image generation, and language modeling.","url_abs":"https://arxiv.org/abs/2510.10020","url_pdf":"https://arxiv.org/pdf/2510.10020","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2510.10020","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2510.10020"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/smithhenryd/cgm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":16},"by_repo_kind":{"found_in_text":{"samples":16,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"083602ed7c768390","entry":"build_prompt","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"gemma/cgm_gemma.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/gemma/cgm_gemma.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"083602ed7c768390"}},{"code_sha256_prefix":"c8765fe23686641b","entry":"clean_df","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"esm3/cgm_esm3.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/esm3/cgm_esm3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c8765fe23686641b"}},{"code_sha256_prefix":"bceb224d9f5dca7a","entry":"clone_network","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/utils.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bceb224d9f5dca7a"}},{"code_sha256_prefix":"67176465cf507433","entry":"combine_samples","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"gemma/cgm_gemma.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/gemma/cgm_gemma.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67176465cf507433"}},{"code_sha256_prefix":"53c523697aec2dae","entry":"compute_bivariate_quantiles","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"esm3/cgm_esm3.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/esm3/cgm_esm3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"53c523697aec2dae"}},{"code_sha256_prefix":"c978a6b9da7552f8","entry":"default_logger","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/utils.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c978a6b9da7552f8"}},{"code_sha256_prefix":"9e8aacf09f0436f0","entry":"diffusion","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"genie2/genie_score_network.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/genie2/genie_score_network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9e8aacf09f0436f0"}},{"code_sha256_prefix":"3e80da7d4a2d667c","entry":"dot_product_kernel","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/kernels.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/kernels.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e80da7d4a2d667c"}},{"code_sha256_prefix":"3f31d3435a5bdae8","entry":"energy_distance_kernel","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/kernels.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/kernels.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3f31d3435a5bdae8"}},{"code_sha256_prefix":"9c54db2784a3a05b","entry":"fit_pca","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/cgm_distribution.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/cgm_distribution.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c54db2784a3a05b"}},{"code_sha256_prefix":"74dff8236e373e41","entry":"h_bi","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"esm3/cgm_esm3.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/esm3/cgm_esm3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74dff8236e373e41"}},{"code_sha256_prefix":"9bb8e09b1bfb72a0","entry":"make_warmup_cosine_scheduler","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/lr_schedules.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/lr_schedules.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9bb8e09b1bfb72a0"}},{"code_sha256_prefix":"c951752cae37ba30","entry":"module_device","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/utils.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c951752cae37ba30"}},{"code_sha256_prefix":"47f2c36e4e658821","entry":"rbf_mixture_kernel","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/kernels.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/kernels.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"47f2c36e4e658821"}},{"code_sha256_prefix":"1e0dbc5011ce31a6","entry":"up_to_eos_mask","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"gemma/cgm_gemma.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/gemma/cgm_gemma.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1e0dbc5011ce31a6"}},{"code_sha256_prefix":"f61246a331d0104c","entry":"warmup_cosine_multiplier","repo":"smithhenryd/cgm","repo_kind":"found_in_text","path":"cgm/lr_schedules.py","file_url":"https://github.com/smithhenryd/cgm/blob/HEAD/cgm/lr_schedules.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f61246a331d0104c"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"stat.ML","source":"arxiv_api"},"syntology_extracted_results":null}