Shock-Capturing Limiters for Temporally Consistent Knowledge Graphs

Temporal knowledge graphs store facts together with the time spans during which they hold, for example "X was president of Y from 1990 to 1998." Models that score such facts routinely produce answers that are locally plausible but jointly impossible. They predict two mutually exclusive offices held in the same year, or an office held before the holder was born. The standard remedy is to fix these contradictions after the fact with a combinatorial solver. Computational fluid dynamics faced a structurally identical problem decades ago. High-order schemes represent the solution inside each grid cell as a polynomial, and near shocks (abrupt jumps) these polynomials overshoot into impossible states such as negative density. The cure that became standard is a scaling limiter. It shrinks the polynomial toward its cell average just enough to make every sample point physically valid, while leaving the cell average, the conserved quantity, exactly unchanged. It does this in closed form, and only in the few cells near a jump.

We propose to carry this mechanism over to temporal knowledge representation. Each query of the form (subject, relation, ?) yields a set of fact-validity curves over time. Coarse time bins carry averages that are valid by construction and pool statistics across years. Within each bin, a polynomial supplies year-level detail. A closed-form limiter then guarantees that the curves satisfy convex temporal-logic constraints, namely "at most one holder at a time," "birth precedes office," and "validity stays between 0 and 1," at every year. The coarse-bin evidence is never distorted. The claim is specific and falsifiable: enforcing temporal consistency inside training, through a mechanism that preserves coarse-scale predictions, gives fewer contradictions than post-hoc solvers and better interval prediction than projection or penalties, without the ranking-accuracy loss that mass-moving enforcement causes.

Core Claim

Fact-centric temporal knowledge graph completion has an admissible set that is genuinely meaningful and convex. Let $u_o(t)\in[0,1]$ be the predicted probability that object $o$ completes the query at time $t$. For a functional relation (one holder at a time) the admissible set is $\{u : u_o(t)\ge 0,\ \sum_o u_o(t)\le 1\}$. An ordering constraint between relations of the same subject (birth before office start) is a linear inequality between cumulative curves. The intersection of these constraints is a convex polytope $G$, exactly the setting in which scaling limiters are provably correct, because a convex combination of the cell average and the polynomial stays in $G$ whenever the average does. The limiter is

$$\tilde u(t) = \bar u_k + \theta_k\,\big(u(t) - \bar u_k\big),\qquad \theta_k = \max\{\theta\in[0,1] : \tilde u(t_q)\in G \text{ for all quadrature years } t_q \text{ in bin } k\},$$

where $\bar u_k$ is the bin-$k$ average and $t_q$ are the years inside the bin. Because $G$ is defined by linear inequalities, $\theta_k$ is a minimum of ratios with no iterative solve. It is differentiable almost everywhere, and it leaves $\bar u_k$ untouched.

This idea differs from the closest existing work in a specific way. Towards Time-Aware Knowledge Graph Completion (TAE-ILP) enforces the same kinds of constraints (disjointness, ordering, valid spans), but only at test time, by integer linear programming over precomputed scores. Its representation never learns from the constraint, and the solver can only rearrange candidates the scorer already surfaced. Continuous-time models do something else. Temporal Knowledge Graph Forecasting with Neural ODE (TANGO) evolves embeddings by an unconstrained differential equation. Learning Continuous Temporal Dynamics on Symplectic Manifolds for Temporal Knowledge Graph Embedding (TDSym) evolves them by a volume-preserving Hamiltonian flow. Both regularize the embedding trajectory, but neither constrains the predicted facts, so neither rules out two simultaneous presidents.

We deliberately do not apply limiters to latent embeddings. The research file frames this as Gap 1, but a latent vector has no physical admissible set, and simple norm clipping would do as well there. The constraint belongs on the output, where it has semantics.

Why the physics mechanism, specifically

Three properties of the limiter literature transfer, and each predicts something testable.

The first property is that intervention happens only where the solution jumps. Admissibility preserving subcell limiter for Lax-Wendroff flux reconstruction introduces the scaling limiter and a subcell blending scheme, and reports that its limiter activates in typically under 5% of cells, located precisely at shocks. Fact validity curves are piecewise constant with sharp onsets and expirations, which are exactly "shocks" in time. We therefore expect the limiter to fire only in bins containing a fact transition. Smooth bins keep their full high-order detail.

The second property is that the conserved quantity is protected. A high-order positivity-preserving single-stage single-step method for the ideal magnetohydrodynamic equations guarantees positivity with a flux limiter that blends high- and low-order fluxes. It explicitly gives up exact local energy conservation at the interfaces where its limiter is active. That paper is the cautionary analogue to Euclidean projection onto $G$, which also guarantees admissibility but moves probability mass. The cell-average-preserving limiter does not move mass, so our hypothesis is that coarse ranking accuracy survives enforcement.

The third property is that admissibility comes cheaply from convexity. The relativistic hydrodynamics papers (Bound preserving Lax-Wendroff flux reconstruction method for special relativistic hydrodynamics, same title, alternate entry) recast awkward constraints as a convex set on the conserved variables so that scaling becomes closed form. Constraints Preserving Lax-Wendroff Flux Reconstruction for Relativistic Hydrodynamics with General Equations of State shows that convexity breaks under general equations of state and must then be handled by tailored methods. That paper constrains our scope. Constraints of the "exactly one of" or disjunctive kind are non-convex, and we exclude them rather than pretend the guarantee covers them.

Finally, Conservation-informed Graph Learning for Spatiotemporal Dynamics Prediction (CiGNN) builds conservation into graph message passing as structure rather than as a loss term. It reports one to two orders of magnitude lower error on Burgers' equation and good fits from a few dozen trajectories. It is motivating evidence that structural enforcement beats penalties in data-poor regimes, which is the regime of long-tail entities in YAGO and Wikidata.

Research Program

The model has three parts.

The backbone is a continuous-time encoder that extrapolates to unseen times. We use TDSym's symplectic dynamics, because its authors report that it keeps nonzero accuracy on future timestamps where lookup-table models collapse. A TANGO-style neural ODE backbone serves as a second instantiation to show the head is backbone-agnostic.

The head turns a query into curves. For each bin $k$, the head first produces a bin average $\bar u_k$ that is admissible by construction. For functional relations this is a softmax over candidates plus a "none" slot. For ordering constraints it is a stick-breaking (monotone cumulative) parameterization over the subject's dated relations. The head then produces Legendre-polynomial coefficients of degree $N$ for within-bin detail at yearly resolution.

The limiter is the closed-form $\theta_k$ above, applied in both training and inference.

The bin structure answers the trade-off noted in Embedding Temporal Dynamics in Knowledge Graphs: fine time slices are sparse, and coarse slices blur ordering. Coarse bins carry the statistics. Polynomials carry the resolution. The limiter keeps the resolution from producing contradictions. HyTE, which assigns a separate hyperplane to each discrete slice, sits at the sparse end of that trade-off.

The analysis has two strands. First, we will prove that admissibility holds at every quadrature year whenever the bin average is admissible. This is immediate from convexity, but we must state precisely which constraint families qualify. Second, we will measure limiter activation rates and check whether they concentrate in bins containing true fact transitions, a direct test of the "shocks in time" analogy. Noether-style rule mining (Noether Embedding) is out of scope. Its conserved quantity encodes recurring time lags in event data, not validity intervals, and its authors note degradation on long horizons.

Baselines

The naive reference point is the TDSym backbone with its own scoring and no constraint enforcement, trained and evaluated on identical splits. It measures how often an unconstrained continuous-time model contradicts itself and sets the accuracy any enforcement method must not lose. As a sanity anchor, we will reproduce TDSym on ICEWS14, where its paper reports MRR 0.492, against 0.467 for TeAST, and about 0.362 MRR on the extrapolation splits. We check there that our head does no harm on event data, where few constraints apply.

The strongest existing constraint-enforcing method is TAE-ILP (Towards Time-Aware Knowledge Graph Completion). It reports Hits@10 gains of 19% to 30% over baselines and roughly 10% better relation-prediction precision on YG15k, YG36k, FB42 and FB87. These are relative figures. No absolute value for YAGO11k or Wikidata12k is reported on Lacuna for TAE-ILP, TDSym or TANGO. We will run the ILP decoder on top of the same TDSym backbone with the same candidate pool size and the same constraint set, so the comparison isolates "post-hoc combinatorial versus in-training closed-form." Beating it means fewer or equal violations with higher Hits@10 and interval accuracy, at a fraction of its inference time.

The most dangerous competitor is per-year differentiable Euclidean projection onto $G$, used inside training. It enforces the same guarantee but redistributes mass. It gets the same backbone, the same tuning budget (an equal number of hyperparameter trials), and the same epochs. The limiter beats it if it matches projection on violations (both should be zero) and is at least as good on MRR and interval accuracy, at lower cost. A tie on accuracy with a large cost advantage is a modest win. A loss on accuracy would refute the conservation hypothesis.

We also include a soft-penalty baseline, which adds a constraint-violation term to the loss with a tuned weight. Finally, two ablations isolate the key ingredient. One scales toward a fixed admissible point (zero validity) instead of the bin average, which keeps admissibility but breaks conservation. The other applies the limiter only at test time. If the first ablation matches the full method, conservation is not what matters. If the second matches it, training-time enforcement is not what matters.

Why not just…?

Why not just run ILP after an unconstrained model, as TAE-ILP does? TAE-ILP's gains show the constraints carry real signal. But the solver can only reorder candidates the scorer already ranks highly. It solves an NP-hard search per test query, and it never lets the representation learn from the constraint. Whether in-training enforcement matters beyond what post-hoc repair recovers is settled directly by the test-time-only limiter ablation and by the ILP-on-same-backbone baseline. If ILP matches us on accuracy, our remaining advantage is only cost, and we will report that honestly.

Why not just parameterize the output with a per-year softmax or stick-breaking, so constraints hold by construction with no limiter? For a single functional relation, this is a genuine alternative, and we include it at yearly resolution as a baseline. Two things stand against it. First, it lives at the fine-slice end of the sparsity trade-off: every year needs its own normalized distribution, with no pooling across the bin. Second, coupling ordering across several relations of one subject at every year makes the parameterization combinatorially awkward. If it matches our method on long-tail entities, the bin-plus-detail structure is unnecessary, and we will say so.

Why not just project onto the constraint set? This is the real threat. Projection gives the same guarantee and is already differentiable. Our only principled argument is the conservation one: projection moves coarse-bin mass, the limiter does not. This is exactly the trade-off the magnetohydrodynamics limiter accepts at its active interfaces. The head-to-head comparison and the conservation-breaking ablation decide whether that argument has empirical weight.

Why not just add a penalty? Penalties give no guarantee, and the evidence from CiGNN suggests structural enforcement wins most where data are scarce. We expect penalties to leave residual violations concentrated on rare entities. The stratified analysis below tests this.

Proposed Experiments

We will use YAGO11k and Wikidata12k for interval-valued completion, and YG15k and YG36k to stay comparable with TAE-ILP. Each dataset gets two splits: the standard random split and a chronological extrapolation split built in the style of ICEWS14-Ext, using 80/10/10 by time. ICEWS14 and ICEWS05-15 serve as constraint-light controls.

The metrics are MRR and Hits@10 for link prediction. For time-interval prediction we use the overlap between predicted and gold validity intervals. We also report the constraint-violation rate per subject, measured as the fraction of subjects whose predicted fact set breaks disjointness or ordering in any year. Rounding out the metrics are inference time and limiter activation rate.

Three checks are decisive. First, the full model must reach zero violations, as projection and ILP do, while matching or exceeding projection on bin-resolution MRR. This tests whether conservation of the coarse average is what protects ranking. Second, the limiter's activation must concentrate in bins containing true onsets and expirations, at a low overall rate comparable in spirit to the under-5% figure from the flux-reconstruction work. Diffuse activation would mean the polynomials oscillate everywhere and the analogy fails. Third, gains over the penalty and per-year softmax baselines must be largest for entities with few training facts, and largest on the extrapolation split. If the advantage shows up only on frequent entities and interpolation, the mechanism is not doing what we claim.