Vortex Codec for Float32 Physics Data Compression

I have been working on lossless data compression for High Energy Physics data. The four main LHC experiments produce around 15 petabytes of detector data per year. The standard pipeline relies on classical dictionary compressors like LZMA or Zstd for archival storage. The core problem is that classical compressors treat float32 binary files as unstructured byte arrays. They look for repeated string matches using sliding windows, which is a terrible prior for the statistical structure of IEEE-754 floating-point numbers.

The Float32 Entropy Problem

In little endian format, byte 0 and byte 1 hold the lower and mid mantissa. They encode fractional precision and are highly entropic. Byte 3 holds the sign and the 8-bit exponent. In physics simulations like the CAMEL astrophysics dataset or ATLAS kinematics, measurements cluster around specific physical energy scales, making the exponent byte exhibit very low entropy. Standard autoregressive neural compressors map all 256 possible byte values through a single shared embedding matrix. This forces the network to compromise its capacity across conflicting entropy regimes.

Type-Decomposed Token Embedding and Model Architecture

To fix this I built VORTEX-CODEC, an 87-million parameter autoregressive byte-level model. The main architectural contribution is Type-Decomposed Token Embedding. Instead of one shared table, the embedding layer allocates four independent lookup tables indexed by the position of the byte modulo 4. This explicit prior teaches the sequence model the float32 layout so it can learn specialized representations for exponents and mantissas from scratch. I applied a softmax normalization to a learnable scale vector during initialization to stop one table from dominating the gradient signal early in the schedule.

The sequence then passes through an 8-layer Compressive Transformer. I use Learnable Token Eviction to manage a compressed memory of older tokens, which allows rare high-momentum physical events to persist in memory longer than uninformative background particles. I also implemented a Context-Adaptive Training Wrapper to sample chunk lengths uniformly from 128, 256, and 512 bytes, preventing the model from overfitting to a single context horizon. Finally, the network outputs 256 logits that are consumed by a custom Triton arithmetic range coder to generate the exact lossless compressed bitstream.

Baseline Comparisons on AMD MI300X

I ran all training and evaluation on an AMD MI300X GPU with 192 GB of HBM3 via the AMD Developer Cloud. I tested against LZMA-9, the strongest classical baseline for this data format.

On the ATLAS FTAG dataset, VORTEX-CODEC achieved 3.397 bits-per-byte, a 28.0 percent improvement over LZMA-9. The CamelFloat32 dataset is basically incompressible for classical methods, with LZMA-9 only managing a 1.27 compression ratio. VORTEX-CODEC hit 5.063 bits-per-byte, giving a 19.5 percent improvement. Since CamelFloat32 has almost no dictionary matches, this proves the model is actually learning the structural layout of the float32 data rather than memorizing local byte-string repetitions. To confirm this, I trained a control model with a standard shared embedding. The four-table TDTEmbedding version was 6.4 percent better on average.

Hardware Profiling and Custom Triton Kernels

Profiling on the MI300X showed an encode throughput of 2.9 MB/s on CamelFloat32 and a decode throughput of 2.1 MB/s. Because I wrote a custom Triton arithmetic range coder, the entropy coding step contributes negligibly to the overall wall time.

The primary bottleneck restricts the current codec to offline archival workflows. Approximately 90 percent of the execution time is consumed by the transformer forward pass. Throughput optimization is the immediate next step. I plan to implement model quantization to int8 and write fused Triton attention and memory kernels specifically optimized for AMD hardware to accelerate the forward pass.

Preprint:https://drive.google.com/file/d/1RdcNLZCi25uMBr212CC2YH-836rCExNx/view?usp=sharing

pypi package:t.co/l1BjQw9dWJ

2 Likes

It’s a great idea, but reading the data one byte at a time is definitely what’s slowing you down. To make it much faster, you could let standard zip tools handle the predictable parts of the numbers and only use your AI for the complicated parts. Thanks for sharing.

1 Like