COKE: A Cognitive Knowledge Graph for Machine Theory of Mind

Jincenzi Wu, Zhuang Chen, Jiawen Deng, Sahand Sabour, Helen Meng, Minlie Huang

Abstract

Theory of mind (ToM) refers to humans’ ability to understand and infer the desires, beliefs, and intentions of others. The acquisition of ToM plays a key role in humans’ social cognition and interpersonal relations. Though indispensable for social intelligence, ToM is still lacking for modern AI and NLP systems since they cannot access the human mental state and cognitive process beneath the training corpus. To empower AI systems with the ToM ability and narrow the gap between them and humans, in this paper, we propose COKE: the first cognitive knowledge graph for machine theory of mind. Specifically, COKE formalizes ToM as a collection of 45k+ manually verified cognitive chains that characterize human mental activities and subsequent behavioral/affective responses when facing specific social circumstances. In addition, we further generalize COKE using LLMs and build a powerful generation model COLM tailored for cognitive reasoning. Experimental results in both automatic and human evaluation demonstrate the high quality of COKE, the superior ToM ability of COLM, and its potential to significantly enhance social applications.

Introduction

While Large Language Models (LLMs) demonstrate remarkable fluency, they often lack a robust Theory of Mind (ToM)—the capacity to infer hidden desires, beliefs, and intentions. Current AI systems primarily learn from superficial text corpora, observing what people say without access to the underlying cognitive processes. Consequently, models like GPT-4 can struggle with complex social nuances or adversarial scenarios. To achieve true social intelligence and provide effective emotional support, AI requires a structured method to simulate internal human reasoning.

The COKE Framework and Methodology

The researchers propose formalizing the cognitive process as a chained structure: Situation ⇒ Clue ⇒ Thought ⇒ (Action + Emotion). This structure serves as the foundation for COKE (Cognitive Knowledge Graph).

The cognitive chain structure in COKE, illustrating the transition from external situations to internal thoughts and subsequent responses.

Data Construction

COKE was built using a two-step pipeline:

  1. Generation: GPT-3.5 generated raw data based on social events sourced from ATOMIC.
  2. Verification: Eight graduate students in social psychology manually verified and revised the data to ensure logical consistency.

The resulting dataset contains over 45,000 manually verified cognitive chains across five social domains: School, Work, Tourism, Relationships, and Ordinary Life. A key innovation is the inclusion of Polarity, labeling chains as Positive (optimistic) or Negative (pessimistic) to reflect diverse human mindsets.

COLM: Cognitive Language Model

Using COKE, the researchers fine-tuned LLaMA-2-7B to create COLM. The model is trained on four sequential generation tasks (Clue, Thought, Action, and Emotion), enabling it to "think through" social situations step-by-step.

Results and Evaluation

Experimental results indicate that "Thoughts" act as a critical bridge between the external environment and internal responses. Unlike previous knowledge graphs that focus on simple "if-then" relations, COKE emphasizes the internal trigger factors (Clues) leading to specific mental activities.

Comparison of COLM against GPT-3.5 and GPT-4 across clue, thought, and action generation tasks.

COLM consistently outperformed GPT-4 and GPT-3.5 in both automatic metrics and human evaluations. In human trials, COLM’s cognitive chains were rated valid 90% of the time for clue and thought generation, a significant improvement over GPT-3.5's 61%. Furthermore, integrating COLM into Emotional Support Conversation (ESC) systems led to marked improvements in fluency, identification, and comforting capabilities.

Conclusion

COKE provides a roadmap for AI that understands the why behind human behavior. While currently limited to five social topics, expanding COKE's domain coverage and applying its framework to larger model backbones (like LLaMA-3) represents a promising path toward more sophisticated social reasoning in AI systems.

Summary updated

BibTeX
@inproceedings{wu2024coke,
  author = {Jincenzi Wu and Zhuang Chen and Jiawen Deng and Sahand Sabour and Helen Meng and Minlie Huang},
  title = {{COKE: A Cognitive Knowledge Graph for Machine Theory of Mind}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=LjYni8VSuq},
}
Figure