T HE M ODALITY F OCUSING H YPOTHESIS : T OWARDS U NDERSTANDING C ROSSMODAL K NOWLEDGE D ISTILLATION
Anonymous authors
Paper under double-blind review
A BSTRACT
Crossmodal knowledge distillation (KD) extends traditional knowledge distillation to the area of multimodal learning and demonstrates great success in various applications.
To achieve knowledge transfer across modalities, a pretrained network from one modality is adopted as the teacher to provide supervision signals to a student network learning from another modality.
In contrast to the empirical success reported in prior works, the working mechanism of crossmodal KD remains a mystery.
In this paper, we present a thorough understanding of crossmodal KD.
We begin with two case studies and demonstrate that KD is not a universal cure in crossmodal knowledge transfer.
We then present the modality Venn diagram to understand modality relationships and the modality focusing hypothesis revealing the decisive factor in the efficacy of crossmodal KD.
Experimental results onmultimodal datasets help justify our hypothesis, diagnose failure cases and point directions to improve crossmodal knowledge transfer in the future
I NTRODUCTION
Knowledge distillation (KD) is an effective technique to transfer knowledge from one neural network to another (Wang & Yoon, 2021;
Gou et al., 2021).
Its core mechanism is a teacher-student learning framework, where the student network is trained to mimic the teacher through a loss.
The loss is realized as the KL divergence between teacher and student soft labels when first proposed by (Hinton et al., 2015) and has been extended in many ways (Zagoruyko & Komodakis, 2016; Tung & Mori, 2019; Park et al., 2019; Peng et al., 2019; Tian et al., 2019).
KD has been successfully applied to various fields and demonstrates its high practical value.
The wide applicability of KD stems from its generality: any student can learn from any teacher.
To be more precise, the student and teacher network may differ in several ways.
Three common scenarios are: (1) model capacity difference : Many works (Zagoruyko & Komodakis, 2016; Tung & Mori, 2019;
Park et al., 2019; Peng et al., 2019) on model compression aim to learn a lightweight student matching the performance of its cumbersome teacher for deployment benefits.
(2) architecture (inductive bias) difference : Recent works (Touvron et al., 2021;
Ren et al., 2021b;
Xianing et al., 2022) propose to utilize a CNN teacher to distill its inductive bias to a transformer student for data efficiency.
(3) modality difference : KD has been extended to transfer knowledge across modalities (Gupta et al., 2016; Aytar et al., 2016;
Zhao et al., 2018; Garcia et al., 2018; Thoker & Gall, 2019; Ren et al., 2021a;
Afouras et al., 2020; Valverde et al., 2021; Xue et al., 2021), where the teacher and student network come from different modalities.
Examples include using an RGB teacher to provide supervision signals to a student network taking depth images as input, and adopting an audio teacher to learn a visual student, etc.
Despite the great empirical success reported in prior works, the working mechanism of KD is still poorly understood (Gou et al., 2021).
This puts the efficacy of KD into question: Is KD always efficient?
If not, what is a good indicator of KD performance?
A few works (Cho & Hariharan, 2019; Tang et al., 2020; Ren et al., 2021b) are in search for the answer in the context of model capacity difference and architecture difference .
However, the analysis for the third scenario, KD under modality difference or formally crossmodal KD , remains an open problem.
This work aims to fill this gap and for the first time provides a comprehensive analysis of crossmodal
KD.
Our major contributions are the following:
• We evaluate crossmodal KD on a few multimodal tasks and find surprisingly that teacher performance does not necessarily correlate with student performance.
• To explore the cause of performance mismatch in crossmodal KD, we adopt the modality Venn diagram (MVD) to understand modality relationships and formally define modalitygeneral decisive features and modality-specific decisive features .
• We present the modality focusing hypothesis (MFH) that provides an explanation of when crossmodal KD is effective.
We hypothesize that modality-general decisive features are the crucial factor that determines the efficacy of crossmodal KD.
• We conduct experiments on 6 multimodal datasets ( i
e. , synthetic Gaussian, AV-MNIST, RAVDESS, VGGSound, NYU Depth V2 and MM-IMDB).
The results help validate our proposed hypothesis and provide insights on how to improve crossmodal KD.
R ELATED W ORK 2. U NIMODAL KD
KD represents a general technique that transfers information learned by a teacher network to a student network, with applications to many vision tasks (Tung & Mori, 2019; Peng et al., 2019;
He et al., 2019; Liu et al., 2019).
Despite the development towards better distillation techniques or new application fields, there is limited literature (Phuong & Lampert, 2019; Cho & Hariharan, 2019;
Tang et al., 2020; Ren et al., 2021b) on understanding the working mechanism of KD.
Specifically, Cho & Hariharan (2019) and Mirzadeh et al.
(2020) investigate KD for model compression, i.e. , when the student and teacher differ in model size.
They point out that mismatched capacity between student and teacher network can lead to failure of KD.
Ren et al.
(2021b) provide an analysis of KD for vision transformers and demonstrate that teacher’s inductive bias matters more than its accuracy in improving performance of the transformer student.
These works provide good insight into understanding KD, yet their discussion is limited to unimodality and has not touched on the application field of KD for multimodal learning.
2. C ROSSMODAL KD
With the accessibility of the Internet and the growing availability of multimodal sensors, multimodal learning has received increasing research attention (Baltrušaitis et al., 2018).
Following this trend,
KD has also been extended to achieve knowledge transfer from multimodal data and enjoys diverse applications, such as action recognition (Garcia et al., 2018; Luo et al., 2018; Thoker & Gall, 2019),
lip reading (Ren et al., 2021a;
Afouras et al., 2020) and medical image segmentation (Hu et al., 2020; Li et al., 2020).
Vision models are often adopted as teachers to provide supervision to student models of other modalities, e.g. , sound (Aytar et al., 2016; Xue et al., 2021), depth (Gupta et al., 2016;
Xue et al., 2021), optical flow (Garcia et al., 2018), thermal (Kruthiventi et al., 2017) and wireless signals (Zhao et al., 2018).
Although these works demonstrate potentials of crossmodal KD, they are often associated with a specific multimodal task and mostly empirical.
An in-depth analysis of crossmodal KD is notably lacking, which is the main focus of this paper.
2. M ULTIMODAL D ATA R ELATIONS
There is continuous discussion on how to characterize multimodal (or multi-view) data relations.
Many works (Tsai et al., 2020; Lin et al., 2021; 2022) utilize the multi-view assumption (Sridharan &
Kakade, 2008), which states that either view alone is sufficient for the downstream tasks. However, as suggested in (Tsai et al., 2020), when the two views of input lie in different modalities, the multi-view assumption is likely to fail 1 . In the meantime, a few works on multimodal learning (Wang et al., 2016; Zhang et al., 2018; Hazarika et al., 2020; Ma et al., 2020) indicate that multimodal features can be decomposed as common features and specific features in each modality. Building upon these ideas, in this work, we present the MVD to formally characterize modality relations.
In addition, the importance of modality-general information has been identified in these works, yet with different contexts.
In multi-view learning, (Lin et al., 2021; 2022) consider shared information between two views as the key to enforce cross-view consistency.
To boost multimodal network performance and enhance its generalization ability
, (Wang et al., 2016; Zhang et al., 2018; Hazarika et al., 2020; Ma et al., 2020) propose different ways to separate modality-common and modalityspecific information.
For semi-supervised multimodal learning, (Sun et al., 2020) aims at maximizing mutual information among all the modalities.
To the best of our knowledge, our work is the first to reveal the importance of modality-general information in the context of knowledge distillation.
O N THE E FFICACY OF C ROSSMODAL KD
First, we revisit the basics of KD and introduce notations used throughout the paper.
Consider a supervised K -class classification problem.
Let f θ s ( x ) ∈ R K and f θ t ( x ) ∈ R K represent the output ( i.e. , class probabilities) of the student and teacher networks respectively, where { θ s , θ t } are learnable parameters.
Without loss of generality, we limit our discussion within input data of two modalities, denoted by x a and x b for modality a and b , respectively.
Assume that we aim to learn a student network that takes x b as input.
In conventional unimodal KD , the teacher network takes input from the same modality as the student network ( i.e. , x b ).
The objective for training the student is:
[Equation]
(1) where L task represents the cross entropy loss between the ground truth label y ∈ { 0 , 1 , · · · , K − 1 } and the student prediction f θ s ( x b ) , L kd represents the KL divergence between the student prediction f θ s ( x b ) and teacher prediction f θ t ( x b ) , and ρ ∈ [0 , 1] weighs the importance of two terms L task and
L kd ( i.e. , driving the student to true labels or teacher’s soft predictions).
Crossmodal KD resorts to a teacher from the other modality ( i.e. , x a ) to transfer knowledge to the student.
Eq.
(1) is still valid with a slight correction that the KL divergence term is now calculated using f θ s ( x b ) and f θ t ( x a ) .
In addition, there is one variant (or special case) of crossmodal KD, where a multimodal teacher taking input from both modality a and b is adopted for distillation, and L kd is now a KL divergence term between f θ s ( x b ) and f θ t ( x a , x b ) .
We first present a case study on the comparison of crossmodal KD with unimodal KD.
Consider the special case of crossmodal KD where a multimodal teacher is adopted.
Intuitively, adopting a multimodal teacher, which takes both modality a and b as input, can be beneficial for distillation since: (1) a multimodal network usually enjoys a higher accuracy than its unimodal counterpart (Baltrušaitis et al., 2018), and a more accurate teacher seems to result in a better student; (2) the complementary modality-dependent information brought by a multimodal teacher can enrich the student with additional knowledge.
This idea motivates many research works (Luo et al., 2018;
Hu et al., 2020;
Valverde et al., 2021) to replace conventional unimodal KD with crossmodal KD, in an attempt to improve student performance.
Despite many empirical evidence reported in prior works, in this paper, we reflect on this assumption and ask the question: Is crossmodal KD always effective?
[Table]
Table 1 provides two counterexamples for the above question on AV-MNIST and NYU Depth V data.
The goal is to improve an audio student using KD (for AV-MNIST) and to improve an RGB model (for NYU Depth V2).
From Table 1, we can see that a more accurate multimodal network does not serve as a better teacher in these two cases.
For AV-MNIST, while the audio-visual teacher itself has a much higher accuracy than the unimodal teacher ( i [Table] e. , +7.04%), the resulting student is worse ( i.e. , -0.37%) instead.
Similarly, the great increase in teacher performance ( i.e. , +4.64%) does not translate to student improvement ( i.e. , -0.22%) for NYU Depth V2.
These results cast doubt on the efficacy of crossmodal KD 2 .
Even with the great increase in teacher accuracy, crossmodal KD fails to outperform unimodal KD in some cases.
Contradictory to the previous intuition, teacher performance seems not reflective of student performance.
Inspired by this observation, our work targets on exploring the open problem: What is the fundamental factor deciding the efficacy of crossmodal KD?
P ROPOSED A PPROACH 4. T HE M ODALITY V ENN D IAGRAM
To study crossmodal KD, it is critical to first establish an understanding of multimodal data.
Before touching multimodal data, let us fall back and consider unimodal data.
Following a causal perspective (Schölkopf et al., 2012) ( i.e. , features cause labels), we assume that the label y is determined by a subset of features in x a (or x b ); this subset of features are referred to as decisive features for modality a (or modality b ) throughout the paper.
For instance, colors of an image help identify some classes ( e.g. , distinguish between a zebra and a horse) and can be considered as decisive features .
When considering multimodal data, input features of the two modalities will have logical relations such as intersection and union.
We describe the modality Venn diagram (MVD) below to characterize this relationship.
Stemming from the common perception that multimodal data possess shared information and preserve information specific to each modality, MVD states that any multimodal features are composed of modality-geganeral features and modality-specific features .
Decisive features of the two modalities are thus composed of two parts: (1) modality-general decisive features and (2) modality-specific decisive features ; these two parts of decisive features work together and contribute to the final label y .
Fig. 1 left shows an example of a video-audio data pair, where the camera only captures one person due to its position angle and the audio is mixed sounds of two instruments.
Fig.
1 right illustrates how we interpret these three features ( i.e. , modality-general decisive , visual modality-specific decisive and audio modality-specific decisive ) at the input level.
[Figure]
Next, we propose a formal description of MVD to capture the generating dynamics of multimodal data.
Let X a , X b , and Y be the feature space of modality a , modality b , and the label space, respectively, and ( x a , x b , y ) be a pair of data drawn from a unknown distribution D over the space X a × X b × Y .
MVD assumes that ( x a , x b , y ) is generated by a quadruple ( z sa , z sb , z 0 , y
) ∈
Z sa ×Z sb ×Z 0 ×Y , following the generation rule:
[Equation]
where collectively, g u ( · ) : Z u (cid:55)→ X u denotes an unknown generating function, if we adopt the notation u ∈ { a, b } .
To complete the MVD, another linear decision rule should be included.
Specifically, the following equation:
[Equation]
is assumed to hold for any ( z sa , z sb , z 0 , y ) , where 1[ · ] returns 1 if the argument is true andotherwise.
In essence, the two rules of MVD altogether specify that x u is generated based on a modality-specific decisive feature vector z su , and a modality-general decisive feature vector z 0 .
We proceed to quantify the correlation of modality-general decisive features and modality-specific decisive features .
Let Z su ⊆ R d su and Z
⊆
R d 0 , so that Z u
⊆
R
d
u , where d u = d su + d 0 .
We denote a ratio γ = d 0 / ( d 0 + d sa + d sb ) ∈ [0 , 1] , which characterizes the ratio of modalitygeneral decisive features over all decisive features .
Similarly, α = d sa / ( d 0 + d sa + d sb ) and β = d sb / ( d 0 + d sa + d sb ) denotes the proportion of modality-specific decisive features for modality a and b over all decisive features , respectively, and we have α + β + γ = 1 .
4. T HE M ODALITY F OCUSING H YPOTHESIS
Based on MVD, we now revisit our observation in Sec.
3 ( i.e. , teacher accuracy is not a key indicator of student performance) and provide explanations.
First, teacher performance is decided by both modality-general decisive and modality-specific decisive features in modality a .
In terms of student performance, although modality-specific decisive features in modality a are meaningful for the teacher, they can not instruct the student since the student only sees modality b .
On the other hand, modality-general decisive features are not specific to modality b and could be transferred to the student.
Coming back to the example in Fig.
1, if an audio teacher provides modality-specific information ( i.e. , the sound colored in pink), the visual student will get confused as this information ( i.e. , playing violin) is not available in the visual modality.
On the contrary, modality-general information can be well transferred across modalities and facilitates distillation as the audio teacher and visual student can both perceive the information about the left person playing guitar.
This motivates our modality focusing hypothesis.
The Modality Focusing Hypothesis (MFH).
For crossmodal KD, distillation performance is dependent on the proportion of modality-general decisive features preserved in the teacher network: with larger γ , the student network is expected to perform better.
The hypothesis states that in crossmodal knowledge transfer, the student learns to “focus on” modalitygeneral decisive features .
Crossmodal KD is thus beneficial for the case where γ is large ( i.e. , multimodal data share many label-relevant information).
Moreover, it accounts for our observation that teacher performance fails to correlate with student performance in some scenarios.
When α is large and γ is small, the teacher network attains high accuracy primarily based on modality-specific information, which is not beneficial for the student’s learning process.
To have an intuitive and quick understanding of our hypothesis, here we present two experiments with synthetic Gaussian data.
More details can be found in Sec.
As shown in Fig.
2, we start from the extreme case where two modalities do not overlap, and gradually increase the proportion of modality-general decisive features until all decisive features are shared by two modalities.
We observe that crossmodal KD fails to work when x a and x b share few decisive features ( i.e. , γ is small) since modality-specific decisive features in modality a are not perceived by the student.
As γ gradually increases, crossmodal KD becomes more effective.
For the case where all decisive features possess in both modalities, the student gains from teacher’s knowledge and outperforms its [Equation] [Figure] [Equation]
one standard deviation for student accuracy.
With increasing γ , crossmodal KD becomes more effective.
[Figure] baseline by 2.1%. Note that the teacher accuracy does not vary much during this process, yet student performance differs greatly.
Fig.
3 illustrates the reverse process where modality-specific decisive features in modality a gradually dominate.
With increasing α , the teacher gradually improves since it receives more modality-specific decisive features for prediction.
However, the student network fails to benefit from the improved teacher and performs slightly worse instead.
Clearly, teacher performance is not reflective of student performance in this case.
These two sets of experiments help demonstrate that teacher accuracy does not faithfully reflect the effectiveness of crossmodal KD and lend support to our proposed hypothesis.
Apart from the two intuitive examples, below we provide a theoretical guarantee of MFH in an analytically tractable case, linear binary classification.
Formally, considering an infinitesimal learning rate which turns the training into a continuous gradient flow defined on a time parameter t ∈ [0 , + ∞ ) (Phuong & Lampert, 2019), if n data are available, which are collectively denoted as
Z u ∈ R d u × n , we have the following theorem to bound the training distillation loss with γ .
Theorem 1.
(Crossmodal distillation in linear binary classification).
Without loss of generality, we assume f
θ t ( · ) : X a (cid:55)→ Y and f θ s ( · ) :
X b (cid:55)→ Y .
Suppose max {|| Z u Z u,T || , ||
( Z u Z u,T ) − 1 ||} ≤ λ always holds for both u = a or b , and g u ( · ) are identity function.
If there exists ( ϵ, δ ) such that
[Equation]
Then, with an initialization at t = 0 satisfying R dis n ( θ s (0)) ≤ q , we have, at least probability 1 − δ :
[Equation]
where ϵ ⋆ = λ 1 . 5 ( λ 2 + 1)(1 − γ )
ϵ
and R dis n ( θ s ) is the empirical risk defined by KL divergence:
R dis n
[Equation]
The proof is presented in Appendix A.
The theorem implies that the training distillation loss is upper-bounded by a monotonic function w.r.t.
γ .
When γ increases from 0 to 1 , the upper bound gradually decreases.
Further combining the above Theorem with Rademacher complexity, we could even obtain a bound on the generalization error.
Nevertheless, the key component in the generalization bound is already shown here.
4. I MPLICATIONS
We have presented MVD and MFH.
Equipped with this new perspective of crossmodal KD, we discuss their implications and practical applications in this section.
Implication.
For crossmodal KD, consider two teachers with identical architectures and similar performance: teacher (a) makes predictions primarily based on modality-general decisive features while teacher (b) relies more on modality-specific decisive features .
We expect that the student taught by teacher (a) yields better performance than that by teacher (b).
The implication above provides us with ways to validate MFH and points directions to improve crossmodal KD.
We can train a teacher network that focuses more on modality-general decisive
[Table] features
Note that: (1) Identical architectures and performance of the two teachers are stated here for a fair comparison.
Similar performance of the two teachers translate to similar ability to extract decisive features for prediction, thus the only difference lies in the amount of modality-general decisive features .
This design excludes other factors and helps justify that the performance difference stems from γ .
In fact, we observe that even with inferior accuracy than teacher (b), teacher (a) still demonstrates better cross-modal KD performance in experiments.
The main focus of this paper is to present the MFH and to validate it with theoretical analysis, synthetic experiments and evidence from experiments conducted on real-world multimodal data.
Contrary to the common belief, we detach the influence of teacher performance in crossmodal KD and point out that modality-general decisive features are the key.
Developing methods to separate the two features from real-world multimodal data is beyond the scope of this paper and left as future work.
E XPERIMENTAL R ESULTS 5. E XPERIMENTAL S ETUP
To justify our MFH, we conduct experiments on 6 multimodal datasets (synthetic Gaussian, AVMNIST, RAVDESS, VGGSound, NYU Depth V2 and MM-IMDB) that cover a diverse combination of modalities including images, video, audio and text.
In essence, we design approaches to obtain teachers of different γ and perform crossmodal KD to validate the implication presented in Sec. 4.3.
We consider four different ways to derive a teacher network that attends to more or fewer modalitygeneral decisive features than a regularly-trained teacher: (1) For synthetic Gaussian data, since the multimodal data generation mechanism is known, we train a modality-general teacher on data with only modality-general decisive features preserved and other channels removed; (2) For NYU Depth
V2, we notice that RGB images and depth images are two modalities that have large similarity and can be processed with one single network.
Therefore, we design a modality-general teacher ( i.e. , has a larger γ than a regularly-trained teacher) by following the training approach in (Girdhar et al., 2022); (3) For MM-IMDB data, we follow the approach in (Xue et al., 2021) to obtain a multimodal teacher which is more modality-specific ( i.e. , has a smaller γ ) than the regularly-trained teacher; (4)
For the other datasets, we design an approach based on feature importance (Breiman, 2001; Wojtas & Chen, 2020) to rank all feature channels according to the amount of modality-general decisive information.
With a sorted list of all features, we obtain a modality-general teacher by only keeping feature channels with large values and a modality-specific teacher by keeping features with small values.
In summary, the variability in approaches and tasks help demonstrate the generalizability of
MFH.
Due to space limit, we place results such as MM-IMDB movie classification in Appendix B.
5. S YNTHETIC G AUSSIAN
We extend the Gaussian example in (Lopez-Paz et al., 2015) to a multimodal scenario (see Appendix B.2 for details).
To validate MFH, we train two teacher networks: (1) a regular teacher is trained on data with all input feature channels; (2) a modality-general teacher is trained on data with modality-general decisive features preserved and other channels removed, thus this teacher has γ = 1 .
We experiment with different data generation rules, and the regular teachers have different γ correspondingly.
Crossmodal KD results obtained by these two teachers are presented in Table 2.
We observe considerable performance degradation (larger than -10% accuracy loss) of the modality- general teacher than the regular teacher, as it only relies on modality-general decisive features and discards modality-specific decisive features for prediction.
However, the modality-general teacher still facilitates cross-modal KD and leads to an improved student ( ∼ +2% accuracy improvement compared with regular crossmodal KD).
The results align well with MFH stating that a teacher with more emphasis on modality-general decisive features ( i.e. , has a larger γ ) yields a better student.
5. NYU D EPTH V
Next, we revisit the example of NYU Depth V2 in Sec. 3.
We adopt a teacher network that takes depth images as input to transfer knowledge to an RGB student.
Both student and teacher network architecture are implemented as DeepLab V3+ (Chen et al., 2018).
As described in Sec. 5.1, besides training a regular teacher, we follow (Girdhar et al., 2022) and train a teacher that learns to predict labels for the two modalities with exactly same parameters.
To be specific, a training batch contains both RGB and depth images, and the teacher network is trained to output predictions given either
RGB or depth images as input.
Thus the resulting teacher is assumed to extract more modalitygeneral features for decision ( i.e. , has a larger γ than a regular teacher) since it needs to process both modalities in an identical way during training.
As shown in Table 3, regular crossmodal KD does not bring many advantages: the student achieves a similar mIoU compared with the No-KD baseline.
Therefore, one might easily blame the failure of crossmodal KD on teacher accuracy and assume that crossmodal KD is not effective because the depth teacher itself yields poor performance ( i.e. , has an mIoU of 37.33%).
By nature of its training approach, the modality-general teacher is forced to extract more modality-general decisive features for prediction rather than rely on depth-specific features as it also takes RGB images as input.
While we do not observe difference in teacher performance, the modality-general teacher turns out to be a better choice for cross-modal KD:
its student mIoU improves from 46.36% to 47.93%.
The results show how our MFH can indeed help diagnose failure of crossmodal KD and lead to improvement.
[Table]
NullifiedArea
5. RAVDESS AND VGGS OUND
Besides the approaches presented above we design a permutation-based method to sort the features according to the saliency of modality-general decisive features which allows us to obtain teacher networks that possess different amount of γ .
See Appendix B.4 for the detailed algorithm flow.
We apply this approach to RAVDESS (Livingstone & Russo, 2018) and VGGSound (Chen et al., 2020a).
RAVDESS is an audio-visual dataset containing 1,440 emotional utterances with 8 different emotion classes.
Teacher modality is audio and student modality is images.
The student and teacher network follow the unimodal network design in (Xue et al., 2021); VGGSound is a large-scale audio-visual event classification dataset including over 200,000 video and 310 classes.
We consider two setups: (1) adopting an audio teacher and a video student; (2) using a video teacher for distillation to an audio student.
We also experiment with two architectures, ResNet-18 and ResNet-50 (He et al., 2016) to be the teacher and student network backbone. [Table]
In our algorithm, we sort feature channels according to the saliency of modality-general decisive features . A modality-general teacher is derived by nullifying r % feature channels with smallest values. Similarly, a modality-specific teacher is obtained by nullifying the r % feature channels with largest values and a random teacher is derived by randomly nullifying r % channels. The feature nullifying ratio r % is a hyperparameter and we experiment with different values of r in the later experiments.
While the exact value of γ for different teacher networks is unknown, we know that γ increases in the order of modality-specific, random and modality-general teacher.
As shown in Table 4, cross-modal KD performance aligns well with this order.
For RAVDESS emotion recognition, a modality-specific teacher results in a significantly downgraded student ( i.e. , accuracy drops from 77.22% to 42.66%) while a modality-general teacher improves regular KD by 1.06%.
Similarly, for VGGSound event classification, modality-general crossmodal KD improves the video student performance from 30.62% to 31.88% (for ResNet-18) and from 38.78% to 39.81% (for ResNet-50).
These results demonstrate the critical role of modality-general decisive features in cross-modal KD.
Moreover, to provide an intuitive understanding of how a modality-general teacher differs from the regular teacher, we present visualization results on VGGSound data in Fig.
We see that a regular video teacher utilizes all decisive features for classification, and attends to the visual objects ( i.e. , the
Saxophone and the baby).
On the contrary, a modality-general teacher focuses more on information available in both the visual and audio modality, thus the area of vocalization get most activated.
Finally, we vary feature nullifying ratio r for VGGSound data and plot the student performance curve along with r .
From Fig.
5, we observe that there exists a sweet spot for modality-general KD.
As r increases, the student performance improves in the beginning.
The improvement indicates that non modality-general decisive features in the teacher are gradually discarded, which in turn results in a better student.
Later, after all non modality-general decisive information are discarded, the feature nullifying process starts to hinder student performance as modality-general decisive features get nullified as well.
The modality Venn diagram corresponding to this process is depicted in the upper figure.
The observed performance curve aligns well with our understanding on MVD.
C ONCLUSION
In this work, we present a thorough investigation of crossmodal KD.
We find that teacher accuracy do not necessarily indicate student performance, and modality-general decisive features are the key in crossmodal KD.
The proposed MVD and MFH characterize multimodal data relationships and reveal when crossmodal KD is effective.
We present theoretical analysis and conduct various experiments to justify the proposed hypothesis.
Finally, we hope MFH shed light on applications of crossmodal KD and will raise interest for general understanding of multimodal learning in the community.
R EPRODUCIBILITY S TATEMENT
We attach the code in the supplementary material, and will release the full code and training scripts to replicate all the experiments in the paper once published.
All datasets and code platform (PyTorch) we use are public, and experimental details are provided in Appendix B.
A P ROOF OF T HEOREM
Lemma 1.
Consider a function l ( b, a ) :
[Equation]
where σ ( · ) represents the sigmoid function.
When | a − b | ≤ ϵ ,
[Equation]
Proof.
We only need to prove the following two things: (i) l ( b, a ) ≤ l ( a ± ϵ, a ) , and (ii) l ( a ± ϵ, a ) ≤ ϵ
[Equation]
ϵ
[Equation]
e − ϵ .
For (i), we imagine a is fixed, and calculate the derivative of l ( b, a ) w.r.t.
b , yielding:
[Equation]
Thus, when varying b in the range [ a − ϵ, a + ϵ ] , the value of l ( b, a ) first decreases and then increases.
It implies l ( b, a ) ≤ l ( a ± ϵ, a ) .
To prove (ii), we first consider the function:
[Equation]
where in the last line, we temporarily denote t =
e − a .
Now, let us calculate the derivative of ˜ l + w.r.t.
t :
[Equation]
Obviously, the denominator is always larger than zero, and let us focus only on the numerator.
After expanding the numerator, we see that when t = e ϵ (1 − ϵ ) − 1 1+ ϵ − e ϵ , ˜ l + achieves its maximum.
Therefore, according to a = − ln t , we conclude the maximum value of ˜ l + ( a ) is ϵ 1 − e − ϵ − 1 − ln ϵ 1 − e − ϵ , achieved at a = − ln e ϵ (1 − ϵ ) − 1 1+ ϵ − e ϵ .
Similarly, we could define a function ˜ l − ( a )
=
l ( a − ϵ, a ) and verify that the maximum value of ˜ l − ( a ) is − ϵ 1 − e ϵ − 1 − ln − ϵ 1 − e ϵ .
Furthermore, after some simplifications, these two expressions, i.e., max ˜ l + ( a ) and max ˜ l − ( a ) , could be proved identical.
Corollary 1.
For two vectors a ∈ R n and b ∈ R n , if || a − b || ≤ ϵ , then
L n ( b , a ) =
n (cid:88) i =
[Equation]
The corollary is obvious if noticing | a
i − b i | ≤ || a − b || ≤ ϵ holds for any i = 1 , 2 , · · · , n .
Lemma 2.
If max {|| Z u Z u,T || , || ( Z u Z u,T ) − 1 ||} ≤ λ always holds for both u = a, b .
Assume ||
Z a,T Z a − Z b,T Z b || ≤ (1 − γ )
ϵ , then we have:
[Equation]
Proof.
For conciseness, we temporarily denote A
=
Z a and B = Z b .
Thus, we have || A || ∈
[ 1 λ , λ ] and || B || ∈ [ 1 λ , λ ] .
To begin with, we notice:
[Equation]
Then, we have:
[Equation]
Now, we are ready to prove Theorem 1.
For reader’s convenience, we re-state Theorem 1 in below.
Theorem A.1.
(Crossmodal distillation in linear binary classification).
Without loss of generality, we assume f
θ t ( · ) : X a (cid:55)→ Y and f θ s ( · ) :
X b (cid:55)→ Y .
Suppose max {|| Z u Z u,T || , ||
( Z u Z u,T ) − 1 ||} ≤ λ always holds for both u = a or b , and g u ( · ) are identity function.
If there exists ( ϵ, δ ) such that
[Equation]
Then, with an initialization at t = 0 satisfying R dis n ( θ s (0)) ≤ q , we have, at least probability 1 − δ :
[Equation]
where ϵ ⋆ = λ 1 . 5 ( λ 2 + 1)(1 − γ )
ϵ
and R dis n ( θ s ) is the empirical risk defined by KL divergence:
[Equation]
Proof.
First, under the given conditions, if we could prove:
[Equation]
Then, adding the outer probability bracket doesn’t alter the conclusion, and the theorem is proved.
Therefore, in the following, we will focus on proving Eq.
The proof consists of two parts.
In the first part, we will show that there exists an θ ⋆s , such that R dis n ( θ ⋆s ) is bounded.
Then, in the second part, we will prove that if the training process is long enough (i.e., t → + ∞ ), then the final distillation risk R dis n ( θ s ( t = + ∞ )) is further bounded by R dis n ( θ ⋆s ) .
Without loss of generality, we assume the trained teacher weight ||
θ t ||
= 1 since in linear binary classification, scaling the weight doesn’t affect the final prediction.
Now, let us denote:
[Equation]
Then we have:
[Equation]
where in the last line, we have used Lemma 2.
Then using Corollary 1, we obtain
[Equation] [Equation]
where ϵ ⋆ = λ 1 . 5 ( λ 2 + 1)(1 − γ ) ϵ .
Now, the remaining effort is to prove that if time is sufficiently long (i.e., t → + ∞ ), the trained loss R dis n ( θ s ( t )) will be smaller than R dis n ( θ ⋆s ) .
To begin with, we apply Theorem A.2 and Corollary A.1 from (Phuong & Lampert, 2019):
For any sublevel set Θ = { θ s : R dis n ( θ s ) ≤ q } , there exists c > 0 such that:
[Equation]
Compared to the original Corollary A.1 of (Phuong & Lampert, 2019), a slight modification is done for it to suit our case.
Proving the existence of c is obvious by noticing that the left-hand side of
Eq.
(50) of (Phuong & Lampert, 2019) will be R dis n ( θ ⋆s ) instead of 0 in our case.
Next, noticing Eq.
(8) and (53) of (Phuong & Lampert, 2019), we have:
[Equation] [Equation]
which could be simplified as (Phuong & Lampert, 2019):
[Equation]
Integrating over [0 , τ ] yields:
[Equation]
Thus, as τ → + ∞ , R dis n ( θ s ( τ = + ∞ )) will be upper-bounded by R dis n ( θ ⋆s ) .
B E XPERIMENTAL S ETUP AND M ORE R ESULTS B. C ASE STUDIES IN S EC .
In this section, we describe implementation details and provide more results for the two case studies in Sec. 3.
AV-MNIST (Vielzeuf et al., 2018) is an audio-visual dataset created by pairing audio and image features.
The two modalities are MNIST images with 75% energy removed by principal component analysis and audio spectrograms with random natural noise injected.
There are 50, pairs for training, 5,000 pairs for validation and 10,000 pairs for testing.
Following (Vielzeuf et al., 2018; Gao et al., 2022), we adopt a 6-layer CNN as the audio teacher network.
The audio student network is implemented as a 3-layer CNN, and the multimodal teacher is a late fusion network.
The multimodal teacher uses LeNet5 (LeCun et al., 1989) as the image backbone and a 5-layer CNN as the audio backbone; Audio and image features are then concatenated and passed to fully-connected layers for the final prediction.
Recall that ρ in Eq.
(1) in the main paper controls the relative importance of the two loss terms when training the student network.
We experiment with both ρ = 0 and ρ = 0 . 5 , and repeat the experiments for 10 times.
We have provided the results of ρ = 0 .
5 in Table 1 in the main paper, and a more detailed version can be found in Table 5.
[Table]
From the table, we can see that crossmodal KD does not have advantages over unimodal KD for both values of ρ .
We hypothesize that the proportion of modality-general decisive information is small in this dataset since a multimodal data pair is assembled by randomly pairing an image with an audio that belongs to the same class.
Thus the two modalities are not naturally correlated and there may be little modality-general information.
MFH provides a plausible explanation for this failure case of crossmodal KD.
NYU Depth V2 (Nathan Silberman & Fergus, 2012) contains 1,449 aligned RGB and depth images with 40-class labels, where 795 images are used for training and 654 images are for testing.
ρ is set as 0.5.
We implement two model architectures for the multimodal teacher: (1) Channel Exchanging
Networks (CEN) (Wang et al., 2020) and (2) Separation-and-Aggregation Gate (SA-Gate) (Chen et al., 2020b).
The unimodal teacher and student are adopted as the RGB branch of the corresponding multimodal network.
The results are shown in Table 6, which corresponds to the right part of Tablein the main paper.
[Table]
Table 6 demonstrates that crossmodal KD is not effective in both cases.
The great advantages in teacher performance does not enhance student performance.
Adopting CEN as the multimodal teacher seems better than SA-Gate, but the improvement compared with unimodal KD is still marginal ( i.e. , from 46.23% to 46.70%).
According to MFH, different teacher networks utilize different amount of modality-general decisive features for prediction, which results in different distillation performance.
We hypothesize that CEN has a larger γ than SA-Gate due to their model design: CEN shares all parameters for the RGB and depth input except for Batch Normalization layer while SA-Gate has separate encoders for the two modalities.
This indicates that CEN is more modality-general than
SA-Gate and may account for their performance differences.
There may be other factors lying behind, and one future direction is to develop methods to compare existing model architectures to find a teacher architecture that best suits cross-modal KD.
B. S YNTHETIC G AUSSIAN
Assume two vectors x a ∈ R D 1 and x b ∈ R D 2 compose one multimodal data pair ( x a , x b ) .
We select a subset of input features as decisive features , denoted by x ∗ ∈ R D .
We assume that x ∗ exist in both x a and x b , and denote the corresponding decisive feature index set of x a ( x b ) as J 1 ( J 2 ).
The separating hyperplanes are denoted by δ ∈ R D .
Formally, we generate one feature-label pair ( x a , x b , y ) by:
[Equation]
As depicted in MVD, modality-general decisive features are decisive features shared by two modalities and thus indexed by J 1 ∩ J 2 .
J 1 ∪ J 2 represents the index set of decisive features from both modalities.
Therefore, α = 1 − | J 2 | | J 1 ∪ J 2 | , β = 1 − | J 1 | | J 1 ∪ J 2 | and γ = | J 1 ∩ J 2 | | J 1 ∪ J 2 | .
By changing J 1 and J 2 , we can generate multimodal data with different inherent characteristics ( i.e. , different α , β and γ ).
We consider 2 settings: (1) varying γ (Fig. 2 in the main paper).
Let D 1 = 25 , D 2 = 50 and D = 20 , we gradually increase | J 1 ∩ J 2 | from 0 to 10, with a step size of 2 and perform KD on every step.
Consequently, γ takes the value of [0, 0.11, 0.25, 0.43, 0.67, 1], and α = β = 1 − γ 2 .
(2) varying α (Fig. 3 in the main paper).
Let D
= D 2 = 50 and D = |
J 1 ∪ J 2 | increase from 10 to 50, with a step size of 10.
So α takes the value of [0, 0.5, 0.67, 0.75, 0.80, 0.83].
We set β to be 0 through the process, and γ = 1 − α .
Following (Lopez-Paz et al., 2015), teacher and student are implemented as logistic regression models, and we use 200 samples for training and 1,000 samples for testing.
β is sampled from the standard normal distribution.
ρ in Eq.
1 in the main paper is set as 0.5.
Results are averaged overruns.
B. MM-IMDB
MM-IMDB (Arevalo et al., 2017) is the largest publicly available multimodal dataset for genre prediction on movies.
It contains 25,959 movie titles and posters that belong to 27 movie genres.
We pick two movie genres ( i.e. , drama and comedy) for multi-label classification.
There is 15,552 data for training, 2,608 for validation and 7,799 for testing.
We adopt the same pre-processing method as (Arevalo et al., 2017) to extract image and text features.
We consider the special case of crossmodal
KD, where teacher is a multimodal network that takes both images and text as input and student is a unimodal text network.
The unimodal and multimodal architecture are identical to (Liang et al., 2021).
As described in Sec. 5.1, we experiment with two teacher networks that have the same architecture but differ in γ : (1) We regularly train a multimodal network with labels; (2) Following (Xue et al., 2021), we train a multimodal network that receives pseudo labels from an unimodal image network.
The second teacher only has access to pseudo labels from the image modality and leans towards the image modality when giving predictions.
In other words, it is more modality-specific ( i.e. , has a smaller γ ) than the regular teacher.
We randomly split training data as 1:1, and use the first half to train the unimodal teacher and the general multimodal teacher.
The other part of data is used for training the student network, and we set ρ = 0 .
[Table]
Table 7 shows the teacher and student performance for both unimodal KD and crossmodal KD.
We select three teacher models that have similar performance on test data, and use them for distillation to detach the influence of teacher performance.
Clearly, the three teachers transfer different knowledge to the student.
The unimodal teacher comes from the image modality and the modality-specific multimodal teacher is also biased towards the image modality due to its training strategy.
Finally, the regular multimodal teacher adopts more modality-general information compared with the previous two teachers ( i.e. , has a larger γ ).
As can be seen from the table, it results in the best unimodal text student, which helps verify our proposed MFH.
B. RAVDESS AND VGGS OUND
Feature Ranking Approach .
We first present a permutation-based approach to rank given multimodal features according to the amount of modality-general decisive information available in each feature channel.
This approach offers an alternative way to obtain teachers of different γ and helps validate the proposed MFH.
As described in Sec.
5.4, once we have a sorted list for all feature channels, we can derive a modality-general (or modality-specific) teacher by nullifying the top r % smallest (or largest) channels during the distillation process.
The major steps of our proposed feature ranking approaches are demonstrated in Algorithm 1.
The input of Algorithm 1 are X a ∈ R N × D 1 , X b ∈ R N × D 2 , and Y ∈ R N , representing N paired features from modality a and b , and N target labels, respectively.
The output is a saliency vector p ∈ R D 1 for modality-specific decisive features in modality a , where its d -th entry p d ∈ [0 , 1] reflects the saliency of the d -th feature dimension.
A larger saliency value indicates a more modality-general decisive feature channel.
Input: multimodal features ( X a ∈ R N × D 1 , X b ∈ R N × D 2 , Y ∈ R N )
Output: saliency vector p ∈ R D 1 for features of modality a 1: Jointly train two unimodal networks f θ ∗ 1 and f θ ∗ 2 using the following loss:
[Equation]
▷ Dist ( · , · ) denotes a distance loss ( e.g. , mean squared error) and CE denotes cross entropy 2: for d = 1 to D 1 do ▷ Calculate the saliency for the d -th feature dimension 3: p d =4: for m = 1 to M do permutation M for better stability 5: permute the d -th column of X a yielding ˜X a 6: p d = p d + 1 M × Dist ( f θ ∗ 1 ( ˜X a ) , f θ
[Equation]
2 ( X b )) 7: end for 8: end for 9: Perform normalization: p = p max d p d ∈ [0 , 1] D
Since input-level features contain much label-irrelevant noise, our Algorithm 1 is designed following a trace-back thought starting from the output level.
Namely, we drive two unimodal networks to the state of “feature alignment” at the output level using Eq.
(28), and then use permutation to identify which input feature dimension has a larger impact to the state.
Those more influential to the state ( i.e. , a large distance in step 6) will be assigned a larger saliency value.
In step 1, we jointly train two unimodal networks f θ ∗ 1 and f θ ∗ 2 that respectively take unimodal data
X a and X b as input.
The first loss term in Eq.
(28) aims to align feature spaces learned by the two networks, and the remaining loss terms ensure that learned features are essential for a correct prediction.
We believe that this training strategy aligns three sources of decisive features at the output level.
In step 2, we follow the idea of permutation feature importance (Breiman, 2001) to trace back modality-general decisive features at the input level.
For the d -th dimension in X a , we randomly permute X a along this dimension and obtain a permuted ˜X a in step 5.
Next, we calculate the distance between f θ ∗ 1 ( ˜X a ) and f θ ∗ 2 ( X b ) in step 6.
A large distance indicates that the d -th dimension largely influences the state of “feature alignment”.
Consequently, we are able to quantify the proportion of modality-general decisive features in each input feature channel and use the saliency vector p to represent it.
We repeat the permutation process for M times and average the distance value for good stability.
Finally, p is normalized to [0 , 1] D 1 in step 9.
Note that: (1) The focus of this paper is to propose and validate MFH.
Algorithm 1 presents an approach to rank features and allows us to derive teachers of different γ to justify the MFH implication.
Developing methods that can separate modality-general decisive features and modalityspecific decisive features is a challenging problem worth deep investigation and is left as future work.
(2) Algorithm 1 is not limited to feature ranking at the input level.
X a and X b can be features extracted from middle layers of the neural network as well.
In such case, output p reflects the saliency for each middle-layer feature channel.
(3) Algorithm 1 could be equally applied to rank modality-general decisive features for modality b as long as we permute X b .
Next, we present results by applying this feature ranking approach to two multimodal applications, i.e. , RAVDESS emotion recognition and VGGSound event classification.
The Ryerson Audio-Visual Database of Emotional Speech and Song (RAVDESS) (Livingstone &
Russo, 2018) contains videos and audios of 24 professional actors vocalizing two lexically-matched statements.
For modality a ( i.e. , teacher modality), we adopt Kaiser best sampling and take melfrequency cepstral coefficients (MFCCs) features from corresponding audio.
For modality b ( i.e. , student modality), we uniformly sample single-frame images every 0.5 second from each video.
We randomly split image-audio pairs, and have 7,943 data for training, 2,364 data for validation and 1,001 data for testing.
Similar to (Xue et al., 2021), the teacher and student architecture are 3-layer
CNNs followed by 3 fully-connected layers.
We set ρ in Eq.
(1) in the main paper as 0 ( i.e. , only use L kd for distillation) to fully observe the teacher’s influence on student performance.
We report results with three feature nullifying ratio r in Table 8, which is a detailed version of Table 4 in the main paper.
Results are averaged over 5 runs.
[Table]
As shown in the table, with more feature channels getting nullified ( i.e. , increasing r ), the random and modality-specific version both suffer from a heavy performance degradation.
On the contrary, a modality-general teacher still attains satisfactory distillation performance and outperforms regular KD even when the feature nullifying ratio goes to 75%.
This demonstrates the efficacy of our proposed feature ranking method as well as the practical value of MFH.
VGGSound is a large-scale audio-visual correspondent dataset.
We randomly choose 100 class from its 310 classes and obtain 56,614 audio-video pairs for training and 4,501 audio-video pairs for testing.
Videos clips and audio spectrograms are taken as input features, respectively.
The audio network is implemented as a ResNet-18 / ResNet-50 backbone followed by linear layers and the video network is the same architecture with 2D convolution replaced by 3D convolution.
For Tablein the main paper, we set ρ in Eq.
(1) to be 0 and experiment with both ResNet-18 and ResNet-50.
In
Table 9, we report results of both ρ = 0 and ρ = 0 .
5 with the ResNet-18 backbone.
The conclusion is consistent: a modality-general teacher improves student performance while a modality-specific teacher results in performance degradation.
These results help validate our proposed MFH.
[Table]
[Figure]
In Algorithm 1, we repeat permutation M times for a better estimation of each feature dimension’s saliency value.
Fig.
6 provides an analysis on the number of permutation times ( .e. , M ).
As M increases, we have a more accurate estimation of p , so modality-general KD gradually improves and finally reaches a plateau.
C C OMPARISON OF MVD WITH THE MULTI - VIEW ASSUMPTION
Below we compare MVD with the multi-view assumption (Sridharan & Kakade, 2008).
We adopt the same notations used in the main text here for the multi-view learning paradigm: assume the input variable is partitioned into two different views x a and x b , and there is a target variable y of interest.
The multi-view assumption states that either view alone is sufficient to predict the target label y accurately.
As illustrated in Figure 7 (a), all task-relevant information is assumed to lie in the shared regions between x a and x b .
Despite its wide use in unimodal self-supervised learning, the multi-view assumption is likely to fail when x a and x b are from different modalities (Tsai et al., 2020).
In fact, whether the multi-view assumption holds is largely dependent on downstream tasks and modalities involved.
On one hand, for tasks such as image classification, either the image itself or its caption is sufficient to derive the target label.
On the other hand, for tasks such as MM-IMDB movie genre classification, using the movie poster (image modality) alone may not convey which category this movie belongs to.
Movie descriptions (text modality-specific information) are also needed to infer the target label y .
Similarly, using the depth image alone is not sufficient for RGB-D semantic segmentation as there are regions in the image that have the same depth values but correspond to different semantic labels.
The multi-view assumption thus does not hold for many challenging multimodal tasks.
[Figure]
Our proposed MVD generalizes the multi-view assumption by taking modality-specific decisive features into consideration as well.
It states that task-relevant information is composed of three parts: (1) modalitygeneral decisive features; (2) decisive features specific to modality a ; and (3) decisive features specific to modality b , as illustrated in Figure 7 (b).
Consequently, the multi-view assumption can be considered as a special case of
MVD when α = β = 0 and γ = 1 .