Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
arXiv Machine Learning · 2026/7/31 13:01:43
PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction
AI 中文解读
科研人员找到了一种“反推”AI对话的新方法,让黑盒AI也能被精准“逆向工程”。过去,想要从AI的回答反推出原始问题,就像根据一道菜猜出完整菜谱,非常困难。旧方法需要借助额外模型或AI内部数据,且只能猜出大概意思。这次的新技术却完全不需要这些“辅助工具”,只需利用AI自己生成的对话数据来训练一个“逆向翻译器”,就能高度还原出原始提问内容,甚至能做到近乎一字不差。更厉害的是,这种技术还能在不同AI之间“互通”,用一个AI生成的回答,去还原另一个AI的提问,还原结果也准确。对普通人来说,这项技术带来了一个直接影响:AI的安全性将更有保障,开发者和监管部门可以通过它更精确地审查AI在对话中经历了什么,防止信息泄露或滥用。同时,这也为“AI理解AI”提供了新思路,未来我们与AI的交互过程可能会因此变得更加透明、可靠。
Large language models (LLMs) generate text by auto-regressively sampling the next token. This inherently leads to a many-to-many mapping between prompts and responses, complicating the task of inferring prompts from observed outputs. Prior work on LLM inversion frames prompt recovery as a semantic reconstruction task. They rely on fine-tuning pretrained sequence-to-sequence models on large external datasets--and requiring access to model weights or logits--to generate semantically plausible prompts. In contrast, we present a functional approach to inverting a given LLM in a black-box setting, without auxiliary aids. We train an explicit inverse language model entirely from scratch on data synthetically generated from the target LLM itself. Analogous to forward next-token prediction, our inverse model is trained using previous-token prediction, establishing a generative link between the forward and inverse processes that enables faithful prompt reconstruction. Moreover, it naturally supports diverse prompt reconstructions through sampling, whereby all such prompts induce similar responses under the forward, target LLM. Our approach generalises across datasets and exhibits transferability in reconstructing prompts from responses generated by different LLMs. Further, across the set of token based evaluation metrics for prompt and response reconstructions, our approach outperforms prior work.
分享
阅读原文 ↗