MAG-BERT
BERT with a Multimodal Adaptation Gate that shifts word representations using aligned visual and acoustic features.
Multimodal · 405 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Multimodal
- Parameters
- 110.9M
- Operations
- 405
- Framework
- PyTorch
- Recurrent
- No
- Published
- ACL 2020
- Cited by
- 9 (as of 28 October 2026)
- Authors
- Wasifur Rahman, Md. Kamrul Hasan, Sangwu Lee and others
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18018
- Graph hash
- 834ad2fbcc41d6bc90da02ae749f2bd4b89aaa2c985450fa73f4ab09bc64f032
- Skeleton hash
- 31e0bcaa5642fc9826c8bf731715a97ace69c3a914cbbc0aee192b13d5223b79
- Architecture hash
- e8d221866c1ef66f8b232f2b987d55cd50a0f49f3b4065efb9b68482c558ad9a
- Diagram SHA-256
- 6df0f82bdb376ce8110dfacd7ed837cfb4d415f3daf5d573a6946411f5ae194c
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
MAG-BERT is BERT with an attachment, the Multimodal Adaptation Gate (MAG), that lets the language model accept visual and acoustic data alongside text during fine-tuning. The paper's starting point is that BERT and XLNet only expect linguistic input, so fine-tuning them for face-to-face communication data had not been studied.
The gate treats nonverbal behavior as something that moves a word in semantic space: the new position is the language-only position plus a displacement vector. For each word, the gate concatenates the lexical vector with the acoustic and with the visual features to produce two gating vectors. The acoustic and visual features, each multiplied by its gating vector, are fused into a nonverbal displacement vector. A scaling factor keeps the size of that shift within a desirable range before it is added to the lexical vector.
In MAG-BERT the gate is attached to one layer of BERT, and nothing else in BERT is changed. The first output vector, for the [CLS] token, goes through an affine transformation to produce a single real value. On the CMU-MOSI sentiment dataset, the paper reports that MAG-BERT scored better on all metrics than multimodal models using BERT word embeddings, and better than fine-tuned BERT. In a layer study on XLNet, the authors observed that earlier layers are more suitable for applying the gate.
Key idea. The paper attaches a Multimodal Adaptation Gate to BERT and XLNet that shifts their internal word representations according to visual and acoustic input during fine-tuning.
- MAG-BERT
- MAG
- Multimodal Adaptation Gate
- multimodal sentiment analysis
- multimodal BERT
- multimodal fusion
- multimodal language
- CMU-MOSI
- CMU-MOSEI
- sentiment analysis
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{rahman2020integratingmultimodalinformationlarge,
title={Integrating Multimodal Information in Large Pretrained Transformers},
author={Wasifur Rahman and Md. Kamrul Hasan and Sangwu Lee and Amir Zadeh and Chengfeng Mao and Louis-Philippe Morency and Ehsan Hoque},
year={2020},
eprint={1908.05787},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1908.05787},
}