NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Modularizing Deep Learning via Pairwise Learning With Kernels

Shiyu Duan, Shujian Yu, José C. PríncipeIEEE TNNLS 2020 · DOI

TL;DR

This paper introduces a novel framework that reinterprets deep neural networks (NNs) as modular kernel machines (KMs). This perspective enables a provably optimal modular training approach that decouples module training, significantly improving label efficiency and facilitating model reusability, all without sacrificing performance compared to end-to-end training.

What Problem Does This Paper Address?

Deep learning models are notoriously difficult to modularize. While engineering principles emphasize modularity for scalability, maintainability, and reusability, current deep learning workflows often require end-to-end training, making it hard to debug, update, or reuse individual components. Furthermore, traditional deep learning training demands a large amount of labeled data and relies on backpropagation, which might not be the most efficient way to leverage this data. This paper aims to bridge this gap by proposing a modular training paradigm inspired by kernel methods, which offers a more efficient and flexible approach to deep learning.

Methods

The core of this work lies in a new perspective on neural networks: viewing them as a series of linear models in feature spaces, essentially kernel machines. This is achieved by "absorbing" the nonlinearity of a layer into the subsequent layer, transforming each layer into a KM with a kernel induced by the preceding layer's nonlinearity.

Based on this KM interpretation, the authors propose a provably optimal modular training framework. For a two-module network (F2 composed with F1), the key insight is that the training of the input module (F1) can be decoupled from the output module (F2). This is achieved by having F1 optimize a "proxy objective function" that relies on pairwise kernel evaluations between examples from different classes. This proxy objective effectively captures the optimal representation F1 should learn for F2 to perform well, without needing F2's trainable parameters or backpropagation.

The authors also introduce a method to quantify module reusability and task transferability. This leverages the same proxy objective function, allowing for an estimation of how well a pre-trained module (F1) can adapt to a new task, without requiring any further training.

Datasets

The authors evaluate their methods on:

  • MNIST: A standard dataset for handwritten digit recognition.
  • CIFAR-10: A dataset of 60,000 32x32 color images in 10 classes.

They also create a benchmark of 15 binary classification tasks derived from CIFAR-10 to evaluate task transferability.

Key Insights and Ideas

  • NNs as Kernel Machines: The paper provides a compelling theoretical link between finitely wide, fully trainable NNs and kernel machines. This isn't an asymptotic result (infinite width) or an expectation-based one, but a direct equivalence by redefining layer composition.
  • Modular Training without Backprop: The most significant insight is the development of a modular training framework that provably finds the same optimal solution as end-to-end training but without requiring backpropagation between modules. This is a major step towards truly modular deep learning.
  • Label Efficiency: The modular approach dramatically improves label efficiency. The output module, which requires full supervision, performs exceptionally well with very few labeled examples (as few as 10 for CIFAR-10, one per class). This suggests that traditional supervision and backpropagation might be inefficient.
  • Implicit Pairwise Labels: The training of the input module leverages "implicit pairwise labels" (whether pairs of examples are from different classes), a weaker form of supervision than full labels, yet yields competitive results.
  • Task Transferability Estimation: The framework provides a fast, data-driven, and training-free method to estimate module reusability and task transferability, offering a practical solution to a long-standing problem in transfer learning.

Key Results

  • Performance Parity: The modular training approach achieves performance comparable to end-to-end training on MNIST and CIFAR-10 across various backbone architectures (LeNet-5, ResNet-18, ResNet-152). For instance, ResNet-18 on CIFAR-10 achieved 94.93% with modular training versus 94.91% with end-to-end.
  • Exceptional Label Efficiency: On CIFAR-10, the modular model achieved 94.88% accuracy using only 30 randomly chosen fully-labeled examples for the output module. With balanced classes, it required just 10 examples (one per class) to reach the same accuracy.
  • Accurate Task Space Mapping: The transferability estimation method accurately described the task space structure of 15 binary classification tasks derived from CIFAR-10, aligning well with intuition and common sense, using only 10% of target task data and no computational overhead.
  • Faster Training: While not explicitly quantified as a speedup percentage, the modular approach inherently allows for parallel training of modules and avoids the computational cost of backpropagating through the entire network, suggesting potential efficiency gains.

Limitations and Future Work

  • Two-Module Focus: The theoretical optimality proof is presented for the two-module case. Generalizing this to arbitrarily deep modular networks is left as future work.
  • Output Layer Constraint: The theoretical framework for modular training and transferability estimation relies on the output module being a single-layer NN (or having a specific form). While common, this is a constraint.
  • Future Work: The authors suggest further rigorous theoretical and empirical studies on transferability estimation, exploring how modular learning can contribute to better un/semi-supervised learning paradigms, and investigating the impact of network design choices on modular learning.

Summary updated

BibTeX
@article{duan2020modularizing,
  author = {Shiyu Duan and Shujian Yu and José C. Príncipe},
  title = {{Modularizing Deep Learning via Pairwise Learning With Kernels}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2020},
  doi = {10.1109/tnnls.2020.3042346},
}
Figure