Abstract
Traditional Knowledge Graph Embedding (KGE) models often overlook numerical literals or treat them solely as entity attributes, failing to capture mathematical dependencies between connected nodes. We present ReaLitE, a model-agnostic framework that enriches relation embeddings by aggregating numerical attributes from head and tail entities. By explicitly modeling these numerical patterns, ReaLitE achieves significant performance gains in link prediction and node classification tasks, particularly for long-tail relations and highly correlated attributes.
Introduction
Knowledge Graphs (KGs) represent facts as triples: (head, relation, tail). While KGE models like TransE or ComplEx effectively map structural relationships into low-dimensional vector spaces, they typically ignore numerical literals—such as income, rent, or construction years—prevalent in real-world KGs like Wikidata or YAGO.
Existing "literal-aware" models often integrate these values into entity embeddings. However, this approach neglects a crucial signal: the mathematical correlation between attributes across a relation. For instance, a person's monthly income is often strongly correlated with the monthly rent of the house they occupy. ReaLitE addresses this by shifting the focus to relation-centric literal enrichment, allowing the model to learn the bridging mathematical relationships between entities.
Methodology
ReaLitE operates as a two-stage, plug-and-play pipeline designed to complement existing vanilla KGE models. Because it only modifies the relation embedding, it is completely model-agnostic and can be integrated into standard scoring functions for models like TransE, DistMult, and ComplEx.
- Aggregation of Numeric Literals: For every relation in the graph, ReaLitE gathers numerical attributes from all associated head and tail entities. These are aggregated into fixed-size vectors using statistical functions (mean, median, mode, min, max) or a learnable linear combination of these statistics. This step handles missing values and multiple attributes per entity.
- Fusing Literals with Relation Embeddings: The aggregated literal vectors are combined with the standard relation embedding using either a simple Linear transformation or a Gated mechanism. The gated mechanism allows the model to dynamically ignore numerical data if it is unhelpful for a specific relation.
Experimental Results
The authors evaluated ReaLitE on link prediction (FB15k-237, YAGO15k) and node classification (dmg777k, mdgenre) tasks.
- Link Prediction Performance: ReaLitE improved the Mean Reciprocal Rank (MRR) across almost all base models. On FB15k-237, using ReaLitE with ComplEx resulted in a 17% MRR increase over the vanilla model. On relations where head and tail attributes are highly correlated, ReaLitE boosted TransE's MRR by a staggering 47% compared to previous literal-aware baselines.
- Node Classification: Using ReaLitE-trained embeddings as features for downstream classifiers yielded superior results. On the
dmg777kdataset, ReaLitE drove an average 16% increase in Micro-F1 score compared to vanilla KGEs. - Long-tail Relations: ReaLitE provides a vital alternative signal for rare ("long-tail") relations where structural graph connections are sparse, significantly boosting their embedding quality through dense numerical signals.
Conclusion and Limitations
ReaLitE demonstrates that injecting numerical literals into relation embeddings is a powerful strategy for enhancing KGE performance. While the model is highly effective, performance is sensitive to the chosen aggregation function; simple statistics like mode or mean often outperformed more complex learnable aggregators. Future work may focus on refining these aggregation architectures to more consistently capture diverse data distributions.
Summary updated