Skip to main content
QUICK REVIEW

[Paper Review] The Lottery Ticket Hypothesis for Self-attention in Convolutional Neural Network

Zhongzhan Huang, Senwei Liang|arXiv (Cornell University)|Jul 16, 2022
Advanced Neural Network ApplicationsComputer Science8 citations
TL;DR

This paper proposes the Lottery Ticket Hypothesis for Self-attention (LTH4SA), demonstrating that sparse self-attention connection schemes—where only select blocks in a CNN are connected to self-attention modules—can match or exceed the accuracy of full self-attention networks while reducing parameters and inference time. The method uses a reinforcement learning-based search to identify these optimal, sparse connection patterns, validated across CIFAR-100 and ImageNet with state-of-the-art performance.

ABSTRACT

Recently many plug-and-play self-attention modules (SAMs) are proposed to enhance the model generalization by exploiting the internal information of deep convolutional neural networks (CNNs). In general, previous works ignore where to plug in the SAMs since they connect the SAMs individually with each block of the entire CNN backbone for granted, leading to incremental computational cost and the number of parameters with the growth of network depth. However, we empirically find and verify some counterintuitive phenomena that: (a) Connecting the SAMs to all the blocks may not always bring the largest performance boost, and connecting to partial blocks would be even better; (b) Adding the SAMs to a CNN may not always bring a performance boost, and instead it may even harm the performance of the original CNN backbone. Therefore, we articulate and demonstrate the Lottery Ticket Hypothesis for Self-attention Networks: a full self-attention network contains a subnetwork with sparse self-attention connections that can (1) accelerate inference, (2) reduce extra parameter increment, and (3) maintain accuracy. In addition to the empirical evidence, this hypothesis is also supported by our theoretical evidence. Furthermore, we propose a simple yet effective reinforcement-learning-based method to search the ticket, i.e., the connection scheme that satisfies the three above-mentioned conditions. Extensive experiments on widely-used benchmark datasets and popular self-attention networks show the effectiveness of our method. Besides, our experiments illustrate that our searched ticket has the capacity of transferring to some vision tasks, e.g., crowd counting and segmentation.

Motivation & Objective

  • To investigate whether sparse self-attention connections in CNNs can outperform or match full self-attention networks in accuracy while reducing computational cost.
  • To identify a connection scheme between self-attention modules and CNN blocks that maintains model accuracy with fewer parameters and faster inference.
  • To develop a reinforcement learning-based method to efficiently search for such optimal, sparse connection schemes.
  • To validate the generalization capacity of the discovered connection schemes across different vision tasks, including crowd counting and segmentation.

Proposed method

  • Proposes the Lottery Ticket Hypothesis for Self-attention (LTH4SA), asserting that a full self-attention network contains a subnetwork with sparse connections that maintains accuracy while reducing parameters and inference time.
  • Models the connection scheme as a binary vector indicating which blocks are connected to self-attention modules, defining a 'ticket' as a scheme satisfying three criteria: faster inference, reduced parameters, and maintained accuracy.
  • Designs a reinforcement learning controller with a policy gradient method to search for optimal connection schemes, using a composite reward function combining sparsity, validation accuracy, and curiosity-driven exploration via Random Network Distillation (RND).
  • Incorporates Proximal Policy Optimization (PPO) to reuse sampled connection schemes and improve training efficiency of the controller.
  • Employs a supernet to estimate subnetwork performance and uses the Pearson correlation (0.71) between supernet and standalone validation accuracy to justify reward reliability.
  • Uses a hybrid reward function: $ G(\mathbf{a}) = \lambda_1 \cdot g_{\text{spa}} + \lambda_2 \cdot g_{\text{val}} + \lambda_3 \cdot g_{\text{rnd}} $, where $ g_{\text{spa}} $ promotes sparsity, $ g_{\text{val}} $ rewards high validation accuracy, and $ g_{\text{rnd}} $ encourages exploration of novel schemes.

Experimental results

Research questions

  • RQ1Can a sparse self-attention connection scheme outperform or match the performance of a full self-attention network in terms of accuracy, while reducing parameters and inference time?
  • RQ2Is there a subnetwork within a full self-attention network that maintains accuracy with significantly fewer connections, supporting the existence of a 'lottery ticket'?
  • RQ3Does the proposed reinforcement learning-based search method effectively discover such optimal, sparse connection schemes across different datasets and backbone architectures?
  • RQ4Can the discovered connection schemes generalize to downstream vision tasks beyond the original training distribution?

Key findings

  • Empirical results show that certain sparse self-attention connection schemes achieve higher accuracy than the full self-attention network, contradicting the assumption that more connections always improve performance.
  • The proposed reinforcement learning method successfully discovers connection schemes that reduce parameter increment and accelerate inference while maintaining or improving accuracy on CIFAR-100 and ImageNet.
  • The correlation between supernet-estimated and standalone validation accuracy is 0.71 on CIFAR-100, supporting the use of supernet-based reward signals in the search process.
  • The inclusion of RND curiosity bonus improves exploration and mitigates premature convergence in the controller’s training.
  • The discovered tickets generalize to other vision tasks, including crowd counting and semantic segmentation, demonstrating transferability.
  • On ImageNet2012 with ResNet50, the method achieves competitive accuracy with significantly reduced computational and parameter overhead compared to full self-attention networks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.