---
type: "article"
title: "Universal Numerical Fingerprint (UNF): The Format-Agnostic Key to Data Trust"
summary: "The Solution to Data Integrity for FAIR and AI Communities"
newsletter: "Pascal Heus"
newsletter_handle: "plgah"
newsletter_url: "https://usecommune.com/n/plgah"
author: "Pascal Heus (@plgah)"
published: "2026-02-24T15:03:05.300Z"
canonical_url: "https://usecommune.com/n/plgah/a/universal-numerical-fingerprint-unf-the-format-agnostic-key"
markdown_url: "https://usecommune.com/n/plgah/a/universal-numerical-fingerprint-unf-the-format-agnostic-key.md"
chat_url: "https://usecommune.com/n/plgah/a/universal-numerical-fingerprint-unf-the-format-agnostic-key/chat"
source_url: "https://plgah.substack.com/p/universal-numerical-fingerprint-unf"
body_source: "imported"
likes: 1
replies: 0
body_words: 1333
---

# Universal Numerical Fingerprint (UNF): The Format-Agnostic Key to Data Trust

[![](https://substack-post-media.s3.amazonaws.com/public/images/287b595f-051f-4dff-ae4b-6e58d0c6dee2_1200x509.png)](https://substackcdn.com/image/fetch/$s_!eTqe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F287b595f-051f-4dff-ae4b-6e58d0c6dee2_1200x509.png)

*This article provides an overview of the Universal Numerical Fingerprint (UNF) as an improved alternative to traditional data file hashing and introduces a new open-source Python implementation.*

## **The Hidden Problem with Data Files**

Imagine you have a crucial dataset—say, a collection of financial records or scientific observations. You share it with a colleague. One of you uses a CSV file, while the other converts it to Parquet for better performance. Later, you both check the file’s “fingerprint” using a standard tool such as SHA-256. To your surprise, the two files, which contain the exact same data, produce wildly different fingerprints.

Why does this happen? Standard hashing algorithms (like MD5 or SHA256) work by generating a unique signature based on the file’s binary structure—the literal sequence of bytes. If you change the file format, compress it, rearrange the columns, or even save it on a different operating system, the bytes change, and the fingerprint becomes invalid.

This is a fundamental problem for anyone who manages or relies on high-value data:

- **Validation:** How can you be sure the data you received is exactly the same as the data that was sent?
- **Versioning:** Did the data truly change, or just the storage format?
- **Consistency:** Can you compare a proprietary file with a CSV file and know, without opening them, that the semantic content is identical?
- **Comparability:** Two research papers using the same dataset yield different results. Did they use the same sources or versions?

This is where the Universal Numerical Fingerprint (UNF) steps in, offering a solution that validates the *semantic content* of your data, not just its binary clothing.

## **UNF: The Solution for Data Semantics**

A [Universal Numerical Fingerprint (UNF)](https://guides.dataverse.org/en/latest/developers/unf/index.html) is a short, fixed-length string signature that summarizes the entire dataset and that remains constant even when the data format changes. The algorithm was developed by Micah Altman et al. in the early 2000s and integrated into the Dataverse data cataloguing platform.

The UNF algorithm addresses the format-dependency issue through a process called **canonicalization**. Instead of hashing the raw file, UNF first translates the data into a standardized, normalized form with fixed precision, regardless of how it was originally stored.

Think of it like translating a text from one language (CSV) into a neutral, universal language (canonical form) before checking its unique characteristics.

The steps are generally:

1. **Normalization:** Data types (numbers, dates, strings) are converted into their standard representation. Numerical data is handled with fixed precision and rounding rules.
2. **Order Consistency:** The order of variables (columns) is standardized, often alphabetically or based on a pre-defined schema, so that reordering columns doesn’t change the final fingerprint.
3. **Hashing:** A cryptographic hash function is applied to this canonical representation, producing a unique, fixed-length string (the UNF).

The major advantage of this approach is that UNFs are **format-independent**.

A dataset will retain the same UNF value even if it is:

- Moved between software programs.
- Stored in different file formats.
- Compressed or uncompressed.
- Transferred across different operating systems (Windows, macOS, Linux) or saved on different hardware platforms.

This is critical for data custodians and researchers who deal with data movement and archival. It ensures the integrity of the data’s content is verifiable throughout its lifecycle.

It is important to note that under UNF, row order matters! This is because the algorithm is designed to verify the identity of a specific dataset instance, not merely the presence of its values. An implementation that is both column- and row-order-independent (a “bag-of-values”) would also render the fingerprint useless for scientific verification, as it cannot detect whether data has been “scrambled” across variables.

## **A Practical Example**

If you read this far, you deserve a quick illustrative example. Consider the following trivial dataset, which is naturally semantically identical even when the columns are swapped or the format changed.

[![](https://substack-post-media.s3.amazonaws.com/public/images/07213f98-14af-4f65-8761-d17fbfeb1458_828x290.png)](https://substackcdn.com/image/fetch/$s_!1fbD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07213f98-14af-4f65-8761-d17fbfeb1458_828x290.png)

When processed by dartfx-unf, both the original CSV file or parquet format, or a version where columns are swapped (e.g. id,name,income,dob,sex) produce the **exact same overall UNF**: UNF:6:/iH9nCE4fZqn1rBrrsOc7w==.

[![](https://substack-post-media.s3.amazonaws.com/public/images/4f9149f9-b779-4e31-b6ae-3c7f32017860_1056x426.png)](https://substackcdn.com/image/fetch/$s_!B7GU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f9149f9-b779-4e31-b6ae-3c7f32017860_1056x426.png)

The implementation also produces column-level UNFs, allowing for granular validation of individual variables:

This level of detail is useful for complex data pipelines, APIs, and data science notebooks where data transformations must be rigorously verified.

## **Bringing UNF to Python**

Despite its elegance and utility, UNF has not received the widespread attention it deserves. One reason may be its limited visibility and implementations under the Harvard Dataverse umbrella.

Bringing this technique to the modern Python data ecosystem has been one of my long-standing goals, and with the assistance of AI agents, I’ve finally managed to pull it together. You can find this open-source implementation on [GitHub](https://github.com/DataArtifex/dartfx-unf) (dartfx-unf).

The package is part of the [Data Artifex](https://www.dataartifex.org) ecosystem, which aims to strengthen support for the FAIR data principles and AI readiness through integrated packages and apps.

Building a robust UNF implementation in Python required tackling interesting challenges, particularly for large or real-world datasets:

- **Handling Large Files:** We chose the Python Polars library over other packages for data frame processing. Polars’ efficiency and ability to work with large files that exceed common system memory (out-of-memory computation) made it the ideal foundation.
- **Automated Inference:** Using the right data type is critical to UNF’s canonicalization. Polars, by default, only samples the first 10,000 rows to infer types. For sparse or large datasets, this can miss the correct type. We addressed this by implementing an option to control the scan length.
- **Guided Inference:** For data types that fall under the string family, such as date & time, inference may fail. We addressed this by supporting a JSON schema-based definition as input to guide the process. This will be further refined in the future.
- **Cross-Format Consistency:** Ensuring that data read from a Parquet file is translated into the exact same canonical form as data read from a CSV file required strict adherence to the UNF-6 specification on numeric rounding and string handling.

This initial implementation supports CSV and delimited files, as well as Parquet. Future development plans include:

- **Statistical Package Support:** Integrating support for proprietary statistical file formats like SAS, Stata, and SPSS to make UNF practical for social science and statistical data environments.
- **Row-Level Signatures:** Exploring the use of UNF to compute signatures for individual rows or records. This may be an unforeseen use of UNF that could transform QA, deduplication, and versioning, effectively creating natural, format-agnostic keys for any dataset (not all datasets have primary keys).
- **Rust Implementation:** Exploring a high-performance, optimized implementation in pure Rust, potentially integrating it into the [QSV](https://github.com/dathere/qsv) Data Wrangling Toolkit.

## **UNF in the AI Ecosystem**

Given the explosive growth of AI and machine learning, UNF is positioned to be an essential tool for data governance and reproducibility in this space:

- **Data Provenance and Trust:** AI models are only as good as the data they are trained on. UNF provides an undeniable cryptographic link to the exact content of a training or evaluation dataset, regardless of where or how it is stored.
- **Model Reproducibility:** By hashing training data with UNF, researchers can ensure that any two models claiming to be trained on the “same” data are genuinely based on semantically identical inputs.
- **FAIR Data Principles:** Integrating UNF into data pipelines strengthens support for the Findable, Accessible, Interoperable, and Reusable (FAIR) data principles, a necessary standard for high-value scientific and corporate data.

## **Conclusions**

The Universal Numerical Fingerprint is a remarkably useful piece of technical work that has been waiting for wider adoption. By focusing on data’s semantic content rather than its physical format, UNF solves a core problem of data trust and validation across diverse environments.

With a modern, open-source Python implementation now available, UNF is more accessible to data engineers, custodians, AI experts, and application developers. This is a step forward towards increasing the visibility and usability of UNF, and I invite anyone interested or intrigued to visit the package’s [GitHub repository](https://github.com/DataArtifex/dartfx-unf), provide feedback, peer review, and contribute to its development.

***

## Discussion

No replies yet.
