用稀疏编码器分析大模型推理路径,平衡探索与利用提升数学推理准确率。
Towards Interpretable and Inference-Optimal COT Reasoning with Sparse Autoencoder-Guided Generation
- 通过SAE和聚类构建推理轨迹图,量化推理路径的合理性。
- 实验显示平衡探索与利用可显著提升数学推理准确率。
- 适合关注大模型可解释性与推理优化的研究者。
我们提出一种新方法,利用稀疏自编码器(SAE)和聚类技术分析大语言模型(LLMs)在数学推理任务中的内部标记表示,并引导生成过程。首先训练SAE生成训练标记的稀疏向量表示,随后应用k-means聚类构建图结构,顶点代表标记聚类,加权边捕捉序列转移。基于该图定义边权重奖励函数,量化对既定推理轨迹的遵循程度,从而识别出具有剥削性的推理路径。同时,通过聚类评估生成多样性,衡量探索程度。研究发现,在数学推理任务中,平衡剥削与探索至关重要。在生成过程中,SAE可作为可扩展的奖励模型,引导生成过程,实现剥削与探索之间的平衡,避免极端行为,最终促进更高质量的推理流程。
原文摘要 · Abstract (English)
We propose a novel method that leverages sparse autoencoders (SAEs) and clustering techniques to analyze the internal token representations of large language models (LLMs) and guide generations in mathematical reasoning tasks. Our approach first trains an SAE to generate sparse vector representations for training tokens, then applies k-means clustering to construct a graph where vertices represent token clusters and weighted edges capture sequential token transitions. Using this graph, we define an edge-weight based reward function to quantify adherence to established reasoning traces, thereby identifying exploitative reasoning trajectories. Additionally, we measure generation diversity from clustering to assess the extent of exploration. Our findings indicate that balancing both exploitation and exploration is crucial for achieving high accuracy in mathematical reasoning tasks. During generation, the SAE can serve as a scalable reward model to guide generations, ensuring a balanced trade-off between exploitation and exploration. This prevents extreme behaviors in either direction, ultimately fostering a higher-quality reasoning process in LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。