top of page

RDF Tensors

Native tensor operations for knowledge graphs

RDF Tensors is an open-source specification that extends RDF knowledge graph models and SPARQL with native support for multi-dimensional numerical arrays (tensors) and linear algebra operations.

Tensors-RDF3.png

Bridging knowledge graphs and machine learning

Modern AI pipelines rely heavily on multi-dimensional data tensors and high-dimensional embeddings. Previously, representing these vectors in RDF meant serializing them as opaque strings or verbose collections, breaking the query engine’s ability to manipulate, filter, or compare vector data directly.

RDF Tensors bridges this gap by bringing native array operations directly into the knowledge graph engine. Instead of exporting data to external scripts, it equips graph databases with built-in math capabilities through three key innovations: 

✔ Native tensor datatypes:

Efficiently represent numeric and boolean data tensors directly inside RDF triples without text parsing overhead.

✔ SPARQL-native linear algebra:

Perform vector distance calculations, dot products, tensor aggregations, and matrix operations directly within SPARQL queries.

✔ ONNX-accelerated operations:

Leverages the Linux Foundation’s ONNX (Open Neural Network Exchange) intermediate representation to ensure native execution performance and hardware acceleration (GPU, NPU, XPU…) across implementations.

Quick start

To view the complete specification and explore the SPARQL function reference, visit the official documentation:

Our commitment to open source

RDF Tensors is 100% open-source, licensed under Apache 2.0.

At NeverBlink, we build reliable, neurosymbolic AI solutions that combine deterministic knowledge graphs with machine learning and numerical algorithms. Combining semantic graph representations with dense neural vector spaces is foundational to next-generation AI reasoning.

We developed and maintain the RDF Tensors specification to enable standard, inter-operable vector operations across graph databases, helping bridge the gap between knowledge graphs and modern machine learning ecosystems.

Read more

Read our research paper detailing the architecture, benchmarks, and the motivation behind this project:

bottom of page