Relation-Anchored Calibration of Numeric Literals Across Knowledge Graphs

Knowledge graphs store facts as (head, relation, tail) triples. They also store numbers: birth years, populations, coordinates, prices. Models that use these numbers predict missing links noticeably better. The catch is that every such model has only been tested inside a single graph. When a model is moved to a second graph that reports numbers differently (another unit, another calendar, log-scaled or bucketed values), the numbers it learned to rely on stop meaning the same thing. Our proposal is to learn, for each attribute in the new graph, a monotone "translation" of its numbers into the conventions of the original graph. We fit this translation using one kind of evidence: patterns that hold along relations, such as the typical age gap between spouses, stay the same across graphs even when the raw values do not.

The key design choice is what gets aligned. The usual adversarial recipe trains a second network, a discriminator, to tell which graph a representation came from, and trains the encoder to fool it. That recipe would align whole entity embeddings. We instead align only the distribution of number pairs along each relation, after passing them through a map that preserves order. Two things follow. The model never forces genuinely different graphs to look identical, which is the failure that Graph-Relational Domain Adaptation documents for uniform alignment. And it can separate a change in reporting convention, which should be undone, from a real change in the population, which should be kept. Per-graph normalization cannot make that separation.

Core Claim

Relation-conditional statistics of numeric literals identify reporting-convention shift, and they do so even when the marginal distribution of each attribute also shifts for real reasons. Examples of such statistics are the distribution of $(v_h, v_t)$ for spouse, parent_of, or located_in, and in particular the differences $v_h - v_t$. Per-attribute z-scoring treats all marginal shift as convention. Uniform adversarial alignment treats all shift as noise.

A monotone per-attribute calibration, fitted so that these relation-conditional statistics match across graphs, should recover the scale and non-linear parts of a convention change. It should leave genuine population differences intact. Feeding the calibrated numbers to a difference-based literal model should then transfer to the new graph better than either normalization or embedding-level adversarial alignment.

One limitation is built in. Differences cancel constant offsets, so relational statistics cannot identify an offset shared by all attributes of one type. We therefore score with difference-based literal features, as in the radial-basis-function expert of KBlrn, where such an offset is harmless. We recover absolute offsets only when a few anchor entities shared by both graphs are available.

Position in Prior Work

Work that motivates this proposal. Literal-aware embedding methods show that numbers matter for link prediction. TransEA regresses attribute values from entity embeddings. LiteralE gates literal vectors into entity embeddings and reports up to 12.41% MRR gain for DistMult on FB15k-237. ReaLitE pools head and tail literals into relation embeddings. KBlrn scores relations with kernels on numeric differences and reaches MRR 31.4 on FB15k-237-num, against 26.4 for DistMult. All four train and test on one graph, with one set of conventions.

KBlrn matters twice here. It uses literals as differences, and it observes that these differences have relation-specific shapes: narrow for spouses, wide for influenced_by. That invariance is the one we exploit.

Cross-graph work that drops the numbers. Cross-graph completion methods ignore literals. Inter-domain Multi-relational Link Prediction aligns RESCAL embeddings with Wasserstein or maximum-mean-discrepancy penalties. IMKGC uses information-bottleneck constraints across multilingual graphs. Both are purely relational.

Work that constrains the design. On the Benefits of Attribute-Driven Graph Domain Adaptation finds that attribute shift usually exceeds topology shift across networks. That supports adapting the numbers. However, GAA handles it with a gradient-reversal discriminator (a layer that flips the encoder's gradient so the encoder learns to fool the discriminator) on fused node features. GRDA's results warn that this kind of uniform alignment can hurt: on TPT-48, DANN and ADDA did worse than no adaptation.

DAEA aligns cross-lingual graphs adversarially in a kernel space, but treats attributes as text.

Work that supplies the method. FAN-Net supplies the template of splitting shift into a "style" part that is removed and a "structure" part that is kept. It does this for images. We do it for numbers, with reporting conventions as style and relational numeric laws as structure.

Research Program

We use a shared relation vocabulary across a source graph $S$, which has many triples and literals, and a target graph $T$, which has fewer triples and literals in its own conventions. For each target attribute $a$ we learn a monotone map $f_a$, parameterized as a positive-increment piecewise-linear function over quantiles of the target values. Source values pass through unchanged.

For every observed triple $(h,r,t)$ where both endpoints carry attribute $a$, we form the tuple $z = (r, a, f_a(v_h) - f_a(v_t), f_a(v_h))$. The discriminator $D$ sees $z$ and tries to guess which graph it came from. Because $D$ is given $r$, it can only exploit mismatches in relation-conditional distributions, not in marginals alone.

The full objective is

$$ \min_{\theta, f} \max_{D} \; \mathcal{L}_{\text{link}}(\theta, f) \;-\; \lambda \, \mathcal{L}_{\text{dom}}(D, f). $$

Here $\theta$ are the parameters of a KBlrn-style model: latent DistMult or ComplEx scores plus kernel experts on calibrated differences. $\mathcal{L}_{\text{link}}$ is the link-prediction loss on the union of source and target training triples. $\mathcal{L}_{\text{dom}}$ is the discriminator's cross-entropy on the tuples $z$. $\lambda$ trades off the two.

Entity embeddings are never passed to $D$. Gradient reversal is applied only to $f$, so only the number channel is aligned.

We also derive a closed-form special case. When $f_a$ is restricted to be affine, matching the mean and variance of relation-conditional differences gives the scale directly. This case serves as both a cheap estimator and an ablation.

The analysis has two parts. First, we characterize when relational statistics identify $f_a$. This holds up to an offset whenever at least one relation involving $a$ has a difference distribution that is non-degenerate and differs from its reflection. Second, we measure how calibration error grows as the number of target triples per attribute shrinks.

Baselines

Naive reference points. The first reference is a literal-free DistMult or ComplEx trained on the union of both graphs. It shows what the numbers are worth at all. The second is KBlrn and LiteralE trained on raw, unadapted literals. This is the realistic practice of pooling the graphs and hoping. If raw literals do worse than no literals on shifted targets, that alone establishes the problem.

Per-graph z-score normalization. Each attribute is standardized within each graph, then KBlrn is run on the result. This is the baseline a practitioner would reach for.

Uniform adversarial alignment. This is LiteralE with a gradient-reversal discriminator on the literal-enriched entity embeddings, which is the GAA recipe carried over to link prediction.

Wasserstein alignment. This is the soft embedding alignment of the inter-domain link-prediction paper, which reports Hit@10 0.328 against 0.302 for plain RESCAL on FB15k-237 at 3% entity overlap.

Strongest in-domain literal model. The strongest reported literal model is KBlrn at MRR 31.4 on FB15k-237-num. For every shifted split constructed here, there is no reported result found on Lacuna.

Ablations. Four ablations isolate the key ingredient. A marginal discriminator sees $f_a(v)$ without the relation or the pair, which tests whether relational anchoring is what matters. The affine moment-matching estimator tests whether adversarial training earns its cost. A non-monotone map tests whether preserving order matters. An oracle applies the true inverse transform and serves as a ceiling.

Fairness. Every method uses the same base scorer and embedding dimension, the same training triples, and the same number of hyperparameter trials, 30 per method. Model selection uses a small labeled target validation set that is identical for all methods.

What counts as beating. We count it a win if the proposal significantly improves filtered target MRR over the best of z-score, uniform DANN, and Wasserstein alignment on non-affine and mixed shifts, over three seeds. It must also avoid falling below the raw-literal model on the natural-shift split, where identity is the correct map.

Why not just…?

Why not just z-score each attribute within each graph? Normalization cannot tell convention from population. Consider a target graph of eighteenth-century people. Its birth-year marginal genuinely differs from a modern source graph, but its spouse age gaps do not. Z-scoring rescales those gaps by the target's standard deviation, which is set by how many centuries the graph spans, and so distorts the very feature KBlrn uses. The natural-shift split tests this directly: normalization should hurt there while the proposal leaves values close to identity. Under pure affine unit changes, normalization is a real competitor and may tie us. We report that honestly.

Why not just put a standard DANN discriminator on the fused embeddings? GRDA shows that uniform alignment produced negative transfer on continuous, structured targets, with DANN and ADDA below source-only on TPT-48. LiteralE also found that linear literal transforms often damage embeddings. Aligning entire entity embeddings asks the model to erase real differences between graphs. The uniform-DANN baseline versus our number-only alignment measures exactly this.

Why not just learn the calibration end to end from target link loss, with no discriminator? This is the most serious threat. With enough target triples, link likelihood alone may pin down $f_a$. Our bet is that sparse targets lack the signal, and that relational distribution matching supplies it from unlabeled pairs. We run this variant as an additional baseline across a sweep of target triple fractions. If it matches the proposal at every fraction, we will drop the adversarial term and report relational anchoring as a sparse-data regularizer only.

Why not just match moments of relational differences in closed form? For affine shifts this is likely enough. It is the affine special case of our method, and we report it as such. The adversarial monotone map needs to beat it only on log-scaled, quantized, and mixed shifts. If it does not, the contribution reduces to the closed-form estimator.

Proposed Experiments

Data. We build transfer splits from FB15k-237-num (KBlrn), the LiteralE literal sets for FB15k-237 and YAGO3-10, and YG58K (TransEA). We partition each into source and target subgraphs with 0–5% entity overlap, following the inter-domain protocol.

Synthetic shifts. On the target, we apply controlled monotone transforms to the literals: affine unit changes, log reporting, coarse quantization into 5–20 bins, and a mixture that varies per attribute.

Natural shift. Separately, we split by entity era (birth or founding year) and by latitude band, leaving literals untransformed. The correct calibration there is identity.

Metrics. We measure filtered target MRR and Hits@10 overall and on literal-sensitive relations, including influenced_by, where KBlrn reports literals moving Hits@10 from 20.9 to 26.8. We also report calibration error of $f_a$ against the known inverse, and target-fact sparsity curves at 5% to 50% of target triples.

Decisive checks. Three results would settle the claim. The first is that the relational discriminator beats the marginal discriminator on the mixed shift. That confirms relational anchoring is the working ingredient. The second is that on the natural-shift split the learned $f_a$ stays near identity while z-scoring degrades MRR. That confirms the method separates convention from population. The third is that the gap over end-to-end calibration widens as target triples shrink. If any of these fails, the corresponding part of the claim is falsified and the note says so.