Formal Concept Analysis for Semantic Compression of Knowledge Graph Versions

Damien Graux, Diego Collarana, Fabrizio Orlandi

Abstract

Knowledge Graphs (KGs) such as Wikidata and DBpedia are inherently dynamic, evolving as facts are added, updated, or corrected. Managing multiple versions of these graphs typically incurs significant storage and processing overhead. This paper introduces a novel semantic compression method that leverages Formal Concept Analysis (FCA) to identify and group redundant facts across different KG versions. By encoding version metadata directly into URIs using a specialized grammar, the proposed approach reduces triple counts significantly—achieving an 80% reduction in a motivating example—while ensuring the data remains directly queryable via standard SPARQL without requiring decompression.

Introduction

The evolution of Knowledge Graphs presents a challenge for data providers who must release and maintain multiple versions. Existing solutions generally fall into two categories: syntactic compression, which reduces file size but requires decompression for use, and delta-based versioning, which stores only changes but necessitates reconstructing specific versions for querying.

This research proposes a "semantic" approach to compression. Instead of treating the data as bit patterns, the method identifies shared semantic concepts across time. The objective is to create a single, compressed representation that acts as a "live" graph, queryable across any version history using standard tools.

Methodology: The Compression Pipeline

The authors propose a three-step "zip function" for RDF data designed to map, analyze, and compress versioned triples.

The three-step pipeline for semantic KG compression.
  1. Formal Context Mapper: This component treats different versions of an entity as distinct "objects" and their associated predicate-object pairs as "attributes." It constructs a formal context table representing the presence of facts across versions.
  2. FCA Engine: Utilizing Formal Concept Analysis, the engine generates a concept lattice. This mathematical structure reveals implicational dependencies, identifying which sets of facts are common to specific version subsets.
  3. Rule-based Grammar Compressor: The final stage replaces redundant triples with a single compressed triple. Version history is encoded into URIs using a specific grammar:
  4. Hash (#): Separates version identifiers and concatenated objects.
  5. Hyphen (-): Denotes a continuous range of validity (e.g., v=02-20).
  6. Comma (,): Lists discrete, non-contiguous versions.

Experimental Results

The approach was evaluated using a curated "CR7" dataset, representing the career of Cristiano Ronaldo across four snapshots: 2002, 2008, 2013, and 2020.

Comparison of original and compressed Knowledge Graphs for the CR7 dataset.

In this motivating example, the original four versions comprised a total of 30 triples. After applying the semantic compression pipeline, the graph was reduced to just 6 triples. This represents an approximately 80% compression rate. Crucially, the compressed graph retains the full information of the original versions, which can be retrieved using standard SPARQL 1.1 string functions and regular expressions to filter the encoded URIs.

Discussion and Future Work

While the initial results are promising, several challenges remain. The method leads to "URI explosion," creating a high cardinality of unique predicates and objects that may impact performance in non-optimized triplestores. Additionally, the choice of delimiters (#, -, ,) poses a risk of collisions with existing data.

Future research will focus on scaling the FCA-based approach to large-scale datasets like the full DBpedia history and introducing similarity thresholds to allow for the compression of near-identical facts.

Summary updated

BibTeX
@inproceedings{graux2021formal,
  author = {Damien Graux and Diego Collarana and Fabrizio Orlandi},
  title = {{Formal Concept Analysis for Semantic Compression of Knowledge Graph Versions}},
  booktitle = {HAL},
  year = {2021},
}
Figure