Technical Manual for a Toolkit for Measuring Contextual Individuation in Transformer Language Models
José Luciano Verçosa Marques, Frederico Jorge Heitmann, Daniel Omar Perez, Marcelo Vinicius de Paula, Tárcio André dos Santos Barros
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.AI, cs.CL
- Comments
- 29 pages, 2 figures (one with 2 subfigures), 1 table. Toolkit, source code, and corpora archived separately on Zenodo (see Section 9)
Related papers
Do Large Language Models Know What They Don't Know II? A Fully Behavioral, Non-Cognitive Measure of Epistemic Honesty
Shared title terminologycs.AIAli Şenol, H. Russell Bernard, Huan Liu
Corporate Language Model (CLM): Transforming Tacit and Fragmented Enterprise Knowledge into a Sovereign, Auditable, and Executable Corporate Intelligence Layer
Shared title terminologycs.AIFabricio C. Avini, Guilherme Trez
LimoBench: How Street Smart Are Large Language Models?
Shared title terminologycs.AIGautam Choudhary, Jack Peng, Udesh Kumarasinghe et al.
Look Before You Commit: Visual-Evidence-Guided Decoding for Multimodal Diffusion Language Models
Shared title terminologycs.AITongxiao Hu, Yikai Zhao, Qiyan Zhao et al.
Frequency-Conditioned Privacy Auditing of Fine-Tuned Language Models
Shared title terminologycs.AIAymen Noor, Ke Lyu, Honglu Jiang
Agent Recovery Gone Wrong: Measuring Harm Beyond Duplicate Calls
Shared title terminologycs.AIArtem Trofimov, Boris Novikov