One-Versus-Others Attention: Scalable Multimodal Integration

Michal Golovanevsky, Eva Schiller, Akira A Nair, Ritambhara Singh, Carsten EickhoffSubmission to ICLR 2024 · Withdrawn

TL;DR

Standard multimodal Transformers rely on pairwise cross-attention or early concatenation with self-attention, both of which suffer from quadratic $\mathcal{O}(k^2)$ computational complexity as the number of modalities $k$ grows. The authors propose One-Versus-Others (OvO) Attention, an integration mechanism that compares each modality against the average of all other modalities, reducing attention complexity to linear $\mathcal{O}(k)$ without requiring fine-grained cross-modal alignment. On benchmarks spanning 2 to 20 modalities, OvO achieves competitive or superior accuracy while drastically cutting floating-point operations (FLOPs).

What Problem Does This Paper Address?

Most multimodal Transformer research focuses on vision-and-language tasks with two to four modalities (text, audio, image, video). However, domains like clinical medicine frequently gather many heterogeneous data types for a single patient—such as whole-slide histology images, clinical notes, gene expression, copy number variations, and DNA methylation.

Current multimodal integration approaches scale poorly as the number of modalities $k$ increases:

  1. Early fusion (concatenation + self-attention): Concatenating inputs multiplies sequence length by $k$, causing self-attention to scale quadratically ($\mathcal{O}(k^2 \cdot n^2 \cdot d)$).
  2. Pairwise cross-attention: Computing attention between every directed pair requires $k(k-1)$ attention matrices, also scaling quadratically ($\mathcal{O}(k^2 \cdot n^2 \cdot d)$).

Additionally, many multimodal vision-language architectures rely on spatial or temporal token alignment (e.g., bounding boxes matching noun phrases). In settings like genomics and pathology, there is rarely an explicit one-to-one mapping across data streams, necessitating a scalable, domain-agnostic fusion paradigm.

Methods

The authors introduce One-Versus-Others (OvO) Attention:

  • One-Versus-Others Scoring: For each modality $m_i$ among $k$ total modalities, OvO computes an attention score by taking the dot product of $m_i$ against a shared learnable weight matrix $W$ and the mean vector of the remaining $k-1$ modalities: $$\text{score}(m_i, \{m_j : j \neq i\}) = m_i^T W \left( \frac{\sum_{j \neq i} m_j}{k - 1} \right)$$
  • Context Vector & Order Invariance: The context vector is formed via $\text{softmax}(\text{score}) \cdot m_i$. Averaging the non-target modalities provides permutation invariance over modality ordering, avoiding the arbitrary ordering sensitivity inherent in simple sequence concatenation.
  • Multi-Headed OvO Attention: Extends the single-score mechanism across $h$ attention heads by projecting input embeddings into subspace projections, applying OvO attention per head, and projecting the concatenated results with an output matrix $W^O$.
  • Computational Complexity: Because only one attention score is computed per modality per head, complexity drops from $\mathcal{O}(k^2 \cdot n^2 \cdot d)$ down to $\mathcal{O}(k \cdot n^2 \cdot d)$, scaling linearly with $k$.

Datasets

The authors evaluated OvO across diverse modality counts, domains, and data types:

  • Simulation Dataset (20 modalities): A synthetic 2,000-sample binary classification benchmark where labels depend on joint interactions across all 20 modalities (400 total vectorized features).
  • Hateful Memes Challenge (2 modalities): 9,000 image-text pairs evaluating performance in the base 2-modality setting.
  • Amazon Customer Reviews (3 modalities): ~20,000 reviews categorized into positive/negative sentiment using image, review text, and tabular product metadata (price, brand, category).
  • The Cancer Genome Atlas / TCGA (5 modalities): 1,422 cancer patients categorized into 5 cancer types using whole-slide tissue images, tabular clinical metrics, copy number variation (CNV), gene expression, and DNA methylation.

Key Insights and Ideas

  • Linear Scaling Unlocks Extreme Multimodal Settings: In the 20-modality simulation, OvO ran in ~2 minutes versus ~20 minutes for pairwise cross-attention, demonstrating dramatic wall-clock and FLOP savings.
  • Avoiding Spurious Pairwise Correlations: In scenarios where the classification signal requires whole-system context, pairwise cross-attention can overfit to irrelevant local modality pairs. OvO compares each modality against a holistic summary of the rest, yielding higher accuracy and lower variance across seeds.
  • Intrinsic Modality Interpretability: Because OvO produces an explicit attention weight per modality, it indicates modality importance without requiring post-hoc ablation studies. For example, on TCGA, OvO assigns highest attention to gene expression and image data while de-emphasizing DNA methylation (which is biologically redundant with gene expression).

Key Results

  • Hateful Memes ($k=2$): OvO attained 70.7% accuracy / 67.7 F1, significantly outperforming pairwise cross-attention (69.1% / 65.4%) while using fewer incremental FLOPs ($1.05 \times 10^6$ vs. $1.44 \times 10^6$).
  • Amazon Reviews ($k=3$): While multimodal concatenation and cross-attention degraded performance relative to a unimodal text baseline (92.6%), OvO effectively integrated noisy image/tabular data, reaching 93.1% accuracy / 93.0 F1 with roughly 72% fewer incremental FLOPs ($0.52 \times 10^6$ vs. $1.90 \times 10^6$).
  • TCGA Pan-Cancer ($k=5$): OvO achieved 98.3% accuracy / 98.4 F1, statistically comparable ($p > 0.01$) to cross-attention (99.2% / 99.3%) but with a 16× reduction in added FLOPs ($0.33 \times 10^6$ vs. $5.26 \times 10^6$) and substantially lower variance across runs ($\pm 0.07$ vs. $\pm 1.04$).

Limitations and Future Work

  • Sample Size Constraints: Due to compute limitations, real-world evaluations were conducted on datasets of moderate sample size ($\le 20,000$ samples) rather than massive web-scale corpora.
  • Equal Feature Representation: The formulation assumes modalities are projected to equal dimensionality before fusion, adding linear projection layers.
  • Future Directions: Incorporating OvO into large-scale multimodal pre-training backbones and extending its application to broader high-stakes settings such as complex clinical diagnostics and multi-sensor robotics.

Summary updated

Abstract

Multimodal learning models have become increasingly important as they surpass single-modality approaches on diverse tasks ranging from question-answering to autonomous driving. Despite the importance of multimodal learning, existing efforts focus on NLP applications, where the number of modalities is typically at most four (audio, video, text, images). However, data inputs in other domains, such as clinical medicine, may include X-rays, PET scans, MRIs, genetic screening, clinical notes, and more, creating a need for both efficient and accurate information fusion. Many state-of-the-art models rely on pairwise cross-attention or early fusion through self-attention, which do not scale well for applications with more than three modalities. The complexity per layer of computing attention in either paradigm is, at best, quadratic with the number of modalities, potentially requiring considerable computational resources. To address this, we propose a new domain-neutral attention mechanism, One-Versus-Others (OvO) attention, that scales linearly with the number of modalities, thus offering a significant reduction in computational complexity compared to existing multimodal attention methods. Using three diverse real-world datasets as well as an additional simulation experiment, we show that our method improves performance compared to popular fusion techniques while decreasing computation costs.
BibTeX
@misc{golovanevsky2023one,
  author = {Michal Golovanevsky and Eva Schiller and Akira A Nair and Ritambhara Singh and Carsten Eickhoff},
  title = {{One-Versus-Others Attention: Scalable Multimodal Integration}},
  year = {2023},
  eprint = {2307.05435},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.05435},
}
Figure