Large Language Models Can Learn Temporal Reasoning

Siheng Xiong, Ali Payani, Ramana Kompella, Faramarz Fekri
1/12/2024
214 citations
cs.CL

Official code: xiongsiheng/TG-LLM (71 stars, Python, MIT, last commit 2026-04-11).

Abstract

While large language models (LLMs) have demonstrated remarkable reasoning capabilities, they are not without their flaws and inaccuracies. Recent studies have introduced various methods to mitigate these limitations.

Show full abstract

Temporal reasoning (TR), in particular, presents a significant challenge for LLMs due to its reliance on diverse temporal concepts and intricate temporal logic. In this paper, we propose TG-LLM, a novel framework towards language-based TR. Instead of reasoning over the original context, we adopt a latent representation, temporal graph (TG) that enhances the learning of TR. A synthetic dataset (TGQA), which is fully controllable and requires minimal supervision, is constructed for fine-tuning LLMs on this text-to-TG translation task. We confirmed in experiments that the capability of TG translation learned on our dataset can be transferred to other TR tasks and benchmarks. On top of that, we teach LLM to perform deliberate reasoning over the TGs via Chain-of-Thought (CoT) bootstrapping and graph data augmentation. We observed that those strategies, which maintain a balance between usefulness and diversity, bring more reliable CoTs and final results than the vanilla CoT distillation.

View on arXivView PDF

Code Implementations(1)

xiongsiheng/TG-LLMOfficial100%
MIT

[ACL 24 main] Large Language Models Can Learn Temporal Reasoning

7110PythonJan 29, 20247 months agoMIT

Similar Papers

Cite this paper

@article{xiong2024large,
  title  = {Large Language Models Can Learn Temporal Reasoning},
  author = {Siheng Xiong and Ali Payani and Ramana Kompella and Faramarz Fekri},
  year   = {2024},
  eprint = {2401.06853},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.06853v6}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.06853.svg)](https://codeofpaper.com/paper/2401.06853)

Discussion