Sparse Latents Steer Retrieval-Augmented Generation
Chunlei Xin, Shuheng Zhou, Huijia Zhu, Weiqiang Wang, Xuanang Chen, Xinyan Guan, Yaojie Lu, Hongyu Lin
Abstract
Understanding the mechanisms underlying Large Language Model (LLM) behavior in Retrieval-Augmented Generation (RAG) systems is critical for enhancing reliability. In this paper, we leverage Sparse Autoencoders (SAEs) within the LLaMA Scope to uncover sparse, interpretable latents that govern RAG behaviors. Through systematic analysis of SAE activations, we identify specific latents associated with two fundamental RAG decisions: (1) context versus memory prioritization, and (2) response generation versus query rejection. Intervention experiments demonstrate that these latents enable precise control over model behavior and maintain generalizability across various experimental settings. Mechanistic analysis reveals that manipulating these latents influences model behavior by reconfiguring attention patterns of retrieval heads. Our findings establish SAEs as a principled tool for understanding and controlling RAG behaviors, demonstrating capabilities in precise behavior steering without architectural modifications.
BibTeX
@inproceedings{xin-etal-2025-sparse,
title = "Sparse Latents Steer Retrieval-Augmented Generation",
author = "Xin, Chunlei and
Zhou, Shuheng and
Zhu, Huijia and
Wang, Weiqiang and
Chen, Xuanang and
Guan, Xinyan and
Lu, Yaojie and
Lin, Hongyu and
Han, Xianpei and
Sun, Le",
editor = "Che, Wanxiang and
Nabende, Joyce and
Shutova, Ekaterina and
Pilehvar, Mohammad Taher",
booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2025",
address = "Vienna, Austria",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.acl-long.228/",
doi = "10.18653/v1/2025.acl-long.228",
pages = "4547--4562",
ISBN = "979-8-89176-251-0"
}