量化如何改变可解释特征:语言模型的稀疏自编码器分析
Perplexity Can Miss SAE Feature Damage Under Quantization
AI总结:
通过稀疏自编码器分析,发现量化导致语言模型中的可解释特征逐渐退化,且任务指标无法完全反映这种损伤,量化与幅度剪枝共享相似的损伤模式。
摘要:
量化是部署大型语言模型的标准途径,通常当量化模型的困惑度或下游精度接近全精度原始模型时,即认为其可接受。但模型是否仍以相同方式计算,或全精度模型中识别的可解释特征是否在权重舍入后存活,很少被测试,即使安全审计和引导干预越来越依赖这些特征。我们探究从稠密全精度模型中提取的稀疏自编码器(SAE)特征在模型量化后是否仍然忠实。使用冻结的SAE作为固定测量基础,我们在相同令牌上编码全精度和最近舍入(RTN)量化激活,并通过皮尔逊相关系数量化每个特征的存活率,在Pythia-70M和Gemma-2-2B上扫描从INT8到INT4的位宽。我们发现特征存活是分级的:特征系统地退化而非一次性全部失效,在Pythia-70M上INT6时62.4%的活跃特征存活,在Gemma-2-2B上INT6时51.3%存活,且大多数非存活特征被模糊而非破坏。存活率可仅从全精度统计量预测,交叉验证AUC为0.92至0.97,峰值激活是最强的边际预测因子。关键的是,任务指标可能忽略这种损伤:在Gemma-2-2B上,INT7改善了困惑度却使18.7%的特征退化。最后,量化和匹配困惑度的幅度剪枝损伤高度重叠的特征集,Jaccard重叠为0.79至0.86,损伤分数斯皮尔曼相关性为0.98,表明存在共享的压缩诱导脆弱性模式。这些结果表明,行为等价不足以证明可解释性发现可迁移到量化部署,从而激励对压缩进行特征级审计。
英文摘要:
Quantization is a standard path to deploying large language models, and quantized models are typically judged acceptable when perplexity or downstream accuracy remains close to the full-precision original. But behavioral parity need not imply feature fidelity: the sparse-autoencoder (SAE) features used to interpret a full-precision model may change after weight rounding. We test this directly by using a frozen SAE as a fixed measurement basis, encoding full-precision and round-to-nearest (RTN) quantized activations on identical tokens, and measuring per-feature survival by Pearson correlation across bit-widths from INT8 to INT4 on Pythia-70M and Gemma-2-2B. Our central finding is that perplexity can miss feature damage: on Gemma-2-2B, INT7 improves perplexity while degrading 18.7% of active SAE features, and under sliding-window evaluation INT6 also improves perplexity while only 51.3% of active features survive. Feature survival is graded rather than cliff-like, with 62.4% of active Pythia features and 51.3% of active Gemma features surviving at INT6; most non-surviving features are blurred rather than fully damaged. Survival is also predictable from full-precision feature statistics alone, with cross-validated AUC 0.92--0.97 and peak activation as the strongest marginal predictor. Finally, RTN quantization and matched-perplexity magnitude pruning damage strongly overlapping feature sets, with Jaccard overlap 0.79--0.86 and damage-score Spearman correlation 0.98. These results show that behavioral metrics alone are insufficient evidence that full-precision interpretability findings transfer to quantized models, motivating feature-level audits of compression.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。