Investigating the impact of weight sharing decisions on knowledge transfer in continual learning

Joshua Andle, Ali Payani, Salimeh SekehOpenReview 2023 · DOI · OpenReview

TL;DR

This paper explores how to strategically share knowledge between tasks in Continual Learning (CL) using neural network pruning. They found that simply sharing all learned subnetworks isn't optimal; instead, task similarity and complexity play a crucial role in deciding which subnetworks to share to maximize knowledge transfer and improve accuracy on new tasks.

What Problem Does This Paper Address?

Continual Learning (CL) aims to train neural networks on a sequence of tasks without forgetting previously learned information (catastrophic forgetting). A key benefit of CL is Forward Knowledge Transfer (FKT), where knowledge from earlier tasks helps learn new ones. While pruning methods can create specialized subnetworks for each task, it's unclear which parts of these subnetworks should be shared with new tasks. Naively sharing everything can hurt performance, but sharing too little might miss valuable FKT opportunities. This paper investigates how to make informed decisions about what to share to best leverage FKT, considering the relationships between tasks.

Methods

The authors employ a pruning-based approach to CL. After training a network on a task, they prune it to identify a subnetwork of useful filters. These filters' weights are then frozen. For subsequent tasks, they experiment with different strategies for sharing these frozen subnetworks.

Key methodological contributions include:

  • Structured Pruning: Unlike unstructured pruning (individual weights), they use structured pruning (entire filters/channels). This ensures that a shared filter's feature representation remains consistent across tasks, improving interpretability.
  • Subnetwork Constraints: To maintain feature consistency, they enforce constraints: frozen weights are not updated, shared filters require their preceding connected filters to also be shared, and pruning a filter in one layer necessitates pruning connected filters in the next layer.
  • Usefulness Measures: They use "Activation Score" (average activation of a subnetwork on a task) and "Connectivity Score" (Pearson correlation between activations of connected filters) to predict subnetwork usefulness. They specifically note that lower connectivity often correlates with better FKT.
  • Forward Knowledge Transfer (FKT) Metric: Defined as the difference in accuracy on a new task when a subnetwork is shared versus when it's not.

Datasets

The paper uses three sequential datasets, each comprising six tasks, designed to vary task complexity and similarity:

  • Tiny Imagenet-CIFAR (TIC): Task 1 is Tiny Imagenet, Task 2 is CIFAR-10, and Tasks 3-6 are subsets of CIFAR-100. This dataset emphasizes task complexity.
  • Mixed PMNIST/CIFAR (MPC): Tasks 1, 3, and 5 are permuted MNIST (PMNIST), and Tasks 2, 4, and 6 are subsets of CIFAR-100. This dataset highlights task similarity.
  • Mixed KEF-MNIST/CIFAR (KEF): Similar to MPC but uses KMNIST-49, EMNIST-balanced, and Fashion-MNIST for the MNIST-like tasks.

Experiments were conducted using both ResNet-18 and VGG-16 architectures.

Key Insights and Ideas

  • Sharing is Not Always More: The intuition that sharing all learned subnetworks is best for FKT is challenged. The paper demonstrates that selective sharing, based on task properties, can lead to superior performance.
  • Connectivity as a Predictor: Lower connectivity scores between subnetworks often correlate with higher accuracy on new tasks, suggesting that less interconnected subnetworks might be more generalizable or less prone to interference.
  • Task Similarity Matters: Sharing subnetworks from similar tasks (e.g., two MNIST tasks) generally leads to better FKT than sharing from dissimilar tasks.
  • Task Complexity Matters: More complex tasks (like Tiny Imagenet) can be highly beneficial for FKT when shared with less complex tasks.
  • Structured Pruning for Interpretability: The use of structured pruning and specific constraints helps ensure that the features learned by a subnetwork remain consistent, making it easier to understand why certain subnetworks are useful for transfer.

Key Results

  • Two-Task Transfer: In two-task experiments, subnetworks with lower connectivity scores consistently yielded better accuracy on the second task. For example, on the MPC dataset, sharing CIFAR tasks with other CIFAR tasks resulted in higher accuracy than sharing with PMNIST tasks.
  • Three-Task Omission: Experiments with three tasks showed that omitting a subnetwork from a dissimilar or less complex task could improve accuracy on the target task, reinforcing the idea of selective sharing. For instance, in MPC, omitting a PMNIST subnetwork when training on a CIFAR task often improved performance.
  • Six-Task Strategies: In longer sequences, simple strategies like "share lowest connectivity" performed poorly. However, manual strategies informed by task similarity and complexity (e.g., sharing MNIST with MNIST, CIFAR with CIFAR) consistently matched or exceeded other automated strategies. For example, on the MPC dataset, manual sharing achieved a mean accuracy of 79.79% with ResNet-18, outperforming "Share All" (71.84%) and "Omit Lowest" (78.18%).

Limitations and Future Work

  • Structural Constraints: The authors acknowledge that their strict structural constraints for interpretability, while beneficial for analysis, might be overly restrictive for practical CL applications and could limit modularity in longer task sequences.
  • Systematic Sharing Strategies: Simple automated strategies (like always sharing the lowest connectivity subnetwork) struggled in longer sequences due to these constraints, highlighting the need for more sophisticated decision-making.
  • Future Directions:
    • Investigating how to leverage connectivity for more generalizable subnetworks, even if they are less suited for their original task.
  • Exploring the impact of sharing subnetworks from diverse tasks on adversarial robustness and generalizability.
  • Developing more adaptive sharing strategies that can handle complex task relationships and longer sequences without overly restrictive constraints.

Summary updated

BibTeX
@misc{andle2023investigating,
  author = {Joshua Andle and Ali Payani and Salimeh Sekeh},
  title = {{Investigating the impact of weight sharing decisions on knowledge transfer in continual learning}},
  year = {2023},
  eprint = {2311.09506},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.09506},
}
Figure