arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.24927cs.CLcs.AIcs.LG
收藏

通过潜在蒸馏探索大语言模型

Large Language Models Explore by Latent Distilling

State Key Laboratory of General Artificial Intelligence, BIGAI, Beijing, China(人工智能通用基础理论国家重点实验室,BIGAI,北京,中国);School of Information Science and Technology, ShanghaiTech University, Shanghai, China(信息科学与技术学院,上海交通大学,上海,中国)

Yuanhao Zeng, Ao Lu, Lufei Li, Zheng Zhang, Yexin Li, Kan Ren

AI总结:

本文提出Exploratory Sampling方法,通过蒸馏模型引导生成过程,提升语义多样性与推理效率,在数学、科学和代码生成中表现优异。

摘要:

生成多样化的响应对大语言模型(LLM)的测试时间扩展至关重要,但标准随机采样通常仅产生表层词汇变化,限制了语义探索。本文提出Exploratory Sampling(ESamp),一种在生成过程中显式鼓励语义多样性的解码方法。ESamp受神经网络在相似输入上产生较低误差、在新输入上产生较高误差的观察启发。基于此特性,我们训练了一个轻量级的蒸馏器,在测试时从LLM的浅层表示预测深层隐藏表示,以建模LLM的深度表示转换。在解码过程中,蒸馏器持续适应当前生成上下文诱导的映射。ESamp利用预测误差作为新颖性信号,重新加权候选令牌扩展,从而引导解码向未探索的语义模式倾斜。ESamp采用异步训练-推理流水线,最坏情况下的开销低于5%(优化版为1.2%)。实验结果表明,ESamp显著提升了推理模型的Pass@k效率,在强随机和启发式基线中表现优异或相当。值得注意的是,ESamp在数学、科学和代码生成基准上实现了稳健的泛化,并在创造性写作中打破了多样性和连贯性的权衡。我们的代码已发布在:https://github.com/LinesHogan/tLLM。

英文摘要:

Generating diverse responses is crucial for test-time scaling of large language models (LLMs), yet standard stochastic sampling mostly yields surface-level lexical variation, limiting semantic exploration. In this paper, we propose Exploratory Sampling (ESamp), a decoding approach that explicitly encourages semantic diversity during generation. ESamp is motivated by the well-known observation that neural networks tend to make lower-error predictions on inputs similar to those encountered before, and incur higher prediction error on novel ones. Building on this property, we train a lightweight Distiller at test time to predict deep-layer hidden representations of the LLM from its shallow-layer representations to model the LLM's depth-wise representation transitions. During decoding, the Distiller continuously adapts to the mappings induced by the current generation context. ESamp uses the prediction error as a novelty signal to reweight candidate token extensions conditioned on the current prefix, thereby biasing decoding toward less-explored semantic patterns. ESamp is implemented with an asynchronous training--inference pipeline, with less than 5% worst case overhead (1.2% in the optimized release). Empirical results show that ESamp significantly boosts the Pass@k efficiency of reasoning models, showing superior or comparable performance to strong stochastic and heuristic baselines. Notably, ESamp achieves robust generalization across mathematics, science, and code generation benchmarks and breaks the trade-off between diversity and coherence in creative writing. Our code has released at: https://github.com/LinesHogan/tLLM.

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

↑