Interpret and Control Dense Retrieval with Sparse Latent Features
Hao Kang, Tevin Wang, Chenyan Xiong
TL;DR
Dense retrieval embeddings provide strong performance but lack interpretability and controllability. The authors propose a k-sparse autoencoder trained with a retrieval-oriented loss that combines reconstruction with a KL-divergence objective to preserve query–document relevance, producing sparse latent features that are faithful for retrieval. Interpretability is obtained via Neuron-to-Graph analysis, revealing meaningful concepts in the latent space, while controllability is demonstrated by amplifying latent features to steer retrieval toward specific perspectives. Empirically, both the sparse latents and their reconstructed embeddings retain near the original retrieval accuracy on MsMarco and BeIR, and controlled experiments show that targeted feature amplification can bias results, offering a transparent mechanism to adjust dense retrieval systems. The approach enables interpretable and controllable dense retrieval with publicly available code for broader adoption.
Abstract
Dense embeddings deliver strong retrieval performance but often lack interpretability and controllability. This paper introduces a novel approach using sparse autoencoders (SAE) to interpret and control dense embeddings via the learned latent sparse features. Our key contribution is the development of a retrieval-oriented contrastive loss, which ensures the sparse latent features remain effective for retrieval tasks and thus meaningful to interpret. Experimental results demonstrate that both the learned latent sparse features and their reconstructed embeddings retain nearly the same retrieval accuracy as the original dense vectors, affirming their faithfulness. Our further examination of the sparse latent space reveals interesting features underlying the dense embeddings and we can control the retrieval behaviors via manipulating the latent sparse features, for example, prioritizing documents from specific perspectives in the retrieval results.
