Weight-based Analysis of Detokenization in Language Models: Understanding the First Stage of Inference Without Inference

N/ACitations
Citations of this article
7Readers
Mendeley users who have this article in their library.
Get full text

Abstract

According to the stages-of-inference hypothesis, early layers of language models map their subword-tokenized input, which does not necessarily correspond to a linguistically meaningful segmentation, to more meaningful representations that form the model’s “inner vocabulary”. Prior analysis of this detokenization stage has predominantly relied on probing and interventions such as path patching, which involve selecting particular inputs, choosing a subset of components that will be patched, and then observing changes in model behavior. Here, we show that several important aspects of the detokenization stage can be understood purely by analyzing model weights, without performing any model inference steps. Specifically, we introduce an analytical decomposition of first-layer attention in GPT-2. Our decomposition yields interpretable terms that quantify the relative contributions of position-related, token-related, and mixed effects. By focusing on terms in this decomposition, we discover weight-based explanations of attention bias toward close tokens and attention for detokenization.

Cite

CITATION STYLE

APA

Kamoda, G., Heinzerling, B., Inaba, T., Kudo, K., Sakaguchi, K., & Inui, K. (2025). Weight-based Analysis of Detokenization in Language Models: Understanding the First Stage of Inference Without Inference. In 2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Proceedings of the Conference Findings, NAACL 2025 (pp. 6339–6358). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2025.findings-naacl.355

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free