arXiv:2610.27817cs.AIOct 2026

Manuscript Offprint

arXiv:2610.27817

Privacy-preserving inference on hosted models: a learned input-embedding transform for frozen Qwen3.8-27B

Mahendra Roopa, Srikanth Roopa

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Every prompt sent to a hosted language model is readable by whoever runs it. We study whether the prompt can remain on the client while the host receives transformed vectors that stand in for it. A language model converts text to vectors exactly once, with a public lookup table; we perform that step locally and pass the vectors through a small trained network (55.6M parameters) before they leave the perimeter. The host runs a frozen 27B model (Qwen3.8-27B) on the transformed vectors and never receives text or token ids.

We train the transform against the frozen model as a fixed judge, combining a forward-KL utility term with an auxiliary term that pushes each vector away from its original direction. On 1,490 MMLU questions held out from training, the transform costs 1.5 points of accuracy (80.7% vs. 82.3%), breaking 68 of the 1,226 questions the unmodified model answers correctly (5.5%), while 30.1% of content tokens no longer decode to their original token under a nearest-neighbour lookup. We report sweeps over the inference-time strength scalar and the training-time hiding weight, and two continuation budgets. Neither sweep improves the trade: hiding collapses to 1.1% at strength 0.8 while 48 answers are still broken, and every hiding weight above 0.3 roughly doubles the breaks. Continued training is the one exception, improving both axes at 2,000 additional examples on two seeds before reversing at 6,000.

Nearest-neighbour hiding is only a diagnostic; it is not a privacy guarantee. An adversary that can run a transform of this family on inputs of its own choosing recovers the prompt outright. Estimating the displacement subspace at rank 64 and projecting it out returns all 2,794 content tokens of a held-out 96-prompt set from the checkpoint reported above. The hiding rate on that same set reads 59.7%. Recovery is equally complete in all 42 cross-checkpoint pairs tested, so keeping the transform's weights on-prem does not help either. That an unkeyed transform of this family falls to an adaptive attacker is already known [4]. We additionally report the transfer between checkpoints and the utility cost measured alongside it. Accordingly, we do not claim privacy. The transform preserves much of the model's utility under the measurement protocol given here, and fails against a simple adaptive attack.

1 Introduction

A hosted model needs the whole input to do its work. Whatever is sent, the host holds a copy for at least the duration of the request. For sensitive inputs such as customer records, medical notes or internal documents, this means the provider sees the data during inference.

Each of the usual mitigations gives something up. Redaction changes the question the model is asked, so it can change the answer that comes back. Self-hosting removes the host from the picture, but the cost of serving a 27B model then falls on the user. A trusted execution environment seals the input inside the host's hardware [17][17], which helps as far as the host's configuration can be trusted.

This paper measures a different route. A transformer consumes text only through its first step: tokenisation followed by a lookup in a public embedding table. Every later layer is arithmetic on vectors. The lookup can therefore be moved to the client, and the host given vectors instead of tokens. The table is public, so the move alone hides nothing: anyone can invert a raw embedding by a table lookup. We therefore measure whether a learned transform can displace those vectors far enough to frustrate recovery while the frozen model still computes the right answer.

Both properties have to hold at once, and either one alone is easy to get. Neither extreme is useful: raw embeddings are trivially invertible, whereas noise strong enough to hide the input destroys the model's utility. The difficulty is in obtaining the two together, which is what the rest of this paper measures. We do not obtain them: the utility side is affordable and we characterise its price, and the privacy side fails outright to an adversary that can run the transform on inputs of its own choosing ( §5.7§5.7).