A multi-task semi-supervised framework for Text2Graph & Graph2Text

Oriol Domingo, Marta R. Costa-jussà, Carlos EscolanoarXiv 2022

TL;DR

This paper introduces T5-MSSF, a semi-supervised framework that uses a single T5 model to simultaneously tackle Text-to-Graph (parsing text into knowledge graphs) and Graph-to-Text (generating human-readable text from graphs). By leveraging cycle training on non-parallel data and using only 15% of available parallel data, the model outperforms unsupervised state-of-the-art methods and demonstrates superior generalization to unseen domains compared to fully supervised models.

What Problem Does This Paper Address?

Knowledge Bases (KBs) store complex, structured facts in graph shapes (usually as subject-predicate-object triples). They are essential for applications like chatbots, question-answering systems, and recommender engines. However, KBs face two major bottlenecks:

  1. Information Ingestion (Text-to-Graph / T2G): Continuously updating the KB by extracting structured graphs from unstructured text.
  2. Information Retrieval (Graph-to-Text / G2T): Presenting retrieved graph data in a human-comprehensible, natural language format.

While these tasks are exact opposites, existing datasets matching text to graphs are tiny—typically on the order of tens of thousands of samples. This scarcity makes it incredibly difficult for deep learning models to generalize well without overfitting. The authors address this data scarcity by treating T2G and G2T as complementary tasks that can be learned jointly from large amounts of unaligned (non-parallel) text and graph data.

Figure 1: Overview of the problem. A Deep Learning model jointly learns Text-to-Graph (gray) and Graph-to-Text (red) in a cycle train- ing regime.

Methods

Instead of training two separate, decoupled models for each direction, the authors propose a single T5-Base architecture trained in a multi-task, semi-supervised environment.

Key components of their approach include:

  • Task Token Specification: Because a single model handles both tasks, specific tokens are prepended to the input to instruct the model whether to parse text into a graph or generate text from a graph.
  • Cycle Training: To exploit non-parallel data, the framework sets up two cycle consistency losses:
  • Forward Cycle: A graph is translated to text, and that generated text is translated back into a graph, which is then compared to the original graph.
  • Backward Cycle: A text snippet is parsed into a graph, which is then translated back into text and compared to the original text.
  • Involutory Function Relaxation: Passing an input through an inverse function can risk the model simply learning the identity function (copying the input). The authors prevent this by modifying the input vector space using the task tokens, forcing the model to learn actual semantic translations.
Figure 2: (1) The cycle training approach is based on two mapping functions g2t : G →T and t2g : T →G, however, our approach uses a single model to learn both functions. This framework introduces two cycle losses that capture the intuition that if we translate from one side to the other, and back again we should obtain the original sample: (2) forward cycle loss: g →g2t(g) →t2g(g2t(g)) ≃g, and (3) backward cycle loss: t →t2g(t) →g2t(t2g(t)) ≃t.

Datasets

The framework was evaluated and trained using two primary data sources:

  1. WebNLG Corpus (v3.01): A standard benchmark containing parallel text and graph data across 16 different DBpedia categories. The test set is explicitly split into Seen Categories, Unseen Entities, and Unseen Categories to rigorously test generalization.
  2. GTWiki (New Dataset): The authors collected and released a massive non-parallel dataset by scraping Wikipedia paragraphs and querying corresponding Wikidata graphs. After preprocessing, it yielded 271,095 graph instances and 240,024 natural text instances for unsupervised cycle training.

Key Insights and Ideas

  • The Power of a Single Model: Prior cycle-training frameworks (like CycleGT) relied on two separate models updated one-by-one, making the joint loss function non-differentiable. Using a single T5 model allows both cycle losses to be backpropagated together, creating a shared latent representation.
  • The "Unseen Domain" Advantage: Purely supervised models excel at data types they have seen before but suffer massive performance drops on entirely new categories. Synthetic data generated during the cycle training loop acts as a regularizer, helping the semi-supervised model maintain consistent performance across both seen and unseen domains.

Key Results

Graph-to-Text (G2T) Generation

Using just 15% of parallel data, T5-MSSF achieved an overall 45.3 BLEU score, outperforming both the fully supervised T5 baseline (44.6) and the unsupervised state-of-the-art CycleGT model (44.6). Crucially, on Unseen Categories, T5-MSSF only dropped to 40.0 BLEU, whereas the fully supervised baseline plummeted from 51.7 to 38.0.

Text-to-Graph (T2G) Parsing

For the parsing task, T5-MSSF achieved an overall F1-score of 0.431, representing a 39.4% relative improvement over CycleGT (0.309) and a massive jump over a standard fine-tuned model without cycle training (0.179).

Limitations and Future Work

While T5-MSSF bridges the gap significantly for unsupervised and semi-supervised setups, a noticeable performance gap still remains when compared to fully supervised models on the Text-to-Graph task (where the fully supervised bt5 model achieves an F1-score of 0.675).

Additionally, the authors note that because this framework allows easy adaptation to new domains simply by throwing unaligned text and graphs into the cycle loop, a promising future direction is exploring its utility in lifelong learning scenarios where KBs must continuously adapt to new real-world information without forgetting old concepts.

Summary updated

BibTeX
@misc{domingo2022multi,
  author = {Oriol Domingo and Marta R. Costa-jussà and Carlos Escolano},
  title = {{A multi-task semi-supervised framework for Text2Graph \& Graph2Text}},
  year = {2022},
  eprint = {2202.06041},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.06041},
}
Figure