SlowGuess/NAACL_2022_OCR huggingface dataset:
Devamanyu Hazarika*, Yingting Li $^{\alpha}$ ,
Bo Cheng $^{\alpha}$ , Shuai Zhao $^{\alpha}$ , Roger Zimmermann $^{\text{圆}}$ , Soujanya Poria $^{\text{圆}}$
National University of Singapore, Singapore
$^{\alpha}$  Beijing University of Posts and Telecommunications
DeCLaRe Lab, Singapore University of Technology and Design, Singapore
{hazarika, rogerz}@comp.nus.edu.sg
{cindyyting,chengbo，zhaoshuaiby}@bupt.edu.cn
sporia@sutd.edu.sg
Building robust multimodal models are crucial for achieving reliable deployment in the wild. Despite its importance, less attention has been paid to identifying and improving the robustness of Multimodal Sentiment Analysis (MSA) models. In this work, we hope to address that by (i) Proposing simple diagnostic checks for modality robustness in a trained multimodal model. Using these checks, we find MSA models to be highly sensitive to a single modality, which creates issues in their robustness; (ii) We analyze well-known robust training strategies to alleviate the issues. Critically, we observe that robustness can be achieved without compromising on the original performance. We hope our extensive study-performed across five models and two benchmark datasets-and proposed procedures would make robustness an integral component in MSA research. Our diagnostic checks and robust training solutions are simple to implement and available at https://github.com/declare-lab/MSA-Robustness
Multimodal Sentiment Analysis (MSA) is a burgeoning field of research that has seen accelerated developments in recent years. Numerous models have been proposed that utilize multiple modalities such as audio, visual, and language signals to predict sentiments, emotions, and other forms of affect. While progress in MSA has been driven mainly by improvements in multimodal performance, we call for attention towards an equally important aspect
Figure 1: Removing modalities one at a time from the testing set of CMU-MOSI (Zadeh et al., 2016) on a trained MISA (Hazarika et al., 2020).
in multimodal systems - multimodal robustness. Robustness is crucial when models are deployed in the wild, where it is common to encounter inadvertent errors in the source modalities due to data loss, data corruption, jitter, privacy issues, amongst others.
A well-known fact in the MSA research is that language modality tends to be the most effective, which has prompted models to utilize language as its core modality (Wu et al., 2021; Han et al., 2021a; Zeng et al., 2021). In this work, we focus on skewed dependence on language and try to understand how it affects the robustness of MSA models. Specifically, we ask,
RQ1: Are models in MSA over-reliant on a subset of modalities, particularly language?
RQ2: If yes, what implications does it have on modality robustness?
To answer RQ1, we look at Fig. 1. The figure illustrates a setup where we fully remove one modality during testing on the MISA model (Hazarika et al., 2020). Here, we observe a sharp drop in performance when language modality is removed but
Human Language Technologies, pages 685 - 696
do not see statistically significant drops when audio or visual modalities are removed. This observation aligns with recent findings in the MSA literature highlighting the dominance of language.
This brings us to RQ2 where we try to understand the robustness implications over this dominance. We design an elaborate study in § 3—over five state-of-the-art (SOTA) MSA models and across two benchmark datasets—where we propose diagnostic checks to understand modality robustness, i.e., how robust are models against modality errors such as missing or noisy modalities.
Based on our findings, we then proceed to ask,
RQ3: How can we improve the robustness of these models?
RQ4: Does robust training lead to a performance trade-off?
For RQ3, we study well-known robust training methods, that act as a pre-emptive strategy to reduce the performance drops. Critically, our training is model-agnostic and can be easily included in any existing multimodal model (§ 4). For RQ4, we observe that our method to improve robustness does not trade-off with the final performance on the clean testing set, thus achieving similar performance as the original model.
While MSA has received increased attention in recent times, the topic of robustness has not taken center stage. Fortunately, few works have started changing this trend. (Gat et al., 2020) reveals how multimodal classifiers often utilize a subset of modalities, which they addressed by inducing uniform contribution from all input modalities. In MSA, multiple works over-rely on language modality to improve the performance. (Wu et al., 2021) constructs a text-centered shared-private framework for multimodal fusion, and (Han et al., 2021a) obtains two text-related modal pairs and iteratively push the interaction between modalities to supplement information for better performance. While this has enabled performance boosts, our goal is to explore the double-edged nature of this feature and how it impacts robustness. Our motivation for diagnostics is similar to (Frank et al., 2021), but unlike them, we do not perturb the raw data (such as image patches). Instead, we intervene on modality representations, which is easier to integrate with existing models and do not require prior knowledge of the modality structure.
To address robustness in MSA, (Tsai et al., 2018) proposes a factored model that can accommodate modality drops. Also, (Ma et al., 2021) introduces modality drops during training and testing and uses meta-learning to make models robust. However, our work comprises some crucial distinctions: i) Unlike these works, our diagnostics and robust training do not require sophisticated architecture and can be easily integrated into existing models. ii) We perform an exhaustive analysis of robustness across multiple models, which is previously not done in the MSA literature.
3 Testing Robustness via Diagnostic Checks
In this section we perform an elaborate study on modality robustness by simulating potential issues with modality signals during testing (or deployment) of MSA models.
Models. In order to fully verify the universality of our experiments, we select a series of diverse SOTA models, ranging from RNN-based to Transformer-based architectures. These models work across different granularities from word-level to sentence-level variants:
(i) MISA (Hazarika et al., 2020) is a popular model that generates modality-invariant and -specific features of multimodal data, to learn both shared and unique characteristics of each modality. (ii) BBFN (Han et al., 2021a) in a similar vein performs fusion and separation to increase cross-modal relevances and differences. This work acknowledges the dominance of text modality in MSA and proposes two text-centric bi-modal transformers to increase performance. (iii) Self-MM (Yu et al., 2021) focuses on the relationship between multi- and uni-modal predictions by multitasking consistencies and differences between them. (iv) MMIM (Han et al., 2021b) incorporates mutual information (MI) into MSA by maximizing MI at the input and fusion level. (v) MulT (Tsai et al., 2019) merges multimodal time series through multiple sets of directional pairwise cross-modal transformers. It accounts for long-range dependencies across modality elements to create a strong baseline (see Appendix B).
Datasets. We consider two benchmark datasets widely used in the field of multimodal sentiment analysis, CMU-MOSI (Zadeh et al., 2016), which
Figure 2: Diagnostic checks (missing modality) for modality robustness in MOSI and MOSEI datasets. Results are averaged over three independent runs. Each modality error is applied to  $30\%$  of testing data.
is a popular dataset for studying the intensity of multimodal sentiment in the MSA field and CMU-MOSEI (Bagher Zadeh et al., 2018) which is a larger counterpart of MOSI with richer annotations and more diverse samples. Both these datasets contain short utterance videos and provide language, audio, and visual modality features.
3.2 Proposed Diagnostic Checks
We propose two diagnostic checks that introduce i) Missing Modalities, which drops (or nullifies) a modality from the input and ii) Noisy Modalities which include random changes to the modality representations, introduced via white Gaussian noise to the respective modality representations<sup>1</sup>. To simulate a realistic scenario, we apply these checks to  $30\%$  of the testing data set<sup>2</sup>. Given the increased dependence on language modality in MSA models, we limit our study to errors introduced only in language modality without loss of generality.
Procedure. We aim to intervene on modality representations to simulate modality errors. For the language modality  $l$ , all models map the sequence of tokens  $U_{l} \in R^{T_{l}}$  to its low-level embedding  $\mathbf{U}_l \in R^{T_l \times d_l}$  with  $T_{l}$  tokens and  $d_{l}$  embedding dimension. This low-level sequence is
then encoded into hidden representations using an encoder of choice, such as BERT (Devlin et al., 2019), to achieve the language representation vector  $\mathbf{u}_l = \text{enc}_{\theta_l}(U_l) \in \mathbb{R}^d$ . We intervene on this representation and apply our diagnostics as follows.
We sample  $30\%$  of  $u_{l}$  from the testing set and modify them as  $\hat{\mathbf{u}}_l = f(\mathbf{u}_l)$ , where  $f(\mathbf{x})$  is defined as either  $f(\mathbf{x}) = \mathbf{x} \odot \mathbf{0}$  for modality dropping (nulling the vector to 0s by element-wise multiplication) or  $f(\mathbf{x}) = \mathbf{x} + \mathcal{N}(\mathbf{0}, \mathbf{1})$  to add white noise. The modified  $\hat{\mathbf{u}}_l$  is then fed to the rest of the network as usual.
In the selected models, we apply diagnostics at different network locations. These include the representations before the hidden projection, such as in MISA, or fusion operation, such as in Self-MM. For MulT and BBFN, we apply the interventions right after the word embeddings. Detailed discussion on the location of interventions is provided in Appendix A.
Observations. Figs. 2 and 3 presents the results, where across both MOSI and MOSEI datasets, we find that language modality is highly sensitive to modality errors in the language source (across all models). This trend is observed for both missing and noisy modality checks, thus highlighting the concerns over robustness of these SOTA models. These diagnostic checks are easy to analyze, and we hope they will become an integrated part of the model-development pipeline in MSA.
<sup>1</sup>While missing and noisy errors are predominant in the wild, we leave other potential forms of errors, such as affine transformations to the representations for future work.
2We set  $30\%$  arbitrarily to simulate modality errors to a proportion of the input signals.
Figure 3: Diagnostic checks (noisy modality) for modality robustness in MOSI and MOSEI datasets. Results are averaged over three independent runs. Each modality error is applied to  $30\%$  of testing data.
4 Robust Training
In this section, we explore how to reduce the sensitivity of the models to the dominant modality, i.e., language. One of the popular ways to alleviate such issues is to teach the model such scenarios during training. We dub this approach as modality-perturbation, which is conceptually similar to removing or masking modalities in (Ma et al., 2021; Georgiou et al., 2021) or adding noise in (Miyato et al., 2018). It simulates the modality errors during training so that the model learns to expect such events during testing/deployment. The procedure is as follows,
1. Training:
(a) For a particular batch of data, sample a proportion of the data to be perturbed.
(b) Similar to the diagnostic checks in § 3, perturb the dominant modality (in our case, language) of half of this data with missing and the other half with noisy perturbation. Repeat both these steps for the next batch.
2. Testing: Apply the diagnostic checks as in § 3.
This simple approach can be interpreted as regularization akin to dropouts or noising strategies used in de-noising auto-encoders.
Robustness. Table 1 presents the results, where we perform balanced perturbation between missing
and noisy modalities. For the  $30\%$  perturbable data in training, we drop the language modality on  $15\%$  and for the other  $15\%$ , we add noise. This setting improves the diagnostics in both kinds of errors. Appendix C presents results on other proportions of the training data.
With balanced perturbation, (BBFN-MOSI) reduces the relative drop on missing language diagnostic by  $31\%$  (in F1) and  $98\%$  on noise. Also, missing drop reduces by  $11\%$  in Corr and by  $99\%$  for noisy diagnostic. (Self-MM, MOSI) increases the relative drop in Corr slightly on missing diagnostic, but in all other cases, it is significantly reduced. For example, the F1 drop on MOSI for noisy diagnostic reduces significantly by  $93\%$ . Table 1 also shows that our method performs well on both RNN-based and Transformer-based models, demonstrating the wide applicability of our method.
Performance Trade-off. While alleviating robustness via regularization is well-known in the literature, there is often a trade-off with absolute performance in the original testing setup. Most approaches that achieve robustness take a hit at their best performance on clean input (Zhang et al., 2022) (Nakkiran, 2019) (Su et al., 2018) (Tsipras et al., 2019). This raises the question of whether introducing modality-perturbation reduces the performance of the model on the original testing set.
We find the answer to this is No. Surprisingly, our robust training procedure does not degrade in
Diagnostic (30%)	Robust Training	MOSI	MOSEI
Corr	F1	Corr	F1
MISA	-Yes	0.737	82.40	0.765	85.76
0.736	81.42	0.767	85.97
missing	-Yes	↓0.122	↓11.53	↓0.186	↓8.45
↓0.210	↓9.96	↓0.147	↓8.26
noise	-Yes	↓0.122	↓11.67	↓0.136	↓8.36
↓0.163	↓10.10	↓0.002	↓0.19
BBFN	-Yes	0.754	83.12	0.764	85.70
0.754	83.28	0.763	85.43
missing	-Yes	↓0.127	↓10.55	↓0.139	↓10.57
↓0.119	↓7.28	↓0.124	↓7.88
noise	-Yes	↓0.232	↓8.58	↓0.308	↓9.62
↓0.046	↓0.16	↓0.003	↓0.23
Self-MM	-Yes	0.794	85.61	0.759	84.62
0.790	84.73	0.754	84.67
missing	-Yes	↓0.099	↓11.74	↓0.126	↓9.04
↓0.120	↓9.66	↓0.122	↓6.86
noise	-Yes	↓0.154	↓8.35	↓0.172	↓9.48
↓0.041	↓0.58	↓0.051	↓1.02
MMIM	-Yes	0.796	86.02	0.758	84.89
0.784	84.67	0.751	83.15
missing	-Yes	↓0.117	↓9.37	↓0.122	↓8.15
↓0.146	↓10.48	↓0.115	↓6.62
noise	-Yes	↓0.197	↓9.55	↓0.191	↓9.18
↓0.180	↓8.88	↓0.096	↓4.41
Mult	-Yes	0.747	82.25	0.738	83.37
0.744	82.21	0.745	83.95
missing	-Yes	↓0.113	↓12.17	↓0.109	↓6.60
↓0.117	↓9.63	↓0.113	↓7.03
noise	-Yes	↓0.295	↓8.99	↓0.263	↓7.95
↓0.068	↓6.13	↓0.001	↑0.02
Table 1: Robust Training is performed with  $15\%$  missing and  $15\%$  noise perturbation. Results are averaged over 3 random runs. More perturbation results are provided in Appendix C. Higher drops between Non-robust and robust training (consecutive rows) are highlighted.
its original performance and can perform similar to the original model variants. This is highly ideal as we achieve robustness without compromising on performance in clean data.
In this work, we performed a systematic study that demonstrate the double-edged nature of dominant modality in SOTA MSA models. Our analysis using diagnostic checks reveal high susceptibility to performance drops when presented with unwanted errors in their representations.
To alleviate the issues, we also study robust training methods that uses modality perturbations. Critically, we find that robustness and performance can co-exist without an explicit trade-off. These improvements demonstrate a positive nudge in the effort to achieve robustness and we believe there remains significant room for improvement. With this work, by proposing simple and easy-to-integrate diagnostic checks and training methods, we hope to permeate discussions on robustness into mainstream MSA research.
This research is supported by (i) T2MOE2008 awarded by Singapore's MoE under its Tier-2 grant scheme, and (ii) SUTD SRG grant #T1SRIS19149. We also thank the anonymous reviewers for their valuable comments.
AmirAli Bagher Zadeh, Paul Pu Liang, Soujanya Poria, Erik Cambria, and Louis-Philippe Morency. 2018. Multimodal language analysis in the wild: CMU-MOSEI dataset and interpretable dynamic fusion graph. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2236-2246, Melbourne, Australia. Association for Computational Linguistics.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics.
Stella Frank, Emanuele Bugliarello, and Desmond Elliott. 2021. Vision-and-language or vision-for-language? on cross-modal influence in multimodal transformers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9847-9857.
Itai Gat, Idan Schwartz, Alexander G. Schwing, and Tamir Hazan. 2020. Removing bias in multi-modal classifiers: Regularization by maximizing functional entropies. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.
Efhymios Georgiou, Georgios Paraskevopoulos, and Alexandros Potamianos. 2021. M3: Multimodal masking applied to sentiment analysis. Proc. Interspeech 2021, pages 2876-2880.
Wei Han, Hui Chen, Alexander F. Gelbukh, Amir Zadeh, Louis-Philippe Morency, and Soujanya Poria. 2021a. Bi-bimodal modality fusion for correlation-controlled multimodal sentiment analysis. In ICMI '21: International Conference on Multimodal Interaction, Montréal, QC, Canada, October 18-22, 2021, pages 6-15. ACM.
Wei Han, Hui Chen, and Soujanya Poria. 2021b. Improving multimodal fusion with hierarchical mutual information maximization for multimodal sentiment analysis. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,
EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November; 2021, pages 9180-9192. Association for Computational Linguistics.
Devamanyu Hazarika, Roger Zimmermann, and Soujanya Poria. 2020. MISA: modality-invariant and -specific representations for multimodal sentiment analysis. In MM '20: The 28th ACM International Conference on Multimedia, Virtual Event / Seattle, WA, USA, October 12-16, 2020, pages 1122-1131. ACM.
Mengmeng Ma, Jian Ren, Long Zhao, Sergey Tulyakov, Cathy Wu, and Xi Peng. 2021. Smil: Multimodal learning with severely missing modality. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 2302-2310.
Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. 2018. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979-1993.
Preetum Nakkiran. 2019. Adversarial robustness may be at odds with simplicity. CoRR, abs/1901.00532.
Dong Su, Huan Zhang, Hongge Chen, Jinfeng Yi, Pin-Yu Chen, and Yupeng Gao. 2018. Is robustness the cost of accuracy? - A comprehensive study on the robustness of 18 deep image classification models. In Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part XII, volume 11216 of Lecture Notes in Computer Science, pages 644-661. Springer.
Yao-Hung Hubert Tsai, Shaojie Bai, Paul Pu Liang, J. Zico Kolter, Louis-Philippe Morency, and Ruslan Salakhutdinov. 2019. Multimodal transformer for unaligned multimodal language sequences. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 6558-6569. Association for Computational Linguistics.
Yao-Hung Hubert Tsai, Paul Pu Liang, Amir Zadeh, Louis-Philippe Morency, and Ruslan Salakhutdinov. 2018. Learning factorized multimodal representations. In International Conference on Learning Representations.
Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. 2019. Robustness may be at odds with accuracy. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
Yang Wu, Zijie Lin, Yanyan Zhao, Bing Qin, and Li-Nan Zhu. 2021. A text-centered shared-private framework via cross-modal prediction for multimodal sentiment analysis. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages
4730-4738, Online. Association for Computational Linguistics.
Wenmeng Yu, Hua Xu, Ziqi Yuan, and Jiele Wu. 2021. Learning modality-specific representations with self-supervised multi-task learning for multimodal sentiment analysis. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pages 10790-10797. AAAI Press.
Amir Zadeh, Rowan Zellers, Eli Pincus, and Louis-Philippe Morency. 2016. Multimodal sentiment intensity analysis in videos: Facial gestures and verbal messages. IEEE Intelligent Systems, 31(6):82-88.
Ying Zeng, Sijie Mai, and Haifeng Hu. 2021. Which is making the contribution: Modulating unimodal and cross-modal dynamics for multimodal sentiment analysis. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 1262-1274.
Yuxin Zhang, Jindong Wang, Yiqiang Chen, Han Yu, and Tao Qin. 2022. Adaptive memory networks with self-supervised learning for unsupervised anomaly detection. CoRR, abs/2201.00464.
MISA: We get the MISA model from its official repository  $^{3}$ . In this model, we apply the interventions at the following encoded language representation from the original paper:
$$
\mathbf {u} _ {l} = \operatorname {B e r t} \left(\mathbf {U} _ {l}; \theta_ {l} ^ {\text {b e r t}}\right) \tag {1}
$$
$$
\hat {\mathbf {u}} _ {l} = f (\hat {\mathbf {u}} _ {l}) \tag {2}
$$
$$
\mathbf {h} _ {l} ^ {c} = E _ {c} \left(\hat {\mathbf {u}} _ {l}; \theta^ {c}\right), \quad \mathbf {h} _ {l} ^ {p} = E _ {p} \left(\hat {\mathbf {u}} _ {l}; \theta_ {l} ^ {p}\right) \tag {3}
$$
That is, the interventions are applied before the language representation is projected to its shared and private subspaces.
BBFN: We get the BBFN model from its official repository. In this model, we execute the interventions after the following language embedding from the original paper.
$$
\mathbf {M} _ {l} = \left(m _ {0}, m _ {1}, \dots , m _ {n + 1}\right) \tag {4}
$$
$$
\hat {\mathbf {M}} _ {l} = f (\mathbf {M} _ {l}) \tag {5}
$$
Self-MM: We get the Self-MM model from its official repository<sup>5</sup>. In this model, we set the interventions after the language features encoded below from the original paper.
$$
\mathbf {F} _ {l} = B E R T \left(I _ {l}; \theta_ {l} ^ {b e r t}\right) \in R ^ {d _ {l}} \tag {6}
$$
$$
\hat {\mathbf {F}} _ {l} = f \left(\mathbf {F} _ {l}\right) \tag {7}
$$
MMIM: We get the MMIM model from its official repository  $^{6}$ . For this model, we perform the interventions after the following encoded language representation from the original paper.
$$
\mathbf {x} _ {l} = \operatorname {B E R T} \left(X _ {l}; \theta_ {l} ^ {B E R T}\right) \tag {8}
$$
$$
\hat {\mathbf {x}} _ {l} = f (\mathbf {x} _ {l}) \tag {9}
$$
MulT: We get the MulT model from its official repository. We intervene in this model after the following encoded language representation:.
$$
\mathbf {x} _ {l} = \operatorname {C o n v 1 D} \left(X _ {l}, k _ {l}\right) \in \mathbb {R} ^ {T _ {l} \times d} \tag {10}
$$
$$
\hat {\mathbf {x}} _ {l} = f (\mathbf {x} _ {l}) \tag {11}
$$