Qin Lin
Author directory2026
Know What You should not Know: Dynamic Attention Gating for Knowledge-Bounded Role-Playing
Zongsheng Wang | Bowen Wu | Qun yu | Dengzhengwei | Qin Lin | Xu Chen | Baoxun Wang
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Zongsheng Wang | Bowen Wu | Qun yu | Dengzhengwei | Qin Lin | Xu Chen | Baoxun Wang
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Role-playing conversational agents (RPCAs) built on large language models often leak out-of-boundary knowledge: when asked about topics outside a character’s limits, the model’s Chain-of-Thought reasoning reveals knowledge that the character should not possess, undermining immersion. To locate the source of this leakage, we conduct heuristic experiments at three levels of granularity, and find that intervening on individual Feed-Forward Network (FFN) neurons yields the strongest and most effective suppression. Motivated by this finding, we propose the Dynamic Attention Gating (DAG) Router, a lightweight trainable network that encodes the system prompt and dynamically generates per-layer FFN gating signals at inference time. Evaluated on multiple models and benchmarks, the DAG Router improves out-of-boundary scores by up to +162% compared with the original baseline, along with better overall role-playing quality.