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

Abstract

The alignment of large language models (LLMs) with human preferences remains a key challenge. While post-training techniques like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO) have achieved notable success, they often introduce computational inefficiencies and training instability. In this paper, we propose Feature-level constrained Preference Optimization (FPO), a novel method designed to simplify the alignment process while ensuring stability. FPO leverages pre-trained Sparse Autoencoders (SAEs) and introduces feature-level constraints, allowing for efficient, sparsity-enforced alignment. Our approach enjoys efficiency by using sparse features activated in a well-trained sparse autoencoder and the quality of sequential KL divergence by using the feature-level offline reference. Experimental results on benchmark datasets demonstrate that FPO achieves a 5.08% absolute improvement in win rate with much lower computational cost compared to state-of-the-art baselines, making it a promising solution for efficient and controllable LLM alignments.

Introduction

Aligning Large Language Models (LLMs) with human preferences is critical for safety and utility. Current state-of-the-art methods like Direct Preference Optimization (DPO) and its variants face a "trilemma" of efficiency, stability, and controllability. Standard DPO requires a live reference model, doubling memory requirements. Reference-free methods like SimPO improve efficiency but suffer from instability. Token-level constraints, such as Token-level DPO (TDPO), offer stability but are computationally expensive due to the large vocabulary sizes of modern models.

Feature-level constrained Preference Optimization (FPO)

We introduce Feature-level constrained Preference Optimization (FPO), which shifts constraints from the high-dimensional token level to a sparse feature level. By leveraging Sparse Autoencoders (SAEs), we decompose dense hidden states into interpretable, sparse features.

Comparison of preference optimization methods and the two-phase FPO workflow involving offline caching and training.

FPO operates in two phases:

  1. Offline Caching: Reference features and log-probabilities are pre-calculated and stored.
  2. FPO Training: The model is trained using a feature-level Mean Squared Error (MSE) constraint against the cached reference, eliminating the need for a live reference model during training. This approach maintains the low memory usage of reference-free methods while providing the stability of reference-based ones.

Theoretical Insights: Sparsity and Stability

A key insight of this work is that internal model representations are highly sparse. As shown in the feature activation distribution, only a small subset of features is active for any given input.

Distribution of feature activation values, highlighting the inherent sparsity of concepts within the model.

We demonstrate that constraining these dominant sparse features via MSE serves as a mathematically sound proxy for token-level KL divergence. This allows for stable alignment without the overhead of calculating probabilities across the entire vocabulary. Furthermore, the monosemantic nature of SAE features enables precise "surgical" control over specific model behaviors, such as language output or formatting styles, by targeting relevant features during alignment.

Experimental Results

FPO was evaluated on the Gemma-2-2B and 9B models using benchmarks like AlpacaEval-2 and Arena-Hard.

  • Performance: FPO achieved a 5.08% absolute improvement in win rate over DPO and SimPO on the 2B model.
  • Efficiency: The method reduced computational overhead by 17.6% compared to TDPO2, the leading token-level constraint method.
  • Controllability: Targeted experiments showed that FPO can precisely suppress or enhance specific behaviors (e.g., reducing French output from 80% to 3%) by adjusting constraints on relevant features.

Conclusion

FPO addresses the alignment trilemma by providing a memory-efficient, stable, and controllable framework. By utilizing sparse feature-level constraints and offline caching, it outperforms existing baselines while significantly reducing computational costs. Future work will explore scaling FPO to larger models and improving SAE quality to capture more nuanced behaviors.

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