Enabling Precise Topic Alignment in Large Language Models Via Sparse Autoencoders

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Joshi, Ananya, Cintas, Celia, Speakman, Skyler
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912455596179456
author Joshi, Ananya
Cintas, Celia
Speakman, Skyler
author_facet Joshi, Ananya
Cintas, Celia
Speakman, Skyler
contents Recent work shows that Sparse Autoencoders (SAE) applied to large language model (LLM) layers have neurons corresponding to interpretable concepts. These SAE neurons can be modified to align generated outputs, but only towards pre-identified topics and with some parameter tuning. Our approach leverages the observational and modification properties of SAEs to enable alignment for any topic. This method 1) scores each SAE neuron by its semantic similarity to an alignment text and uses them to 2) modify SAE-layer-level outputs by emphasizing topic-aligned neurons. We assess the alignment capabilities of this approach on diverse public topic datasets including Amazon reviews, Medicine, and Sycophancy, across the currently available open-source LLMs and SAE pairs (GPT2 and Gemma) with multiple SAEs configurations. Experiments aligning to medical prompts reveal several benefits over fine-tuning, including increased average language acceptability (0.25 vs. 0.5), reduced training time across multiple alignment topics (333.6s vs. 62s), and acceptable inference time for many applications (+0.00092s/token). Our open-source code is available at github.com/IBM/sae-steering.
format Preprint
id arxiv_https___arxiv_org_abs_2506_12576
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Enabling Precise Topic Alignment in Large Language Models Via Sparse Autoencoders
Joshi, Ananya
Cintas, Celia
Speakman, Skyler
Computation and Language
Artificial Intelligence
Recent work shows that Sparse Autoencoders (SAE) applied to large language model (LLM) layers have neurons corresponding to interpretable concepts. These SAE neurons can be modified to align generated outputs, but only towards pre-identified topics and with some parameter tuning. Our approach leverages the observational and modification properties of SAEs to enable alignment for any topic. This method 1) scores each SAE neuron by its semantic similarity to an alignment text and uses them to 2) modify SAE-layer-level outputs by emphasizing topic-aligned neurons. We assess the alignment capabilities of this approach on diverse public topic datasets including Amazon reviews, Medicine, and Sycophancy, across the currently available open-source LLMs and SAE pairs (GPT2 and Gemma) with multiple SAEs configurations. Experiments aligning to medical prompts reveal several benefits over fine-tuning, including increased average language acceptability (0.25 vs. 0.5), reduced training time across multiple alignment topics (333.6s vs. 62s), and acceptable inference time for many applications (+0.00092s/token). Our open-source code is available at github.com/IBM/sae-steering.
title Enabling Precise Topic Alignment in Large Language Models Via Sparse Autoencoders
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2506.12576