🛰️ Daily AI Frontier
‹ back to 2026-08-03

PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction

arXiv cs.CL LLM Security & Privacy Pirzada Suhail, Nagasai Saketh Naidu, Atanu R Sinha, Amit Sethi 2026-07-31
Representative image for PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction

TL;DR - An arXiv preprint introducing PTP, a black-box LLM inversion method that trains an inverse language model from scratch via "previous-token prediction" to reconstruct the prompts that produced observed outputs. It matters because it shows near-exact prompt recovery without needing model weights, logits, or external datasets — a direct prompt-confidentiality risk.

  • Frames inversion functionally rather than as semantic reconstruction: the inverse model is trained on data synthetically generated from the target LLM itself, avoiding fine-tuning of pretrained seq2seq models on large external corpora.
  • Previous-token prediction mirrors forward next-token prediction, creating a generative link between forward and inverse processes that the authors argue enables faithful reconstruction.
  • Sampling from the inverse model yields diverse candidate prompts that reportedly induce similar responses under the forward target LLM.
  • Claims generalization across datasets and transferability to responses from different LLMs, outperforming prior work on token-based prompt and response reconstruction metrics.

view merged work →