NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Spectral Haar Binarizer: Compact Boolean Contrast Representations for Hyperspectral Classification

Michał Romaszewski, Przemysław GłombarXiv 2026

TL;DR

The Spectral Haar Binarizer (SHB) is a novel preprocessing method that bridges the gap between continuous, high-dimensional hyperspectral data and efficient, logic-based Tsetlin Machines. By extracting Boolean features based on the contrast between spectral intervals rather than individual band thresholds, SHB captures the "shape" of a spectrum while providing a compact, hardware-friendly representation that outperforms standard binarization techniques.

What Problem Does This Paper Address?

Hyperspectral imaging (HSI) captures a wealth of information by recording hundreds of narrow wavelength bands for every pixel, creating a "data cube." While powerful for identifying materials—like distinguishing real blood from red paint—this data is continuous, noisy, and computationally heavy.

Researchers are increasingly looking toward Tsetlin Machines (TMs) for HSI classification because they are inherently interpretable and extremely efficient on hardware (using bitwise logic instead of heavy floating-point math). However, TMs require Boolean (0 or 1) inputs. The standard way to "binarize" data is to threshold each spectral band independently. This is problematic for HSI because the most important information often lies in the relationship between bands—such as the specific "dips" in absorbance caused by hemoglobin (see Figure 1 below). Independent thresholding discards these slopes and local shapes, leading to bulky, less effective models.

Figure 1: Hyperspectral imaging of blood and blood-like substances, based on the dataset introduced in [31]. (a) Laboratory scene containing blood and visually similar red substances. (b) Absorbance spectra of blood, red paint, and artificial blood. Although these materials may appear similar in RGB imagery, their hyperspectral signatures reveal distinct spectral characteristics. In particular, the blood spectrum exhibits characteristic haemoglobin absorption features, including the 𝛼and 𝛽bands around 576 nm and 542 nm, respectively, as well as a further feature near 950 nm. This illustrates the potential of hyperspectral imaging for discriminating substances and analysing their material properties beyond what is accessible from conventional RGB data.

Methods

The authors introduce the Spectral Haar Binarizer (SHB), which moves away from per-band thresholding toward a contrast-based approach inspired by the famous Viola-Jones face detection algorithm.

  1. 1D Haar-like Features: Instead of looking at one wavelength, SHB calculates the difference between the average intensities of two spectral intervals. This directly captures local slopes and absorption features.
  2. Integral Spectra: To keep computation lightning-fast, the method uses a "prefix sum" (integral spectrum). This allows the sum of any spectral interval to be calculated in constant $O(1)$ time using just two additions, regardless of the interval's width.
  3. AdaBoost-style Selection: The space of possible interval pairs is massive. The authors use an AdaBoost-inspired procedure to iteratively select a compact set of the most discriminative "stumps" (thresholded contrast features).
  4. Hardware Optimization: At inference time, the authors show that the comparison of means can be algebraically rearranged to eliminate floating-point division entirely, leaving only integer additions and multiplications (which can further be reduced to shifts).

Datasets

The SHB was evaluated across five highly diverse hyperspectral datasets to ensure robustness:

  • Indian Pines (INPI): Agricultural remote sensing (crops).
  • Pavia University (PAVI): Urban remote sensing (materials like asphalt and bitumen).
  • La Selva (MOSA): Tropical rainforest tree-species classification.
  • Blood Hyperspectral (HBE1 & HBF1): Forensic detection of blood against visually similar substances (ketchup, paint, etc.) on various backgrounds.

Key Insights and Ideas

  • Shape Over Absolute Values: The core "aha" moment is that for HSI, the relative difference between bands is a much stronger feature for logic-based models than the absolute value of any single band.
  • Decoupling Dimensionality: Standard binarizers expand the input size (e.g., 200 bands $\times$ 5 bits = 1000 features). SHB decouples this; you can choose to extract exactly 256 high-quality features regardless of how many bands the sensor has. This leads to a significant reduction in memory footprint.
  • Classifier Agnostic Benefits: While designed for Tsetlin Machines, the SHB features also improved the performance of Random Forests. This suggests that the binarizer is actually performing a very effective form of feature engineering that exposes the underlying physics of the spectra.

Key Results

The results show that SHB provides a superior bridge to Boolean logic:

  • Superior Accuracy: In binary classification tasks, the TM-SHB combination achieved the best average performance (94.89% Balanced Accuracy), significantly outperforming TMs using standard binarization (~83-85%).
  • Beating the "Raw" Baseline: Remarkably, SHB-based models often outperformed Random Forests trained on the raw, unbinarized continuous data. This proves that the binarization process isn't just compressing data—it's cleaning and highlighting the most relevant signals.
  • Efficiency: The ablation study (Figure 3) confirmed that classification performance stabilizes at around 256 features, allowing for a very compact representation without sacrificing accuracy.

Limitations and Future Work

While SHB is a major step forward for edge-AI in hyperspectral sensing, the authors note a few areas for growth:

  • Spatial Context: The current model is "pixel-wise." It doesn't yet account for the spatial relationships between neighboring pixels, which is a common way to boost HSI accuracy.
  • Candidate Sampling: The initial pool of features is generated randomly. The authors suggest that biasing this generation toward known physical markers (like specific absorption bands) could make the selection process even more efficient.
  • Field Deployment: While the math is hardware-friendly, the next logical step is testing the full pipeline on actual FPGA or microcontroller hardware to measure real-world energy and latency gains.

Summary updated

BibTeX
@misc{romaszewski2026spectral,
  author = {Michał Romaszewski and Przemysław Głomb},
  title = {{Spectral Haar Binarizer: Compact Boolean Contrast Representations for Hyperspectral Classification}},
  year = {2026},
  eprint = {2610.41478},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.41478},
}
Figure