PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 25 references that are in the map. First posted on arXiv 31 Jul 2026.
Builds on
12 of 25 references.
References · 12
- 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,611
- 2023Text Embeddings Reveal (Almost) As Much As Textcited by 192
- 2023Effective Prompt Extraction from Language Modelscited by 85
- 2019Model Inversion Networks for Model-Based Optimizationcited by 83
- 2023Language Model Inversioncited by 68
- 2024Extracting Prompts by Inverting LLM Outputscited by 41
- 2022Autoinverse: Uncertainty Aware Inversion of Neural Networkscited by 16
- 2022Landscape Learning for Neural Network Inversioncited by 15
- 2024Network Inversion of Binarised Neural Netscited by 11
- 2025Better Language Model Inversion by Compactly Representing Next-Token Distributionscited by 9
- 2024Network Inversion of Convolutional Neural Netscited by 8
- 2024Reverse Prompt Engineeringcited by 5
Built on by
Not cited yet.