KGATE 发布:模块化知识图谱自编码训练环境
KGATE : a Knowledge Graph Embedding Training Environment
做知识图谱嵌入的朋友可以看看,这个 PyTorch 库把编码器、解码器、采样器都拆成积木随便拼,还自带防数据泄漏的预处理。
KGATE 是一个基于 PyTorch Geometric 和 TorchKGE 的模块化 Python 库,用于训练知识图谱嵌入(KGE)模型。现有 KGE 库大多不支持完整的自编码器结构,且默认超参数缺乏文档、跨库结果难以比较。KGATE 将初始化器、编码器、解码器、损失函数、负采样器和评估指标做成可自由组合的积木,也允许用户接入自定义模块,并内置防数据泄漏的预处理流程。对比六款现有 KGE 库的基准测试显示,KGATE 训练速度与最快库相当,功能覆盖更广。
KGATE : a Knowledge Graph Embedding Training Environment
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.