[논문 요약] EquiAV: Leveraging Equivariance for Audio-Visual Contrastive Learning
ICML 2024 paper
https://arxiv.org/abs/2403.09502
EquiAV: Leveraging Equivariance for Audio-Visual Contrastive Learning
Recent advancements in self-supervised audio-visual representation learning have demonstrated its potential to capture rich and comprehensive representations. However, despite the advantages of data augmentation verified in many learning methods, audio-vis
arxiv.org
Abstract
최근 self-supervised audio visual representation learning은 data augmentation 과정에서 두 페어 사이의 correpondence(일치)를 방해하는 문제가 있었다.
논문은 이 문제를 해결하기 위해 EquiAV 프레임워크 제안한다.
이 방법은 audio-visual constrasive learning에 equivariance를 사용하며, 이는 공유된 어텐션 기반 transformation predictor로 이루어져있다. 이것은 다양한 augmentation으로부터 나온 특징들을 representative 임베딩(대표적인 임베딩)으로 결합할 수 있게 해 강력한 supervision을 제공한다.
Computational overhead도 없으며 효과적이다.
1. Introduction
Audio-visual 모달리티는 인간이 주변 상황을 인식하는데 중요한 역할을 한다. 그들은 특성이 다름에도 불구하고, 일치성를 갖고있다. 이러한 일치성(correspondence)을 unlabeld 비디오 데이터로부터 self-supervised 방식으로 배우는 것은 최근 주목을 받고 있다.
그 중에 Audio-Visual Contrastive Learning 방식은 효율적이기 때문에 유명하지만, 두 모달리티 사이의 correspondece를 유지하면서 다양한 representation 능력을 키우기엔 문제가 있었다.
Representation 능력을 키우는 가장 쉬운 방식은 data augmentation이지만, 오디오-비주얼 사이 correspondence가 쉽게 왜곡될 수 있기 때문에 적용되기 어려웠다.
이러한 이유로 이전의 연구들은 매우 제한된 augmentation만 사용하고, masked data 모델링 등 representation을 더 풍부하게 학습하는 대체 방안을 제시했다.
반면에 단일 모달 representation 학습 방식으로 data augmentation이 불변하는 상황에서 equivariance를 사용하는 방식이 제안되었다. Equivariance latent space는 augmentation 관련된 정보를 찾고 representation 능력을 키운다. EquiMod는 input space의 변형에 따른 latent space에서의 불일치(displacement)를 추정하는 transformation predictor를 제안하였다.
이 논문에서는, equivariance를 오디오-비주얼 correspondence와 joint representation을 학습하는 데 사용하는 것의 영향과 self-supervised and constrasive learning에 활용하는 최적의 방법도 논의한다.
Equivariance는 intra-modal latent space에 적용하는 것은 각각의 모달리티 정보를 풍부하게 학습하는 것에 효과적이지만 여전히 augmentation으로 인한 부정적 왜곡도 존재한다.
이 문제를 해결하기 위해 equivariance를 audio-visual constrasive learning에 적용하는 EquiAV 프레임워크를 제안한다. Equivariance representation을 shared transformer predictor를 이용해 inter-modal latent space에 적용하였다. 각각의 모달리티 별 transformation predictor로 equivariant 임베딩 집합의 중심을 계산하여 inter-modal constrasive learning에 사용하였다. 중심(centroid)을 이용한 감독 학습은 augmentation의 부정적 영향을 줄였다.
Equivariant 임베딩은 모든 증강된 인풋을 인코딩하는것이 아니라 단일 원본 입력으로부터 생성되기 때문에 최소한의 계산 비용 추가만 필요하다. 게다가, attention-based transformation predictor를 고안하여 파라미터화된 증강 벡터를 latent space로 인코드 할 수 있게 한다.
EquiAV는 오디오-비주얼 self-supervised 방식을 사용한 오디오-비주얼 event classification, zero-shot audio-visual retrieval tasks에서 SOTA이다.
- We effectively transfer equivariant representations from the intra-modal latent space to the inter-modal latent space with a shared transformation predictor. Using the centroid of equivariant embeddings enables the model to learn rich joint representations while avoiding the adverse effect of augmentations.
- We design the attention-based transformation predictor to encode the parameterized augmentation vector into the latent space.
2. Related Works
Audio-Visual Representation Learning.
오디오-비주얼 constrasive learning은 오디오와 비주얼 모달리티 사이의 correspondence를 학습하는데 가장 유명한 방법 중 하나이다. 간단, 직관적이고 downstream task에서 높은 성능을 갖고 있기 때문이다. 보편적인 방식 중 하나는 오디오와 비주얼 입력 사이의 관계성을 학습하는것이다.
반면에 몇몇 연구들은 masked modeling 기법을 사용하여 원본 입력을 마스킹하고 context feature를 예측하는 방식을 사용한다.
최근 CAV-MAE (Gong et al., 2023) and MAViL (Huang et al., 2023) 모델은 constrasive learning과 masked data modeling 기법을 결합하여 보완적인 representation을 학습한다.
Self-supervised Equivariant Representation Learning.
라지 데이터셋으로 self-supervised learning하는 것은 다양한 도메인에서 높은 성능을 나타낸다. 많은 방법들은 joint-embedding 프레임워크를 사용하여 하나의 입력으로부터 나온 두 개의 증강된 임베딩들 사이의 유사도를 최대화 하는 방식을 사용한다. 어떤 augmentation에서도 불변한 representation을 갖는 것이 목적이다.
최근 몇 연구들은 equivariance 이론을 적용하여 더 좋은 representation learning 방식을 사용했다. Equivariance는 representation의 내용(semantic contents)이 data augmentation에 따라 다르도록 보장하여 representation안의 증강 관련 정보를 찾아낼 수 있도록 한다.
Equivariance를 학습할 수 있는 하나의 방법은 특정 증강을 예측하는 auxiliary task를 사용하는것이다. 다른 방법은 latent space와 input space의 augmentations 사이의 transformation을 매핑하는 것이다.
3. Methods
3.1. Preliminary
Self-supervision을 제공하는 하나의 방법은 invariance 개념을 사용하는것이다. 이것은 feature space에서 증강된 입력의 representations을 align 하는 것을 목적으로 한다.
인코더 $f$ 와 augmentation distiribution $\tau$가 주어졌을 때, 목적함수는 다음과 같이 표현된다.
최근 연구는 feature space에서 입력 페어 사이의 discrepancy(모순)을 찾아내는 것이 더 좋은 representation learning을 수행한다고 주장한다. 이 과정에서 $equivariance$라고 알려진 개념은 입력 원본과 증강 버전 사이의 variations을 찾는것을 목적으로 한다. 이로써 근본적인 구조를 보존할 수 있다.
Equivariance를 구현하기 위해 augmentation $t$에 따른 transformation predictor $u$가 feature space에서 intra-model 페어를 맞추기 위해 적용된다. Equivariant self-supervised learning의 목적함수는 다음과 같다.
이 방법으로 모델은 invariant 특징 인코드와 입력 데이터에 적용된 transformation을 학습할 수 있다.
3.2. EquiAV
Data Augmentations and Their Parameterization.
비주얼에 비해 오디오 증강 기법은 매우 제한적이다. 그래서 이 연구에서는 오디오 신호는 스펙트로그램(spectrogram)으로 변환하고, 비주얼 기반 증강 기법을 사용했다.
Augmentation information은 real vectors로 인코드된다. $t_a$ and $t_v$
이런 augmentation vectors는 각 증강이 얼마나 데이터에 적용되었는지를 파라미터화한다.
Encoding Audio-Visual Representations.
오디오-비주얼 입력 페어 $(x_a, x_v)$ 이것의 증강 버전 $(x'_{a}, x'_{v})$이 주어졌을 때, 오디오 인코더 $f_a$와 비주얼 인코더 $f_v$는 그들을 representation으로 인코드한다. 인코딩 프로세스는 다음과 같이 표현된다.
각 인코더로는 vision transformer(Dosovitskiy et al., 2021)를 사용했다.
Equivariant Transformation.
입력 데이터 공간에서 변형으로 인한 잠재 공간의 변위(displacement)를 예측하기 위해서는 transformer predictor인 $u(\cdot)$이 필요하다.
이 논문에서는 이를 attention 메커니즘을 기반으로 디자인했다. 먼저 augmentation 벡터 $t$를 정의했다. $t \in \mathbb{R}^{S \times d_t}$ 여기서 $S$는 증강 $t$ 개수, $d_t$는 증강 $t$의 차원이다.
증강 인코더 $f_t$는 augmentation 벡터를 feature로 인코드하여 attention layer의 쿼리(query)역할을 하도록 한다. 원본 입력의 representation $h$는 키(key)와 밸류(value) 역할을 하여 equivariant representation $\hat{h}$를 다음과 같이 얻게 한다.
Multi-Head Attention (MHA) 레이어는 쿼리와 키 사이의 점수를 계산하여 patch-wise 방식으로 증강 특징의 relevance를 알아낸다. 이 값들은 밸류에 포함되어 feature space상에서의 displacement를 결정한다. MHA의 출력은 Feed Forward Network (FFN)를 통해 원본 입력 이미지의 representation에 더해진다.
Intra-modal Equivariant Learning.
Intra-modal representation learning의 목적인 equivariant latent space를 학습하여 증강 관련 정보를 inter-modal representation learning에 주는것이다.
Equivariant representation $\hat{h}_m$과 증강된 입력의 representation인 $\hat{h'}_m$은 intra-modal latent space로 투영되어 equivariant 임베딩 $\hat{z}_m$와 증강 임베딩 $z'_{m}$을 얻는다. $g^{intra}_{m}$은 intra-modal projection head를 의미한다.
Intra-modal equivariant constrasive learning을 위해 각각 $N$개의 equivariant 임베딩과 augmented input으로부터 나온 임베딩으로 구성된 배치가 사용되었다.
같은 이미지로부터 나온 $(\hat{z}^i_m, \hat{z'}^i_m)$ 쌍은 positive pair 이고, 배치 안에 있는 남은 $2(N-1)$ 개의 임베딩들은 negative pair이다. Negative pair들의 임베딩은 다음과 같이 표현된다.
Constrasive loss를 계산하기 위해 NT-Xent loss (Chen et al., 2020b)가 적용되었다.
Equivariant 임베딩을 위한 loss는 다음과 같이 표현된다.
Intra-modal loss는 원본과 증강 입력을 각각 앵커(anchor)로 사용하여 손실을 결합하는 방식을 사용했다.
이 두 임베딩을 aligning하는 과정은 representation 능력을 키울 뿐 아니라 inter-modal correspondence learning을 위한 representaion vector를 얻게 해준다.
Inter-modal Contrastive Learning.
Inter-modal correspondences를 학습하는 가장 중요한 요인은 input data로부터 어떻게 representation vector를 그리냐이다.
기본적인 방법은 원본 데이터의 임베딩을 representation value로 사용하는 것이다. 이것은 correpondece 정보를 최대화하는데 이점이 있지만, 입력 다양성의 부족에 약하다.
반면에, augmented input의 임베딩을 사용하는 것은 representation 능력을 강화하지만, 주어진 쌍의 correspondence를 방해할 수 있다.
그러므로 증강된 입력으로 이루어진 representation 집한 $D_h$에 대해 기댓값 $\hat{h'}$를 다음처럼 생각할 수 있다. 벡터 $h^{rep}$는 다양한 증강 데이터로부터 정보를 통합하고 augmentation의 부정적 영향을 받지 않은 더 일반적인 특징을 갖게 한다.
하지만, 모든 변환을 생성하고 representation vector $h^{rep}$를 얻는 것은 불가능하므로, 샘플링된 equivariant representation의 중심(centroid)과 유사하게 만드려고 한다.
$u_m$은 intra/inter-modal transformation predictor 사이에 공유된다. 이것은 intra-modal space에서 학습된 equivariance를 inter-modal 공간으로 전이할 수 있게 한다. 더욱이, equivariant representations를 augmented representations 대신 사용하기 때문에 계산 비용이 적다.
Centroid는 inter-modal latent space로 투영된다.