TL;DR
Recent research demonstrates that the key to superior temporal reasoning in Large Language Models (LLMs) is not necessarily increasing model parameters, but rather improving database schema normalization. By converting unstructured Wikipedia infobox timelines into 3NF SQL databases, researchers achieved a 16.8% performance increase, highlighting "schema quality" as a critical bottleneck.
Introduction: The Challenge of Temporal Reasoning
While LLMs excel at static table reading, they often falter when data evolves over time. For instance, answering "Who was India’s cricket captain before Rohit Sharma?" requires an LLM to parse multiple snapshots of a Wikipedia infobox and perform implicit chronological reasoning. Current methods treat these timelines as flat text or JSON, forcing the model to manage temporal ordering and data aggregation simultaneously within its context window. This lack of explicit temporal structure and relational constraints leads to reasoning errors.
Methods: A Three-Stage Pipeline
The proposed approach reframes temporal reasoning as a text-to-SQL problem through a structured pipeline:
- Normalized Schema Generation: The LLM designs a relational database schema in Third Normal Form (3NF), creating distinct tables for Entities, Attributes, and Snapshots (using a
snapshot_idas a temporal anchor). - Database Population: Automated scripts parse raw JSON, clean date formats, and populate a SQLite database.
- Schema-Guided SQL Generation: The LLM translates natural language questions into SQL queries based on the generated schema.
The core innovation, Evidence-Guided Normalization, allows the system to leverage SQL’s native temporal operators (e.g., JULIANDAY()) and deterministic logic instead of relying on the LLM to "hallucinate" temporal sequences in text.
Key Results
The study evaluated various LLMs on the TRANSIENTTABLES dataset. The results show that a well-structured schema significantly boosts performance across different model architectures.
- State-of-the-Art Performance: The combination of Gemini 2.5 Flash (for schema) and Gemini 2.0 Flash (for queries) reached 80.39 Exact Match (EM).
- Significant Gains: This marks a 16.8% absolute improvement over the previous Information Retrieval + Chain-of-Thought baseline (68.89 EM).
- Schema Portability: High-quality schemas generated by larger models (like Llama-3.3-70B) remained effective even when used by smaller models for SQL generation.
Key Insights
- Schema Quality Over Model Scale: Interestingly, Gemini 2.5 Flash outperformed Gemini 2.5 Pro in schema generation. The "Pro" model tended to over-normalize, creating overly complex schemas that hindered SQL generation.
- The Temporal Anchor: Using a universal
snapshot_idenables simple equality joins to resolve complex temporal relationships, such as identifying officeholders during specific periods. - Data Quality Bottlenecks: Error analysis revealed that 70% of failures stemmed from data quality issues (e.g., entity mapping errors) rather than logic or SQL syntax errors.
Limitations and Future Work
The current system is restricted to single-domain queries and struggles with "fuzzy" temporal questions. Additionally, the sequential nature of the pipeline means schema errors can lead to cascading failures. Future research will explore automated schema optimization, allowing models to iteratively refine database designs based on query performance.
Summary updated