[Paper Review] OmniNet: Omnidirectional Representations from Transformers
OmniNet introduces a novel transformer architecture that enables each token to attend to all hidden representations across every layer of the network via a meta-learner-based omnidirectional attention mechanism. By leveraging efficient attention mechanisms like Performer and low-rank approximations, OmniNet achieves state-of-the-art performance on language modeling, machine translation, long-range sequence tasks, and image recognition, outperforming ViT by up to 3% on few-shot image classification.
This paper proposes Omnidirectional Representations from Transformers (OmniNet). In OmniNet, instead of maintaining a strictly horizontal receptive field, each token is allowed to attend to all tokens in the entire network. This process can also be interpreted as a form of extreme or intensive attention mechanism that has the receptive field of the entire width and depth of the network. To this end, the omnidirectional attention is learned via a meta-learner, which is essentially another self-attention based model. In order to mitigate the computationally expensive costs of full receptive field attention, we leverage efficient self-attention models such as kernel-based (Choromanski et al.), low-rank attention (Wang et al.) and/or Big Bird (Zaheer et al.) as the meta-learner. Extensive experiments are conducted on autoregressive language modeling (LM1B, C4), Machine Translation, Long Range Arena (LRA), and Image Recognition. The experiments show that OmniNet achieves considerable improvements across these tasks, including achieving state-of-the-art performance on LM1B, WMT'14 En-De/En-Fr, and Long Range Arena. Moreover, using omnidirectional representation in Vision Transformers leads to significant improvements on image recognition tasks on both few-shot learning and fine-tuning setups.
Motivation & Objective
- To address the limitation of standard transformers that restrict receptive fields to horizontal (sequence) and local (layer-wise) contexts.
- To explore whether extending attention to include all tokens across all layers can improve representation learning and model performance.
- To mitigate the high computational cost of full-network attention through efficient attention mechanisms and partitioned meta-learning.
- To evaluate the impact of omnidirectional representations on diverse tasks including language modeling, machine translation, long-range reasoning, and image recognition.
- To analyze the performance-compute trade-off of OmniNet and demonstrate its Pareto-optimality.
Proposed method
- OmniNet employs a meta-learner—a separate self-attention module—that processes all hidden representations from every layer and token in the network.
- The meta-learner uses efficient attention mechanisms such as kernel-based attention (e.g., Performer), low-rank attention, or block-sparse attention (e.g., Big Bird) to reduce computational cost.
- The model applies omnidirectional attention in partitioned blocks of layers (e.g., P=4,6,12), where the meta-learner operates on a group of P consecutive layers at a time.
- After omnidirectional attention, a pooling operation selects the most relevant values from all layers for each token, enhancing representation richness.
- The method is applied to both autoregressive language models and Vision Transformers (ViT), enabling cross-layer knowledge integration.
- The architecture is trained end-to-end with standard objectives, and the meta-learner is differentiable, allowing gradient flow through all layers.
Experimental results
Research questions
- RQ1Can extending the receptive field of transformers beyond the sequence and layer dimensions to include all tokens across all layers lead to improved model performance?
- RQ2How can the quadratic computational cost of full-network attention be mitigated while preserving representational gains?
- RQ3Does the integration of representations from multiple hierarchical layers improve generalization, especially in few-shot learning and long-range sequence modeling?
- RQ4How does OmniNet compare to state-of-the-art models in terms of accuracy and efficiency across diverse tasks?
- RQ5What is the optimal partition size for the meta-learner in terms of balancing performance and computational cost?
Key findings
- OmniNet achieves state-of-the-art results on the LM1B language modeling benchmark, outperforming existing models like Transformer-XL.
- On WMT’14 English-German and English-French translation tasks, OmniNet surpasses the 60-layer ADMIN model, the then-SOTA transformer.
- In the Long Range Arena benchmark, OmniNet improves performance by +8.9% over Performer and +2.6% over vanilla Transformers.
- On ImageNet, OmniNet improves ViT performance by up to approximately 3% in both few-shot linear probing and fine-tuning setups.
- With partition size P=6, OmniNet achieves the best trade-off between performance and computational cost, outperforming P=4 and P=12 in accuracy-to-FLOP ratio.
- Visualization shows that the pooling mechanism primarily draws from early layers, indicating effective propagation of fine-grained features to final representations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.