T ime T o M : Temporal Space is the Key to Unlocking the Door of Large Language Models’ Theory-of-Mind (2024)

Abstract: Theory of Mind (ToM)—the cognitive ability to reason about mental states of ourselves and others, is the foundation of social interaction. Although ToM comes naturally to humans, it poses a significant challenge to even the most advanced Large Language Models (LLMs). Due to the complex logical chains in ToM reasoning, especially in higher-order ToM questions, simply utilizing reasoning methods like Chain of Thought (CoT) will not improve the ToM capabilities of LLMs. We present TimeToM, which constructs a temporal space and uses it as the foundation to improve the ToM capabilities of LLMs in multiple scenarios. Specifically, within the temporal space, we construct Temporal Belief State Chain (TBSC) for each character and inspired by the cognition perspective of the social world model, we divide TBSC into self-world beliefs and social world beliefs, aligning with first-order ToM (first-order beliefs) and higher-order ToM (higher-order beliefs) questions, respectively. Moreover, we design a novel tool-belief solver that, by considering belief communication between characters in temporal space, can transform a character’s higher-order beliefs into another character’s first-order beliefs under belief communication period.

## introduction humans continually try to reason about other people's mental states and understand how it might impact their actions @xcite . this capability, known as theory of mind (tom) @xcite , is crucial for social interactions. with large language models (llms) playing a growing role in our lives, developing llms with tom could be better at teaching us, learning from us, communicating with us, collaborating with us, and understanding us @xcite @xcite . although tom often comes naturally to humans, llms often make various errors in tom reasoning (figure .1c), such as ignoring the temporal order of events, generating outputs that violate commonsense, confusing the reasoning logic in higher-order tom questions @xcite and failing on "trivial" alternations to existing datasets @xcite . recently, various reasoning strategies like chain of thought (cot) @xcite and tree of thought (tot) @xcite have improved the reasoning abilities of llms in some tasks. however, these strategies are not suitable for tom reasoning @xcite . furthermore, @xcite proposes the perspectivetaking strategy to improve the tom reasoning abilities of llms, but this strategy is not suitable for higher-order tom reasoning. currently, there is still a lack of effective reasoning strategies to improve the performance and robustness of llms in tom reasoning tasks. in this paper, we introduce timetom, which initially constructs temporal space by adding timeline to the stories or dialogues. within the temporal space, we construct temporal belief state chain (tbsc) for each character based on the events they are aware of on the timeline. meanwhile, inspired by a principle of modern cognitive science @xcite , which posits that humans construct abstract models of the social world and their self-world in their minds, we split the beliefs in tbsc into self-world beliefs and social world beliefs. we use self-world beliefs to answer first-order tom questions and incorporate social world beliefs when answering higher-order tom questions. the reasoning difficulty of tom questions significantly increases as the order of questions rises @xcite , and currently, there is no effective reasoning strategy for solving higher-order (reasoning depth @xmath0. we consider that the key to higher-order tom reasoning lies in capturing the belief communication between characters. we design a novel tool-belief solver, which first parses each character's perceptible time set based on their tbsc and then calculates the intersections of the time set of different characters to determine at which times they achieve belief communication. furthermore, as illustrated in figure.1d, since john's understanding of bob's belief only occurs during the belief communication period, the higher-order tom question of john's estimation of bob's beliefs can be transformed into a first-order tom question of what bob's belief state is like during the belief communication period. in reasoning about higher-order tom questions, llms generate an initial reasoning process based on the character's tbsc, and the belief solver transforms the higher-order tom questions into firstorder tom questions under belief communication period, which serves as feedback to inspire llms to refine their initial reasoning process on higherorder tom questions. experimental results experimental results on the tomi @xcite , bigtom @xcite , and fantom @xcite benchmarks indicate that timetom dramatically improves the reasoning performance of llms on tom questions in multiple scenarios (figure .1a and figure .1b), while taking a big step towards coherent and robust tom reasoning. it's noteworthy that timetom is well-suited for higher-order tom questions, demonstrating good performance in third-order tom questions. furthermore, timetom can be applied to situations involving agent communication which is commonly occurring in the real-world. the main contributions of this work are as follows: (1) we construct temporal space and use it as the foundation. (2) within the temporal space, we construct tbsc, which is a comprehensive representation of a character's beliefs, including the temporal evolution of thing states and clear temporal cognition of key social events that create belief gaps. from the social world model's cognitive perspective, tbsc is split into self-world and social world beliefs, aligning with first-order tom (firstorder beliefs) and higher-order tom (higher-order beliefs) questions respectively. (3) within the temporal space, we design a novel tool-belief solver, which serves as feedback to inspire llms to refine their initial reasoning process in higher-order tom questions. (4) temporal space is the key to unlocking the door of llms' theory of mind. extensive experimental results indicate that timetom dramatically improves the reasoning performance and robustness of llms on tom questions foot_0 . llms lack of tom capabilities several studies @xcite @xcite @xcite have shown that llms have poor reasoning performance and robustness on tom tasks in a zero-shot setting, even with the current state-of-the-art gpt-4 @xcite model. with llms becoming increasingly integrated into our everyday lives, developing llms with tom is very necessary. enhancing llms reasoning capabilities recent prompt-based methods enhance the reasoning abilities of llms by guiding them to produce intermediate reasoning steps. for example, cot @xcite guides llms to generate stepby-step derivations before producing the final answer, ltm @xcite decomposes a target question into a series of subquestions, tot @xcite using tree-structured search to find better reasoning chains, self-refine @xcite and reflexion @xcite adds selfverification steps for rectifying reasoning errors. rap @xcite repurposes an llm as a world model by prompting the llm to predict the next state s t+1 of reasoning after applying a reasoning step a t to the current state s t . apart from prompt-based methods, declarative @xcite uses external symbolic solver to solve the equations in reasoning steps. maf @xcite uses multiple external tools such as calculator, programming syntax to generate feedback to refine initial reasoning output. although many methods have been introduced to enhance the reasoning ability of llms, they are not suitable for tom reasoning. @xcite adopts the perspective-taking strategy to enhance the tom reasoning abilities of llms, but this strategy falls short in addressing higher-order tom rea-soning. @xcite foot_1 tracks each entity's beliefs and their estimation of other entities' beliefs, through graphical representations. however, it requires a substantial amount of external memory as well as being difficult to apply to context-rich tom scenarios. furthermore, there are currently no tools specifically dedicated to tom reasoning. ## timetom overview figure.1c illustrates the errors llms made in tom reasoning, often ignoring the temporal order of events and confusing the reasoning logic in higherorder tom questions. concurrently, explicitly representing the timeline not only allows llm to have a clearer temporal understanding of the events in the story and dialogue, but we also observe the association between higher-order questions (higherorder beliefs) and first-order questions (first-order beliefs) on the timeline. building upon this insight, we introduce timetom, improving the tom capabilities of llms in interactive dialogue and reading comprehension scenarios. the overall procedure of timetom is shown in figure 2 . ## the effect of key components given timetom's strong performance, we analyze its key components: (1) foundation: constructing temporal space. ( 2 ) from the perspective of first-order and higher-order tom questions, considering temporal belief construction and compression as well as time-aware belief solver. ## analysis in this section, we analyze belief solver as prompt vs feedback and the extension of timetom to situations encompassing agent communication. ## conclusion in this paper, we propose timetom to improve the tom capabilities of llms in reading comprehension and interactive dialogue scenarios. specifically, we first construct temporal space which serves as the foundation. building on this, we develop several key components: character's belief state chain construction, social world model cognition-inspired belief compression, and tool-belief solver. extensive experimental results show that timetom substantially improves the reasoning performance of llms on tom questions while making a significant advance towards coherent and robust tom reasoning. the temporal space, serving as a key, unlocks the door to the llms' theory of mind. furthermore, we find that time-tom can also be extended to situations involving agent communication which is commonly occurring in the real-world.