mlsanityData to 14 Oct 2026

LayerShuffle: Enhancing Robustness in Vision Transformers by Randomizing Layer Execution Order

arXiv 2407.04513 ↗First posted 5 Jul 2024cs.CV cs.AI cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Due to their architecture and how they are trained, artificial neural networks are typically not robust toward pruning or shuffling layers at test time. However, such properties would be desirable for different applications, such as distributed neural network architectures where the order of execution cannot be guaranteed or parts of the network can fail during inference. In this work, we address these issues through a number of training approaches for vision transformers whose most important component is randomizing the execution order of attention modules at training time. With our proposed approaches, vision transformers are capable to adapt to arbitrary layer execution orders at test time assuming one tolerates a reduction (about 20%) in accuracy at the same model size. We analyse the feature representations of our trained models as well as how each layer contributes to the models prediction based on its position during inference. Our analysis shows that layers learn to contribute differently based on their position in the network. Finally, we layer-prune our models at test time and find that their performance declines gracefully. Code available at https://github.com/matfrei/layershuffle.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 23 of its 38 references that are in the map. First posted on arXiv 5 Jul 2024.

Builds on

23 of 38 references.

References · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  4. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  6. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  7. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  8. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  9. 2016Layer Normalizationcited by 5,669
  10. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  11. 2016Gaussian Error Linear Units (GELUs)cited by 3,502
  12. 2018UMAP: Uniform Manifold Approximation and Projection for Dimension Reductioncited by 2,898
11 more
  1. 2021ImageNet-21K Pretraining for the Massescited by 613
  2. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 439
  3. 2020Visual Transformers: Token-based Image Representation and Processing for Computer Visioncited by 334
  4. 2019Learning Deep Transformer Models for Machine Translationcited by 309
  5. 2024Evolutionary Optimization of Model Merging Recipescited by 208
  6. 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 146
  7. 2018Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networkscited by 132
  8. 2021The Sensory Neuron as a Transformer: Permutation-Invariant Neural Networks for Reinforcement Learningcited by 50
  9. 2022Annotated History of Modern AI and Deep Learningcited by 20
  10. 2021IOT: Instance-wise Layer Reordering for Transformer Structurescited by 5
  11. 2022Minimal Neural Network Models for Permutation Invariant Agentscited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.