On Entity Identification in Language Models (2025)

Abstract: We analyze the extent to which internal representations of language models (LMs) identify and distinguish mentions of named entities, focusing on the many-to-many correspondence between entities and their mentions.We first formulate two problems of entity mentions — ambiguity and variability — and propose a framework analogous to clustering quality metrics. Specifically, we quantify through cluster analysis of LM internal representations the extent to which mentions of the same entity cluster together and mentions of different entities remain separated.Our experiments examine five Transformer-based autoregressive models, showing that they effectively identify and distinguish entities with metrics analogous to precision and recall ranging from 0.66 to 0.9.Further analysis reveals that entity-related information is compactly represented in a low-dimensional linear subspace at early LM layers.Additionally, we clarify how the characteristics of entity representations influence word prediction performance.These findings are interpreted through the lens of isomorphism between LM representations and entity-centric knowledge structures in the real world, providing insights into how LMs internally organize and use entity information.

## introduction transformer-based language models (lms) have been demonstrated to be able to recall factual knowledge composed of entities and relations @xcite @xcite . for example, when given the query "barack obama was born in __", lms can predict appropriate words like 'hawaii". to understand how lm predicts such entities (e.g. "hawaii"), extensive internal analyzes have been performed from an informaif "barack obama" or "joe biden" are represented in various mentions and contexts but still form a cluster as a single entity in the representation space, then we observe successful entity identification. such entity identification in the representation space suggests that the lm's representations reflect certain aspects of the structure of real-world, entity-centric knowledge. however, while previous work has shed light on the internal mechanisms of lms @xcite @xcite , our understanding remains limited in scope. for instance, when processing mentions like "obama" or "barack obama", it remains unclear whether lms encode them as the same individual based on context (figure 1 ). although encoding mentions as distinct entities may appear straightforward, there are two major real-world challenges (figure 2 ). one is mention ambiguity: a single mention could potentially refer to multiple different entities. the other is mention variability: multiple mentions with different surface forms exist for a single entity. no-tably, previous studies have not addressed queries containing mention ambiguity or mention variability, leaving a gap in our understanding of how lms handle these fundamental challenges. properly resolving mention ambiguity and variability is crucial to language understanding. we assume that encoding where mentions are distinguished by their corresponding entities, as shown in figure 1 (left), is an appropriate representation and investigate to what extent lms distinguish entities in their internal representations. we call the process of distinguishing entities in internal representations "entity identification". to evaluate entity identification, we used purity @xcite and inverse purity (ip). this approach allows us to directly measure whether the model's representations for the same entity form compact clusters that differ from other entities. our experiments with five autoregressive lms demonstrated that they achieve an auc of approximately 0.8-0.9 for mention ambiguity ( §4.1) and 0.66-0.8 even in the presence of mention variability ( §4.2). lm scores outperformed the baselines, demonstrating their ability to identify entities. we also find that entity information forms lowdimensional subspaces in early layers ( §5.1), with better entity representation separation improving word prediction ( §5.2). finally, we discuss these findings through the lens of isomorphism between lm representations and real-world entity-centric knowledge structures ( §6). this provides evidence that lms encode discrete structural knowledge through text-only training, extending previous observations @xcite @xcite toward a systematic understanding of how lm representation spaces correspond to structural knowledge. ## entity identification simply put, our goal is to find out if lms "know" foot_0 that different mentions of the same real-world entity refer to the same entity and, conversely, that mentions of different entities refer to different entities. for example, in discussions about "barack obama" or "president obama", a lm with world knowledge should be able to recognize that both mentions refer to the same person. ## additional experiments we conduct additional experiments to analyze two points: (1) the properties of entity representations (e.g., linear separability) and (2) their impact on word prediction. ## discussion: insights from isomorphism in § 4, we revealed the extent to which lms can perform entity identification. interpreting these experimental results from the perspective of isomorphism described in § 2.2 and ## related work we review methods for verifying lms knowledg and position our research by organizing existing findings on knowledge structures.