Transformed CNNs: recasting pre-trained convolutional layers with self-attention
Vision Transformers (ViT) have recently emerged as a powerful alternative to convolutional networks (CNNs). Although hybrid models attempt to bridge the gap between these two architectures, the self-attention layers they rely on induce a strong computational bottleneck, especially at large spatial resolutions. In this work, we explore the idea of reducing the time spent training these layers by initializing them as convolutional layers. This enables us to transition smoothly from any pre-trained CNN to its functionally identical hybrid model, called Transformed CNN (T-CNN). With only 50 epochs of fine-tuning, the resulting T-CNNs demonstrate significant performance gains over the CNN (+2.2% top-1 on ImageNet-1k for a ResNet50-RS) as well as substantially improved robustness (+11% top-1 on ImageNet-C). We analyze the representations learnt by the T-CNN, providing deeper insights into the fruitful interplay between convolutions and self-attention. Finally, we experiment initializing the T-CNN from a partially trained CNN, and find that it reaches better performance than the corresponding hybrid model trained from scratch, while reducing training time.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Temporal Convolutional Attention Neural Networks for Time Series Forecasting
Temporal Convolutional Neural Networks (TCNNs) have been applied for various sequence modelling tasks including time series forecasting. However, TCNNs may require many convolutional layers if the input sequence is long …
Multivariate Time Series ForecastingProbabilistic Time Series ForecastingTime SeriesTime Series Analysis+1Interpreting intermediate convolutional layers of generative CNNs trained on waveforms
This paper presents a technique to interpret and visualize intermediate layers in generative CNNs trained on raw speech data in an unsupervised manner. We argue that averaging over feature maps after ReLU activation in e…
Time Series AnalysisShort-term Precipitation Forecasting in The Netherlands: An Application of Convolutional LSTM neural networks to weather radar data
This work addresses the challenge of short-term precipitation forecasting by applying Convolutional Long Short-Term Memory (ConvLSTM) neural networks to weather radar data from the Royal Netherlands Meteorological Instit…
Precipitation ForecastingTemporal SequencesLocalized convolutional neural networks for geospatial wind forecasting
Convolutional Neural Networks (CNN) possess many positive qualities when it comes to spatial raster data. Translation invariance enables CNNs to detect features regardless of their position in the scene. However, in some…
TranslationTransformed ROIs for Capturing Visual Transformations in Videos
Modeling the visual changes that an action brings to a scene is critical for video understanding. Currently, CNNs process one local neighbourhood at a time, thus contextual relationships over longer ranges, while still l…
Action RecognitionVideo Understanding