arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.14519cs.LGcs.CL
收藏

面向大语言模型的查询自适应神经元调控

Query-Adaptive Neuron Steering for LLMs

Northeastern University(东北大学);Washington University in St. Louis(圣路易斯华盛顿大学);Nanjing University of Aeronautics and Astronautics(南京航空航天大学);Tsinghua University(清华大学);Security Capability Center(360安全能力中心);Tencent(腾讯);Beijing University of Posts and Telecommunications(北京邮电大学)

Yanxi Pan, Jingwen Wu, Yan Ma, Xiang Chen, Xinyi Zeng, Xuetong Wang, Yunyan Zhang, Yue Zhang, Yu Tian, Jianfeng Pan, Hongyi Zhou

AI总结:

本研究针对大语言模型推理阶段的查询适配调控问题,提出Q-NeuS框架,通过查询自适应门动态调控神经元,经实验验证可提升模型性能且适用性广泛。

摘要:

在推理阶段有效激发大语言模型(LLMs)的能力仍是一项重要挑战。现有研究通过上下文工程(对用户查询进行调整)或固定调控(直接干预模型计算)来应对这一挑战,但预定义的上下文和固定的干预策略可能无法充分适配单个查询的多样化知识与推理需求,这引出了一个自然问题:能否让LLMs的内部调控具备查询适应性?本研究探究查询诱导的内部激活是否可引导LLMs的自适应调控。初步研究揭示了与主题、层相关的神经元激活模式,表明放大与主题相关的神经元可提升模型性能。基于这些发现,我们提出Q-NeuS,这是一个查询自适应神经元调控框架,可为每个输入动态确定需调控的神经元及其调控幅度。具体而言,Q-NeuS构建了一个紧凑的主题引导候选神经元空间,并采用轻量级查询自适应门生成神经元级别的调控系数。为学习有效的干预策略,我们引入Neu-GRPO,该方法将组相对优化适配为使用多种神经元干预配置的相对性能来训练查询自适应门。基础LLMs在整个训练和推理过程中保持冻结状态,且推理时无需任务或主题标签。在多个LLMs和基准上开展的大量实验表明,Q-NeuS可持续提升模型性能,在不同模型规模间展现出广泛适用性,并具备强大的跨基准迁移能力。

英文摘要:

Effectively eliciting the capabilities of large language models (LLMs) at inference time remains an important challenge. Existing studies address this challenge through context engineering, which shapes user queries, or fixed steering, which directly intervenes in model computation. However, predefined contexts and fixed intervention strategies may not adequately accommodate the diverse knowledge and reasoning requirements of individual queries. This raises a natural question: Can internal steering in LLMs be made query-adaptive? In this work, we investigate whether query-induced internal activations can guide adaptive steering in LLMs. Our pilot studies reveal subject- and layer-dependent neuron activation patterns and show that amplifying subject-relevant neurons can improve model performance. Based on these findings, we propose Q-NeuS, a query-adaptive neuron steering framework that dynamically determines which neurons to modulate and by how much for each input. Specifically, Q-NeuS constructs a compact subject-guided candidate neuron space and employs a lightweight Query-Adaptive Gate to generate neuron-wise modulation coefficients. To learn effective intervention strategies, we introduce Neu-GRPO, which adapts group-relative optimization to train the Query-Adaptive Gate using the relative performance of multiple neuron intervention configurations. The base LLM remains frozen throughout training and inference, and no task or subject labels are required at inference time. Extensive experiments across multiple LLMs and benchmarks demonstrate that Q-NeuS consistently improves model performance and exhibits broad applicability across model scales and strong cross-benchmark transferability.

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

↑