TL;DR
The $R^2$-CoD framework sheds light on the "black box" of text-graph multi-modality in NLP by tracking how dual representations evolve during training. Using contrastive knowledge co-distillation, the authors reveal a spectrum of relationships ranging from complete alignment to deep complementarity across five relational reasoning tasks. This analysis provides concrete, structural explanations for when and why fusing text with graphs actually improves model performance.
What Problem Does This Paper Address?
In natural language processing, combining text with graph structures (such as knowledge graphs, dependency trees, or visual layouts) is a proven strategy for tackling complex relational reasoning. Graphs explicitly map out connections that might be ambiguous or entirely missing from raw text.
However, our understanding of how these two modalities interact during deep learning remains shallow. Do the text and graph representations converge toward a single, shared concept space, or do they diverge to capture entirely distinct signals? Because most hybrid models simply fuse these representations right before making a prediction, the internal dynamics of mutual learning have remained largely unexamined.
Methods
To peer inside this interaction, the authors introduce $R^2$-CoD (Understanding Text-Graph Complementarity in Relational Reasoning via Knowledge Co-Distillation), a unified, task-agnostic framework designed for representation analysis.
The architecture processes text sequences and graphs through modality-specific encoders to create a hybrid representation for task prediction. Simultaneously, it uses projection heads to map both modalities into a shared latent space.
The core innovation is the application of a Contrastive Knowledge Co-Distillation (CoD) objective. Unlike traditional teacher-student distillation, CoD is fully symmetric and bidirectional: the text representation supervises the graph projection, and vice versa, using a contrastive loss paired with a stop-gradient operation. To track how these representations relate over time, the authors apply Principal Component Analysis (PCA) for visual inspection alongside batch-level cosine similarity and distance metrics.
Datasets
The framework was evaluated across a diverse suite of five relational reasoning tasks using several established benchmarks:
- Event Temporal Relation Extraction (ETRE): TimeBank-Dense (TB-Dense), TDDiscourse-Auto (TDDAuto), and TDDiscourse-Manual (TDDMan).
- Multilingual Relation Extraction (MLRE): The REDfm dataset, covering five languages (English, Spanish, French, German, and Italian).
- Reasoning Pattern Prediction (RPP) & KBQA Entity-Ranking: Modified versions of the WebQSP dataset.
- Form Understanding (FU): Three multimodal layout datasets: SROIE, FUNSD, and CORD.
Key Insights and Ideas
The paper's most compelling contribution is the definition of a representation spectrum that categorizes how text and graphs interact based on task characteristics:
- Complete Alignment (FU and KBQA Entity-Ranking): In these tasks, text and graph representations strongly converge into overlapping clusters. The authors find this is driven by a strict one-to-one token-node correspondence (e.g., matching a specific text span directly to a spatially grounded OCR bounding box or a specific knowledge graph entity node). This structural pairing acts as a scaffold that pulls the representations together.
- Partial Alignment (MLRE and RPP): Here, representations move closer but remain distinct. This occurs when the inputs contain equivalent information, but the task objective requires global reasoning (like identifying an entire reasoning path) rather than local token matching. This allows each modality to retain its unique inductive biases.
- Complementarity (ETRE): Text and graph representations remain completely separated throughout training. In ETRE, text provides local semantic cues while the graph models abstract, long-distance temporal logic. Because the graph structure does not directly mirror the text spans, the two modalities encode fundamentally different, complementary signals.
Key Results
- Performance Gains: Hybrid models consistently outperform single-modality baselines. Introducing the CoD objective yields further improvements, particularly in tasks characterized by complete alignment or strong complementarity. For instance, on the ETRE TDDAuto dataset, performance jumped from 61.6 (text-only) to 77.1 (with CoD).
- Task Objectives Matter More Than Inputs: Interestingly, RPP and KBQA entity-ranking share the exact same input data but have different objectives (global path identification vs. local entity scoring). Under CoD, RPP showed partial alignment while KBQA showed strong alignment, proving that the nature of the reasoning task dictates how modalities merge.
- Efficiency: The CoD objective introduces minimal computational overhead during training and can be completely discarded during inference, preserving the model's original speed.
Limitations and Future Work
While the paper successfully maps out a clear representation spectrum, the authors note a few limitations:
- Task Scope: The analysis is restricted to five specific relational reasoning tasks within NLP and document understanding. Extending this framework to broader multi-modal domains (like vision-language models) remains future work.
- Linear Metrics: The analysis heavily relies on PCA and linear distance metrics, which might overlook highly complex, non-linear interactions between text and graph spaces. The authors suggest that advanced probing or representation disentanglement techniques could reveal deeper nuances.
Summary updated