Causal Reasoning of Entities and Events in Procedural Texts

Li Zhang, Hainiu Xu, Yue Yang, Shuyan Zhou, Weiqiu You, Manni Arora, Chris Callison-Burch

TL;DR

This paper introduces CREPE, a new benchmark for evaluating causal reasoning about events and entities in procedural texts. They demonstrate that current large language models (LLMs) struggle with this task, performing only slightly better than chance. The authors propose a novel approach using code-like representations to prompt LLMs, significantly improving performance and highlighting the potential of code-based reasoning for complex NLP tasks.

What Problem Does This Paper Address?

Natural language understanding often requires reasoning about how events unfold and how entities change over time, especially in procedural texts like instructions or recipes. While existing work has focused on either tracking entity states (e.g., "is the pan hot?") or predicting event likelihoods (e.g., "will touching the pan cause a burn?"), these two aspects are deeply intertwined and causally related. Current LLMs, despite their impressive capabilities, fail to effectively bridge this gap, performing poorly on tasks that require understanding these causal relationships. This paper aims to address this by creating a benchmark that specifically tests causal reasoning about entities and events in procedural contexts and by developing methods to improve LLM performance on this challenging task.

Methods

The core of the authors' proposed solution lies in a novel way of representing procedural texts for LLMs. Instead of using standard natural language prompts, they leverage the power of code.

  • Code-like Representation: They represent procedures as Python classes, where each step is a member function. Hypothetical events are represented as objects with a "change" attribute indicating their likelihood shift. This structured, code-like format allows LLMs trained on code (like Codex) to better understand the procedural flow and causal dependencies.
  • Chain-of-Thought (CoT) Prompting: To further enhance reasoning, they integrate CoT prompting. This involves explicitly guiding the LLM to first predict intermediate entity state changes before making a final prediction about event likelihood. They explore both "soft" entity representations (textual descriptions) and "hard" entity representations (explicitly defined variables and attributes) within their code prompts.
  • Prompt Engineering for LLMs: They also experiment with various textual prompt formulations for standard LLMs like GPT-3, exploring different ways to structure the input and elicit reasoning.

Datasets

The paper introduces a new benchmark dataset called CREPE (Causal Reasoning of Entities and Events in Procedural Texts).

  • CREPE Dataset: This dataset consists of 183 procedures, 1219 steps, and 324 annotated changes in event likelihood. Crucially, each event likelihood change is annotated with the corresponding underlying entity state change that causes it. The dataset is split into a development set (handcrafted and cross-validated) and a test set (annotated by students to assess generalization). The authors emphasize its focus on few-shot and in-context learning settings due to the inherent biases in data annotation.
  • Existing Datasets: They also mention using OpenPI (a procedural text dataset for entity state tracking) to evaluate the effectiveness of existing entity state tracking models as a pipeline component.

Key Insights and Ideas

  • LLMs Struggle with Causal Reasoning in Procedures: Even powerful LLMs like GPT-3 perform poorly on CREPE, indicating a significant gap in their ability to understand the causal interplay between entities and events in dynamic procedural contexts.
  • Code is a Powerful Representation for Procedural Reasoning: Representing procedures as code significantly boosts LLM performance, suggesting that code's structured nature aligns well with the logical flow of procedural texts. This is particularly effective for code-trained models like Codex.
  • Entity State Changes are Crucial Causal Signals: Explicitly incorporating entity state changes, either predicted by the LLM (CoT) or provided as gold data, dramatically improves performance, underscoring their importance as intermediate reasoning steps.
  • Code LLMs Excel at Structured Reasoning: Models like Codex, trained on code, demonstrate a superior ability to reason over structured representations, outperforming text-only models on this task.
  • Existing Entity State Trackers Fall Short: While providing gold entity state changes helps code-trained LLMs, using off-the-shelf entity state tracking models as a pipeline component did not yield improvements, suggesting that current datasets and models for entity tracking may not be sufficient for this specific causal reasoning task.

Key Results

  • Baseline Performance: Standard LLMs (GPT-3, T5, T0) achieve macro F1 scores around 0.35, close to random chance (0.297).
  • Code-based Prompting: The proposed code-like representation for Codex achieves a significant improvement, reaching 0.591 F1 on the test set.
  • Chain-of-Thought (CoT) Integration: Incorporating CoT reasoning, where LLMs predict entity states first, further boosts performance. Codex with CoT achieves 0.667 F1 (using predicted entity states) and 0.715 F1 (using gold entity states) on the development set.
  • Human Performance: Human performance on the CREPE dataset is high, reaching 0.868 F1 on the development set.
  • Ablation Studies: The hierarchical representation of procedures as classes and steps as functions, along with comments, proved critical for the success of the Codex prompt.

Limitations and Future Work

  • Dataset Size and Bias: The CREPE dataset, while high-quality, is relatively small and may contain annotator biases. The authors acknowledge that porting the methods to other text styles (e.g., stories, news) might require domain adaptation.
  • Simplified Causality: The current CREPE dataset assumes each event likelihood change is caused by exactly one entity state change, which is an oversimplification of real-world complex causal relationships.
  • Model Specificity: The success of the code-based representation was demonstrated with Codex. Further research is needed to see if this approach generalizes to other code language models.
  • Future Directions: The authors suggest exploring related tasks like next-event prediction and event temporal ordering by injecting relevant entity information. They also propose investigating more powerful code-based reasoning expressions, such as first-order logic, to improve interpretability and mitigate hallucinations.

Summary updated

BibTeX
@inproceedings{zhang2023causal,
  author = {Li Zhang and Hainiu Xu and Yue Yang and Shuyan Zhou and Weiqiu You and Manni Arora and Chris Callison-Burch},
  title = {{Causal Reasoning of Entities and Events in Procedural Texts}},
  booktitle = {EACL (Findings)},
  year = {2023},
  url = {https://openreview.net/forum?id=bZVKFPAhugw},
}
Figure