Unifying Structure Reasoning and Language Pre-Training for Complex Reasoning Tasks

Siyuan Wang, Zhongyu Wei, Jiarong Xu, Taishan Li, Zhihao Fan · DOI

TL;DR

While large language models (LLMs) are linguistic wizards, they often struggle with the "structural skeleton" of complex arguments. This paper introduces a unified framework that injects structure reasoning directly into the pre-training phase, teaching models to identify implicit entities and relations and perform explicit logical steps using geometric "box embeddings." The result is a model that doesn't just predict the next word but actually navigates the underlying logic of the text.

What Problem Does This Paper Address?

Current Pre-trained Language Models (PLMs) like RoBERTa or GPT are excellent at capturing statistical patterns in language, but they often fail at tasks requiring multi-hop reasoning or formal logic. When a question requires connecting disparate facts across a long document, these models often rely on "shortcuts"—surface-level word overlaps—rather than actual reasoning.

The authors identify a missing "foundation skill": structure reasoning. This involves two steps:

  1. Modeling implicit structures: Recognizing that a paragraph isn't just a sequence of words, but a graph of entities and relations (e.g., "A is the director of B," "B is from country C").
  2. Explicit reasoning: Performing a step-by-step traversal of that graph to reach a conclusion.

Methods

The researchers proposed a framework that combines standard Masked Language Modeling (MLM) with a novel Structure Reasoning Loss.

  • Elementary Structures: They defined four "building blocks" of logic:
  • Simple Triplet: (Entity A $\rightarrow$ Relation $\rightarrow$ Entity B)
    • Two-step Path: (A $\rightarrow$ B $\rightarrow$ C)
    • Outward-intersected: (A $\rightarrow$ B and A $\rightarrow$ C)
    • Inward-intersected: (B $\rightarrow$ A and C $\rightarrow$ A)
  • Geometric Box Embeddings: Instead of representing entities as single points in a high-dimensional space, they represent them as hyper-rectangles (boxes). This is a clever trick: logical operations like "intersection" (finding things that satisfy two conditions) become simple geometric overlaps.
  • The Training Loop: During pre-training on Wikipedia, the model identifies these structures in the text. It then uses the PLM’s internal representations to initialize these "boxes" and performs stepwise geometric operations to "calculate" the answer. The model is penalized if the calculated "query box" doesn't contain the correct answer entity.

Datasets

The authors used a mix of massive pre-training data and specialized reasoning benchmarks:

  • Pre-training: Wikipedia documents aligned with Wikidata to extract ground-truth triplets and structures.
  • Multi-hop Reasoning: HotpotQA and 2WikiMultiHopQA, which require connecting multiple facts to answer a single question.
  • Logical Reasoning: ReClor and LogiQA, derived from standardized tests like the GMAT and LSAT.
  • Knowledge Probing: LAMA and LAMA-UHN to test factual recall.
  • Knowledge Graph (KG) Reasoning: FB15k to see if the model's skills transfer to non-textual data.

Key Insights and Ideas

  • Reasoning as Geometry: By using box embeddings, the authors turn abstract logic into spatial math. This makes the reasoning process "explicit" and differentiable, allowing the model to learn how to reason during pre-training.
  • Intrinsic vs. Extrinsic Knowledge: Unlike previous models (like CoLAKE or KEPLER) that try to "force-feed" external knowledge graphs into a model, this approach focuses on the intrinsic structure already present in the text. This makes the model more flexible and less prone to noise from irrelevant external facts.
  • Complementary Skills: The ablation studies showed that the four elementary structures are complementary. Removing even one (like the "inward-intersected" pattern) led to a drop in performance, suggesting that complex reasoning is truly a "Lego set" of these basic logical shapes.

Key Results

  • State-of-the-Art Performance: The proposed model outperformed RoBERTa and other structure-enhanced models (like ERICA) across all four reasoning datasets.
  • The ChatGPT Comparison: On the ReClor (logical reasoning) test, the model achieved 57.6% accuracy, actually surpassing a sampled version of ChatGPT (56.0%). This is particularly impressive given the difference in model scale.
  • Low-Resource Transfer: When trained on only 10% of the available data, the model maintained a much higher performance floor than its peers, proving that the "structure reasoning skill" is a highly transferable foundation.
  • KG Modality: The model also showed superior performance on pure Knowledge Graph tasks, suggesting it had successfully learned a modality-agnostic way to handle structured data.

Limitations and Future Work

While powerful, the model currently focuses on four specific elementary structures. The authors acknowledge that real-world reasoning can be even more "messy" and non-linear.

  • Future Directions: The team plans to explore more complex structures (like cycles or larger subgraphs) and integrate abductive reasoning (reasoning from an observation to the most likely explanation).
  • Retrieval: They also suggest combining this internal structural skill with external knowledge retrieval to handle cases where the necessary "skeleton" isn't fully present in the provided text.

Summary updated

BibTeX
@article{wang2024unifying,
  author = {Siyuan Wang and Zhongyu Wei and Jiarong Xu and Taishan Li and Zhihao Fan},
  title = {{Unifying Structure Reasoning and Language Pre-Training for Complex Reasoning Tasks}},
  journal = {IEEE ACM Trans. Audio Speech Lang. Process.},
  year = {2024},
  doi = {10.1109/taslp.2023.3325973},
}
Figure