Physics

New Rust Library Speeds Up Information Theory Calculations for Physicists

How the science connects

EntropyInformation theorySoftware engineering

AI Insight

Researchers have developed infomeasure-rs, a high-performance Rust library that consolidates various information-theoretic measures and estimators into a single, efficient software package. The library implements multiple entropy variants, mutual information, transfer entropy, and divergence measures using different estimation methods including discrete, kernel, ordinal, and nearest-neighbor approaches. Performance benchmarks show it outperforms existing packages across multiple programming languages on single-core CPU operations, with optional GPU and multi-threading capabilities for further acceleration.


This tool addresses critical barriers in applying information theory across scientific disciplines by providing a unified, computationally efficient, and reproducible implementation. The substantial performance improvements and comprehensive feature set could enable more widespread and practical use of information-theoretic analysis in fields ranging from neuroscience to social sciences.


⚠️ Preprint – Noch nicht peer-reviewed

Dieser Artikel wurde noch nicht von unabhängigen Experten begutachtet. Die Ergebnisse sind vorläufig und sollten mit Vorsicht interpretiert werden.

Abstract: Information theory has become a standard tool across the natural and social sciences, yet practical use is limited by estimator choice, fragmented software, reproducibility, and computational cost. We present infomeasure-rs, an open-source Rust library that brings a broad set of information-theoretic measures and estimators into one self-contained, type-safe package. It covers entropy, mutual information, conditional mutual information, transfer entropy, conditional transfer entropy, cross-entropy, and the Kullback-Leibler and Jensen-Shannon divergences, with discrete (plug-in and bias-corrected), kernel, ordinal, and nearest-neighbour estimators, including the R’enyi and Tsallis families, and exposes local and global values and significance testing through a consistent trait interface. It ships as a single portable binary with no runtime dependency and is continuously validated against a reference implementation. On a single central processing unit (CPU) core, and even without its GPU or parallel paths, it is the fastest of the packages we compared across languages, matching the closest packages only for plug-in discrete entropy and substantially faster for mutual information, the conditional and transfer measures, and the kernel, ordinal, and generalised-entropy estimators. The optional GPU and multi-threaded paths accelerate selected continuous estimators further. The library is open source and, to our knowledge, the most complete information-theory package for Rust.

Source: infomeasure-rs: A High-Performance Rust Library for Information-Theoretic Measures and Estimators