cs.LGMar 12, 2026

Matching Features, Not Tokens: Energy-Based Fine-Tuning of Language Models

Authors: Samy Jelassi, Mujin Kwun, Rosie Zhao, Yuanzhi Li, Nicolo Fusi, Yilun Du, Sham M. Kakade, Carles Domingo-Enrich

Organizations: Harvard University, Kempner Institute · MBZUAI · Microsoft Research New England

Abstract

Cross-entropy (CE) training provides dense and scalable supervision for language models, but it optimizes next-token prediction under teacher forcing rather than sequence-level behavior under model rollouts. We introduce a feature-matching objective for language-model fine-tuning that targets sequence-level statistics of the completion distribution, providing dense semantic feedback without requiring a task-specific verifier or preference model. To optimize this objective efficiently, we propose energy-based fine-tuning (EBFT), which uses strided block-parallel sampling to generate multiple rollouts from nested prefixes concurrently, batches feature extraction over these rollouts, and uses the resulting embeddings to perform an on-policy policy-gradient update. We present a theoretical perspective connecting EBFT to KL-regularized feature-matching and energy-based modeling. Empirically, across Q&A coding, unstructured coding, and translation, EBFT matches RLVR and outperforms SFT on downstream accuracy while achieving a lower validation cross-entropy than both methods.

Figures & tables

Appendix figures & tables17 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Entropy-KL Divergence-based Token Masking: A Novel Approach for Selective Fine-tuning of Large Language Models

    May 28, 2026Qi Liu, Mingdi Sun, Yongyi He +5Supervised Fine-TuningFine-Tuning

  2. Phantom transitions in language model fine-tuning

    May 25, 2026Vaibhav Prakash, Jayasri DontabhaktuniLLM Fine-Tuning

  3. LP-SFT: Local-Preserving Supervised Fine-Tuning via Multimodal Entropy Structure

    Jul 6, 2026Yueyang Wang, Baolong Bi, Shuo Lu +1Supervised Fine-TuningFine-Tuning