SparseRM: A Lightweight Preference Modeling with Sparse Autoencoder

Dengcan Liu, Jiahao Li, Zheren Fu, Yi Tu, Jiajun Li, Zhendong Mao, Yongdong Zhang

TL;DR

This paper introduces SparseRM, a novel and lightweight approach for training reward models (RMs) for large language models (LLMs). By leveraging Sparse Autoencoders (SAEs) to extract interpretable preference features from LLM representations, SparseRM significantly reduces computational costs and parameter requirements while achieving competitive or superior performance compared to existing methods, making LLM alignment more accessible.

What Problem Does This Paper Address?

Aligning large language models (LLMs) with human preferences is crucial for their safe and effective deployment in real-world applications. This alignment process typically relies on training reward models (RMs) that act as proxies for human evaluation. However, training these RMs is challenging due to the need for extensive, human-annotated preference data and the high computational cost associated with fine-tuning large LLMs. This creates a bottleneck, especially in resource-constrained environments. The paper addresses this by proposing a method to build efficient and effective RMs that don't require extensive LLM fine-tuning.

Methods

The core of SparseRM lies in its innovative use of Sparse Autoencoders (SAEs). The process involves three main steps:

  1. Identify Preference-Relevant Directions: An SAE is used to decompose LLM representations into sparse latent variables. By analyzing the activation frequencies of these latents on positive and negative preference samples, the authors identify "interpretable directions" that capture preference-specific features.
  2. Compute Projection Vectors: For each input (e.g., a response from an LLM), its representation is projected onto these identified preference-relevant directions. This results in a "projection vector" that quantifies how strongly the representation aligns with each preference feature.
  3. Preference Modeling: A lightweight, single-layer reward head is trained on these projection vectors to predict preference scores. This approach replaces the computationally expensive fine-tuning of the entire LLM with training a small, dedicated reward head.

This method contrasts with traditional RMs that often fine-tune the entire LLM or rely on dense representations. SparseRM also integrates seamlessly into the Online Iterative Alignment Framework, using its learned RM to filter generated responses before further alignment training.

Datasets

The paper evaluates SparseRM on three benchmark datasets:

  • TruthfulQA: Used to evaluate truthfulness.
  • SafeRLHF: Used to evaluate safety.
  • Red-Teaming datasets: Used for adversarial testing of safety.

The authors also mention using data generated by the policy model itself during the alignment process, highlighting the framework's ability to handle distributional shifts.

Key Insights and Ideas

  • Interpretable Features are Key: The paper strongly suggests that LLM internal representations contain highly interpretable features that directly correlate with human preferences. By extracting these features using SAEs, SparseRM bypasses the need for extensive fine-tuning.
  • Lightweight is Powerful: SparseRM demonstrates that a simple, single-layer reward head operating on carefully extracted sparse features can outperform much larger, traditional RMs. This highlights the efficiency gains possible by focusing on the right kind of information.
  • Generalization is Crucial: SparseRM shows robust performance even when tested on data generated by the policy model, which differs from the supervised training data. This suggests that the extracted preference features are fundamental and not overfitted to specific training examples.
  • Margin Loss Advantage: The paper empirically shows that using a margin loss function for training is more effective for preference modeling than binary cross-entropy or Bradley-Terry loss, aligning better with the nature of human pairwise comparisons.

Key Results

  • Superior RM Accuracy: SparseRM achieved the highest RM accuracy on the TruthfulQA dataset and outperformed most baselines on SafeRLHF and Red-Teaming, using Gemma-2-9B-it as a backbone.
  • Parameter Efficiency: SparseRM uses less than 1% of the trainable parameters compared to mainstream RMs, significantly reducing computational and memory costs. For instance, it uses a 256-dimensional preference-aware vector and a single-layer reward head.
  • Effective Alignment: When integrated into the Online Iterative Alignment Framework, SparseRM consistently matched or surpassed prior methods, demonstrating its effectiveness in realistic alignment scenarios.
  • Robustness to Distributional Shift: SparseRM showed stronger generalization to out-of-distribution samples compared to methods using dense representations, leading to better alignment performance.

Limitations and Future Work

  • Layer Selection: While the paper identifies optimal layers for SAE extraction on specific models (e.g., 13th layer for Gemma-2-2B-it, 31st for Gemma-2-9B-it), the optimal layer might vary across different LLMs and tasks.
  • SAE Generalization: The paper notes that while Gemma-Scope provides SAEs for Gemma models, similar SAEs for instruction-tuned versions of other models might not be readily available, requiring further research into SAE development for diverse LLM architectures.
  • Future Work: The authors suggest further investigation into the underlying causes of performance differences between SparseRM and DenseRM, particularly concerning how SAEs handle distributional shifts. They also propose exploring the interpretability of SparseRM more deeply, as demonstrated by the semantic explanations of top latents for TruthfulQA.

Summary updated

BibTeX
@inproceedings{liu2026sparserm,
  author = {Dengcan Liu and Jiahao Li and Zheren Fu and Yi Tu and Jiajun Li and Zhendong Mao and Yongdong Zhang},
  title = {{SparseRM: A Lightweight Preference Modeling with Sparse Autoencoder}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i38.40476},
}
Figure