Deep Edge Filter: Return of the Human-Crafted Layer in Deep Learning
Dongkwan Lee, Junhoo Lee, Nojun Kwak
TL;DR
The paper addresses model vulnerability to perturbations and domain shifts by positing that deep features encode semantic, task-relevant signals predominantly in high-frequency components while domain-specific biases reside in low-frequency components. It introduces Deep Edge Filter, a high-pass filtering operation applied to deep features (h_edge = h - LPF(h)) that is attached at a single layer and is non-trainable, with architecture-specific LPF choices (2D for CNNs, 1D for Transformers/MLPs). Through extensive experiments across Vision (TTA), Language (GLUE SST-2 and related tasks), 3D NeRF, and Audio (UrbanSound8K), the method yields consistent generalization and robustness gains, accompanied by evidence of induced sparsity and favorable frequency decomposition. Ablation studies confirm the importance of filter positioning and LPF type, while comparisons against trainable convolution layers suggest that the edge-filtered approach provides a genuine generalization boost beyond merely increasing compute. The work suggests broad applicability, including potential extensions to foundation models and multimodal systems, and provides open-source code for replication.
Abstract
We introduce the Deep Edge Filter, a novel approach that applies high-pass filtering to deep neural network features to improve model generalizability. Our method is motivated by our hypothesis that neural networks encode task-relevant semantic information in high-frequency components while storing domain-specific biases in low-frequency components of deep features. By subtracting low-pass filtered outputs from original features, our approach isolates generalizable representations while preserving architectural integrity. Experimental results across diverse domains such as Vision, Text, 3D, and Audio demonstrate consistent performance improvements regardless of model architecture and data modality. Analysis reveals that our method induces feature sparsification and effectively isolates high-frequency components, providing empirical validation of our core hypothesis. The code is available at https://github.com/dongkwani/DeepEdgeFilter.
