[Paper Review] OnionNet: Sharing Features in Cascaded Deep Classifiers
OnionNet proposes a cascaded deep learning architecture that shares intermediate feature maps across stages to accelerate inference in retrieval tasks. By allowing subsequent stages to extend both depth and width of earlier features while reusing computed representations, it achieves significant speedups over monolithic and non-sharing cascades with only marginal precision loss.
The focus of our work is speeding up evaluation of deep neural networks in retrieval scenarios, where conventional architectures may spend too much time on negative examples. We propose to replace a monolithic network with our novel cascade of feature-sharing deep classifiers, called OnionNet, where subsequent stages may add both new layers as well as new feature channels to the previous ones. Importantly, intermediate feature maps are shared among classifiers, preventing them from the necessity of being recomputed. To accomplish this, the model is trained end-to-end in a principled way under a joint loss. We validate our approach in theory and on a synthetic benchmark. As a result demonstrated in three applications (patch matching, object detection, and image retrieval), our cascade can operate significantly faster than both monolithic networks and traditional cascades without sharing at the cost of marginal decrease in precision.
Motivation & Objective
- Address the high computational cost of evaluating deep neural networks on negative examples in retrieval scenarios.
- Reduce inference time by reusing intermediate feature maps across cascaded stages instead of recomputing them.
- Enable flexible architecture design where later stages can add both new layers and new feature channels to earlier ones.
- Train the entire cascade end-to-end under a joint loss to ensure optimal feature sharing and performance.
- Demonstrate that feature-sharing cascades can outperform both monolithic networks and non-sharing cascades in speed with minimal accuracy trade-off.
Proposed method
- Design a cascaded architecture where each stage extends the feature map set of the previous stage, allowing reuse of intermediate representations.
- Allow subsequent stages to add both new convolutional layers and additional feature channels to earlier features, enabling depth and width expansion.
- Share intermediate feature maps across stages to avoid redundant computation, particularly for expensive early layers.
- Train the entire model end-to-end using a joint loss function to jointly optimize all stages and maintain representation consistency.
- Use a synthetic benchmark to analyze time complexity and validate theoretical behavior under varying proportions of positive examples.
- Evaluate on real-world tasks: patch matching, object detection, and image retrieval to demonstrate practical speedups.
Experimental results
Research questions
- RQ1Can feature sharing across cascaded deep classifiers significantly reduce inference time without sacrificing precision?
- RQ2How does the computational cost of OnionNet compare to monolithic networks and non-sharing cascades across varying ratios of positive to negative examples?
- RQ3To what extent can architectural flexibility—adding both layers and channels in later stages—improve efficiency and performance?
- RQ4What is the impact of model parameter reduction and feature reuse on the trade-off between speed and accuracy?
- RQ5How do practical GPU execution overheads affect theoretical speedup predictions in real-world deployment?
Key findings
- OnionNet achieves substantial speedups over monolithic networks and non-sharing cascades in patch matching, object detection, and image retrieval, with minimal precision degradation.
- Theoretical analysis shows that OnionNet consistently reduces time cost across all positive example ratios (p), with the largest gains observed when the first stage is wide (e.g., RW3 vs. RW1).
- Empirical running times confirm the theoretical trend, though GPU kernel launch overhead and non-linear GPU performance characteristics can reduce gains for small or weak first-stage networks.
- Non-sharing cascades outperform monolithic models only at low positive example ratios (p), while OnionNet maintains superiority across all p values due to feature reuse and parameter reduction.
- The method is most effective when the first-stage network is relatively wide, as it benefits most from shared computation and reduced redundancy.
- Two-stage cascades are practical and effective, but more than two stages proved impractical due to increased overhead and diminishing returns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.