GainCtrl:用轻量预测器控制 LLM 智能体的执行时机
GainCtrl: Predicting Remaining Gains for Efficient LLM Agent Execution
做智能体的朋友可以看看这篇:GainCtrl 用 CPU 上的毫秒级预测器判断某次尝试还值不值得继续跑,3 个环境实测在同等质量下省 token。不用碰模型内部,外挂就能用,适合 token 账单压力大的人。
arXiv 论文提出 GainCtrl,一个基于收益预测的执行控制器,用于解决工具调用型智能体反复尝试时成本持续增加的问题。核心是一个运行在 CPU 上的轻量预测器,利用交互历史估计相对已保留分数的预期正收益,再通过校准阈值决定是否提前停止某次尝试,以在降低执行成本的同时保留 Best-of-N 任务质量。
评估采用轨迹回放方式,覆盖 3 个环境和 3 个 LLM actor,通过插值后的质量-成本帕累托前沿对比显示:在匹配目标质量时 GainCtrl 通常比基线消耗更少 token;固定策略也能在接近全量执行质量的同时大幅减少 token 消耗。预测器在单 CPU 线程上达到毫秒级延迟,无需访问 LLM 内部结构即可支持高频监控。
对依赖多轮工具调用的智能体开发者来说,这类外挂式停止控制器提供了不改动模型本身就能压缩推理成本的路径,与依赖模型内部信号的方法相比部署门槛更低。
GainCtrl: Predicting Remaining Gains for Efficient LLM Agent Execution
Large language models (LLMs) are widely used to power agents that interact with tools and environments to solve complex tasks. Repeated attempts improve the quality of tool-using agents, but continued execution incurs additional costs even when it is unlikely to improve the best result ultimately returned. This raises the question of when to stop an attempt to reduce execution cost while preserving task-level Best-of-N quality. To address this question, we introduce GainCtrl, a gain-based execution controller for LLMs. In GainCtrl, a lightweight CPU predictor uses interaction histories to estimate expected positive gains over retained scores, which are then used to guide stopping decisions with calibrated thresholds to limit the loss in mean Best-of-N task quality. We evaluate the controller through trajectory replay across three environments and three LLM actors. Comparisons of interpolated quality-cost Pareto frontiers show that GainCtrl generally uses fewer tokens than baselines at matched target quality. Fixed policies also achieve quality close to that of full execution while substantially reducing token consumption. The predictor runs at millisecond latency on a single CPU thread, supporting repeated monitoring without access to LLM internals.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include GainCtrl, agents, Best-of-N, inference cost.
Source attribution: curated from arXiv cs.AI (@Kangwen Zhao, Jianfeng Cai, Ruopei Sun, Mingxiao Feng, Peng Zhang, Wengang Zhou, Houqiang Li).