Histogram Layers for Neural "Engineered" Features

Joshua Peeples, Salim Al Kharsa, Luke Saleh, Alina Zare

TL;DR

This paper introduces "neural engineered" features, specifically Neural Local Binary Patterns (NLBP) and Neural Edge Histogram Descriptors (NEHD), by embedding learnable histogram layers into neural networks. This allows traditional hand-crafted texture features to be learned end-to-end, significantly improving image classification performance and offering greater adaptability compared to their fixed, hand-tuned counterparts.

What Problem Does This Paper Address?

For decades, computer vision relied heavily on "engineered" features like Local Binary Patterns (LBP) and Edge Histogram Descriptors (EHD) for tasks like image classification. While effective, these features have limitations: they require manual parameter tuning, domain expertise, and are not easily adaptable to new problems. Deep learning, particularly Convolutional Neural Networks (CNNs), automates feature extraction but often struggles with capturing local statistical texture information and can be computationally expensive. This paper bridges this gap by proposing a way to learn these powerful engineered features within a deep learning framework, combining the interpretability and effectiveness of traditional methods with the adaptability of neural networks.

Methods

The core innovation is the introduction of histogram layers that can be trained within a neural network. These layers are designed to learn and aggregate texture information.

  • Neural Local Binary Pattern (NLBP): This is a learnable version of LBP. Instead of fixed thresholding and binning, NLBP uses convolutional layers to capture pixel differences (structural information) and then a histogram layer to aggregate these differences. Crucially, the bin centers and widths of the histogram can be learned, allowing the feature to adapt.
  • Neural Edge Histogram Descriptor (NEHD): Similar to NLBP, NEHD learns edge information (structural) using convolutional kernels and then aggregates it using a histogram layer (statistical). The "no-edge" component, traditionally handled by a fixed threshold, can also be learned via a convolutional layer.

Both NLBP and NEHD are designed to be integrated as layers within a larger neural network, allowing for end-to-end training. This means both the structural (e.g., edge kernels, pixel difference detectors) and statistical (histogram binning) components can be optimized for a specific task.

Datasets

The authors evaluated their methods on three datasets:

  • FashionMNIST: A benchmark dataset for image classification, used for initial ablation studies and comparisons.
  • Plant Root Minirhizotron Imagery (PRMI): A real-world dataset of RGB plant images, used to test multichannel processing and comparisons. A subset of specific classes was used.
  • BloodMNIST: A dataset of medical images (blood cells), used to test performance on a more challenging, fine-grained classification task.

Key Insights and Ideas

  • Learnable Histograms are Powerful: The ability to learn the binning and aggregation of texture features (like LBP and EHD) within a neural network is key. This allows the features to adapt to the specific dataset and task, overcoming the limitations of fixed, hand-tuned histograms.
  • End-to-End Learning for Engineered Features: Integrating traditional engineered features into a deep learning pipeline allows for end-to-end optimization. This means the "engineered" feature extractors are not static but are refined alongside the rest of the network, leading to better performance.
  • Synergy of Structural and Statistical Features: The proposed NEHD and NLBP layers effectively combine learned structural texture information (e.g., edge orientations, pixel differences) with learned statistical aggregation (histograms). This synergy is crucial for robust feature representation.
  • Robustness to Initialization: The proposed NEHD and NLBP layers show robustness to random initialization, and in some cases, initialization based on the original hand-crafted features (EHD/LBP) also yields good results, indicating a well-behaved learning process.
  • Potential for Interpretability: While deep learning features are often black boxes, by learning components inspired by interpretable features like LBP and EHD, there's a potential for more explainable AI.

Key Results

  • Superior Performance: Both NEHD and NLBP consistently outperformed their traditional counterparts (EHD and LBP) and even lightweight CNNs (DSANet, MSDCNN) on the FashionMNIST and PRMI datasets. For example, on FashionMNIST, NEHD achieved 89.74% accuracy compared to EHD's 86.94%, and NLBP achieved 87.50% compared to LBP's 71.66%.
  • BloodMNIST Challenge: On the more challenging BloodMNIST dataset, lightweight CNNs (MSDCNN) performed best, but NEHD and NLBP still showed significant improvements over traditional features.
  • Parameter Efficiency: The proposed NEHD and NLBP layers have significantly fewer learnable parameters than the compared lightweight CNNs. For instance, NEHD has only 162 learnable parameters in its feature extraction layers, while DSANet has 290,894.
  • Multichannel Processing: For RGB images, independently processing each channel with NEHD/NLBP yielded the best accuracy, though a 1x1 convolution approach offers a more compact representation for integration into deeper networks.
  • Neighborhood Size Impact: The aggregation window size for statistical features had a greater impact on performance than the dilation size for structural features in NEHD. NLBP was more sensitive to the aggregation window size.

Limitations and Future Work

  • Shallow Network for Evaluation: The experiments primarily used shallow networks to isolate the performance of the engineered features. Integrating these learned features into deeper, more complex networks is a natural next step.
  • Computational Complexity: While the learned features are parameter-efficient, the computational complexity of the structural and statistical layers is discussed, and further optimization might be explored.
  • Multichannel Fusion: While independent channel processing was best for accuracy, exploring more sophisticated fusion techniques for multichannel inputs (beyond a simple 1x1 convolution) could be beneficial.
  • Broader Applications: The authors suggest their framework can be extended to other texture feature approaches (e.g., Haralick, HOG) and applied to more complex tasks beyond classification, such as segmentation and object detection.

Summary updated

BibTeX
@article{peeples2026histogram,
  author = {Joshua Peeples and Salim Al Kharsa and Luke Saleh and Alina Zare},
  title = {{Histogram Layers for Neural "Engineered" Features}},
  journal = {IEEE Trans. Artif. Intell.},
  year = {2026},
  doi = {10.1109/tai.2025.3593445},
}
Figure