Multi-layer Learnable Attention Mask for Multimodal Tasks

Link
Abstract

While the Self-Attention mechanism in the Transformer model has proven to be effective in many domains, we observe that it is less effective in more diverse settings (e.g. multimodality) due to the varying granularity of each token and the high computational demands of lengthy sequences. To address the challenges, we introduce the Learnable Attention Mask (LAM), strategically designed to globally regulate attention maps and prioritize critical tokens within the sequence. Leveraging the Self-Attention module in a BERT-like transformer network, our approach adeptly captures associations between tokens. The extension of the LAM to a multi-layer version accommodates the varied information aspects embedded at each layer of the Transformer network. Comprehensive experimental validation on various datasets, such as MADv2, QVHighlights, ImageNet 1K, and MSRVTT, demonstrates the efficacy of the LAM, exemplifying its ability to enhance model performance while mitigating redundant computations. This pioneering approach presents a significant advancement in enhancing the understanding of complex scenarios, such as in movie understanding.

Synth

Problem:: Transformer의 Self-Attention은 다양한 Token Granularity와 긴 Sequence의 높은 계산 비용으로 인해 Multimodal 환경에서 효율이 저하됨 / 모든 Token이 동일한 중요도를 갖지 않음에도 불구하고 이를 동적으로 조절하는 메커니즘이 Computer Vision 분야에서 부족함

Solution:: 입력 Sequence 전체를 보고 중요 Token을 우선순위화하여 Attention Map을 조절하는 Learnable Attention Mask (LAM) 제안 / Transformer의 각 Layer가 다른 정보 측면을 처리하므로, Layer별 Context에 맞는 Mask를 동적으로 학습하는 Multi-Layer LAM으로 확장

Novelty:: 전체 입력 Sequence를 기반으로 동적으로 학습되는 Attention Mask를 통해 Multimodal Token 간의 복잡한 연관성을 전역적으로 포착 / Ablation Study를 통해 LAM의 효과가 단순한 Parameter 증가가 아닌 선택적 Attention 능력임을 보임

Note:: 마스크를 씌우는 것은 계산할 토큰 수를 줄이는건 아니므로, 연산량이 감소하지는 않음 / 이상적으로 학습된 Self-Attention은 LAM이 없어도 동작하겠지만, LAM을 통한 Inductive Bias로 모델 학습을 쉽게 했다고 볼 수 있음

Summary

Motivation

file-20250522150650544.png

(a)는 영화 장면에서 시간적으로 정렬된 Video Token과 Audio Token을 보여줌.

Method

Learnable Attention Mask (LAM)

file-20250522151329838.png|525

Multi-Layer Learnable Attention Mask

Method 검증

Experimental Setup

Experimental Results

Performance on Multimodal Encoders

Performance on Single-Modality Encoders

Ablation Study

Qualitative Analysis

file-20250522152831481.png|575