Spectral graph contrastive learning builds a low-frequency and a high-frequency channel and fuses them globally, with one rule shared by all nodes. A node-wise gate is the natural refinement: it is at least as expressive, and node-adaptive filtering helps in supervised learning. However, without labels, the gate falls behind global fusion on homophilic graphs and is unstable across seeds. Measuring its error against a label-derived oracle gate, we decompose it into bias and variance and trace each to a cause with controlled interventions. The bias comes mainly from the uniformity pressure of the contrastive loss, which favors the more dispersed high-frequency channel while labels on homophilic graphs favor low frequencies. The variance comes from a positive feedback loop between the gate and the channels it weights, which locks in seed-dependent choices early. The two sources respond to separate interventions. These findings lead to AlignGate, which trains each channel with its own contrastive loss and the gate with alignment only. AlignGate removes the high-frequency bias on homophilic graphs, cuts the variance by about two thirds, and outperforms global fusion and spectral baselines on nine benchmarks and a large graph.
Mingchao Zhang, Miduo Cui, Kangze He, Yuanjun Li, Dapeng Li, Ce Zhang, Chuanchen Luo, Xue Yan 等 13 位作者
原文摘要
Reinforcement learning has achieved remarkable success in sequential decision-making, but learning effective policies often requires substantial interaction experience. Model-based reinforcement learning alleviates this dependence by leveraging world models, which are typically used to support planning or policy optimization. In this paper, we investigate an alternative paradigm in which autonomous LLM-based coding agents directly synthesize control policies by reasoning over readable world models. By examining environment source code, these agents translate environmental knowledge into executable decision rules and iteratively refine their policies using online feedback or offline data, without task-specific RL training. Experiments across diverse decision-making benchmarks show that synthesized policies match or outperform conventional RL methods while requiring substantially less experience. Further analyses reveal interpretable decision rules and how they evolve through feedback-driven refinement. Comparisons with policies generated without source code access and experiments under challenging conditions further demonstrate the benefits of readable world models. These findings suggest that direct policy synthesis can reduce reliance on trial and error, challenging the necessity of task-specific RL training.
Heads of Security: Learned Attention Gates Improve Prompt Injection Robustness
Igor Shilov, Xiaoxue Yang, Alexander Panfilov, Evgenii Kortukov, Matthieu Meeus, Peter Romov, Wojciech Samek, Jonas Geiping 等 9 位作者
AI 速读 基于摘要
提出 Heads of Security(HoS),用少量可学习的逐头注意力门实现指令与数据分离,从而在不明显损失效用的前提下提升对提示注入攻击的鲁棒性。
cs.LG · cs.CL · cs.CR
查看原文摘要
We introduce Heads of Security (HoS), a prompt injection defense that enforces instruction-data separation via a small set of learned per-head attention gates. HoS learns how each head should redistribute attention between trusted and untrusted tokens, enabling models to reason over untrusted content without following injected instructions. We evaluate HoS on Llama-3.3-70B-Instruct and GPT-OSS-20B. We compare it against SecAlign++, a state-of-the-art finetuning-based defense, and ASIDE, a defense that, like ours, builds instruction-data separation into the model architecture. We show that HoS offers greater robustness to adaptive attacks, better performance on standard utility benchmarks, and matches top performance on standard agentic prompt injection benchmarks. More specifically, the black-box RL-Hammer attack reaches 97% ASR against GPT-OSS-20B and 85% against SecAlign, but only 10% against HoS. Claudini, a state-of-the-art white-box attack, strengthened against HoS through autoresearch, requires 3 times more FLOPs to reach the same ASR on HoS as it does on GPT-OSS-20B or SecAlign. HoS preserves base-model utility across standard multiple-choice benchmarks and prompting setups, whereas SecAlign and ASIDE degrade in few-shot settings. On agentic benchmarks with static attacks, HoS and SecAlign perform similarly and substantially improve the security-utility trade-off over the base model. ASIDE struggles with tool use, achieving only 10% utility. These results show that prompt injection robustness can be achieved and improved through targeted attention interventions.