PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction
- URL: http://arxiv.org/abs/2607.29378v1
- Date: Fri, 31 Jul 2026 13:01:43 GMT
- Title: PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction
- Abstract summary: Large language models (LLMs) generate text by auto-regressively sampling the next token.<n>We present a functional approach to inverting a given LLM in a black-box setting, without auxiliary aids.<n>We train an explicit inverse language model entirely from scratch on data synthetically generated from the target LLM itself.
- Score: 11.373080904038758
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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.
Related papers
- REATS: LLM Reasoning-based Ensemble Learning for Adaptive Time Series Forecasting [33.69887280643071]
We propose REATS, which processes temporal pattern descriptions and numerical features to produce interpretable ensemble weights.<n>Experiments on eight benchmarks demonstrate that REATS outperforms competitive ensemble baselines.
arXiv Detail & Related papers (2026-08-10T19:04:46Z) - ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMs [23.327977837371503]
Recent advances in Large Language Models have opened new avenues for generating training-free text embeddings.<n>We propose Reverse prompting with Explicit One-word Limitation to enhance the representational capability of frozen LLMs.
arXiv Detail & Related papers (2026-06-04T08:30:49Z) - What Gets Unmasked First? Trajectory Analysis of Diffusion Models for Graph-to-Text Generation [7.344034836280294]
We present the first systematic study of masked diffusion language models for graph-to-text generation.<n>We find that MDLMs naturally prioritize entities first, followed by relational and function words, with structural tokens resolved last.<n>We introduce Graph-LLaDA, which integrates a Graph Transformer encoder into LLaDA's decoding process to explicitly incorporate graph structure.
arXiv Detail & Related papers (2026-05-29T17:29:35Z) - On the Semantic and Syntactic Information Encoded in Proto-Tokens for One-Step Text Reconstruction [0.5097809301149341]
Autoregressive large language models (LLMs) generate text token-by-token, requiring n forward passes to produce a sequence of length n.<n>Recent work shows that frozen LLMs can reconstruct hundreds of tokens from only two learned proto-tokens in a single forward pass.<n>We study what information these proto-tokens encode and how they behave under reconstruction and controlled constraints.
arXiv Detail & Related papers (2026-02-20T15:54:10Z) - DiffuRank: Effective Document Reranking with Diffusion Language Models [71.16830004674513]
We propose DiffuRank, a reranking framework built upon diffusion language models (dLLMs)<n>dLLMs support more flexible decoding and generation processes that are not constrained to a left-to-right order.<n>We show dLLMs achieve performance comparable to, and in some cases exceeding, that of autoregressive LLMs with similar model sizes.
arXiv Detail & Related papers (2026-02-13T02:18:14Z) - Multimodal LLMs as Customized Reward Models for Text-to-Image Generation [60.164968941945645]
We introduce LLaVA-Reward, an efficient reward model designed to automatically evaluate text-to-image (T2I) generations across multiple perspectives.<n>LLaVA-Reward directly utilizes the hidden states of multimodal large language models (MLLMs)<n>We train LLaVA-Reward on four evaluation perspectives: text-image alignment, fidelity/artifact, safety, and overall ranking.
arXiv Detail & Related papers (2025-07-28T23:52:53Z) - Unleashing the Power of LLMs in Dense Retrieval with Query Likelihood Modeling [69.84963245729826]
We propose an auxiliary task of QL to enhance the backbone for subsequent contrastive learning of the retriever.<n>We introduce our model, which incorporates two key components: Attention Block (AB) and Document Corruption (DC)
arXiv Detail & Related papers (2025-04-07T16:03:59Z) - ReEval: Automatic Hallucination Evaluation for Retrieval-Augmented Large Language Models via Transferable Adversarial Attacks [91.55895047448249]
This paper presents ReEval, an LLM-based framework using prompt chaining to perturb the original evidence for generating new test cases.
We implement ReEval using ChatGPT and evaluate the resulting variants of two popular open-domain QA datasets.
Our generated data is human-readable and useful to trigger hallucination in large language models.
arXiv Detail & Related papers (2023-10-19T06:37:32Z) - Revisiting Large Language Models as Zero-shot Relation Extractors [8.953462875381888]
Relation extraction (RE) consistently involves a certain degree of labeled or unlabeled data even if under zero-shot setting.
Recent studies have shown that large language models (LLMs) transfer well to new tasks out-of-the-box simply given a natural language prompt.
This work focuses on the study of exploring LLMs as zero-shot relation extractors.
arXiv Detail & Related papers (2023-10-08T06:17:39Z) - Instruction Position Matters in Sequence Generation with Large Language
Models [67.87516654892343]
Large language models (LLMs) are capable of performing conditional sequence generation tasks, such as translation or summarization.
We propose enhancing the instruction-following capability of LLMs by shifting the position of task instructions after the input sentences.
arXiv Detail & Related papers (2023-08-23T12:36:57Z) - Understanding Emergent In-Context Learning from a Kernel Regression Perspective [55.95455089638838]
Large language models (LLMs) have initiated a paradigm shift in transfer learning.<n>This paper proposes a kernel-regression perspective of understanding LLMs' ICL bahaviors when faced with in-context examples.<n>We find that during ICL, the attention and hidden features in LLMs match the behaviors of a kernel regression.
arXiv Detail & Related papers (2023-05-22T06:45:02Z) - Self-Refine: Iterative Refinement with Self-Feedback [62.78755306241981]
Self-Refine is an approach for improving initial outputs from large language models (LLMs) through iterative feedback and refinement.
We evaluate Self-Refine across 7 diverse tasks, ranging from dialog response generation to mathematical reasoning, using state-of-the-art (GPT-3.5, ChatGPT, and GPT-4) LLMs.
Our work demonstrates that even state-of-the-art LLMs like GPT-4 can be further improved at test time using our simple, standalone approach.
arXiv Detail & Related papers (2023-03-30T18:30:01Z) - Guiding Large Language Models via Directional Stimulus Prompting [114.84930073977672]
We introduce Directional Stimulus Prompting, a novel framework for guiding black-box large language models (LLMs) toward specific desired outputs.
Instead of directly adjusting LLMs, our method employs a small tunable policy model to generate an auxiliary directional stimulus prompt for each input instance.
arXiv Detail & Related papers (2023-02-22T17:44:15Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.