Existing works on multimodal affective computing tasks, such as emotion recognition, generally adopt a two-phase pipeline, first extracting feature representations for each single modality with hand-crafted algorithms and then performing end-to-end learning with the extracted features. However, the extracted features are fixed and cannot be further fine-tuned on different target tasks, and manually finding feature extraction algorithms does not generalize or scale well to different tasks, which can lead to sub-optimal performance. In this paper, we develop a fully end-to-end model that connects the two phases and optimizes them jointly. In addition, we restructure the current datasets to enable the fully end-to-end training. Furthermore, to reduce the computational overhead brought by the end-to-end model, we introduce a sparse cross-modal attention mechanism for the feature extraction. Experimental results show that our fully end-to-end model significantly surpasses the current state-of-the-art models based on the two-phase pipeline. Moreover, by adding the sparse cross-modal attention, our model can maintain performance with around half the computation in the feature extraction part. Humans show their characteristics through not only the words they use, but also the way they speak and their facial expressions. Therefore, in multimodal affective computing tasks, such as emotion recognition, there are usually three modalities: textual, acoustic, and visual. One of the main challenges in these tasks is how to model the interactions between different modalities, as they contain both supplementary and complementary information (Bal-truaitis et al., 2018). In the existing works, we discover that a two-phase pipeline is generally used (Zadeh et al., 2018a,b; Tsai et al., 2018, 2019; Rahman et al., 2020). In the first phase, given raw input data, feature representations are extracted with hand-crafted algorithms for each modality separately, while in the second phase, end-to-end multimodal learning is performed using extracted features. However, there are three major defects of this two-phase pipeline: 1) the features are fixed after extraction and cannot be further fine-tuned on target tasks; 2) manually searching for appropriate feature extraction algorithms is needed for different target tasks; and 3) the hand-crafted model considers very few data points to represent higher-level feature, which might not capture all the useful information. These defects can result in sub-optimal performance. In this paper, we propose a fully end-to-end model that connects the two phases together and optimizes them jointly. In other words, the model receives raw input data and produces the output predictions, which allows the features to be learned automatically through the end-to-end training. However, the current datasets for multimodal emotion recognition cannot be directly used for the fully end-to-end training, and we thus conduct a data restructuring to make this training possible. The benefits from the end-to-end training are that the features are optimized on specific target tasks, and there is no need to manually select feature extraction algorithms. Despite the advantages of the end-to-end training, it does bring more computational overhead compared to the two-phase pipeline, and exhaustively processing all the data points makes it computationally expensive and prone to over-fitting. Thus, to mitigate these side-effects, we also propose a multimodal end-to-end sparse model, a combination of a sparse cross-modal attention mechanism and sparse Convolutional Neural Network (CNN) (Graham and van der Maaten, 2017), to select the most relevant features for the task and reduce the redundant information and noise in the video and audio. Experimental results show that the simply end-to-end training model is able to consistently outperform the existing state-of-the-art models which are based on the two-phase pipeline. Moreover, the incorporation of the sparse cross-modal attention and sparse CNN is able to greatly reduce the computational cost and maintain the performance. We summarize our contributions as follows. To the best of our knowledge, we are the first to apply a fully end-to-end trainable model for the multimodal emotion recognition task. We restructure the existing multimodal emotion recognition datasets to enable the end-to-end training and cross-modal attention based on the raw data. We show that the fully end-to-end training significantly outperforms the current state-of-the-art two-phase models, and the proposed sparse model can greatly reduce the computational overhead while maintaining the performance of the end-to-end training. We also conduct a thorough analysis and case study to improve the interpretability of our method. Human affect recognition is a popular and widely studied research topic (Mirsamadi et al., 2017; Zhang and Liu, 2017; Xu et al., 2020; Dai et al., 2020b). In recent years, there is a trend to leverage multimodal information to tackle these research tasks, such as emotion recognition (Busso et al., 2008), sentiment analysis (Zadeh et al., 2016, 2018b), personality trait recognition (No-javanasghari et al., 2016), etc, have drawn more and more attention. Different methods have been proposed to improve the performance and cross-modal interactions. In earlier works, early fusion (Morency et al., 2011; Prez-Rosas et al., 2013) and late fusion (Zadeh et al., 2016; Wang et al., 2017) of modalities were widely adopted. Later, more complex approaches were proposed. For example, Zadeh et al. (2017) introduced the Tensor Fusion Network to model the interactions of the three modalities by performing the Cartesian product, while (Wang et al., 2019) used an attention gate to shift the words using the visual and acoustic features. In addition, based on the Transformer (Vaswani et al., 2017), Tsai et al. (2019) introduced the Multimodal Transformer to improve the performance given unaligned multimodal data, and Rahman et al. (2020) introduced a multimodal adaptation gate to integrate visual and acoustic information into a large pre-trained language model. However, unlike some other multimodal tasks (Chen et al., 2017; Yu et al., 2019; Li et al., 2019) using fully end-to-end learning, all of these methods require a feature extraction phase using hand-crafted algorithms (details in Section 5.2), which makes the whole approach a two-phase pipeline. The fully end-to-end multimodal model requires the inputs to be raw data for the three modalities (visual, textual and acoustic). The existing multimodal emotion recognition datasets cannot be directly applied for the fully end-to-end training for two main reasons. First, the datasets provide split of training, validation and test data for the hand-crafted features as the input of the model and emotion or sentiment labels as the output of the model. However, this dataset split cannot be directly mapped to the raw data since the split indices cannot be matched back to the raw data. Second, the labels of the data samples are aligned with the text modality. However, the visual and acoustic modalities are not aligned with the textual modality in the raw data, which disables the fully end-to-end training. To make the existing datasets usable for the fully end-to-end training and evaluation, we need to reorganize them according to two steps: 1) align the text, visual and acoustic modalities; 2) split the aligned data into training, validation and test sets. In this work we reorganize two emotion recognition datasets: Interactive Emotional Dyadic Motion Capture (IEMOCAP) and CMU Multimodal Opinion Sentiment and Emotion Intensity (CMU-MOSEI). Both have multi-class and multi-labelled data for multimodal emotion recognition obtained by generating raw utterance-level data, aligning the three modalities, and creating a new split over the aligned data. In the following section, we will first introduce the existing datasets, and then we will give a detailed description of how we reorganize them. IEMOCAP (Busso et al., 2008) is a multimodal emotion recognition dataset containing 151 videos. In each video, two professional actors conduct dyadic conversations in English. The dataset is labelled by nine emotion categories, but due to the data imbalance issue, we take the six main categories: angry , happy , excited , sad , frustrated , and neutral . As the dialogues are annotated at the utterance level, we clip the data per utterance from the provided text transcription time, which results in 7,380 data samples in total. Each data sample consists of three modalities: audio data with a sampling rate of 16 kHz, a text transcript, and image frames sampled from the video at 30 Hz. The provided pre-processed data from the existing work (Busso et al., 2008) 1 doesn't provide an identifier for each data sample, which makes it impossible to reproduce it from the raw data. To cope with this problem, we create a new split for the dataset by randomly allocating 70%, 10%, and 20% of data into the training, validation, and testing sets, respectively. The statistics of our dataset split are shown in Table 1. 3.2 CMU-MOSEICMU-MOSEI (Zadeh et al., 2018b) comprises 3,837 videos from 1,000 diverse speakers with six emotion categories: happy , sad , angry , fearful , disgusted , and surprised . It is annotated at utterance-level, with a total of 23,259 samples. Each data 1 http://immortal.multicomp.cs.cmu.edu/ raw_datasets/processed_data/iemocap Label Avg. sample in CMU-MOSEI consists of three modalities: audio data with a sampling rate of 44.1 kHz, a text transcript, and image frames sampled from the video at 30 Hz. We generate the utterance-level data from the publicly accesible raw CMU-MOSEI dataset. 2 The generated utterances are perfectly matched with the preprocessed data from the existing work (Zadeh et al., 2018b), but there are two issues with the existing dataset: 1) in includes many misaligned data samples; and 2) many of the samples do not exist in the generated data, and vice versa, in the provided standard split from the CMU MultiModal SDK. 3 To cope with the first issue, we perform data cleaning to remove the misaligned samples, which results in 20,477 clips in total. We then create a new dataset split following the CMU-MOSEI split for the sentiment classification task. 4 The statistics of the new dataset split setting are shown in Table 2. 4 Methodology 4.1 Problem Definition We define I multimodal data samples as X = { ( t i , a i , v i ) } Ii =1 , in which t i is a sequence of words, a i is a sequence of spectrogram chunks from the 2 http://immortal.multicomp.cs.cmu.edu/ raw_datasets/processed_data/cmu-mosei/seq_length_20/ 3 https://github.com/A2Zadeh/ CMU-MultimodalSDK 4 http://immortal.multicomp.cs.cmu.edu/ raw_datasets/processed_data/cmu-mosei/seq_length_50/mosei_senti_data_noalign.pkl Cross-modalAttention Linear Linear Add tanh Linear softmax Nucleus Sampling Sparse CNN Wow. audio, and v i is a sequence of RGB image frames from the video. Y = { y i } Ii =1 denotes the annotation for each data sample. We build a fully end-to-end model which jointly optimizes the two separate phases (feature extraction and multimodal modelling). For each spectrogram chunk and image frame in the visual and acoustic modalities, we first use a pre-trained CNN model (an 11-layer VGG (Si-monyan and Zisserman, 2014) model) to extract the input features, which are then flattened to vector representations using a linear transformation. After that, we can obtain a sequence of representations for both visual and acoustic modalities. Then, we use a Transformer (Vaswani et al., 2017) model to encode the sequential representations since it contains positional embeddings to model the temporal information. Finally, we take the output vector at the CLS token and apply a feed-forward network (FFN) to get the classification scores. In addition, to reduce GPU memory and align with the two-phase baselines which extract visual features from human faces, we use a MTCNN (Zhang et al., 2016) model to get the location of faces for the image frames before feeding them into the VGG. For the textual modality, the Transformer model is directly used to process the sequence of words. Similar to the visual and acoustic modalities, we consider the feature at the CLS token as the output feature and feed it into a FFN to generate the classification scores. We take a weighted sum of the classification scores from each modality to make the final prediction score. Although the fully end-to-end model has many advantages over the two-phase pipeline, it also brings much computational overhead. To reduce this overhead without downgrading the performance, we introduce our Multimodal End-to-end Sparse Model (MESM). Figure 2 shows the overall architecture of MESM. In contrast to the fully end-to-end model, we replace the original CNN layers (except the first one for low-level feature capturing) with N cross-modal sparse CNN blocks. A cross-modal sparse CNN block consists of two parts, a cross-modal attention layer and a sparse CNN model that contains two sparse VGG layers and one sparse max-pooling layer. The cross-modal attention layer accepts two inputs: a query vector q  R d and a stack of feature maps M  RC  S  H  W , where C, S, H, and W are the number of channels, sequence length, height, and width, respectively. Then, the cross-modal spatial attention is performed over the feature maps using the query vector. The cross-modal spatial attention can be formularized in the following steps: M q = tanh (( W m M + b m )  W q q ) (1) M i = softmax ( W i M q + b i ) (2) M ns = Nucleus Sampling ( M i ) (3) M o = M ns  M, (4) in which W m  R k  C , W q  R k  d , and W i  R k are linear transformation weights, and b m  R k and b i  R 1 are biases, where k is a pre-defined hyper-parameter, and  represents the broadcast addition operation of a tensor and a vector. In Eq.2, the softmax function is applied to the ( H  W ) dimensions, and M i  RS  H  W is the tensor of the spatial attention scores corresponding to each feature map. Finally, to make the input feature maps M sparse while reserving important information, firstly, we perform Nucleus Sampling (Holtzman et al., 2019) on M i to get the topp portion of the probability mass in each attention score map ( p is a pre-defined hyper-parameter in the range of (0 , 1] ). In M ns , the points selected by the Nucleus Sampling are set to one and the others are set to zero. Then, we do broadcast point-wise multiplication between M ns and M to generate the output M o . Therefore, M o is a sparse tensor with some positions being zero, and the degree of sparsity is controlled by p . We use the submanifold sparse CNN (Graham and van der Maaten, 2017) after the cross-modal attention layer. It is leveraged for processing low-dimensional data which lies in a space of higher dimensionality. In the multimodal emotion recognition task, we assume that only part of the data is related to the recognition of emotions (an intuitive example is given in Figure 1), which makes it align with the sparse setting. In our model, the sparse CNN layer accepts the output from the cross-modal attention layer, and does convolution computation only at the active positions. Theoretically, in terms of the amount of computation (FLOPs) at a single location, a standard convolution costs z 2 mn FLOPs, and a sparse convolution costs amn FLOPs, where z is the kernel size, m is the number of input channels, n is the number of output channels, and a is the number of active points at this location. Therefore, considering all locations and all layers, the sparse CNN can help to significantly reduce computation. Following prior works (Tsai et al., 2018; Wang et al., 2019; Tsai et al., 2019; Dai et al., 2020a), we use the accuracy and F1-score to evaluate the models on the IEMOCAP dataset. On the CMU-MOSEI dataset, we use the weighted accuracy instead of the standard accuracy. Additionally, according to Dai et al. (2020a), we use the standard binary F1 rather than the weighted version. Weighted Accuracy Similar to existing works (Zadeh et al., 2018b; Akhtar et al., 2019), we use the weighted accuracy (WAcc) (Tong et al., 2017) to evaluate the CMU-MOSEI dataset, which contains many more negative samples than positive ones on each emotion category. If normal accuracy is used, a model will still get a fine score when predicting all samples to be negative. The formula of the weighted accuracy is WAcc. in which P means total positive, TP true positive, N total negative, and TN true negative. For our baselines, we use a two-phase pipeline, which consists of a feature extraction step and an end-to-end learning step. Feature Extraction We follow the feature extraction procedure in the previous works (Zadeh et al., 2018b; Tsai et al., 2018, 2019; Rahman et al., 2020). For the visual data, we extract 35 facial action units (FAUs) using the OpenFace library 5 (Bal-truaitis et al., 2015; Baltrusaitis et al., 2018) for the image frames in the video, which capture the movement of facial muscles (Ekman et al., 1980). For the acoustic data, we extract a total of 142 dimension features consisting of 12 dimension bark band energy (BBE) features, 22 dimension mel-frequency cepstral coefficient (MFCC) features, and 108 statistical features from 18 phonological classes. We extract the features per 400 ms time frame using the DisVoice library 6 (Vsquez-Correa et al., 2018, 2019). For textual data, we use the pre-trained 5 https://github.com/TadasBaltrusaitis/ OpenFace 6 https://github.com/jcvasquezc/ DisVoice Model #FLOPs (  10 9 ) Angry Excited Frustrated Happy Neutral Sad Average Acc. GloVe (Pennington et al., 2014) word embeddings (glove.840B.300d 7 ). Multimodal Learning As different modalities are unaligned in the data, we cannot compare our method with existing works that can only handle aligned input data. We use four multimodal learning models as baselines: the late fusion LSTM (LF-LSTM) model, the late fusion Transformer (LF-TRANS) model, the Emotion Embeddings (EmoEmbs) model (Dai et al., 2020a), and the Multimodal Transformer (MulT) model (Tsai et al., 2019). They receive the hand-crafted features extracted from the first step as input and give the classification decisions. We use the Adam optimizer (Kingma and Ba, 2014) for the training of every model we use. For the loss function, we use the binary cross-entropy loss as both of the datasets are multi-class and multi-labelled. In addition, the loss for the positive samples is weighted by the ratio of the number of positive and negative samples to mitigate the imbalance problem. For all of the models, we perform an exhaustive hyper-parameter search to ensure we have solid comparisons. The best hyper-parameters 7 https://nlp.stanford.edu/projects/ glove/ are reported in Appendix A. Our experiments are run on an Nvidia 1080Ti GPU, and our code is implemented in the PyTorch (Paszke et al., 2019) framework v1.6.0. We perform preprocessing for the text and audio modalities. For the text modality, we perform word tokenization for our baseline and subword tokenization for our end-to-end model. We limit the length of the text to up to 50 tokens. For the audio modality, we use mel-spectrograms with a window size of 25 ms and stride of 12.5 ms and then chunk the spectrograms per 400 ms time window. In Table 3, we show the results on the IEMOCAP dataset. Compared to the baselines, the fully end-to-end (FE2E) model surpasses them by a large margin on all the evaluation metrics. Empirically, this shows the superiority of the FE2E model over the two-phase pipeline. Furthermore, our MESM achieves comparable results with the FE2E model, while requiring much less computation in the feature extraction. Here, we only show the results of MESM with the best p value of the Nucleus Sampling. In Section 6.3, we conduct a more detailed discussion of the effects of the top-p values. We further evaluate the methods on the CMU-MOSEI Happy Angry original layer 1 layer 2 layer 3 Fear Sad Surprised Disgusted original layer 1 layer 2 layer 3 Figure 3: Case study of MESM on six basic emotion categories (happy, sad, angry, surprised, fear, disgusted). dataset and the results are shown in Table 4. We observe similar trends on this dataset. To improve the interpretability and gain more insights from our model, we visualize the attention maps of our sparse cross-modal attention mechanism on the six basic emotions: happy, sad, angry, surprised, fear, and disgusted. As shown in Figure 3, in general, the models attend to several regions of interest such as the mouth, eyes, eyebrows, and facial muscles between the mouth and the eyes. We verify our method by comparing the regions that our model captures based on the facial action coding system (FACS) (Ekman, 1997). Following the mapping of FACS to human emotion categories (Basori, 2016; Ahn and Chung, 2017), we conduct empirical analysis to validate the sparse cross-modal attention on each emotion category. For example, the emotion happy is highly influ-enced by raising of the lip on both ends, while sad is related to a lowered lip on both ends and downward movement of the eyelids. Angry is determined from a narrowed gap between the eyes and thinned lips, while surprised is expressed with an open mouth and raising of the eyebrows and eyelids. Fear is indicated by a rise of the eyebrows and upper eyelids, and also an open mouth with the ends of the lips slightly moving toward the cheeks. For the emotion disgusted , wrinkles near the nose area and movement of the upper lip region are the determinants. Based on the visualization of the attention maps on the visual data in Figure 3, the MESM can capture most of the specified regions of interest for the six emotion categories. For the emotion angry , the sparse cross-modal attention can retrieve the features from the lip region quite well, but it sometimes fails to capture the gap between the eyes. For surprised , the eyelids and mouth regions can be successfully captured by MESM, but sometimes the model fails to consider the eyebrow regions. For the acoustic modality, it is hard to analyse the attention in terms of emotion labels. We show a general visualization of the attention maps over the audio data in Figure 4. The model attends to 0.60 0.65 0.70 0.75 0.80 0.85 0.90 A cc u r a c y 0.84 0.85 0.83 0.84 0.84 0.84 0.75 0.74 0.73 0.62 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 top-p 3.00 4.00 5.00 6.00 7.00 8.00 9.00 FLOPS ( x 10 9 ) 8.65 6.47 5.66 5.18 4.71 4.34 3.94 3.58 3.23 2.93 Figure 5: The trend line of the Top: Weighted Accuracy and Bottom: FLOPs (x 10 9 )) of the MESM with different top-p values used in the Nucleus Sampling. More visualized examples are provided in Appendix B. 6.3 Effects of Nucleus Sampling To have an in-depth understanding of the effects of Nucleus Sampling on the MESM, we perform more experiments with different top-p values ranging from 0 to 1, with a step of 0.1. As shown in Figure 5, empirically, the amount of computation is reduced consistently with the decrease of the top-p values. In terms of performance, with a top-p value from 0.9 to 0.5, there is no significant drop in the evaluation performance. Starting from 0.5 to 0.1, we can see a clear downgrade in the performance, which means some of the useful information for recognizing the emotion is excluded. The inflec-tion point of this elbow shaped trend line can be an indicator to help us make a decision on the value of the topp . Specifically, with a topp of 0.5, the MESM can achieve comparable performance to the FE2E model with around half of the FLOPs in the feature extraction. We conduct a comprehensive ablation study to further investigate how the models perform when one or more modalities are absent. The results are shown in Table 5. Firstly, we observe that the more modalities the more improvement in the performance. TAV, representing the presence of all three modalities, results in the best performance for both models, which shows the effectiveness of having more modalities. Secondly, with only a single modality, the textual modality results in better performance than the other two, which is similar to the results of previous multimodal works. This phenomenon further validates that using textual (T) to attend to acoustic (A) and visual (V) in our cross-modal attention mechanism is a reasonable choice. Finally, with two modalities, the MESM can still achieve a performance that is on par with the FE2E model or is even slightly better. In this paper, we first compare and contrast the two-phase pipeline and the fully end-to-end (FE2E) modelling of the multimodal emotion recognition task. Then, we propose our novel multimodal end-to-end sparse model (MESM) to reduce the computational overhead brought by the fully end-to-end model. Additionally, we reorganize two existing datasets to enable fully end-to-end training. The empirical results demonstrate that the FE2E model has an advantage in feature learning and surpasses the current state-of-the-art models that are based on the two-phase pipeline. Furthermore, MESM is able to halve the amount of computation in the feature extraction part compared to FE2E, while maintaining its performance. In our case study, we provide a visualization of the cross-modal attention maps on both visual and acoustic data. It shows that our method can be interpretable, and the cross-modal attention can successfully select important feature points based on different emotion categories. For future work, we believe that incorporating more modalities into the sparse cross-modal attention mechanism is worth exploring since it could potentially enhance the robustness of the sparsity (selection of features). This work is funded by MRP/055/18 of the Innovation Technology Commission, the Hong Kong SAR Government.
abstain abstain objective abstain method result method abstain abstain abstain method abstain abstain abstain objective abstain method abstain abstain abstain abstain abstain objective objective abstain objective result other other other other other other other other other abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain other abstain method abstain abstain abstain abstain other abstain abstain method abstain abstain method method method abstain method method abstain method abstain abstain abstain abstain abstain other abstain method abstain method abstain method abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain result abstain abstain result result abstain abstain abstain result abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain other method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain objective objective abstain abstain abstain method result objective other