Skip to content

PyKEEN-NSX: A Modular Framework for Static, Dynamic and Schema-Aware Negative Sampling in PyKEEN

Aug 2026 · 0 citations · 21 references
Computer Science

TL;DR

PyKEEN-NSX is introduced, an extension of PyKEEN, the popular KGE framework, that provides a modular engineered abstraction for negative sampling that separates the generation of candidate negative pools, conditioned on an explicit context, from the selection strategy, enabling the development of static, schema-aware and dynamic approaches within a consistent framework.

Abstract

Embedding methods have become popular due to their scalability on link prediction and/or triple classification tasks on Knowledge Graphs (KGs). Embedding models are trained relying on both positive and negative samples of triples. However, since KGs generally contain only positive assertions, negative samples are artificially generated through negative sampling strategies, ranging from simple random corruption to more sophisticated approaches that exploit structural, semantic, or embedding information. The design and implementation of advanced negative samplers remains challenging, as most popular Knowledge Graph Embedding (KGE) libraries provide support only for basic strategies and lack a unified framework for developing more advanced and customized solutions. To address this gap, we introduce PyKEEN-NSX, an extension of PyKEEN, the popular KGE framework, that provides a modular engineered abstraction for negative sampling. The proposed architecture separates the generation of candidate negative pools, conditioned on an explicit context, from the selection strategy, enabling the development and integration of static, schema-aware and dynamic approaches within a consistent framework. Based on this abstraction, we implement six negative samplers, while remaining fully compatible with existing PyKEEN workflows and pipelines. As a proof of concept, we study negative availability across four datasets, showing that constrained pools frequently fall below the requested number of negatives, so that the encoded criterion is to a large extent replaced by the random fallback that supplements them.

View source

Similar papers

Preprint Aug 2026

FlowNeg: GFlowNet-Guided Diverse Hard Negative Sampling for Knowledge Graph Embedding

FlowNeg is introduced, a context-conditioned hierarchical generative flow network that amortizes reward-proportional sampling without normalizing a composite reward over the entity set: given a positive triple and corruption side, it selects a type, then an entity.

Ibne Farabi Shihab, Naoshin Anzum Hridi, Joyanta J. Mondal · 0 citations
Open access Sep 2026

DrugBank in RDF: Vector Embeddings

This work addresses the need for efficient and reusable vector embeddings for large-scale RDF Knowledge Graphs, focusing on the widely used DrugBank dataset, and provides a comprehensive, reusable resource that facilitates research while promoting computational efficiency and environmental sustainability.

Verdiana Schena, Simona Colucci, F. Donini · 0 citations
Book Open access Aug 2026

ZeroRel: Relational Reasoning via Graph-guided Large Language Models

A novel self-supervised framework for relational reasoning over RDBs that treats context sparsity as a controllable curriculum variable and leverages it to induce a progressive shift from semantic-dominant inference to structure-aware relational reasoning.

Yujie Tian, Kun Zhang, Qiu-Yuan Li et al. · 0 citations
Book Open access Aug 2026

PYTHIA: Universal Question Answering over Knowledge Graphs

PYTHIA is presented, a training-free, plug-and-play solution for KGQA over any RDF KG which consists of an LLM agent guided by a relation-centric conceptual model of the KGQA task which is acted upon through a suite of tools for entity linking, graph exploration and query execution.

Sergios-Anestis Kefalidis, Konstantinos Plas, Manolis Koubarakis · 1 citation
Open access Aug 2026

Optimizing sample selection for large language model-based entity matching using AssistEM

AssistEM, a framework for efficient LLM adaptation to EM via principled data selection, demonstrates that selective fine-tuning not only accelerates adaptation but also improves training efficiency (requiring fewer GPU hours), enabling open-source LLMs to rival–and in some cases outperform–closed-source models.

John Bosco Mugeni, Steven J. Lynden, Toshiyuki Amagasa et al. · 1 citation
Jun 2026

FedAugment: Table Augmentation Search over Decentralized Data Repositories

Dataset search often aims to identify joinable or unionable datasets to augment a given query table. State-of-the-art approaches rely on large language models (LLMs) to embed tables into vector representations and perform semantic similarity search. However, existing work assumes a centralized data repository with em...

Lennart Behme, Emil Badura, Leonard Geißler et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.