让大模型倒着思考,自动给出无监督反馈,提升生成质量与安全性。
Time-Reversal Provides Unsupervised Feedback to LLMs
- 构建反向时间语言模型(TRLM),可从回答反推问题并评分。
- 在AlpacaEval上比基准方法提升5%,改善重排效果。
- 适合提升生成质量、安全过滤和对抗攻击防御场景。
大型语言模型(LLMs)通常以正向时间方向进行预测。但近期研究发现,让模型回溯并批判自身生成内容可产生有用反馈。受此启发,本文探索是否能让LLMs具备反向思维能力,即在给定回答的条件下预测并评分问题,从而提供互补的无监督反馈。为此,提出时间反转语言模型(TRLMs),可在反向时间方向生成和评分查询。我们从零开始预训练并微调了反向词元顺序的TRLM-Ba模型,使其有效推理‘回答-问题’方向。实验证明(并在简化设定下理论支持),将反向模型用于评分‘回答-问题’对,能显著提升前向模型多生成结果的重排性能。在广泛使用的AlpacaEval排行榜上,相比基于自对数似然分数的最佳-前N重排基线,性能最高提升5%。此外,TRLM评分优于传统正向评分,在引文生成和段落检索任务中表现更优。最后,利用TRLM的生成能力,增强或替代输入安全过滤器,使在JailbreakBench上的多种攻击下,误漏率大幅降低,而误报率几乎不变。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are typically trained to predict in the forward direction of time. However, recent works have shown that prompting these models to look back and critique their own generations can produce useful feedback. Motivated by this, we explore the question of whether LLMs can be empowered to think (predict and score) backwards to provide unsupervised feedback that complements forward LLMs. Towards this, we introduce Time Reversed Language Models (TRLMs), which can score and generate queries when conditioned on responses, effectively functioning in the reverse direction of time. Further, to effectively infer in the response to query direction, we pre-train and fine-tune a language model (TRLM-Ba) in the reverse token order from scratch. We show empirically (and theoretically in a stylized setting) that time-reversed models can indeed complement forward model predictions when used to score the query given response for re-ranking multiple forward generations. We obtain up to 5\% improvement on the widely used AlpacaEval Leaderboard over the competent baseline of best-of-N re-ranking using self log-perplexity scores. We further show that TRLM scoring outperforms conventional forward scoring of response given query, resulting in significant gains in applications such as citation generation and passage retrieval. We next leverage the generative ability of TRLM to augment or provide unsupervised feedback to input safety filters of LLMs, demonstrating a drastic reduction in false negative rate with negligible impact on false positive rates against several attacks published on the popular JailbreakBench leaderboard.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。