From Unstructured Text to Causal Knowledge Graphs: A Transformer-Based Approach

Scott E. Friedman, Ian H. Magnusson, Vasanth Sarathy, Sonja Schmer-GalunderarXiv 2022

Abstract

Qualitative causal relationships compactly express the direction, dependency, temporal constraints, and monotonicity constraints of discrete or continuous interactions in the world. Extracting and representing these diverse causal relations are critical for cognitive systems that operate in domains spanning from scientific discovery to social science. This paper presents a transformer-based NLP architecture that jointly extracts knowledge graphs including variables or factors, qualitative causal relationships, qualifiers, magnitudes, and word senses to localize each node within a large ontology. We provide evidence of its accurate knowledge graph extraction in real-world domains and the practicality of its resulting knowledge graphs for cognitive systems that perform graph-based reasoning.

Introduction: The Challenge of Causal Extraction

Humans communicate causality with significant nuance, using language that conveys magnitude, direction, and intent. For instance, a statement like "smoking greatly increases the risk of cancer" contains more than a simple binary relation; it includes a monotonic constraint ("increases") and a magnitude qualifier ("greatly"). Most existing NLP tools struggle to capture this expressiveness, often failing to distinguish between correlation, causation, and comparison, or failing to ground these entities in a broader hierarchy of human knowledge.

Methodology: The SpEAR Architecture

The researchers introduced SpEAR (Span-based Entity, Attribute, and Relation extraction), an extension of the SpERT model designed to bridge the gap between raw text and structured, "reason-able" knowledge representations.

The SpEAR architecture extends SpERT with attention-based span representations and multi-label attribute classification.

Key technical innovations in SpEAR include:

  • Attention-Based Span Representation: Instead of simple max-pooling, SpEAR uses an attention mechanism to weight the most salient words within a phrase (e.g., focusing on "smoking" in "the smoking rate").
  • Multi-Label Attribute Classification: This allows the model to categorize nodes with multiple labels simultaneously, such as identifying a phrase as both a "Comparison" and "Sign+" (indicating an increase).
  • The Rectifier: A symbolic post-processing component that prunes extractions violating logical or schema constraints, such as ensuring a magnitude modifier only attaches to a valid association.
  • Ontological Grounding: Using the LMMS framework, extracted nodes are mapped to WordNet synsets, allowing the system to disambiguate word senses (e.g., "bank" as a financial institution vs. a river bank) for cross-graph reasoning.

Representing Qualitative Nuance

A core strength of the SpEAR approach is its ability to capture "qualitative proportionalities" (q+ and q-). By identifying whether one variable increases or decreases another, the resulting graphs can be used for qualitative simulation and reasoning.

An example of an extracted causal knowledge graph showing the complex relationship between sex predisposition, smoking rates, and geographic qualifiers.

As seen in the figure above, the system extracts not just the factors (e.g., "smoking rate") but also the nature of the association (Correlation), the sign (Sign+), and the magnitude (much). This level of detail allows for "valence computation," where a cognitive system can infer the overall impact of a chain of events.

Evaluation and Results

The model was evaluated on two distinct domains: SciClaim (scientific claims from social science and COVID-19 research) and an Ethnographic Corpus (anthropology papers regarding maternal health in West Africa).

On the SciClaim dataset, the model demonstrated robust performance:

  • Entities: Achieved a micro-averaged F1 score of 89.59.
  • Attributes: Achieved a micro-averaged F1 of 87.08.
  • Relations: Qualitative relations like q+ (positive proportionality) reached an F1 of 70.32, while the overall relation F1 was 77.16.

In the ethnographic domain, the authors provided a proof-of-concept demonstrating that the model could successfully map complex cultural mental models, such as the perceived causal links between specific dietary habits and health outcomes.

Conclusion and Future Work

SpEAR represents a significant step toward automating the construction of causal knowledge graphs from unstructured text. While challenges remain regarding linguistic ambiguity and the need for larger labeled datasets, the integration of neural transformer models with symbolic logic (the Rectifier) and ontological grounding (WordNet) provides a powerful framework for scientific and social science discovery. Future work will focus on expanding ethnographic datasets and using these graphs to automate the verification of reproducibility in scientific claims.

Summary updated

BibTeX
@misc{friedman2022from,
  author = {Scott E. Friedman and Ian H. Magnusson and Vasanth Sarathy and Sonja Schmer-Galunder},
  title = {{From Unstructured Text to Causal Knowledge Graphs: A Transformer-Based Approach}},
  year = {2022},
  eprint = {2202.11768},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.11768},
}
Figure