Transformer模型上下文区分测量工具包技术手册
Technical Manual for a Toolkit for Measuring Contextual Individuation in Transformer Language Models
研究人员发布了一套开源工具包,可测量Transformer模型如何区分同一词在不同上下文中的含义,包含完整流程和避免常见偏差的方法。
该工具包围绕"桥接形式"概念构建,用于测试Transformer模型如何通过上下文区分同一词的不同含义。工具包包含从桥接形式声明、语料获取到表示提取的完整流程,并采用成对轮廓测量方法评估模型表示空间中的分离度。所有设计选择都附带方法论说明,避免过度宽泛类别标签导致的含义污染、轮廓系数的多组偏差等问题。
Technical Manual for a Toolkit for Measuring Contextual Individuation in Transformer Language Models
A transformer language model assigns a single, context-independent vector to a word type at its embedding layer, yet is widely believed to individuate that word's occurrences by context in its later layers. Testing this belief cleanly requires a construct that holds the word form fixed while its context and intended sense vary in a controlled, labeled way. This manual documents an open toolkit built around such a construct, which we call a bridge form: a single written word that recurs, unchanged, across two or more subject domains with a different sense in each. We describe, and justify, every stage of the pipeline: the declarative specification of bridge forms and their source domains, corpus acquisition from Wikipedia, occurrence localization, layer-wise representation extraction, a domain-pairwise silhouette measurement of separation in the model's representation space, and a paired visualization protocol. Each design choice is presented together with the methodological failure mode it is meant to avoid (sense contamination from overly broad category labels, the multi-group bias of the silhouette coefficient, subword-tokenization misalignment, and axis-comparability artifacts in dimensionality-reduced plots, among others). This manuscript is a methodological and implementation reference: it does not report or interpret empirical outcomes of running the toolkit on any particular model or bridge-form set. The toolkit, its full source, and the corpora used to exercise it are archived separately (Section 9) under a persistent identifier, and are intended to be cited as an instrument by studies that use it to produce and interpret empirical results.