TL;DR
Autonomous vehicles generate terabytes of lidar data daily, yet public datasets usually store these massive 3D point clouds uncompressed because existing compression methods break the data's structure or decode way too slowly. By setting strict requirements for a usable codec and letting AI coding agents explore the problem space from scratch, the author uncovered a remarkably clean, physics-driven approach. The result is Spindle: a blazingly fast, rule-based codec built on the mechanics of spinning lidars that shrinks datasets by ~30x while keeping downstream neural networks 99% accurate.
What Problem Does This Paper Address?
If you have ever downloaded an autonomous driving dataset, you know the pain: lidar accounts for 55% to 69% of the total storage, single-handedly dwarfing multiple camera streams combined. Yet, we still store raw point clouds. Why?
Most existing point cloud codecs—especially deep learning-based ones—treat a lidar sweep as an arbitrary bag of 3D coordinates designed for human visualization. They group points into spatial grids (like octrees or voxels), merging nearby points and scrambling their original sequence. For machine learning, this is a dealbreaker: ground-truth labels map to points by their exact index, and losing the firing order erases implicit timing data needed for motion compensation. Worse, heavy neural codecs require a GPU and can take several seconds to decode a single frame, turning data loading into a massive training bottleneck.
To actually replace raw files, a compressed dataset needs to check several strict boxes: keep every point in its exact original order, preserve auxiliary channels (like intensity, flags, and timestamps), guarantee a strict maximum error per point (2 cm, matching natural sensor noise), and decode in real time (<100 ms) on a single CPU core so GPUs can focus on training.
Methods
The methodology takes an unconventional, two-stage route: AI-driven discovery followed by human-engineered distillation.
First, the author set up an automated evaluation harness and tasked LLM coding agents (including Claude models and GPT-OSS-120B) with writing a codec from scratch. Given only the strict requirements and raw data formats—with zero hints that the data came from a spinning sensor—top agents deduced the physical scanning pattern of the lidar and beat state-of-the-art codecs for less than $5 in API tokens.
However, the agents' raw code was slow to encode, overfitted to a single sensor, and relied on hefty lookup tables. Taking the structural insights discovered by the agents, the author engineered Spindle, a clean, deterministic, six-step rule-based pipeline:
- Firing Grid: Instead of 3D space, a sweep is unrolled into a 2D grid of
firings × beams. Because the grid mirrors the sensor's physical rotation, point order and beam indices are preserved implicitly for free. - Sensor Model: A tiny configuration file (4–13 KB) captures beam elevations and models smooth ego-motion drift, leaving only the distance (range) and two tiny angle corrections to be coded per point.
- Bounded Quantization: Values are quantized to guarantee every decoded point stays within 2 cm of its original measurement, with an automatic fallback for edge-case outliers.
- Scan-Line Prediction: Consecutive firings of the same rotating beam usually hit the same surface centimeters apart. Spindle predicts each point's range from its predecessors along the scan line using an adaptive choice of seven lightweight predictors.
- Intensity Coding: Intensity values are mapped to preserve rank correlation (keeping bright retroreflective traffic signs exact) rather than wasting bits on sensor noise.
- Entropy Coding: An adaptive binary arithmetic coder compresses the streams in independent chunks. An optional slower variant swaps counted probabilities for tiny integer-math neural networks.
Datasets
Spindle was developed using the nuScenes mini split and evaluated across ten public autonomous driving datasets spanning thirteen different spinning lidars (ranging from 16 to 128 beams):
- nuScenes, SemanticKITTI, Waymo, ONCE, KITTI-360, View-of-Delft (VoD), Argoverse 2, ZOD, TruckScenes, and KITScenes.
- The author also tested scalability on simulated lidars with up to 1,024 beams. No new datasets were introduced, though Spindle configurations for all ten datasets will be released.
Key Insights and Ideas
- Code the acquisition process, not the geometry: Treating a lidar sweep as an unstructured 3D cloud throws away massive redundancy. Unrolling it into the sensor's native firing grid halves the bit rate immediately because one range value replaces three $(x, y, z)$ coordinates.
- Average error metrics hide fatal flaws: Standard codecs optimize average point distance, allowing hard-to-predict, isolated points (like a distant pedestrian or small road hazard) to drift wildly. Bounding the maximum error per point guarantees fidelity everywhere.
- Coding agents as scientific scouts: Lidar compression proved ideal for LLM agents because evaluation takes just two minutes, constraints are crystal clear, and modular rules work well. Agents found the underlying physics without human nudging, while human refinement turned messy, single-sensor scripts into a fast, universal tool.
Key Results
Spindle compression ratios across datasets, geometry bit rates, and decoding speeds
- Massive Compression: On nuScenes, Spindle compresses full sweeps ~32x (down to 5.04 bits per point from 160 bpp), shrinking the dataset from 199 GB to 6.3 GB. It uses 20% fewer geometry bits than PACE (the most compact learned codec) and 33% fewer bits than MPEG's G-PCC predictive mode. The slower learned-entropy variant drops this further to 4.45 bpp (36x compression).
- Blazingly Fast CPU Decoding: Spindle decodes a nuScenes sweep in 2 ms on a single CPU core—over 10x faster than G-PCC (29 ms) and thousands of times faster than top GPU-bound neural codecs like PACE (24 seconds). Over a 100 Mbit/s network link, streaming an epoch takes 8 minutes instead of 4.4 hours.
- Drop-in Downstream Accuracy: Without any retraining, 3D detection (CenterPoint) and segmentation (FRNet) models retain 99.3% and 99.1% of their original accuracy on Spindle-decoded data. Training FRNet from scratch on compressed data retains 99.3% accuracy.
Limitations and Future Work
- Spinning Lidars Only: Spindle relies on a repeating
firings × beamsgrid. Non-repetitive or solid-state lidars require a different sensor model, and pre-shuffled point clouds cost extra bits to restore order. - No Temporal Compression: Each sweep is coded independently so frames can be accessed randomly. Incorporating previous sweeps saves 52% of range bits when the car is stationary, though ego-motion drops that gain to just 6% at highway speeds (>10 m/s)—an open avenue for future motion modeling.
- Fixed Error Bound: Spindle uses a flat 2 cm bound everywhere; adapting the bound dynamically to match beam noise over long distances could save even more bits. Finally, tasks requiring sub-centimeter surface reconstruction may be more sensitive to bounded quantization than detection or segmentation.
Summary updated