Language Model Inversion through End-to-End Differentiation

Kevin Yandoka Denamganaï, Kartic Subr
2/11/2026
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Despite emerging research on Language Models (LM), few approaches analyse the invertibility of LMs. That is, given a LM and a desirable target output sequence of tokens, determining what input prompts would yield the target output remains an open problem. We formulate this problem as a classical gradient-based optimisation. First, we propose a simple algorithm to achieve end-to-end differentiability of a given (frozen) LM and then find optimised prompts via gradient descent. Our central insight is to view LMs as functions operating on sequences of distributions over tokens (rather than the traditional view as functions on sequences of tokens). Our experiments and ablations demonstrate that our DLM-powered inversion can reliably and efficiently optimise prompts of lengths $10$ and $80$ for targets of length $20$, for several white-box LMs (out-of-the-box).

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{denamgana2026language,
  title  = {Language Model Inversion through End-to-End Differentiation},
  author = {Kevin Yandoka Denamganaï and Kartic Subr},
  year   = {2026},
  eprint = {2602.11044},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.11044v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.11044.svg)](https://codeofpaper.com/paper/2602.11044)

Discussion