Decoupling Logic from Persona: Structural Immunity of Edge LLM Agents to Context Pollution
Abstract
Edge language-model agents must hold a persona and reason correctly at once, in one context window that fills with history and persona instructions. We study what happens to the logical part of such an agent when that history is long, misleading and persona-heavy (persona-logic interference), and present a Decoupling Architecture (AO-DA) that separates logical inference ("What") from persona expression ("How") into two inference paths on one INT4 base model with hot-swappable LoRA adapters. The logic path receives only the core turn and emits a verifiable structured state (Micro-State); the persona path renders it in character with the full history. In same-base-model ablations on an Apple M2 laptop (Llama-3.1-8B-Instruct and Gemma-3-4B-it, 4-bit; 480 runs: 2 bases x 4 pollution levels x 3 arms x 2 tasks x 2 personas x 5 seeds) we find: (i) the decoupled logic path is structurally invariant to pollution: its prompt stays at 180 (Llama) or 167 (Gemma) tokens while the mixed single-pass prompt grows from 242 to 1,203 on Llama, and its outputs are byte-identical across levels (40/40); (ii) the mixed single pass degrades monotonically (composite logic score 0.669 to 0.150 on Llama, 0.487 to 0.150 on Gemma), mostly by failing to emit the required structured output (80-95% of runs on Llama, 100% on Gemma at the two highest levels); (iii) with the same pollution fed into the logic path, the dedicated-adapter, dedicated-format path is still more robust than the single pass on the 8B model (failure 0-20% vs 25-95% at L2-L4; paired +0.30 to +0.50, Cliff's 0.50-0.85, Holm-adjusted ) but not on the 4B model, where both collapse. Separation costs one extra decode on a topic's first turn (28.2 s vs 18.2 s on Llama) and buys persona hot-swapping in 1.7 ms (warm median) without re-running the logic path. Code, logic-path adapters, logs and analysis scripts are released.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- 29 pages, 3 figures. v2: adds the public repository and licences (Appendix G), aligns the release statements with it, and corrects reporting errors listed at the end of Appendix G; conclusions unchanged. Code, logic-path adapters, logs and analysis: https://github.com/0x-AO-Protocol/decoupling-logic-persona. Companion paper: arXiv:2610.11542
Related papers
Wiki-Talkie: Multilingual Benchmarking of Persona-Based Agents on Real-World Discussions
Shared title terminologycs.CLDennis Fucci, Andrea Bacciu, Dong Liu et al.
ReFold: Training-Free Reversible Inter-Turn Context Folding for Long-Horizon Agents
Shared title terminologycs.CLYupeng Su, Jiayi Tian, Zheng Zhang et al.
IRTIQA: Evolving in English, Evaluated in Urdu -- Does Agent Self-Evolution Transfer from English to Urdu and Code-Switched Input?
Shared title terminologycs.CLAbdullah Hashmat, Danish Javed, Usman Naseem et al.
NORMCRAFT: Cultural Norm Generation for Context-Aware Language Model Alignment
Shared title terminologycs.CLTangyuan Zhang, Zhuang Li, Fatemeh Shiri et al.
Sports Agent: A Self-Evolving System for Conversational Data Analytics
Shared title terminologycs.CLChao Chen, Fuqi Lin, Ze Chen et al.
Failure Broadens, Success Sharpens: Continual Adaptation of Tool-Use Agents Across Diverse Tasks with Dual-Polarity Memory
Shared title terminologycs.CLTianmai M. Zhang, Hoda Shajari, Amr Hendy et al.