arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.11367cs.LGcs.AIcs.CL
收藏

稀疏自编码器特征用于分类和可迁移性

Sparse Autoencoder Features for Classifications and Transferability

Harvard University(哈佛大学);Mass General Brigham(麻省总医院);Boston Children’s Hospital(波士顿儿童医院);Johns Hopkins University(约翰霍普金斯大学);Maastricht University(马斯特里赫特大学);University of Virginia(弗吉尼亚大学)

Jack Gallifant, Shan Chen, Kuleen Sasse, Hugo Aerts, Thomas Hartvigsen, Danielle S. Bitterman

AI总结:

本文提出利用稀疏自编码器提取LLM特征,通过优化架构和二进制化策略提升分类性能和跨模型迁移能力。

摘要:

稀疏自编码器(SAEs)为在大语言模型(LLMs)中揭示结构化、可被人类理解的表示提供了潜力,使其成为透明和可控的AI系统的关键工具。我们系统地分析了SAE在安全关键分类任务中用于可解释性特征提取。我们的框架评估了(1)模型层选择和缩放特性,(2)SAE架构配置,包括宽度和池化策略,以及(3)将连续SAE激活转换为二进制的影响。SAE衍生的特征在宏F1>0.8的情况下优于隐藏状态和BoW基线,同时在从Gemma 2 2B到9B-IT模型的跨模型迁移中表现出色。这些特征以零样本方式泛化到跨语言毒性检测和视觉分类任务。我们的分析突显了池化策略和二进制化阈值的重要性,表明二进制化提供了传统特征选择的高效替代方案,同时保持或提高了性能。这些发现建立了基于SAE的可解释性新最佳实践,并使LLMs在现实应用中的可扩展、透明部署成为可能。完整仓库:https://github.com/shan23chen/MOSAIC。

英文摘要:

Sparse Autoencoders (SAEs) provide potentials for uncovering structured, human-interpretable representations in Large Language Models (LLMs), making them a crucial tool for transparent and controllable AI systems. We systematically analyze SAE for interpretable feature extraction from LLMs in safety-critical classification tasks. Our framework evaluates (1) model-layer selection and scaling properties, (2) SAE architectural configurations, including width and pooling strategies, and (3) the effect of binarizing continuous SAE activations. SAE-derived features achieve macro F1 > 0.8, outperforming hidden-state and BoW baselines while demonstrating cross-model transfer from Gemma 2 2B to 9B-IT models. These features generalize in a zero-shot manner to cross-lingual toxicity detection and visual classification tasks. Our analysis highlights the significant impact of pooling strategies and binarization thresholds, showing that binarization offers an efficient alternative to traditional feature selection while maintaining or improving performance. These findings establish new best practices for SAE-based interpretability and enable scalable, transparent deployment of LLMs in real-world applications. Full repo: https://github.com/shan23chen/MOSAIC.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑