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

长寿角色,局部推理:游戏NPC的增量记忆维护

Long-Lived Characters, Local Inference: Incremental Memory Maintenance for Game NPCs

  • University of Bern(伯尔尼大学)

机构由 AI 辅助整理,请以论文原文为准。

Zimu Xu

AI总结:

针对游戏NPC对话中记忆更新导致前缀失效的问题,提出增量维护方法,保留循环状态和KV,实验证明能有效保持语义正确性,强调推理状态为需维护的历史依赖资源。

AI中文摘要:

游戏角色不应在每次对话前重读其整个生命历程。然而,对于本地部署的语言模型角色,修改少量记忆可能会使长可复用前缀失效。由此产生的准备成本与前台对话及其他角色的维护相竞争。当对话触发游戏定义的动作和价值判断时,这一点尤为重要:对物品归属或转移是否已发生的流畅但不准确的描述,可能污染原本确定性规则的输入。我们研究在量化Qwen混合循环注意力模型中,对长寿游戏NPC进行增量记忆维护。我们的运行时移除被取代的注意力KV条目,在真实序列尾部计算替换记录,并保留持续的循环状态和未改变的KV。现有局部实验结合了多更新对话重放、固定输入放置消融和注意力诊断。独立的块组合削弱了查询条件记忆选择,而缺乏统一的块初始注意力坍缩。真实尾部更新在八个脚本化维护轮次中保留了重要的当前状态和历史绑定;一个放置案例在三次重建中恢复了完整刷新量,而保留槽位的替代方案重复了双重减法错误。注意力分布接近性本身并不能解释这些语义差异。结果促使将角色的推理状态视为一个维护的、历史依赖的资源,而不仅仅是其最新记忆文本的可丢弃编码。

英文摘要:

A game character should not have to reread its entire life before every conversation. For locally deployed language-model characters, however, revising a few memories can invalidate a long reusable prefix. The resulting preparation cost competes with both foreground dialogue and the maintenance of other characters. This matters especially when dialogue feeds game-defined actions and value judgments: a fluent but incorrect account of who owns an item, or whether a transfer has already happened, can corrupt the input to otherwise deterministic rules. We study incremental memory maintenance for long-lived game NPCs in a quantized Qwen hybrid recurrent-attention model. Our runtime removes superseded attention KV entries, computes replacement records at the true sequence tail, and preserves the continuing recurrent state and unchanged KV. Existing local experiments combine multi-update dialogue replays, fixed-input placement ablations, and attention diagnostics. Independent block composition weakens query-conditioned memory selection without a uniform chunk-initial attention collapse. True-tail updates preserve important current-state and historical bindings across eight scripted maintenance rounds; a placement case recovers the full-refill quantity in three reconstructions, while slot-preserving alternatives repeat a double-subtraction error. Attention-distribution proximity alone does not explain these semantic differences. The results motivate treating a character's inference state as a maintained, history-dependent resource, rather than only a disposable encoding of its latest memory text.

补充信息

↑