Skip to content

KGCL: Knowledge Graph Change Language

The Knowledge Graph Change Language (KGCL) is a standard for describing changes to ontologies and knowledge graphs (KGs). It describes changes at a high level, the way curators and ontology editors think about them: rename this term, add a synonym, move this class under a different parent, obsolete this term and point to its replacement.

rename UBERON:0002398 from 'manus' to 'hand'
create exact synonym 'cell nucleus' for GO:0005634
obsolete GO:9999999 with replacement GO:0005634

Source

Portions of this page, and Figures 2 and 3, are adapted from Hegde et al., A change language for ontologies and knowledge graphs, Database (2025), used under the CC BY 4.0 license. See Citing KGCL.

Why a change language?

Ontologies and KGs are never finished. Terms are added, merged, and obsoleted; labels, definitions, and synonyms are corrected; and relationships are refined as knowledge improves. The Gene Ontology, for example, is more than 20 years old, and it still changes in every release.

Despite this, there has been no single agreed-upon way to represent or communicate those changes. That gap shows up in two places:

  • Retrospective changes ("diffs"). How do you tell people what changed between two releases? Comparing ontology O1 with O2 should produce the most parsimonious set of changes that turns one into the other. In the figure below, that is a single move of node E from under C to under B.
  • Prospective changes ("patches"). How do you ask for a change you want? Applying a change to O1 produces O2. Today, change requests usually arrive as free-text GitHub issues, which an ontology editor then has to translate by hand into edits in a tool such as Protégé.

Diff (retrospective) and apply (prospective) operations on two versions of an ontology

The logic of ontology changes. (a) A diff between O1 and O2 yields a change object, here a NodeMove. (b) Applying that change object to O1 yields O2. Reproduced from Hegde et al. 2025, Fig. 2 (CC BY 4.0).

A low-level diff of OWL axioms is precise, but it doesn't match how editors think about changes: the move above would show up as one deleted axiom and one added axiom. In a 2023 community survey, 82% of ontology users said staying informed about changes was very or extremely important, yet only 8% were satisfied with the existing ways of viewing them. KGCL provides the higher-level representation that was missing.

The three parts of KGCL

The three components of KGCL: change types, controlled natural language, and direct serialization

The components of KGCL. (a) A classification of change types, (b) a controlled natural language (CNL) for writing changes, and (c) a data model that serializes directly to formats such as YAML. Reproduced from Hegde et al. 2025, Fig. 3 (CC BY 4.0).
  1. A classification of change types. Changes that affect terms (nodes) and changes that affect relationships (edges) form two branches of one hierarchy. For example, NodeRename is a kind of NodeChange, alongside NodeCreation and NodeDeletion. Browse it in the class hierarchy, or see each type drawn out in the visual guide.
  2. A controlled natural language (CNL). A restricted subset of English that people can read and write, and that machines can parse without ambiguity: rename ENVO:01000575 from 'wax' to 'oil'. The CNL is defined by a Lark grammar.
  3. A data model. Each change type has a defined set of attributes. Every change has an id; a NodeRename also has about_node, old_value, and new_value. The model is written in LinkML, so the same change can be written as the CNL, JSON, YAML, or RDF, or as a table in a spreadsheet (less expressive).

The same rename in two of those forms:

rename ENVO:01000575 from 'wax' to 'oil'
id: CHANGE:001
type: NodeRename
about_node: ENVO:01000575
old_value: wax
new_value: oil

Tools that use KGCL

Tool What it does with KGCL
Ontobot GitHub Action that reads KGCL commands from an issue and opens a pull request that applies them to the ontology
BioPortal Web forms that let curators propose changes without writing KGCL; BioPortal writes the KGCL and files the issue for Ontobot
Ontology Access Kit (OAK) Python library and command line: diff two ontologies into KGCL, or apply KGCL to an ontology
KGCL-Java and its ROBOT plugin Java parser and serializer, and a robot apply command for use in ROBOT pipelines
This repository (kgcl-schema on PyPI) The schema, the generated Python data model, and the CNL parser and renderer

Not every tool supports every change type yet.

Using the parser

pip install kgcl-schema
kgcl-parse "create exact synonym 'cell nucleus' for GO:0005634"

From Python:

from kgcl_schema.grammar.parser import parse_statement
from kgcl_schema.grammar.render_operations import render

change = parse_statement("add label 'nucleus' to GO:0005634")
type(change).__name__   # 'NewLabel'
render(change)          # "add label 'nucleus' to GO:0005634"

Persistent URIs

These URIs resolve to the KGCL standard:

The KGCL classification is also browsable on BioPortal.