Skip to main content
QUICK REVIEW

[Paper Review] Core-Periphery Principle Guided Redesign of Self-Attention in Transformers

Xiaowei Yu, Lu Zhang|PubMed|Mar 27, 2023
Advanced Memory and Neural ComputingEngineering7 citations
TL;DR

This paper proposes CP-ViT, a core-periphery (CP)-guided redesign of self-attention in Vision Transformers that reorganizes image patches into a sparse CP graph structure, where core nodes integrate task-relevant patches via gradient-based patch redistribution. The method improves accuracy, efficiency, and interpretability, achieving state-of-the-art performance on CIFAR-10, CIFAR-100, TinyImageNet, and INbreast datasets by leveraging brain-inspired organizational principles.

ABSTRACT

Designing more efficient, reliable, and explainable neural network architectures is critical to studies that are based on artificial intelligence (AI) techniques. Previous studies, by post-hoc analysis, have found that the best-performing ANNs surprisingly resemble biological neural networks (BNN), which indicates that ANNs and BNNs may share some common principles to achieve optimal performance in either machine learning or cognitive/behavior tasks. Inspired by this phenomenon, we proactively instill organizational principles of BNNs to guide the redesign of ANNs. We leverage the Core-Periphery (CP) organization, which is widely found in human brain networks, to guide the information communication mechanism in the self-attention of vision transformer (ViT) and name this novel framework as CP-ViT. In CP-ViT, the attention operation between nodes is defined by a sparse graph with a Core-Periphery structure (CP graph), where the core nodes are redesigned and reorganized to play an integrative role and serve as a center for other periphery nodes to exchange information. We evaluated the proposed CP-ViT on multiple public datasets, including medical image datasets (INbreast) and natural image datasets. Interestingly, by incorporating the BNN-derived principle (CP structure) into the redesign of ViT, our CP-ViT outperforms other state-of-the-art ANNs. In general, our work advances the state of the art in three aspects: 1) This work provides novel insights for brain-inspired AI: we can utilize the principles found in BNNs to guide and improve our ANN architecture design; 2) We show that there exist sweet spots of CP graphs that lead to CP-ViTs with significantly improved performance; and 3) The core nodes in CP-ViT correspond to task-related meaningful and important image patches, which can significantly enhance the interpretability of the trained deep model.

Motivation & Objective

  • To develop a brain-inspired neural network architecture that improves efficiency, reliability, and interpretability by embedding organizational principles from biological neural networks (BNNs).
  • To investigate whether the core-periphery (CP) structure—common in human brain networks—can guide the redesign of artificial neural network (ANN) architectures, particularly in self-attention mechanisms.
  • To enhance model performance by identifying and concentrating information flow on task-relevant image patches through a dynamic patch redistribution strategy.
  • To improve model interpretability by associating core nodes with meaningful, high-impact image patches that contribute most to classification.

Proposed method

  • The method introduces a sparse graph with a core-periphery (CP) structure to define attention operations between image patches, where core nodes serve as central hubs for information integration.
  • It computes gradients of the network output with respect to patch embeddings to assess patch importance, using global average pooling over feature dimensions to obtain patch importance weights: $\alpha_k = \frac{1}{Z} \sum_{i=1}^{Z} \frac{\partial y}{\partial P^k_i}$.
  • The top-K patches with highest importance weights are selected and redistributed to core nodes based on node degree, ensuring high-impact patches are prioritized in central processing.
  • Patch redistribution is dynamically updated during training, allowing core nodes to adaptively focus on the most relevant image patches as training progresses.
  • The framework, named CP-ViT, replaces standard self-attention in Vision Transformers with this CP-structured message passing mechanism, enabling efficient and interpretable feature aggregation.
  • The method includes a hyperparameter search for optimal CP graph configurations, identifying 'sweet spots' that maximize performance.

Experimental results

Research questions

  • RQ1Can the core-periphery (CP) organizational principle from biological neural networks be proactively used to guide the design of artificial neural network architectures?
  • RQ2Does incorporating a CP-structured attention mechanism in Vision Transformers lead to improved predictive performance compared to standard self-attention?
  • RQ3Can the core nodes in CP-ViT be meaningfully associated with task-relevant image patches, enhancing model interpretability?
  • RQ4Are there optimal CP graph configurations (i.e., 'sweet spots') that significantly boost model accuracy and efficiency?
  • RQ5Does dynamic patch redistribution based on gradient-based importance improve model performance while reducing computational waste?

Key findings

  • CP-ViT outperforms state-of-the-art models on multiple benchmarks, including CIFAR-10, CIFAR-100, TinyImageNet, and the medical INbreast dataset.
  • The model achieves improved accuracy while reducing unnecessary computational cost by focusing attention on task-relevant patches through dynamic redistribution.
  • Core nodes in CP-ViT are consistently associated with image patches that have high gradient importance, indicating strong alignment with task-critical features.
  • Optimal CP graph configurations exist, and models trained with these configurations show significantly enhanced performance, suggesting a 'sweet spot' in architectural design.
  • The method enhances model interpretability, as core nodes correspond to semantically meaningful and important image patches, enabling clearer insight into model decisions.

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.