Introduction
Relational reasoning—the ability to infer connections between entities (e.g., "If Alice is Bob’s mother and Bob is Charlie’s father, then Alice is Charlie’s grandmother")—remains a significant challenge for standard Natural Language Processing (NLP) models. While Graph Neural Networks (GNNs) excel at these tasks by operating on structured symbolic data, real-world applications often provide only raw, unstructured text. This paper explores whether the structural logic of a GNN can be "distilled" into text-based models during training to improve their performance on raw text at inference time.
Methodology: Structured Distillation
The authors propose a Structured Distillation framework that utilizes a pre-trained GNN as a "Teacher" to guide a "Student" NLP model, such as an LSTM or a Memory, Attention, and Composition (MAC) network.
The framework integrates three distinct loss functions to bridge the gap between text and graph modalities:
- Supervised Learning: Standard cross-entropy loss for predicting relationships directly from text.
- Knowledge Distillation (KD): Penalizes the student if its final output logits deviate from the teacher GNN's predictions, encouraging the student to mimic the teacher's decision logic.
- Contrastive Learning (CL): Aligns the latent representations of the NLP model and the GNN. By maximizing mutual information between their internal "thought" vectors, the NLP model learns to extract structural features from text that mirror the GNN's view of the underlying graph.
Experimental Setup
The framework was evaluated using the CLUTRR (Control Led Underlying Task for Relational Reasoning) benchmark. CLUTRR consists of semi-synthetic stories about family relationships, allowing for precise control over:
- Reasoning Length: The number of steps required to reach a conclusion.
- Noise Levels: The inclusion of "distractor" sentences (irrelevant or disconnected information).
The study tested 12 inductive reasoning datasets to assess how well models generalize to longer reasoning chains than those encountered during training.
Key Results
The distillation process significantly enhanced the performance and robustness of the student models, particularly in complex or noisy scenarios.
- Robustness to Noise: Distilled models demonstrated up to a 13.6% relative improvement in accuracy on datasets containing noisy or irrelevant information. By learning from a GNN that only processes relevant structural facts, the NLP models effectively learned to filter out "distractor" sentences.
- Generalization: Models trained on shorter reasoning chains (e.g., 2-3 steps) showed improved performance when evaluated on longer chains (e.g., 6-10 steps), suggesting a better grasp of underlying relational logic.
- Ablation Analysis: Results confirmed that both Knowledge Distillation and Contrastive Learning are essential; removing either component led to a marked decrease in performance.
Discussion and Limitations
While Structured Distillation narrows the performance gap between text-based and graph-based reasoning, a "structural gap" remains. Even with distillation, NLP models underperform compared to pure GNNs with direct graph access, likely due to the inherent linear limitations of architectures like LSTMs. Furthermore, the method currently depends on the availability of structured symbolic data during training, which may be costly or unavailable in some real-world scenarios. Future work will focus on more effectively transferring knowledge regarding fact relevancy to further close this gap.
Summary updated