大模型对数字的表示存在字符串与数值的混淆,影响其决策准确性。
What is a Number, That a Large Language Model May Know It?
- 用编辑距离和对数线性距离结合建模模型对数字的相似性判断。
- 实验发现模型嵌入层中数字表示存在字符串与数值的混合特征。
- 该特性在真实决策任务中会传播,适合关注模型可解释性的研究者阅读。
数字是人类描述世界的基本方式之一。随着大语言模型日益融入日常决策,学习有效的数字表示至关重要。然而,这些模型面临挑战:同一数字序列(如911)在不同上下文中可能被视作数字或字符串。这种双重性导致了何种表示形式?又会产生哪些下游影响?我们采用认知科学中的相似性提示技术,发现大语言模型生成的表示空间同时包含字符串和数值特征。具体而言,模型对整数对的相似性判断可用莱文斯坦编辑距离与数值对数线性距离的组合来拟合,表明存在纠缠表示。通过一系列实验,我们揭示了这种纠缠如何体现在潜在嵌入中,如何通过上下文部分缓解但无法完全消除,并能在真实决策场景中传播。这些结果揭示了基于文本输入的变换器模型在理解‘什么是数字’时存在的表征张力。
原文摘要 · Abstract (English)
Numbers are a basic part of how humans represent and describe the world around them. As a consequence, learning effective representations of numbers is critical for the success of large language models as they become more integrated into everyday decisions. However, these models face a challenge: depending on context, the same sequence of digit tokens, e.g., 911, can be treated as a number or as a string. What kind of representations arise from this duality, and what are its downstream implications? Using a similarity-based prompting technique from cognitive science, we show that LLMs learn representational spaces that blend string-like and numerical representations. In particular, we show that elicited similarity judgments from these models over integer pairs can be captured by a combination of Levenshtein edit distance and numerical Log-Linear distance, suggesting an entangled representation. In a series of experiments we show how this entanglement is reflected in the latent embeddings, how it can be reduced but not entirely eliminated by context, and how it can propagate into a realistic decision scenario. These results shed light on a representational tension in transformer models that must learn what a number is from text input.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。