跳到正文
arXiv cs.AI· Rishikesh Mallagundla, Pranav Patel·· 2 小时前AI 评分36

在 prefill 阶段训练、decode 阶段监控:用稀疏自编码器实现主题监控

Train on prefill, monitor at decode: Using sparse autoencoders for topic monitoring

AI 导读

arXiv 论文提出 TopicScope 框架,用 SAE 特征训练因果主题分类器,为生成中每个 token 分配主题,标签可在响应中途变化。在 Gemma-3 1B 和 4B 上,基于 prefill 隐状态特征训练的监控器可泛化到 decoding,七话题、三种检测器架构下扰动最多损失 5 macro-F1 点,且去掉 SAE 后需数倍大小的分类器才能达到同等性能。

正文 · 原文

View PDF HTML (experimental)

Abstract:Topic monitoring is the task of labelling the topic of each token in a model's response during generation. Activation-based monitors that run at generation time have so far been trained to detect harmful content and are limited to two or three classes. We introduce TopicScope, a framework for training causal topic classifiers on SAE features that assign a topic to every token, so that the label can change partway through a response. We train three detector architectures on synthetic multi-topic conversations covering seven topics. Across Gemma-3 1B and 4B, monitors trained on features extracted from prefill hidden states were able to generalise to decoding. We also found that the classifiers are robust to perturbations, losing at most 5 macro-F1 points when off-topic asides are inserted, topics are removed or sections are reordered. Ablations conducted to understand the contribution of the SAE revealed that classifiers reaching baseline performance without it were several times larger. Our findings show that compact topic monitors can be trained inexpensively in prefill and deployed during generation. More broadly, our work shows where SAEs are useful beyond safety classification. Our code, dataset and checkpoints are available at this https URL and this https URL
Comments: 22 pages
Subjects: Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2611.12935 [cs.AI]
  (or arXiv:2611.12935v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2611.12935

arXiv-issued DOI via DataCite

Submission history

From: Rishikesh Mallagundla [view email]
[v1] Fri, 6 Nov 2026 11:33:35 UTC (678 KB)

来源:arXiv cs.AI · arxiv.org