Low-Rank Adapting Models for Sparse Autoencoders

Matthew Chen, Joshua Engels, Max Tegmark

Introduction

Mechanistic Interpretability (MI) seeks to demystify the internal computations of Large Language Models (LLMs) by decomposing dense activation patterns into sparse, human-understandable features. Sparse Autoencoders (SAEs) have emerged as a primary tool for this decomposition. However, implementing SAEs often incurs a significant "performance tax": when a model's original activations are replaced by sparse reconstructions from an SAE, the model's predictive accuracy—typically measured by cross-entropy loss—degrades substantially.

While researchers have traditionally attempted to mitigate this by training more complex "end-to-end" (e2e) SAEs, these methods are computationally intensive and require extensive backward passes through the entire model. This paper proposes a paradigm shift: instead of refining the SAE to fit the model, we can use Low-Rank Adaptation (LoRA) to fine-tune the model to accommodate a frozen, pre-trained SAE.

Methodology: The LoRA-SAE Approach

The proposed method, LoRA-SAE, involves freezing a standard, pre-trained SAE (such as a TopK SAE) and inserting it into a specific layer of the LLM. Rather than modifying the SAE to reduce reconstruction error, the researchers apply LoRA to the Multi-Layer Perceptron (MLP) and attention weights in the layers immediately following the SAE insertion point.

Training Objective

The adaptation process is guided by a simple objective: minimizing the Kullback–Leibler (KL) divergence between the original model's output distribution and the output of the model containing the SAE. This effectively teaches the subsequent layers of the model how to "read" and compensate for the slight noise or reconstruction errors introduced by the SAE. Because LoRA only updates a small fraction of the total parameters, the adaptation is highly efficient.

Experimental Setup

The researchers evaluated LoRA-SAE across several model families and benchmarks to ensure robustness:

  • Models: Gemma-2 (2B, 9B, and 27B), Llama-3.2-1B, and Llama-3.1-8B.
  • Data: Training was conducted using 15 million tokens from The Pile and RedPajama.
  • Evaluation: Performance was measured using SAEBench (for interpretability metrics like feature absorption) and general capability benchmarks including MMLU, HellaSwag, and TruthfulQA.

Key Insights and Results

1. Performance and Efficiency

LoRA-SAE significantly improves the Pareto frontier between feature sparsity and model performance. The method closed the cross-entropy loss gap—the performance difference between the original model and the SAE-augmented version—by 30% to 55%.

In terms of computational cost, LoRA-SAE is approximately 3× to 20× faster than training end-to-end SAEs to reach comparable loss levels. On Gemma-2-2B, the method achieved these results with 130× fewer backward passes than e2e methods. The authors estimate the process is roughly 10 million times faster than training a model from scratch.

2. Locality of Adaptation

An important discovery was that the majority of performance recovery occurs when adapting only the single layer immediately following the SAE. This suggests that the "damage" caused by SAE reconstruction is localized and can be corrected by minor shifts in the weights of the succeeding layer.

3. Enhanced Interpretability and Steering

Beyond performance recovery, LoRA-SAE improves the utility of SAEs for mechanistic interpretability:

  • Feature Steering: In tests where specific features (e.g., "Machine Learning") were manually boosted, LoRA-adapted models proved more responsive to interventions without causing the "collateral damage" to unrelated outputs often seen in unadapted models.
  • Circuit Analysis: By allowing the model to maintain performance even with multiple SAEs inserted, LoRA-SAE facilitates complex circuit analysis—tracking how features in early layers interact with those in much later layers.
  • Capability Preservation: Surprisingly, LoRA-adapted models often maintained or even slightly improved their scores on benchmarks like MMLU compared to the original base models.

Discussion and Limitations

While LoRA-SAE offers a powerful tool for researchers, it introduces a philosophical question: by modifying the model's weights, are we still interpreting the original model? The authors argue that because the LoRA shift is minimal and preserves the model's fundamental behavior, the resulting insights remain faithful to the original architecture's logic. However, for researchers requiring strict post-hoc analysis of untouched weights, traditional SAE methods may still be preferred.

Additionally, while the method showed exceptional results on Gemma models, e2e SAEs still achieved a lower final loss on Llama-3.2-1B, albeit at a much higher computational cost. Future research may explore combining LoRA-SAE with alternative architectures like Gated or JumpReLU SAEs to further bridge this gap.

Summary updated

BibTeX
@inproceedings{chen2025low,
  author = {Matthew Chen and Joshua Engels and Max Tegmark},
  title = {{Low-Rank Adapting Models for Sparse Autoencoders}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=lDPtsCYTwr},
}
Figure