Previous-Token Prediction Based LLM Inversion for Prompt Reconstruction arxiv.or...
HN Best 200 @best
Previous-Token Prediction Based LLM Inversion for Prompt Reconstruction arxiv.org · 14 points · 4 comments · HN thread
TL;DR The paper presents PTP, a method for reconstructing the prompt behind an LLM's output by training an inverse language model from scratch on data synthetically generated by the target LLM itself. The inverse model is trained with previous-token prediction, the mirror image of the forward next-token objective, and it can sample several plausible prompts that induce similar responses. The authors claim it outperforms prior semantic-reconstruction work on token-based metrics and transfers across datasets and source LLMs.
- Prior LLM inversion work treats prompt recovery as semantic reconstruction and relies on fine-tuned seq2seq models trained on large external datasets, often needing weights or logits.
- PTP trains an inverse LM from scratch on text synthetically generated by the target LLM, using previous-token prediction as the inverse of next-token prediction.
- The method is presented as working in a black-box setting without auxiliary aids.
- Sampling from the inverse model yields diverse prompt reconstructions, all of which should induce similar responses under the forward LLM.
- The authors report generalisation across datasets, transferability to responses from different LLMs, and better results than prior work on token-based metrics for prompts and responses.
Discussion The thread is short, with four comments, and mostly takes the form of a single critical reply plus a lighter side discussion about applications. The critic argues the results are overstated: small evaluation set, large error bars, headline numbers that drop sharply on other models, and gains that may come from learning the ShareGPT prompt format rather than inversion itself. The replies are playful and speculative, imagining using such tools to trace the prompts behind AI marketing or propaganda, and one points to an existing image-prompt tool. The overall mood is skeptical with a light tone.
- Results are overstated and hyped beyond their evidence (some): The commenter notes only 100 evaluation prompts with error bars of about 4-5 points, and that the 65% headline figure applies only to Qwen3-0.6B chat while GPT-4o and Llama-2 get 11% and 17%. They also say the claim of being black-box is misleading because the method needs the tokenizer.
- Gains may come from learning dataset format, not inversion (some): The commenter suspects the training on 400 ShareGPT prompts mainly teaches the model that prompt format, and says a model fine-tuned on a different dataset reaches only 11%. The data-free claim is also called misleading given the appendix.
- Prompt inversion could expose AI-generated propaganda and slop (many): One commenter imagines running the technique on AI marketing copy, political smear campaigns, text and images to see what prompts produced them. This is a speculative, use-case enthusiasm rather than a technical assessment.
- Prompt recovery could work on arbitrary human-written content (a few): A reply extends the idea to recovering the prompt that would most closely produce any non-AI text, and points to an existing CLIP-based image prompt tool as a related precedent.
Links from the comments
#LLMInversion #PromptReconstruction #Privacy #MachineLearning #ArXiv