让大模型更听话:用奖励机制在生成时精准跟随系统指令。
SyRuP: Enhancing System-Prompt Following via Reward-Guided Prediction in LLM Decoding

- 训练一个奖励头,实时评估每个词是否符合系统指令
- 在推理时结合原始输出和奖励信号,重排候选词
- 无需微调模型,适合快速部署的提示控制场景
大型语言模型(LLMs)通过系统提示来指定角色、格式和安全要求,但模型仅通过上下文学习隐式遵循这些提示,对复杂或组合型提示可能不足。现有方法常需模型微调或响应级重排序,限制了轻量级推理时控制的实用性。我们提出SyRuP,一种解码时框架,在保持基础模型冻结的前提下提升系统提示遵循度。SyRuP从系统提示条件下的偏好对中训练一个交叉注意力奖励头,将系统提示视为独立记忆,生成逐标记的遵循得分。推理时,SyRuP通过结合基础模型的top-k候选、学习到的奖励信号以及捕捉系统引发的逻辑偏移的对比信号,进行重排序。在系统提示遵循基准上的实验表明,SyRuP在适度推理开销下持续优于提示法和解码时基线。结果表明,显式的逐标记引导是一种有效且实用的可靠系统提示遵循机制。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are increasingly controlled through system prompts that specify roles, formats, and safety requirements. However, models follow these prompts only implicitly through in-context learning, which can be insufficient for complex or compositional prompts. Existing approaches often require model tuning or response-level reranking, limiting their practicality for lightweight inference-time control. We introduce SyRuP, a decoding-time framework for improving system-prompt adherence while keeping the base LM frozen. SyRuP trains a cross-attention reward head from system-prompt-conditioned preference pairs, treating the system prompt as a separate memory to produce token-level adherence scores. At inference, SyRuP reranks the base LM's top-k candidates by combining base logits with both the learned reward signal and a contrastive signal that captures system-induced logit shifts. Experiments on system-prompt following benchmarks show that SyRuP consistently outperforms prompting and decoding-time baselines with moderate inference overhead. These results suggest that explicit token-level guidance is an effective and practical mechanism for reliable system-prompt following.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。