Introduction
Generating event temporal graphs—structured maps of how narrative events relate in time—poses a significant challenge for auto-regressive Large Language Models (LLMs). While graphs are inherently sets of relations, LLMs are optimized for sequence prediction. This fundamental mismatch often leads to "shy" models that under-generate relations to avoid sequence-based penalties. This paper introduces the Set-Aligning Framework (SAF), which utilizes data augmentation and novel "Set Property Regularizations" to align sequential generation with set-based graph structures. The result is a significant boost in the model's ability to recover complex temporal structures, outperforming both standard fine-tuning and zero-shot prompting with models like ChatGPT.
The Challenge of Sequential Graph Generation
Understanding the temporal flow of a narrative is a complex task. Traditional approaches used a brittle two-step pipeline: first extracting events (e.g., "the explosion"), then classifying the relationship between every possible pair (e.g., "before," "after"). This method is computationally expensive and prone to error propagation.
Recent shifts toward end-to-end generation use LLMs to output graphs as strings (e.g., using DOT notation). However, because a graph is a set of edges, standard training loss (cross-entropy) penalizes models for generating correct edges in a different order than the training target. This "misalignment" discourages models from being thorough, leading to sparse graphs with low recall.
The Set-Aligning Framework (SAF)
To bridge the gap between sequential text and set-based graphs, the authors propose SAF, which rests on two main pillars:
- Data Augmentation: During training, the order of edges in the target string is randomly shuffled. This teaches the model that the specific sequence of relations is secondary to the content itself.
- Set Property Regularizations (SPR): This core innovation introduces three new loss components to the training objective:
- Cardinality Regularization: Encourages the model to generate the correct number of edges.
- Duplication Regularization: Penalizes the repetition of the same edge.
- Matching Regularization (Hausdorff Distance): By mapping generated and ground-truth edges into an embedding space, the model calculates loss based on semantic similarity rather than exact token-to-token matching.
Experimental Setup and Datasets
The framework was evaluated using Flan-T5 as the backbone model across several datasets:
- NYT Temporal Event Graph Dataset: A large-scale dataset of over 18,000 New York Times documents, with labels generated via weak supervision from the CAEVO tool.
- Human-Annotated NYT Test Set: A high-fidelity benchmark of 22 documents annotated by humans to ensure quality.
- MATRES and TB-Dense: Smaller, established datasets used to test zero-shot generalization across different domains.
Key Results and Insights
Overcoming the Recall Bottleneck
Standard LLMs tend to be conservative in graph generation because they are penalized for every token that deviates from the target sequence. SAF addresses this by encouraging the model to be more "talkative." As shown in the experimental results, SAF generates 24% to 48% more edges than the baseline model across various datasets.
Performance Metrics
On the NYT test set, SAF achieved an Edge Recall of 39.96, a significant improvement over the Flan-T5 baseline of 32.43. The overall Edge F1 score improved from 39.73 to 44.80. Furthermore, in zero-shot tests on the MATRES dataset, SAF achieved an F1 of 15.96, nearly doubling ChatGPT’s 8.09. This suggests that the structural knowledge gained through SAF (forming valid, non-redundant sets) generalizes better than general-purpose prompting.
Conclusion and Future Work
SAF demonstrates that treating graph generation as a set-alignment problem rather than a sequence-matching problem significantly improves the performance of LLMs on temporal reasoning tasks. While the model still faces challenges with noisy training data and long-distance inference (linking events separated by more than ten sentences), the framework provides a robust path forward for end-to-end structural generation. Future work may focus on improving supervision quality by prioritizing "salient" narrative events over every minor verb.
Summary updated