The Geometry of Numerical Reasoning: Language Models Compare Numeric Properties in Linear Subspaces

El-Shangiti, Ahmed Oumar, Hiraoka, Tatsuya, AlQuabeh, Hilal, Heinzerling, Benjamin, Inui, Kentaro

arXiv.org Artificial Intelligence 

We first identified, using partial least square regression, these subspaces, which effectively encode the numerical attributes associated with the entities in comparison prompts. Further, we demonstrate causality, by intervening in these subspaces to manipulate hidden Figure 1: Summary of our approach. We extract contextualized states, thereby altering the LLM's comparison numeric attribute activations and then train outcomes. Experimental results demonstrated k-components PLS model on the activations to predict that our results stand for different numerical their values and then use the first component of the PLS attributes, which indicates that LLMs utilize model to do intervention at the last token of the second the linearly encoded information for numerical entity in the logical comparison.