Transformer components such as non-linear activations and normalization are inherently non-injective, suggesting that different inputs could map to the same output and prevent exact recovery of the input from a model's representations. In this paper, we challenge this view. First, we prove mathematically that transformer language models mapping discrete input sequences to their corresponding sequence of continuous representations are injective and therefore lossless, a property established at initialization and preserved during training. Second, we confirm this result empirically through billions of collision tests on six state-of-the-art language models, and observe no collisions. Third, we operationalize injectivity: we introduce SipIt, the first algorithm that provably and efficiently reconstructs the exact input text from hidden activations, establishing linear-time guarantees and demonstrating exact invertibility in practice. Overall, our work establishes injectivity as a fundamental and exploitable property of language models, with direct implications for transparency, interpretability, and safe deployment.


翻译:Transformer组件(如非线性激活和归一化)本质上是非单射的,这意味着不同的输入可能映射到相同的输出,从而阻碍从模型表示中精确恢复输入。本文中,我们挑战了这一观点。首先,我们从数学上证明了将离散输入序列映射到其对应连续表示序列的Transformer语言模型是单射的,因此是无损的;这一性质在初始化时即成立,并在训练过程中得以保持。其次,我们通过对六个最先进语言模型进行数十亿次碰撞测试,实证验证了这一结果,且未观察到任何碰撞。第三,我们将单射性操作化:提出了SipIt算法,这是首个能够可证明且高效地从隐藏激活中重构原始输入文本的算法,该算法具备线性时间保证,并在实践中实现了精确可逆性。总体而言,我们的工作确立了单射性作为语言模型的一种基本且可利用的性质,对模型透明度、可解释性及安全部署具有直接意义。

0
下载
关闭预览

相关内容

【NeurIPS2025】大型语言模型中关系解码线性算子的结构
专知会员服务
10+阅读 · 2025年11月2日
Meta-Transformer:多模态学习的统一框架
专知会员服务
59+阅读 · 2023年7月21日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
108+阅读 · 2020年8月30日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
一文搞懂反向传播
机器学习与推荐算法
18+阅读 · 2020年3月12日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
技术、多域威慑与海上战争(报告)
专知会员服务
6+阅读 · 4月13日
“在云端防御”:提升北约数据韧性(报告)
专知会员服务
3+阅读 · 4月13日
人工智能及其在海军行动中的整合(综述)
专知会员服务
3+阅读 · 4月13日
美军MAVEN项目全面解析:算法战架构
专知会员服务
19+阅读 · 4月13日
从俄乌战场看“马赛克战”(万字长文)
专知会员服务
13+阅读 · 4月13日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员