Skip to content

Language model inversion from an invariant latent space perspectiveAn Invariant Latent Space Perspective on Language Model Inversion

arXiv· arXiv:2511.19569· Wentao Ye, Jiaqi Hu, Haobo Wang, Xinpeng Ti, Zhiqing Xiao, Hao Chen, Liyao Li, Lei Feng, Sai Wu, Junbo ZhaoCollege of Computer Science and Technology, Zhejiang University; Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security; School of Software Technology, Zhejiang University; School of Computer Science and Engineering, Southeast UniversityIndexed by this site · 8 days ago· Originally publishedAttacks

Translation in progress — untranslated text is omitted.

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

AI summaryThe researchers propose the Inv^2A method, which can infer hidden prompts from LLM outputs, exceeding baselines by an average of 4.77% BLEU on 9 datasets covering user and system prompt scenarios. The authors point out that language model inversion (LMI) poses a real threat to user privacy and system security, and reformulate it as reusing the LLM's own latent space; on this basis they propose the Invariant Latent Space Hypothesis (ILSH), holding that diverse outputs from the same source prompt should remain semantically consistent, and that the cyclic mapping between input and output should be self-consistent within a shared latent space. Inv^2A treats the LLM as an invariant decoder and trains only a lightweight inverse encoder to map outputs to denoised pseudo-representations; when there are multiple outputs, it sparsely concatenates them at the representation level to increase information density; training has two stages, contrastive alignment and supervised reinforcement, and reduces reliance on large inversion corpora. The authors' analysis also shows that common defenses provide limited protection. Code and data are available at https://github.com/yyy01/Invariant_Attacker。

Questions
Language model inversion (LMI) refers to recovering a hidden user prompt or system prompt from outputs, threatening privacy and system security. The authors argue that existing methods rely on large-scale inverse-mapping corpora and that generalization assumptions often do not hold.
Methods
Proposes the Invariant Latent Space Hypothesis (ILSH) and Inv2A: reuse the LLM itself as an invariant decoder and train only a lightweight inverse encoder to encode outputs into denoised pseudo-representations; training has two stages, contrastive alignment and supervised reinforcement, plus an optional training-free dynamic filter.
Experiments and results
On 9 datasets, with LLaMA2-7B-Chat as the forward model, Inv2A's BLEU is on average 4.77% higher than the baselines, and Exact in the user prompt setting is 10.43; the authors state that defenses increasing sampling diversity have limited effect, and that layer-wise noise injection is more effective but harms forward performance.
Limitations and future work
Limitations listed by the authors: reliance on the white-box setting; reconstruction accuracy degrades when prompts are too abstract or when multiple prompts map to the same output; defense exploration remains preliminary. The main experimental results are based on LLaMA2-7B-Chat, and no statistical significance tests or human-evaluation agreement are reported.

Related papers

Show 2 more papers
Read originalarxiv.org