Source-linked AI summary

KGATE : a Knowledge Graph Embedding Training Environment

Benjamin Loire, Galadriel Brière, Célia Brahimi, Antoine Toffano, Anaïs Baudot

arXiv:2610.09927v1cs.LGcs.AI

TL;DR

Existing KGE libraries have gaps in complete autoencoder support, maintenance, and cross-library comparability. KGATE provides a modular training environment with configurable components and preprocessing for data leakage. Benchmarks find its speed comparable to the best-performing libraries and orders of magnitude faster than PyKEEN.

  • Problem

    KGE libraries often lack complete encoder–decoder autoencoders and have maintenance, interoperability, and undocumented-hyperparameter gaps that prevent cross-library result comparison.

    Source: §1 · p. 2
  • Method

    KGATE provides a modular autoencoder library with configurable building blocks and preprocessing focused on controlling data leakage.

    Source: §1 · p. 2, §2 · p. 2, §2.1 · p. 2
  • Results

    Across FB15k-237 and WN18RR, KGATE’s speed is comparable to the best-performing libraries and orders of magnitude faster than PyKEEN.

    Source: §3 · p. 4
  • Takeaways & Limitations

    KGATE is released as version 1.0, with explainability and temporal KGE modules planned as extensions.

    Source: §4 · p. 4

Abstract

from arXiv · show

Knowledge graph embedding (KGE) models encode the entities and relations of a knowledge graph into a low-dimensional latent space, enabling tasks such as classification or link prediction. Most KGE models follow an autoencoder architecture, in which an encoder projects the knowledge graph into the latent space and a decoder reconstruct it. Combining both encoder and decoder components is increasingly needed, yet existing libraries rarely support complete autoencoders, are often unmaintained, rely on undocumented default hyperparameters, and produce results that cannot be compared across libraries. Here we present KGATE (Knowledge Graph Autoencoder Training Environment), a modular Python library built on PyTorch Geometric and TorchKGE. KGATE lets users assemble initializers, encoders, decoders, losses, negative samplers, and evaluation metrics as building blocks, or plug in their own block. KGATE includes a preprocessing procedure that controls data leakage, a builtin training pipeline, and reproducibility by design. Benchmarks against six existing KGE libraries show that KGATE training time is comparable with the fastest libraries while offering a broader set of features.

1 Introduction

Knowledge graphs represent typed relationships between entities, and KGE maps entities and relations into low-dimensional representations for downstream tasks. The section motivates combining encoders and decoders and introduces KGATE as a modular library for complete KGE autoencoders.

1 Introduction

  • KGE encodes entities and relations in a low-dimensional latent space for tasks such as classification and link prediction.Knowledge graphs represent entities as nodes and typed interactions as edges, formally expressed as (head, relation, tail) triplets.Source: §1 · p. 1
  • Autoencoders combine encoders that aggregate neighborhood information and generalize to unseen nodes with decoders that score triplets but are transductive.Decoder performance also varies with the relation of interest.Source: §1 · pp. 1–2
  • Many KGE papers use decoder-only models, while papers introducing encoder architectures often use DistMult alone, motivating combined encoder–decoder designs.The section links this need to multimodal and expanding knowledge graph datasets.Source: §1 · p. 2
  • Existing KGE libraries have maintenance, interoperability, and undocumented-default-hyperparameter gaps, and results from one library cannot be compared with another.PyTorch Geometric and PyKEEN are exceptions to the claim that most listed libraries are mostly unmaintained.Source: §1 · p. 2
  • KGATE is proposed as a modular library for complete autoencoders that aims to enforce best practices while remaining accessible to newcomers.Its building-block design is intended to adapt to different KGE applications.Source: §1 · p. 2

2 Implementation

KGATE organizes preprocessing, model construction, training, and evaluation as a modular workflow whose components can be configured or extended.

2 Implementation

  • KGATE builds on PyTorch Geometric and TorchKGE, with a modular interface, exposed model-building API, documentation, builtin training pipeline, and reproducibility by design.The implementation also includes cross-library model comparison.Source: §2 · p. 2

2.1 Data Layer

  • The data layer centralizes triplets, embeddings, mappings, and split masks in a KnowledgeGraph object, while preprocessing targets data leakage in evaluation.Builtin datasets include FB15k-237, WN18RR, and PrimeKG; data leakage is training-set inclusion of information reserved for testing, which can inflate evaluation performance.Source: §2.1 · p. 2

2.2 Model Layer

  • Initializers support random, user-supplied, and Node2Vec features; GATv2, RGCN, and GraphSAGE encoders can transform these features, or they can pass directly to the decoder.The model layer presents its components as building blocks that users or future updates can extend.Source: §2.2 · pp. 2–3, Figure 1 · p. 3
  • KGATE implements 11 decoders across translational, bilinear, and convolutional families, as well as margin-ranking, binary-cross-entropy, and logistic losses.Decoder defaults follow their original papers but can be overridden; prediction supports rank-based and set-retrieval methods.Source: §2.2 · p. 3

2.3 Hyperparameter Layer

  • The hyperparameter layer accepts PyTorch optimizers and learning-rate schedulers and provides Positional, Bernoulli, Uniform, and Mixed negative samplers.Embedding normalization and regularization are applied around gradient steps.Source: §2.3 · pp. 3–4

2.4 Task Layer

  • The task layer supports node/edge classification, triplet classification, and link prediction, with task-appropriate metrics and extensible metric helpers.Link prediction metrics include MRR, MR, hit@k, median rank, MRR@k, score gap, and relative rank.Source: §2.4 · p. 4

2.5 Modularity and Extensibility

  • Users can customize or replace workflow blocks, add tasks and metrics, and export embeddings for external use.The framework is intended for both newcomers and experts seeking a reproducible autoencoder framework.Source: §2.5 · p. 4

3 Benchmarking KGATE in the KGE library ecosystem

KGATE was benchmarked against six KGE libraries on FB15k-237 and WN18RR. Its average speed was comparable to the best-performing libraries and orders of magnitude faster than PyKEEN.

3 Benchmarking KGATE in the KGE library ecosystem

  • KGATE’s average speed was comparable to the best-performing libraries and orders of magnitude faster than PyKEEN.The evaluation covered data loading, mean training epoch, evaluation durations, and evaluation metrics on FB15k-237 and WN18RR.Source: §3 · p. 4

4 Conclusion

KGATE brings a complete autoencoder architecture and built-in data-leakage control together in a modular structure, with explainability and temporal KGE extensions planned.

4 Conclusion

  • KGATE combines a complete autoencoder architecture with built-in data-leakage control in a modular structure.These utilities are described as absent from common KGE libraries.Source: §4 · p. 4
  • The authors released KGATE in version 1.0.Source: §4 · p. 4
  • Planned extensions include explainability and temporal KGE modules.Source: §4 · p. 4

6 Fundings

The study received funding from Servier, the ERDERA project, and Aix-Marseille Université’s Excellence Initiative.

6 Fundings

  • The work was primarily funded by Servier.Source: §6 · p. 4
  • The study’s aims contribute to ERDERA, funded by the European Union’s Horizon Europe research and innovation program under grant agreement N°101156595.Source: §6 · p. 4
  • The project also received funding through Aix-Marseille Université’s Excellence Initiative, A*Midex, under AMX-21-IET-017.Source: §6 · p. 4

SUPPLEMENTARY MATERIALS - KGATE : A KNOWLEDGE GRAPH EMBEDDING TRAINING ENVIRONMENT

The supplied passage identifies the supplementary materials section for KGATE.

SUPPLEMENTARY MATERIALS - KGATE : A KNOWLEDGE GRAPH EMBEDDING TRAINING ENVIRONMENT

Main differences between KGE libraries

KGE libraries can differ in hyperparameters and implementation choices, making results difficult to reproduce or compare across libraries. KGATE offers configuration presets to reproduce results from other libraries for fairer comparisons.

Main differences between KGE libraries

  • Hyperparameters may be ambiguous or undocumented, and hardcoded implementation choices can prevent users from changing them without editing library code.The cited comparison covers embedding dimension, loss, and negative sampling settings, but the supplied passage does not give the table’s individual values.Source: Main differences between KGE libraries · p. 8
  • DistMult implementations differ: TorchKGE normalizes entity vectors with L2, PyKEEN uses L1 and regularizes relations, while three libraries do neither.The cited implementation choices are made at different training stages; the original publication’s objective does not specify normalization, and its authors provide no code.Source: Main differences between KGE libraries · p. 8
  • Different library choices can produce different MRRs and predictions, so results may reflect the library rather than model capabilities.The paper says comparisons across libraries cannot be directly attributed to differences in data or methodology.Source: Main differences between KGE libraries · p. 9
  • KGATE’s configuration presets reproduce results from other libraries to support cross-library comparisons.This is intended to enable fairer comparisons.Source: Main differences between KGE libraries · p. 10

Details on the Data Leakage control procedure

KGATE’s preprocessing detects three kinds of potentially redundant relations and controls their placement across train, validation, and test splits. It also handles undirected relations while retaining removed true triplets for filtered evaluation.

Details on the Data Leakage control procedure

  • Near-duplicate relations are identified when head-tail overlap exceeds a user-defined threshold, often 80%, with overlap checked in both directions.Users can set a distinct threshold for each direction.Source: Details on the Data Leakage control… · p. 10
  • Near-reverse-duplicate relations use the same overlap procedure, comparing one relation’s head-tail pairs with the other’s tail-head pairs.This captures relations with reverse semantic meanings.Source: Details on the Data Leakage control… · p. 10
  • A Cartesian product relation is flagged when its observed triplets exceed a user-defined fraction of all possible pairs of its unique heads and tails.The maximum possible count is the number of unique heads multiplied by the number of unique tails.Source: Details on the Data Leakage control… · p. 10
  • After splitting, KGATE removes training triplets redundant with validation or test triplets; for Cartesian relations, all triplets sharing a head or tail stay in one split.The procedure detects near-duplicate, near-reverse-duplicate, and Cartesian product relations before splitting.Source: Details on the Data Leakage control… · p. 10
  • For undirected relations, KGATE adds a reverse relation and removes corresponding reverse triples across splits, while retaining all true triplets for filtered evaluation.Filtered evaluation excludes ground-truth triplets so models are not penalized for ranking true facts that were removed from training.Source: Details on the Data Leakage control… · p. 10

Benchmarking KGATE and other libraries

KGATE’s training time is comparable to other libraries, with a larger speed advantage over PyKEEN, the only library described as offering a similar range of utilities. The utility comparison also identifies differences in encoder support and graph handling.

Benchmarking KGATE and other libraries

  • The utility comparison notes that LibKGE has no implemented encoder, while PyKEEN’s generic message passing treats the dataset as a homogeneous graph rather than a knowledge graph.PyKEEN also implements specific message-passing encoders such as RGCN that account for different edge types.Source: Table S2 · p. 11

FB15k-237

  • The table compares training duration and reported metrics for TransE on FB15k-237 and WN18RR under shared hyperparameters; DGL-KE was not run on WN18RR.PyKEEN’s data-loading duration could not be separated from training, and KGATE’s loading time was measured without its preprocessing pipeline.Source: Table S3 · p. 11
  • 4 to 5 times faster than PyKEEN, KGATE has training time similar to or slightly longer than other libraries; full 100-epoch duration differences excluding PyKEEN are negligible.PyKEEN is described as the only library with a similar range of utilities.Source: FB15k-237 · p. 11
Loading 2610.09927v1…