Abstract
Edge detection with Artificial Neural Networks (ANNs) has achieved remarkable progress but faces two major challenges. First, it requires pre-training on large-scale extra data and complex designs for prior knowledge, leading to high energy consumption. Second, the predicted edges perform poorly in crispness and heavily rely on post-processing. Spiking Neural Networks (SNNs), as third generation neural networks, feature quantization and spike-driven computation mechanisms. They inherently provide a strong prior for edge detection in an energy-efficient manner, while its quantization mechanism helps suppress texture artifact interference around true edges, improving prediction crispness. However, the resulting quantization error inevitably introduces sparse edge discontinuities, compromising further enhancement of crispness. To address these challenges, we propose MS2Edge, the first SNN-based model for edge detection. At its core, we build a novel spiking backbone named MS2ResNet that integrates multi-scale residual learning to recover missing boundary lines and generate crisp edges, while combining I-LIF neurons with Membrane-based Deformed Shortcut (MDS) to mitigate quantization errors. The model is complemented by a Spiking Multi-Scale Upsample Block (SMSUB) for detail reconstruction during upsampling and a Membrane Average Decoding (MAD) method for effective integration of edge maps across multiple time steps. Experimental results demonstrate that MS2Edge outperforms ANN-based methods and achieves state-of-the-art performance on the BSDS500, NYUDv2, BIPED, PLDU, and PLDM datasets without pre-trained backbones, while maintaining ultralow energy consumption and generating crisp edge maps without post-processing.
Introduction
Edge detection is a cornerstone of computer vision, but current Artificial Neural Network (ANN) models suffer from two major drawbacks. First, they are computationally expensive, often requiring massive pre-training on datasets like ImageNet and complex ensemble designs to achieve high accuracy. Second, they tend to produce "thick" or blurry edge maps that necessitate a separate, often non-differentiable post-processing step called Non-Maximum Suppression (NMS) to thin the lines.
Spiking Neural Networks (SNNs)—the "third generation" of neural networks—offer a potential solution. They process information via discrete spikes, making them incredibly energy-efficient on neuromorphic hardware. Their "all-or-nothing" firing mechanism acts as a natural quantizer, which helps suppress low-contrast texture noise. However, this same quantization often leads to "broken" edges (discontinuities) where the signal is too weak to trigger a spike. MS2Edge was developed to harness the benefits of SNNs while fixing these inherent connectivity issues.
Methodology
MS2Edge introduces a U-shaped architecture designed specifically for the spike-driven nature of SNNs. The framework consists of several novel components:
- MS2ResNet (Spiking Backbone): This backbone uses Multi-Scale Residual Learning. By employing parallel convolutions with varying kernel sizes (from 1x1 to 7x7), the network can capture both fine-grained local gradients to fill in gaps and long-range semantic context to maintain boundary continuity.
- I-LIF Neurons & MDS: To mitigate quantization errors, the model uses Integer-Leaky Integrate-and-Fire (I-LIF) neurons. During training, these allow for multi-level spikes to preserve information, which are then converted to binary spikes for efficient inference. This is paired with a Membrane-based Deformed Shortcut (MDS) that stabilizes the distribution of membrane potentials across layers.
- SMSUB (Spiking Multi-Scale Upsample Block): In the decoder, instead of simple interpolation, this block uses multi-scale convolutions with different dilation rates to reconstruct smooth, detailed edges.
- MAD (Membrane Average Decoding): At the output layer, instead of just counting spikes, the model averages membrane synaptic inputs across time steps to produce a final, high-precision edge map.
Key Results and Insights
MS2Edge achieves state-of-the-art performance without the need for a pre-trained backbone (like VGG or ResNet trained on ImageNet). This proves that the spiking mechanism itself provides enough structural information for the task.
- Performance: On the BSDS500 dataset, MS2Edge achieved an ODS F-score of 0.827, outperforming many established ANN-based models.
- Energy Efficiency: The model consumes significantly less energy than its ANN counterparts. It uses roughly 80.15 mJ per image, compared to 167.64 mJ for MuGE or 763.60 mJ for the transformer-based EDTER.
- Superior Crispness: Using the Average Crispness (AC) metric, MS2Edge consistently produced thinner, more precisely located edges than ANNs, effectively eliminating the need for post-processing NMS.
Conclusion
MS2Edge demonstrates that quantization in SNNs is a "strong prior" for edge detection because it naturally filters out subtle texture variations that aren't true object boundaries. By integrating multi-scale learning directly into the residual path, the network uses its larger receptive fields to maintain line continuity even when local spike signals are weak. This work paves the way for energy-efficient, high-precision vision tasks on neuromorphic hardware.
Summary updated