Direct Preference Optimization Using Sparse Feature-level Constraints

Qingyu Yin, Chak Tou Leong, Hongbo Zhang, Minjun Zhu, Hanqi Yan, Qiang Zhang, Yulan He, Wenjie Li, Jun Wang, Yue Zhang, Linyi Yang · Submission to ICLR 2025 · Rejected

TL;DR

Direct Preference Optimization (DPO) typically faces a trade-off between the low memory footprint of reference-free approaches and the stability and diversity of token-level KL-constrained methods. Feature-level constrained Preference Optimization (FPO) bridges this gap by replacing expensive token-level KL constraints over massive vocabularies with Mean Squared Error (MSE) constraints over sparse features from pre-trained Sparse Autoencoders (SAEs). Paired with offline reference caching, FPO matches the low training memory of reference-free methods while achieving up to a 5% boost in win rate over strong baselines.

What Problem Does This Paper Address?

Post-training preference alignment (like RLHF and DPO) aligns Large Language Models (LLMs) with human feedback. Recent improvements to DPO have pulled in two opposing directions:

  1. Efficiency (e.g., SimPO, ORPO): Removing the reference model eliminates memory overhead, but the lack of an anchor often leads to training instability and degenerate policies.
  2. Controllability (e.g., TDPO): Applying token-level sequential Kullback–Leibler (KL) divergence against a reference model preserves linguistic diversity and prevents over-optimization. However, calculating token-level distributions over modern, massive vocabularies (e.g., Gemma's 256k-token vocabulary) creates significant computational and memory bottlenecks.

The authors ask: Can we achieve the stability and diversity benefits of fine-grained regularization without the heavy computational penalty of vocabulary-wide sequential KL?

Methods

FPO introduces sparse, feature-level constraints alongside offline reference caching:

  • Unified Preference Objective: The authors reframe DPO, SimPO, and TDPO into a single template: $\text{Log Probability Difference} - \text{Margin} - \text{Constraint}$. FPO adopts a length-normalized adaptive margin ($\gamma_{\text{ref-LN}}$) based on the reference model.
  • Sparse Autoencoder (SAE) Feature Regularization: Rather than computing KL divergence over output token logits, FPO extracts internal activations from an intermediate layer $\ell$ and projects them into an interpretable, sparse feature space using a pre-trained SAE.
  • Pooled MSE Loss on Dominant Features: The sequence activations are average-pooled across tokens, and FPO calculates the Mean Squared Error (MSE) on the union of the top-$k$ most active features between the policy and reference models ($D_{\text{FPO}}^\ell$). The authors mathematically prove that minimizing the MSE of these sparse activations upper-bounds the token-level KL divergence between output distributions.
  • Offline Caching: Because the reference model’s targets (length-normalized margin and top-$k$ sparse feature vectors) are static, they are pre-computed and stored on disk. This frees up GPU VRAM during alignment training, requiring only $O(N \cdot k)$ cached storage rather than $O(N \cdot V)$ token logits.

Datasets

  • Initial Instruction Fine-Tuning (SFT): UltraChat-200K, formatted using the Halos unified conversational dataset.
  • Preference Alignment Training: UltraFeedback.
  • Evaluation Benchmarks:
  • AlpacaEval 2: Measures Length-Controlled Win Rate (WR-L) and raw Win Rate (WR) across 805 open-ended instructions.
  • Arena-Hard: 500 complex technical and reasoning problems.
  • MT-Bench: Multi-turn conversational questions across 8 categories.
  • (Evaluator model: GPT-4-Turbo. No new benchmarks were introduced.)

Key Insights and Ideas

  • Feature Space Over Vocabulary Space: Vocabulary logits in large models are massive (e.g., a length-1024 sequence in Gemma-2-2B spans over 260 million matrix elements). SAEs compress these representations down to a few dozen active, semantically meaningful latent features, drastically shrinking the constraint search space.
  • Theoretical Grounding: Under mild assumptions (accurate SAE reconstruction, bounded projection norms, and second-order Taylor approximations), the authors prove that minimizing sparse activation MSE directly tightens the upper bound on forward KL divergence.
  • Late Layers Dominate: Layer ablation indicates that placing the SAE constraint at deeper layers (e.g., layer 25 in Gemma-2-2B) provides better alignment than shallow or middle layers, as deeper representations correlate more directly with final output decisions.
  • Single vs. Multi-layer Regularization: Constraining multiple layers simultaneously actually degraded alignment metrics, confirming that a focused constraint on a single deep layer offers the best balance of stability and performance.

Key Results

  • Win Rate Gains: Tested on Gemma-2-2B, FPO achieved up to an absolute 5.08% improvement in win rate across AlpacaEval-2 and Arena-Hard, alongside a +0.5 margin on MT-Bench compared to baselines (DPO, SimPO, TDPO-1, TDPO-2).
  • Generation Diversity: FPO matched TDPO-2's high generation diversity (entropy of 1.68) while improving training accuracy on UltraFeedback (64.1% vs. 63.4% for SimPO and 59.9% for DPO).
  • Hardware Efficiency: FPO reduced training GPU memory by approximately 17.6% compared to TDPO-2, achieving memory consumption comparable to reference-free methods like SimPO on an NVIDIA H100 GPU.
  • Temperature Robustness: FPO consistently maintained win rates $>50\%$ against baselines across multiple sampling temperatures ($0.2$ to $1.0$).

Limitations and Future Work

  • Diminishing Returns on Larger Models: Improvements were less pronounced on Gemma-2-9B than on the 2B model. The authors hypothesize that because the SAE width was fixed at 16k features, the larger model underwent less thorough feature decomposition, resulting in noisier constraints.
  • Reliance on Pre-trained SAEs: FPO requires a pre-trained sparse autoencoder (such as Gemma Scope) for the targeted backbone model, limiting out-of-the-box applicability to model families lacking open-source SAE weights.
  • Pre-computation Overhead: While offline caching dramatically reduces peak training memory, it introduces an extra pre-processing step to extract and store reference features and margins before alignment can begin.

Summary updated

BibTeX
@inproceedings{yin2025direct,
  author = {Qingyu Yin and Chak Tou Leong and Hongbo Zhang and Minjun Zhu and Hanqi Yan and Qiang Zhang and Yulan He and Wenjie Li and Jun Wang and Yue Zhang and Linyi Yang},
  title = {{Direct Preference Optimization Using Sparse Feature-level Constraints}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=BCKSxOFX85},
}
Figure