PolyViT: Co-training Vision Transformers on Images, Videos and Audio

Valerii Likhosherstov, Mostafa Dehghani, Anurag Arnab, Krzysztof Marcin Choromanski, Mario Lucic, Yi Tay, Adrian Weller

TL;DR

This paper introduces PolyViT, a single Vision Transformer model capable of processing images, audio, and video simultaneously. By co-training across multiple tasks and modalities, PolyViT achieves state-of-the-art results on several benchmarks while drastically reducing parameter count and enabling cross-modal representation learning.

What Problem Does This Paper Address?

Current state-of-the-art models for perception tasks like image, video, and audio classification typically require separate, specialized models for each modality and task. This leads to a proliferation of models, increased computational cost, and challenges in deployment and maintenance. The authors aim to address this by developing a single, unified transformer model that can handle diverse modalities and tasks efficiently, sharing parameters across them to improve efficiency and generalization.

Methods

The core of PolyViT is a shared Vision Transformer encoder that processes inputs from different modalities. Each modality has its own specialized input tokenizer and positional embeddings to handle modality-specific information and varying sequence lengths. The key innovation is co-training, where the single transformer model is trained simultaneously on multiple classification tasks from different modalities. This is achieved by alternating between processing minibatches from different tasks. The authors explore various task sampling schedules, finding that a "weighted" schedule, which samples tasks proportionally to their baseline training steps, performs best. They also introduce optional modality-specific transformer layers (modality-adaptor layers) that can be added after the initial tokenization to further enhance modality-specific processing.

Datasets

The paper uses a variety of datasets for training and evaluation across three modalities:

  • Image: ImageNet-1K, CIFAR-10, CIFAR-100, Oxford-IIIT Pets, RESISC45, Caltech101, SUN397, Dmlab, DTD, KITTI Distance, PatchCamelyon.
  • Video: Kinetics 400, Kinetics 600, Moments in Time, Epic Kitchens, Something-Something v2.
  • Audio: AudioSet (including Mini-AudioSet and AS-500k), VGGSound.

Key Insights and Ideas

  • Parameter Efficiency through Co-training: Sharing a single transformer backbone across multiple tasks and modalities drastically reduces the number of parameters required, making models more deployable on resource-constrained devices.
  • Regularization Effect: Co-training acts as a regularizer, particularly beneficial for smaller datasets, leading to improved accuracy by mitigating overfitting.
  • Cross-Modal Generalization: PolyViT, when trained on multiple modalities, learns representations that generalize well to new, unseen tasks and datasets across different modalities, enabling "linear probing" for new tasks.
  • Simplicity of Implementation: The co-training approach is practical, as it doesn't require extensive hyperparameter tuning for each new task combination, allowing adaptation of standard single-task training settings.
  • Task Sampling Matters: The choice of task sampling schedule significantly impacts performance, with a weighted approach proving most effective.

Key Results

  • PolyViT achieves state-of-the-art results on 5 standard video and audio classification datasets.
  • When co-trained on 9 datasets across modalities, PolyViT uses 8.3 times fewer parameters than single-task baselines while incurring at most a 1.2% accuracy drop.
  • Linear probing experiments show that multi-modal PolyViT learns representations that transfer well to new tasks and modalities, often outperforming single-modality baselines.
  • Single-modality co-training also improves accuracy and reduces parameters compared to single-task baselines. For instance, on audio tasks, PolyViT surpasses MBT [56] while using about half the parameters.

Limitations and Future Work

  • No Fusion: The current PolyViT processes one task at a time and does not fuse information from multiple modalities to make a single prediction.
  • No Large-Scale Upstream Co-training: The authors did not co-train on very large upstream datasets like ImageNet-21K or C4.
  • Inference Time: The model does not improve inference time as it still processes a single task per forward pass.
  • Future Work: The authors suggest exploring co-training with the text modality, investigating multi-modal fusion for improved predictions, and co-training on larger upstream datasets. They also aim to explore continual learning scenarios.

Summary updated

BibTeX
@article{likhosherstov2023polyvit,
  author = {Valerii Likhosherstov and Mostafa Dehghani and Anurag Arnab and Krzysztof Marcin Choromanski and Mario Lucic and Yi Tay and Adrian Weller},
  title = {{PolyViT: Co-training Vision Transformers on Images, Videos and Audio}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2023},
}
Figure