通过潜空间键值缓存操控,实现大模型高效精准的推理引导。
Memory Inception: Latent-Space KV Cache Manipulation for Steering LLMs

- 在选定层注入文本生成的键值银行,以潜空间方式控制模型行为。
- 在12个评测场景中表现优于提示和激活调控方法,最高节省118倍缓存。
- 适合需要持续、结构化或高成本保留引导信息的场景使用。
大语言模型的引导通常通过指令提示或激活调控实现。提示法控制力强,但会将引导内容缓存在每一层,导致长对话冗余;激活调控紧凑但效果弱,且不支持大型结构化提醒。本文提出无需训练的内存内生(MI)方法,通过仅在特定层插入文本衍生的键值(KV)库,在潜空间中进行引导。与全量缓存不同,MI将引导视为选择性键值分配,仅在模型路由到的位置注入潜空间槽位。在人格引导任务中,MI在漂移与控制之间取得最佳平衡,整体性能优于激活调控,与提示法相当;在可更新引导任务中,可在对话中途实现行为切换而不修改可见文本,在Qwen3上达到最高后置对齐度;在结构化推理任务中,于HARDMath和PHYSICS数据集上表现超越可见提示,在10/12个子任务中胜出,同时相比匹配内容的缓存存储减少最多118倍。结果表明,当引导需持久、结构化或不可见时,MI是强大有效的引导方法。
原文摘要 · Abstract (English)
Steering large language models (LLMs) is usually done by either instruction prompting or activation steering. Prompting often gives strong control, but caches guidance tokens at every layer and can clutter long interactions; activation steering is compact but typically weaker and does not support large structured reminders. We introduce memory inception (MI), a training-free method that steers in latent attention space by inserting text-derived key-value (KV) banks only at selected layers. Rather than materializing reminder content throughout the prompt cache, MI treats steering as selective KV allocation, injecting latent slots only where the model routes to them. On matched personality-steering tasks, MI gives the best overall control--drift trade-off, remaining competitive with prompting while consistently outperforming CAA. On updateable guidance, MI supports mid-conversation behavior shifts without rewriting the visible transcript, achieving the highest post-shift alignment on Qwen3. On structured reasoning, MI outperforms visible prompting on HARDMath and PHYSICS (10/12 subject$\times$mode cells), serving as proxies for structured reasoning in verifiable domains, while cutting content-matched KV storage by up to 118$\times$. These results position MI as a powerful steering method when guidance is persistent, structured, or expensive to keep in the visible transcript.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。