对称性带来的隐私:用于大语言模型推理的正交等变Transformer
Privacy from Symmetry: Orthogonally Equivariant Transformers for LLM Inference
AI总结:
针对拆分推理中隐藏表示易被近邻搜索恢复的问题,提出正交混淆方法,并设计ConjFormer架构实现O(d)-等变性,在不加噪声或重加密下将令牌恢复率从35%降至1.3%,困惑度仅增0.4%。
摘要:
本地运行大型语言模型通常不切实际,这促使将敏感文本的推理推向第三方提供商。拆分推理通过将令牌保留在客户端并仅发送隐藏表示来部分缓解这一问题,但这些表示仍可通过针对公共嵌入表的最近邻搜索恢复。我们提出一种正交混淆过程,其中客户端在传输前将嵌入乘以一个秘密正交矩阵。为了在任意旋转下实现正确推理,我们引入了ConjFormer,这是一种Transformer变体,通过轻量级归一化更改(标量RMSNorm)以及所有线性权重的块状正交共轭,实现精确的$\mathrm{O}(d)$-等变性。因此,服务器完全在旋转基中执行前向传播,并且从未观察到未旋转的隐藏状态。在PubMed上微调的GPT-2和Llama 3.2 1B模型上的实验表明,正交混淆消除了直接余弦最近邻反演,并将令牌恢复率从超过35%的前10名降至最多1.3%,而微调后困惑度仅增加0.4%。这些结果表明,在架构层面强制执行对称性可以为隐私保护的大语言模型推理提供一种实用的防御,无需噪声注入或繁重的密码学机制。
英文摘要:
Running large language models locally is often impractical, pushing inference on sensitive text to third-party providers. Split inference partially mitigates this by keeping tokens on the client and sending only hidden representations, but these representations can still be recovered via nearest-neighbor search against the public embedding table. We propose an orthogonal obfuscation procedure in which the client multiplies embeddings by a secret orthogonal matrix before transmission. To enable correct inference under arbitrary rotations, we introduce ConjFormer, a transformer variant that is exactly $\mathrm{O}(d)$-equivariant via a lightweight normalization change (scalar RMSNorm) together with blockwise orthogonal conjugation of all linear weights. As a result, the server performs the full forward pass entirely in the rotated basis and never observes unrotated hidden states. Experiments on GPT-2 and Llama 3.2 1B models fine-tuned on PubMed show that orthogonal obfuscation eliminates direct cosine nearest-neighbor inversion and reduces token recovery from over 35% top-10 to at most 1.3%, while increasing perplexity by only 0.4% after fine-tuning. These results indicate that enforcing symmetry at the architectural level can provide a practical defense for privacy-preserving LLM inference without noise injection or heavy cryptographic machinery.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。