TL;DR
Dynamic convolutions make neural networks smarter by adapting their weights to each input image, but they usually blow up parameter counts or tank GPU speed because every image in a batch needs its own custom-assembled filter. KernelDNA solves both problems by letting multiple layers within a network stage share a single "parent" kernel, using tiny, clever adapters to specialize "child" kernels. By mathematically separating layer identity from input adaptivity, it shrinks models below static baselines while keeping up to 99% of standard convolution speed.
What Problem Does This Paper Address?
Standard Convolutional Neural Networks (CNNs) are fast and predictable, largely because they apply the exact same static filter to every image—whether they are looking at a husky or a houseplant. Dynamic convolution breaks this rigidity by blending a pool of base kernels on the fly based on the input image.
The catch? It’s a brutal trade-off. Maintaining a bank of parallel kernels at every layer inflates parameter counts by 4$\times$ or more. Worse, because every sample in a mini-batch gets a uniquely blended kernel, GPUs can no longer run a single, clean matrix multiplication across the batch. Instead, they get bogged down in memory-heavy runtime kernel assembly or awkward batch-grouped convolutions, dragging inference throughput down by 3$\times$ to 20$\times$. Existing methods treat every single layer as an isolated island that needs its own dynamic machinery. The authors ask: is the individual layer really the right unit of design?
Methods
Motivated by the observation that convolutional kernels within the same stage of a CNN look remarkably alike (Figure 1), the authors propose KernelDNA: a stage-level weight-sharing framework. Instead of giving every layer its own bank of weights, multiple layers in a stage share one parent kernel, and each layer generates its own child kernel via a Decoupled Neural Adapter (DNA).
While cross-layer sharing, adapters, and Squeeze-and-Excitation (SE) gates all exist separately, KernelDNA’s magic lies in how it constrains and decouples them into two parts:
- Static Spatial & Filter Modulators: Small, learnable per-layer vectors (encoding which layer we are in, not what image we are seeing) that scale the parent’s spatial grid and output filters. Because they don't depend on the input, they can be pre-multiplied ("fused") into the parent kernel before deployment for zero runtime cost.
- Dynamic Channel Gate: An SE-style block that computes input-dependent weights along the input-channel axis.
Here is the crucial linear algebra trick: because convolution is linear, scaling the kernel along the input-channel axis is mathematically identical to scaling the input feature map before the convolution happens: $W * (\beta_c \odot X) = (W \odot \beta_c) * X$. Moving the dynamic gate onto the input leaves the convolution weight completely identical across the entire batch! Every layer executes as a standard, blazing-fast F.conv2d.
Datasets
The authors evaluate KernelDNA using standard benchmarks (no new datasets are introduced):
- ImageNet-1K: Used for training from scratch on image classification across CNNs and Vision Transformers.
- MS-COCO: Used for downstream object detection and instance segmentation by fine-tuning Mask R-CNN backbones pretrained on ImageNet-1K.
Key Insights and Ideas
- Within-stage CNN layers are deeply redundant: Using Centered Kernel Alignment (CKA), the authors show that same-shape $3 \times 3$ kernels inside a ResNet stage have $>0.78$ similarity on average. Residual connections keep feature distributions stable within a stage, so SGD has little reason to invent wildly different filters.
- Linearity lets you dodge per-sample kernel assembly: Prior dynamic methods mix whole kernels per sample, trapping them in slow grouped convolutions. Restricting input-adaptivity strictly to the input-channel axis lets you push the dynamic math onto the feature map—and ablations show channel gating is the single highest-impact dynamic dimension anyway (+1.97% Top-1 alone).
- Blind sharing hurts; adapted sharing shines: Simply copying a parent kernel across layers drops ResNet50 accuracy by 3.23%. Adding tiny decoupled adapters doesn't just recover that loss—it beats an expanded network with independent weights at every layer while using fewer parameters.
- Transformers are fair game too: Because a linear projection is just a $1 \times 1$ convolution over tokens, KernelDNA drops neatly into attention (QKV/output) and FFN layers by omitting the spatial modulator.
Key Results
- ImageNet-1K Classification: KernelDNA achieves the highest Top-1 accuracy on 4 of 5 CNN backbones while using fewer parameters than even the static baselines and retaining 90–99% of static GPU throughput.
- ResNet18: Reaches 74.23% Top-1 with 9.24M params at 7,683 fps—beating ODConv (73.97%, 44.90M params, 1,267 fps) with 4.9$\times$ fewer parameters and 6$\times$ higher speed, and crushing static ResNet18 (70.25%, 11.69M).
- ResNet50 & ConvNeXt-Tiny: Hits 80.95% (+2.51% over static, 2.5$\times$ faster than KernelWarehouse) and 82.76% (saving over 4M parameters vs. static), respectively.
- Training Efficiency: Trains in 1.32$\times$ baseline time on ResNet18, compared to 2.89$\times$ for ODConv, since backprop avoids gigantic batch-expanded weight tensors.
- MS-COCO & Transformers: Outperforms all dynamic convolution baselines across ResNet50, MobileNetV2, and ConvNeXt-Tiny on detection and segmentation. On DeiT-Small, it matches KernelWarehouse accuracy (80.75% vs. 80.63%) with 51% fewer parameters and 2.2$\times$ the throughput.
Limitations and Future Work
- Storage vs. Latency Trade-off: A single exported model artifact cannot claim both maximum storage compression and maximum speed simultaneously. Pre-fusing static modulators gives optimal latency (reported in fps) by storing separate child weights, whereas keeping them un-fused preserves the tiny parameter footprint at the cost of a small runtime tensor product per layer.
- Hand-crafted Placement: Deciding which layers are parents vs. children (e.g.,
FS-SF-SF) follows a manual heuristic rather than an automated search, and offers limited upside when network stages are very short. - Scope of Theory & Hardware: Their theoretical guarantees cover static approximation under alignment and worst-case norm budgets—leaving a distribution-dependent analysis of the trained, dynamic gate for future work. Furthermore, real-world latency on edge NPUs/ARM chips and compatibility with quantization or pruning remain to be tested.
Summary updated