Spatial Representation of Large Language Models in 2 D Scene (2025)

Abstract: Spatial representations are fundamental to human cognition, as understanding spatial relationships between objects is essential in daily life. Language serves as an indispensable tool for communicating spatial information, creating a close connection between spatial representations and spatial language. Large language models (LLMs), theoretically, possess spatial cognition due to their proficiency in natural language processing. This study examines the spatial representations of LLMs by employing traditional spatial tasks used in human experiments and comparing the models’ performance to that of humans. The results indicate that LLMs resemble humans in selecting spatial prepositions to describe spatial relationships and exhibit a preference for vertically oriented spatial terms. However, the human tendency to better represent locations along specific axes is absent in the performance of LLMs. This finding suggests that, although spatial language is closely linked to spatial representations, the two are not entirely equivalent.

## introduction the apparent proficiency of large language models (llms) in understanding and generating natural language suggests that they may exhibit cognitive abilities akin to those of humans, such as theory of mind and reasoning @xcite @xcite @xcite . consequently, the evaluation of these models has garnered increasing attention, particularly given their expanding applications across domains like code generation and translation @xcite , where minimizing potential errors in their responses is critical. a promising direction for the llm industry lies in advancing embodied intelligence, which necessitates a robust capacity for spatial understanding @xcite . while spatial reasoning is more prominent in the multi-modal domain, where spatial phenomena are often integrated with visual information, it remains essential to investigate spatial representations grounded in natural language to further enable llms to support and enhance various aspects of social life. spatial relations, which describe the connections between physical objects, are essential for spatial understanding and play a critical role in spatial reasoning. humans naturally use language to convey spatial relations in everyday life. trained on extensive natural language datasets, large language models (llms) may encode not only spatial linguistic structures but also develop implicit representations of spatial relations, even without direct sensory inputs. understanding the interaction between spatial language and spatial representations in llms can offer valuable insights into how these models process and "comprehend" spatial concepts. recent studies suggest that llms have achieved acceptable proficiency in representing simple cardinal directions and planning navigation tasks @xcite . however, their performance remains inconsistent and is influenced by factors such as environmental complexity. llms tend to excel in addressing basic spatial questions but struggle with more advanced and intricate spatial concepts @xcite . considering that spatial representations are vital for achieving embodied intelligence and advancing toward artificial general intelligence (agi), the sensitivity of llms to spatial relations in 2d space warrants more comprehensive exploration. building on the cogeval protocol recently proposed for the general evaluation of llms' cognitive capacities @xcite , this study aims to assess the spatial intelligence of llms. specifically, we examine the structure of llms' representations of spatial relations between two objects within a 7*7 grid scene and evaluate the similarity of these representations to those of humans using two spatial tasks: the spatial generation task and the spatial rating task. the central research question is whether llms can derive visual-like representations from textual input and coordinate descriptions in a 2d space, and to what extent their representations align with those of humans. we evaluate the spatial sensitivity of five llms, including state-of-the-art (sota) models such as gpt-4, and compare their performance to human behavior data obtained from a previous related study. the research hypothesis posits that llms can partially capture 2d spatial representations and exhibit certain features embedded in human spatial language. the results reveal both similarities and differences between the spatial representations of llms and humans. similar to humans, llms more frequently select vertically oriented spatial prepositions to describe spatial relations, as opposed to horizontally oriented terms. state-of-the-art (sota) models, such as gpt-4, demonstrate significant proficiency in judging spatial relations, with the exception of accurately identifying the rightward relationship. however, weaker models, such as llama3-8b, exhibit lower spatial intelligence. furthermore, the temperature parameter appears to have minimal impact on the models' performance, suggesting that spatial representations may be fundamental to human cognition. nonetheless, llms show limitations in capturing certain subtle characteristics of human spatial cognition, such as the tendency for more precise representations along specific axes. in summary, the main contributions of this study are as follows: ## discussion llms' spatial representation abilities are evaluated through two tasks adapted from cognitive psychology: the spatial generation task and the spatial rating task, which test the models' capacity to describe and judge spatial relationships on a 2d scene. the observed directional imbalance in the spatial generation task mirrors human tendencies @xcite , (a) humans' ratings. in terms of heterogeneity in llms' behavior, more advanced models appear to be significantly more proficient in spatial representations. specifically, sota models such as gpt-4 demonstrate greater accuracy in judging spatial relationships between objects and exhibit higher geometric richness in their choice of spatial prepositions when generating spatial descriptions compared to gpt-3.5-turbo and llama3-8b. this finding suggests that spatial representations can indeed be derived from spatial language, and llms with superior overall performance are more likely to possess enhanced spatial abilities. however, even the bestperforming llms still fall short of perfection, indicating the need for further precision in practical applications. additional pretraining with automatically generated spatial datasets could potentially improve llms' spatial reasoning @xcite . the influence of temperature on llms' perfor-mance in both spatial tasks appears minimal, as no significant differences are observed in models' choice of spatial terms or their judgment of spatial relationships under different temperature levels (0, 0.5, and 1). since temperature controls the randomness of model responses @xcite , the insensitivity to temperature variations in spatial tasks may suggest the fundamental constancy of spatial cognition in human life. this finding aligns with studies indicating that changes in temperature have little effect on llms' problem-solving performance @xcite . interestingly, all llms, including sota models like gpt-4 and zhipuai, fail to accurately represent rightward spatial relationships, highlighting a bias in the models' training datasets, where leftward relationships seem to be more prevalent in natural language. this phenomenon, to our knowledge, is being reported for the first time and warrants further investigation. one possible explanation is that, given most people are right-handed, leftward spatial relationships may be more intuitive and commonly used in practice. it is also worth noting that llms fail to capture certain subtle characteristics of human spatial representations, such as axial salience. cognitive psychology research has shown that humans tend to exhibit more accurate spatial representations in regions near the central axis @xcite , with accuracy decreasing as the distance from the axis increases. however, this tendency is absent in llms' performance, highlighting the limitations of models that excel at detecting regularities and generating words linearly, yet struggle with visualizing situations in a 2d space. this suggests that spatial language does not equate to spatial representation, and there may be an upper limit to the spatial representation capabilities of linguistic models. ## conclusion both similarity and difference exist between spatial representations of llms and humans. on one hand, llms resemble humans in the choice of spatial prepositions while describing spatial relationships between two objects on a 2d scene. vertically oriented spatial terms are preferred by llms relative to horizontal terms, which is consistent to humans' performance and probably the reflection of gravity. on the other hand, finer representations along axis in humans do not appear in llms' spatial cognition, indicating that llms actually fail to capture some subtle facets in human language.