让大模型通过多轮自省逐步控制输出,提升可控性与效率。
Self-controller: Controlling LLMs with Multi-round Step-by-step Self-awareness
- 基于响应状态构建自省机制,实现多轮逐步推理
- 文本长度线性单调,支持二分搜索加速生成
- 兼容上下文缓存技术,显著降低计算开销
大语言模型的应用已广泛渗透各领域,但其基本能力如可控性仍受限。为此,我们提出「Self-controller」,一种将自省意识引入大模型推理逻辑的新型智能体框架。核心思路是基于模型输出维护状态,使模型能够感知当前状态并以多轮思维链方式逐步思考。实验表明,该方法在文本长度控制上具有良好的可控性与有效性。我们进一步基于文本长度的线性与单调性,实现二分搜索以加速生成过程。此外,结合 DeepSeek 的上下文缓存技术,在共享前缀的对话集群中可显著减少计算量。理论上证明,此场景下额外时间复杂度为 $O(c "log n)$。粗略估算显示,本方法的令牌消耗不超过单次生成的两倍。消融实验还验证了其在各类基础模型上对词约束的一致可控性。
原文摘要 · Abstract (English)
The applications of large language models (LLMs) have been widely spread across all domains. However, the basic abilities such as the controllability of LLMs are still limited. To address this, we propose "Self-controller", a novel agentic framework bringing self-awareness into LLMs' reasoning logic. The core idea of this work is to maintain states based on the LLM's response, letting the LLM become self-aware of current status and think step by step in a multi-round chain-of-thought paradigm. Our experiment on the state of textual length has shown the controllability and effectiveness of the Self-controller. We further implement a binary search algorithm to accelerate the generation process based on the linearity and monotonicity of the textual length state. Another advantage of the Self-controller comes with DeepSeek's Context Caching technology, which significantly saves computational token consumption when a cluster of conversations shares the same prefix of context. Theoretically, we prove that in this scenario the extra time complexity is $O(c \log n)$. Results of the back-of-the-envelope estimation suggest that the token consumption of our method is no more than twice as much as that of the trivial single-round generation. Furthermore, our ablation study on word constraints demonstrates the Self-controller's consistent controllability across all foundation models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。