TL;DR
Missing a legal filing deadline by a single day can completely bar a claim, yet Large Language Models (LLMs) frequently flunk the complex calendar arithmetic required to calculate them. This paper introduces a "structure-then-compute" pipeline that extracts legal facts into a Temporal Dependency Graph (TDG) and uses a deterministic engine to calculate deadlines with 100% arithmetic accuracy. This approach significantly outperforms direct LLM prompting and exposes critical self-contradictions in standard model outputs.
What Problem Does This Paper Address?
In the legal world, deadlines are strict jurisdictional boundaries. If a claim is submitted even one day late, it is thrown out regardless of its merits. However, calculating these deadlines is rarely straightforward. A typical calculation requires identifying a specific triggering event (the "anchor date"), applying statutory counting conventions (such as the UK's "beginning with" convention), and accounting for complex extensions like mandatory conciliation pauses.
When researchers ask LLMs to determine if a claim was filed on time by reading raw legal documents (direct answering), the models struggle. They are forced to simultaneously parse dense prose, identify relevant dates, interpret statutory rules, and perform calendar-accurate math (handling leap years and varying month lengths) in a single pass. This often leads to reasoning failures or confident hallucinations where the model's final verdict flatly contradicts its own internal step-by-step math.
Methods
The authors propose a clear division of labor: use language models or rule-based systems for information extraction, but leave the arithmetic and logic to a deterministic code engine.
- Temporal Dependency Graph (TDG): The core intermediate representation. Nodes represent dated facts (tagged with semantic roles like
START,END, orDURATION), and edges represent typed relationships (such as anadditiveedge with adelta_daysoffset, or a sequentialorderingedge). - Extraction Layer: The authors compare a rule-based pipeline (HeidelTime + spaCy dependency parsing) against an LLM-based pipeline (a single prompt generating structured JSON) to extract the TDG from raw text.
- Deterministic Deadline Engine: A calendar-correct code engine that ingests the TDG and a declarative specification of statutory rules. It handles complex logic like the UK's "beginning with" convention (e.g., a three-month period starting January 31 ends April 30) and the Advisory, Conciliation and Arbitration Service (ACAS) conciliation pause (which suspends the clock between two dates and enforces a one-month safety floor). Crucially, if the engine detects conflicting or missing anchor dates, it abstains rather than guessing.
Datasets
The paper evaluates its approach across several distinct datasets:
- UK Employment Appeal Tribunal (EAT) Judgments: A gold-standard evaluation set consisting of real-world judgments from 2025 and 2026 governed by the Employment Rights Act 1996 and the Equality Act 2010.
- Controlled Reasoning Benchmark: A synthetic dataset of 210 items designed to test pure temporal reasoning and multi-step dependency chains (cascades) without extraction difficulties.
- Counterfactual Boundary Tracking Dataset: A large-scale evaluation set created by taking the real EAT cases and systematically perturbing the anchor dates across 427 variations to shift the ground-truth verdict across the statutory boundary. This prevents models from relying on memorized case outcomes.
- Contracts Dataset: 41 unique contract documents sampled from the
Multi_Legal_Piledataset to evaluate extraction performance.
Key Insights and Ideas
- The "Claimant Bias" in LLM Contradictions: When frontier models fail on direct answering, they exhibit a dangerous directional error. In multiple instances, a model's step-by-step reasoning concluded a claim was late, yet its final emitted verdict field claimed it was timely. This bias often aligns with the direction of the appeal, showing that LLMs tend to defer to the legal narrative's desired outcome rather than the math.
- Self-Consistency $\neq$ Correctness: Forcing models to answer all questions in a single prompt eliminates self-contradiction, but actually decreases overall verdict accuracy. Self-consistency is therefore a poor proxy for correctness in complex legal reasoning.
- The Bottleneck is Semantic, Not Mathematical: When the structured pipeline fails, it is almost never due to the arithmetic. Instead, the failure lies in anchor selection—the difficult task of mapping an abstract statutory concept (like "effective date of termination") to the correct factual event in a messy, disputed legal narrative.
Key Results
- Pure Reasoning: On the controlled benchmark, the structured pipeline achieved 100% accuracy across all categories, whereas direct LLM answering accuracy plummeted (down to 7% for some models) as the length of the date dependency chain increased.
- Real-World Cases: Tested on human-verified facts from real EAT judgments, the deterministic engine successfully reproduced 6 out of 7 tribunal verdicts and matched the judges' exact calculated deadlines to the day.
- Robustness to Perturbation: On the 427 counterfactual perturbed items, the structured pipeline achieved 90.2% accuracy on the cases it chose to answer, compared to just 61.2% for direct LLM answering.
- Safe Failures: Unlike direct LLM baselines, which confidently guess and return wrong answers 100% of the time when they fail, the deterministic engine safely abstained (returning a confidence score of 0.00) on half of the unattended full-pipeline runs when the text was too ambiguous to bind an anchor date.
Limitations and Future Work
- Small Real-World Sample: The gold-standard evaluation dataset is small (6 cases, 7 rows), meaning it maps out a taxonomy of failure modes rather than robust statistical error rates.
- Extraction Recall Limits: The pipeline's overall coverage is heavily bounded by the extraction layer's recall. If the extractor fails to link an anchor date properly, the engine must abstain.
- Single Jurisdiction: The statutory rules and conventions evaluated are currently limited to UK employment law. Future work is required to validate the matcher and engine across other legal domains and international jurisdictions.
Summary updated