PathE: Leveraging Entity-Agnostic Paths for Parameter-Efficient Knowledge Graph Embeddings

Ioannis Reklos, Jacopo de Berardinis, Elena Simperl, Albert Meroño-PeñuelaarXiv 2025 · DOI

Introduction

Knowledge Graphs (KGs) such as Wikidata and Freebase serve as critical infrastructure for modern AI applications, including search engines and recommendation systems. However, the sheer scale of these graphs—often containing millions or billions of entities—presents a significant challenge for traditional Knowledge Graph Embedding (KGE) methods. Models like RotatE or TransE typically assign a unique vector to every entity, leading to memory requirements that explode as the graph grows. Furthermore, these transductive models cannot easily accommodate new entities without full retraining.

PathE addresses these challenges by proposing a "fully entity-agnostic" approach. Instead of storing massive entity embedding tables, PathE dynamically computes entity representations from relational paths, achieving state-of-the-art performance while using a fraction of the parameters required by previous models.

Methodology

The core innovation of PathE is its ability to represent entities using only the patterns of relations they participate in. The model stores representations exclusively for relations, which are typically orders of magnitude fewer than entities.

The PathE architecture overview, illustrating the flow from relational contexts and paths to the final prediction heads.

The architecture consists of several key components:

  • Node Projector: A shared Multi-Layer Perceptron (MLP) that maps an entity's local relational context (the types and counts of its incident relations) into a continuous vector space.
  • Path Generation: The model mines unique random walks (paths) for each entity. For instance, an entity is defined not by a unique ID, but by sequences like [actor_in] -> [movie] -> [directed_by] -> [director].
  • Entity-Focused Positional Encodings: To handle long paths effectively, PathE utilizes custom cyclical positional encodings. These help the Transformer focus on the specific head or tail entity being embedded, effectively discounting entities that are too many hops away.
  • Path Aggregator: A Transformer-based module that aggregates multiple paths to create a single, structure-aware representation of an entity.

By learning to process paths and relations rather than specific nodes, PathE is inherently inductive, allowing it to generate embeddings for unseen entities based on their local connectivity.

Key Insights

Relational Fingerprinting

PathE relies on the concept of "relational fingerprinting." In dense graphs, the specific combination of relations surrounding a node is often unique enough to identify its role and properties without needing an explicit entity ID.

The Sparsity Challenge

The model's performance is closely tied to graph density. In sparse graphs like WN18RR, which have very few relation types, many entities may appear identical to the model. PathE is most effective in "path-rich" environments like Freebase or Wikidata.

Positional Importance

The inclusion of custom positional encodings significantly improved performance—by 13% on FB15k-237 and 22% on CoDEx-Large. This underscores that the relative position of an entity within a logical chain is as vital as the relations themselves.

Key Results

PathE demonstrates extreme parameter efficiency. For relation prediction on WN18RR, it requires only 40,000 parameters, a stark contrast to the millions used by traditional methods.

Performance metrics (MRR and Hits@k) on the CoDEx-Large dataset as the number of paths per triple (ppt) increases.

As shown in the evaluation on the CoDEx-Large dataset, performance metrics such as Mean Reciprocal Rank (MRR) and Hits@k improve as the number of paths per triple (ppt) increases, demonstrating the model's ability to leverage richer relational contexts.

In the inductive setting, PathE outperformed all other path-based methods on the FB15k-237 benchmark. While it faces challenges on sparse datasets, it remains highly competitive on dense, real-world graphs, often matching the performance of models with 10x to 100x more memory overhead.

Conclusion

PathE represents a shift toward more scalable and flexible Knowledge Graph Embeddings. By "forgetting" entities and focusing on relational patterns, it achieves high efficiency and strong inductive capabilities. Future work will explore scaling PathE to even larger datasets like Wikidata5M and investigating hybrid models that combine path-based representations with a small set of anchor nodes for improved performance on sparse graphs.

Summary updated

BibTeX
@misc{reklos2025pathe,
  author = {Ioannis Reklos and Jacopo de Berardinis and Elena Simperl and Albert Meroño-Peñuela},
  title = {{PathE: Leveraging Entity-Agnostic Paths for Parameter-Efficient Knowledge Graph Embeddings}},
  year = {2025},
  eprint = {2501.19095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.19095},
}
Figure