The Normalized Difference Layer: A Differentiable Spectral Index Formulation for Deep Learning
Ali Lotfi, Adam Carter, Mohammad Meysami, Thuan Ha, Kwabena Nketia, Steve Shirtliffe
TL;DR
The paper addresses the rigidity of fixed normalized difference indices by embedding a differentiable Normalized Difference Layer with learnable coefficients $\alpha_{ij},\beta_{ij}$ into neural networks. Using softplus reparameterization, the layer preserves illumination invariance and outputs in $[-1,1]$ while enabling end-to-end learning through backpropagation, with closed-form gradient expressions and a backpropagation algorithm. Empirically, the ND Layer matches or exceeds standard MLP performance on Kochia detection with Sentinel-2 data while using substantially fewer parameters and offering strong robustness to multiplicative noise and interpretable learned coefficient patterns. This approach demonstrates the value of injecting domain knowledge as differentiable architectural components, potentially improving efficiency and generalization in remote sensing tasks and beyond.
Abstract
Normalized difference indices have been a staple in remote sensing for decades. They stay reliable under lighting changes produce bounded values and connect well to biophysical signals. Even so, they are usually treated as a fixed pre processing step with coefficients set to one, which limits how well they can adapt to a specific learning task. In this study, we introduce the Normalized Difference Layer that is a differentiable neural network module. The proposed method keeps the classical idea but learns the band coefficients from data. We present a complete mathematical framework for integrating this layer into deep learning architectures that uses softplus reparameterization to ensure positive coefficients and bounded denominators. We describe forward and backward pass algorithms enabling end to end training through backpropagation. This approach preserves the key benefits of normalized differences, namely illumination invariance and outputs bounded to $[-1,1]$ while allowing gradient descent to discover task specific band weightings. We extend the method to work with signed inputs, so the layer can be stacked inside larger architectures. Experiments show that models using this layer reach similar classification accuracy to standard multilayer perceptrons while using about 75\% fewer parameters. They also handle multiplicative noise well, at 10\% noise accuracy drops only 0.17\% versus 3.03\% for baseline MLPs. The learned coefficient patterns stay consistent across different depths.
