Hugging Face Daily Papers论文
冻结 LLM 内部的路由器:从隐藏状态中提取原生技能路由
问题:LLM 智能体依赖技能库扩展能力,但现有方案要么把全部技能元数据塞进上下文(分散注意力、限制库规模),要么用外部检索模型(把选择权移出智能体本身)。方法:作者提出 Gavel,认为冻结的智能体 LLM 前向传播中已携带路由信号,仅用两个线性映射即可读出。第一步 Glance 将任务与各技能的中间层状态投影打分,从预建技能库中初筛;第二步 Verdict 恢复候选技能的前向传播,读取模型自身的似然与 yes/no 判断,与 Glance 分数以专家乘积融合。骨干全程冻结,Qwen3-32B 上仅 7.9M 可训练参数,新技能只需一次前向建立索引。结论:在三个公开基准及新提出的 SkillTraj(372 条模拟轨迹)上,Gavel 零样本迁移,比增加 1.2B–16B 外部参数的渐进披露与检索重排方案最高提升 13.4 分,技能需求出现在轨迹中途时最高提升 21.9 分;路由准确率随骨干增强而提升,32B 模型在 bash 智能体环境中触发正确技能的频率超过 Codex 中更大的前沿模型。
这篇是正式发表的长论文,站内提供中文解读,全文请到原文阅读 PDF。
Abstract
Gavel extracts skill-routing signals from frozen LLM hidden states via lightweight linear projections to select tools without external retrieval or context overload.
Skills extend an LLM agent beyond its parametric knowledge, and the gain they promise rests on picking the right one. Deployed harnesses route by preloading every skill's metadata into the context, which disperses the agent's attention and caps the library size. Retrieval pipelines move the selection out of the context, but also out of the agent's capability. We show that the frozen agent LLM already carries the routing signal in its own forward passes, and that two linear maps suffice to read it out with no skill text in the context. Gavel (Glance And Verdict from a frozen LLM) reads it in two steps. A glance projects the task's and each skill's mid-layer states through the two maps, the only parameters trained, and scores the full library against compact per-skill banks that one forward pass builds at installation. A verdict then resumes the shortlisted skills' forward passes and reads the model's own likelihood and yes/no judgment, fused with the glance as a product of experts. Trained once, Gavel transfers zero-shot to three public benchmarks and SkillTraj, our new benchmark of 372 simulated agent trajectories. On Qwen3-32B it outperforms progressive disclosure and retrieve-and-rerank pipelines that add 1.2B to 16B external parameters, by up to 13.4 points on written tasks and up to 21.9 when the need for a skill arises mid-rollout. Routing accuracy improves as the backbone does, and in a bash-agent harness the same 32B triggers the correct skill on Skill-Use more often than far larger frontier models running in Codex.
⚖️ Gavel: skill routing without a skill catalog in your context.
Hi everyone! I’m Ruishuo, the first author of Gavel. Progressive disclosure lets the agent choose skills by reading their metadata in context. We show that a frozen LLM can instead route through its own hidden states and candidate judgments, without preloading skill metadata into the agent’s context or adding a separate retrieval model.
- 🔍 Glance uses the model’s hidden states to shortlist skills from compact, precomputed skill banks.
- ⚖️ Verdict combines the glance score with the same LLM’s likelihood and yes/no judgments in a product of experts to select the final skill.
- 🧊 The backbone stays frozen. The two projections contain just 7.9M trainable parameters on Qwen3-32B. Each new skill is indexed with one frozen forward pass, with no per-skill training.
We evaluate Gavel on three public benchmarks and introduce SkillTraj, which tests routing when the need for a skill arises amid the noisy context of an agent trajectory.
If you’re building agents with growing skill libraries, we’d love to hear how you handle routing today. Happy to discuss the method, results, and deployment trade-offs!