The existence of multiple datasets for sarcasm detection prompts us to apply transfer learning to exploit their commonality. The adversarial neural transfer (ANT) framework utilizes multiple loss terms that encourage the source-domain and the target-domain feature distributions to be similar while optimizing for domain-specific performance. However, these objectives may be in conflict, which can lead to optimization difficulties and sometimes diminished transfer. We propose a generalized latent optimization strategy that allows different losses to accommodate each other and improves training dynamics. The proposed method outperforms transfer learning and meta-learning baselines. In particular, we achieve 10.02% absolute performance gain over the previous state of the art on the iSarcasm dataset. Sarcastic language is commonly found in social media posts (Gonzlez-Ibez et al., 2011; Maynard and Greenwood, 2014), forum discussions (Khodak et al., 2018a), product reviews (Davidov et al., 2010; Filatova, 2012) and everyday conversations (Gibbs, 2000). Detecting sarcasm is an integral part of creative language understanding (Veale et al., 2019) and online opinion mining (Kannan-gara, 2018). Due to highly contextualized expressions, detecting sarcasm is a challenging task, even for humans (Fox Tree et al., 2020). A challenge specific to sarcasm detection is the difficulty in acquiring ground-truth annotations. Human-annotated datasets (Filatova, 2012; Riloff et al., 2013; Van Hee et al., 2018; Oprea and Magdy, 2020) usually contain only a few thousand texts, resulting in many small datasets. In comparison, automatic data collection using distant supervision signals like hashtags (Ptcek et al., 2014; Bamman and Smith, 2015; Joshi et al., 2015) yielded * Corresponding authors substantially larger datasets. Nevertheless, the automatic approach also led to label noise. For example, Oprea and Magdy (2020) found nearly half of the tweets with sarcasm hashtags in one dataset are not sarcastic. The existence of diverse datasets and data collection methods prompts us to exploit their commonality through transfer learning. Specifically, we transfer knowledge learned from large and noisy datasets to improve sarcasm detection on small human-annotated datasets that serve as effective performance benchmarks. Adversarial neural transfer (ANT) (Ganin and Lempitsky, 2015; Liu et al., 2017; Kim et al., 2017; Kamath et al., 2019) employs an adversarial setup where the network learns to make the shared feature distributions of the source domain and the target domain as similar as possible, while simultaneously optimizing for domain-specific performance. However, as the domain-specific losses promote the use of domain-specific features, these training objectives may compete with each other implicitly. This leads to optimization difficulties and potentially degenerate cases where the domain-specific classifiers ignore the shared features and no meaningful transfer occurs between domains. To cope with this issue, we propose Latent-Optimized Adversarial Neural Transfer (LOANT). The latent optimization strategy can be understood with analogies to to one-step look-ahead during gradient descent and Model-Agnostic Meta Learning (Finn et al., 2017). By forcing domain-specific losses to accommodate the negative domain discrimination loss, it improves training dynamics (Balduzzi et al., 2018). With LOANT, we achieve 10.02% absolute improvement over the previous state of the art on the iSarcasm dataset (Oprea and Magdy, 2020) and 3.08% improvement on SemEval-18 dataset (Van Hee et al., 2018). Over four sets of transfer learning experiments, latent optimization on average brings 3.42% improvement in F-score over traditional adversarial neural transfer and 4.83% over a similar training strategy from Model-Agnostic Meta Learning (MAML) (Finn et al., 2017). In contrast, traditional ANT brings an average of only 0.9% F-score improvement over non-adversarial multi-task learning. The results demonstrates that LOANT can effectively perform knowledge transfer for the task of sarcasm detection and suggests that the proposed latent optimization strategy enables the collaboration among the ANT losses during optimization. Our contributions can be summarized as follows: 1. Inspired by the existence of multiple small sarcasm datasets, we propose to use transfer learning to bridge dataset differences. To the best of our knowledge, this is the first study of transfer learning between different sarcasm detection datasets. 2. We propose LOANT, a novel latent-optimized adversarial neural transfer model for cross-domain sarcasm detection. By conducting stochastic gradient descent (SGD) with one-step look-ahead, LOANT outperforms traditional adversarial neural transfer, multitask learning, and meta-learning baselines, and establishes a new state-of-the-art F-score of 46.41%. The code and datasets are available at https://github.com/ guoxuxu/LOANT . Acquiring large and reliable datasets has been a persistent challenge for computational detection of sarcasm. Due to the cost of annotation, manually labeled datasets (Walker et al., 2012; Riloff et al., 2013; Wallace et al., 2014; Abercrombie and Hovy, 2016; Oraby et al., 2016; Van Hee et al., 2018; Oprea and Magdy, 2020) typically contain only a few thousand texts. Automatic crawling (Ptcek et al., 2014; Bamman and Smith, 2015; Joshi et al., 2015; Khodak et al., 2018b) using hashtags or markers yields substantially more texts, but the results are understandably more noisy. As a case study, after examining the dataset of Riloff et al. (2013), Oprea and Magdy (2020) found that nearly half of tweets with sarcasm hashtags are not sarcastic. In this paper, we evaluate performance on the manually labeled datasets, which are relatively clean and can serve as good benchmarks, and transfer the knowledge learned from automatically collected datasets. Traditional sarcasm detection includes methods based on rules (Tepperman et al., 2006) and lexical (Kreuz and Caucci, 2007) and pragmatic patterns (Gonzlez-Ibnez et al., 2011). Context-aware methods (Rajadesingan et al., 2015; Bamman and Smith, 2015) make use of contexts, such as the author, the audience, and the environment, to enrich feature representations. Deep learning techniques for sarcasm detection employ convolutional networks (Ghosh and Veale, 2016), recurrent neural networks (Zhang et al., 2016; Felbo et al., 2017; Wu et al., 2018), attention (Tay et al., 2018), and pooling (Xiong et al., 2019) operations. Amir et al. (2016) incorporate historic information for each Twitter user. Cai et al. (2019) consider the images that accompany tweets and Mishra et al. (2017) utilize readers' gaze patterns. To the best of our knowledge, no prior work has explored transfer learning between different sarcasm datasets. As a transfer learning technique, multi-task learning (MTL) allows related tasks or similar domains to inform each other and has been a powerful technique for NLP (Collobert et al., 2011; Yang et al., 2017; Aharoni et al., 2019; Guo et al., 2019; Raffel et al., 2020). However, MTL does not always lead to performance improvements (Alonso and Plank, 2017; Bingel and Sgaard, 2017; Changpinyo et al., 2018; Clark et al., 2019). Theoretical analysis (Ben-David et al., 2010) indicates that a key factor for the success of transfer is to reduce the divergence between the feature spaces of the domains. Ganin and Lempitsky (2015) propose to minimize domain differences via a GAN-like setup, where a domain discriminator network learns to distinguish between features from two domains and a feature extraction network learns to produce indistinguishable features, which are conducive to transfer learning. Similar adversarial setups (Liu et al., 2017; Kim et al., 2017) have been adopted for many NLP tasks, such as sentiment analysis (Chen et al., 2018; Liu et al., 2018), satirical news detection (McHardy et al., 2019), detection of duplicate questions (Ka-math et al., 2019), named entity recognition (Zhou et al., 2019), and QA (Yu et al., 2018). However, as shown in our experiments, adding the domain discriminator to MTL does not always result in improved performance. We attribute this to the implicit competition between the negative domain discrimination loss and the domain-specific losses, which causes difficulties in optimization. In this paper, we improve the training dynamics of adversarial transfer learning using latent optimization on BERT features. The idea of coordinating gradient updates of different and competing losses using gradient descent with look-ahead has been explored in Latent-optimized Generative Adversarial Network (LO-GAN) (Wu et al., 2019b,a), Symplectic Gradient Adjustment (Balduzzi et al., 2018; Gemp and Ma-hadevan, 2019), Unrolled GAN (Metz et al., 2016), Model-Agnostic Meta Learning (Finn et al., 2017) and extragradient (Azizian et al., 2020). The difference between LOGAN and other techniques is that the LOGAN computes the derivative of the randomly sampled latent input, whereas other methods compute the second-order derivative in the model parameter space. In this paper, we generalize latent optimization from GANs to multi-task learning, where the adversarial loss is complemented by domain-specific task losses. In addition, we apply latent optimization on the output of the BERT module, which differs from the optimization of the random latent variable in LOGAN. As large pretrained masked language models (PMLMs) gain prominence in NLP, latent optimization avoids gradient computation on the parameters of enormous PMLMs, providing reduction in running time and memory usage. In supervised transfer learning, we assume labeled data for both the source domain and the target domain are available. The source domain dataset D s comprises of data points in the format of ( x s , y s ) and the target domain dataset D t comprises of data points in the format of ( x t , y t ) . The labels y s and y t are one-hot vectors. The task of supervised cross-domain sarcasm detection can be formulated as learning a target-domain function f t ( x t ) that predict correct labels for unseen x t . Fig. 1 shows the model architecture for adversarial neural transfer (ANT) (Liu et al., 2017; Kamath et al., 2019; Kim et al., 2017). We use a large pretrained neural network, BERT (Devlin et al., 2019), as the sentence encoder, though the architecture is not tied to BERT and can use other pretrained encoders. We denote the parameters of the BERT encoder as w b , and its output for data in the source domain and the target domain as z s  RD and z t  RD respectively. We denote this encoder operation as z s = E ( x s , w b ) , z t = E ( x t , w b ) (1) On top of these outputs, we apply domain-specific dense layers to create domain-specific features v s , v t and shared dense layers to create shared features u s , u t . We use w s , w t , and w sh to denote the parameters for the source dense layers, the target dense layers, and the shared dense layers. The concatenation of features [ v s , u s ] is fed to the source-domain classifier, parameterized by  s ; [ v t , u t ] is fed to the target-domain classifier, parameterized by  t . The two classifiers categorize the tweets into sarcastic and non-sarcastic and are trained using cross-entropy. For reasons that will become apparent later, we make explicit the re-liance on z s and z t : L s ( z s ) =  (cid:88) i y s,i log p ( y s,i | z s ) , L t ( z t ) =  (cid:88) i y t,i log p ( y t,i | z t ) , (2) PretrainedEncoder ! where  y s and  y t are the predicted labels and i is the index of the vector components. Simultaneously, the domain discriminator learns to distinguish the features u s and u t as coming from different domains. The domain discriminator is parameterized by  d . It is trained to minimize the domain classification loss, L d ( z t , z s ) =  log p (0 | u s )  log p (1 | u t ) . Through the use of the gradient reversal layer, the shared dense layers and the feature encoder maximizes the domain classification loss, so that the shared features u s and u t become indistinguishable and conducive to transfer learning. In summary, the network weights w b , w s , w t , w sh ,  s ,  t are trained to minimize the following joint loss, LANT = L s ( z s ) + L t ( z t )  L d ( z t , z s ) , (4) whereas  d is trained to minimize L d ( z t , z s ) . It is worth noting that the effects of three loss terms in Eq. 4 on the shared parameters w sh and w b may be competing with each other. This is because optimizing sarcasm detection in one domain will encourage the network to extract domain-specific features, whereas the domain discrimination loss constrains the network to avoid such features. It is possible for the competition to result in degenerate scenarios. For example, the shared features u s and u t may become indistinguishable but also do not correlate with the labels y s and y t . The domain classifiers may ignore the shared features u s and u t and hence no transfer happens. To cope with this issue, we introduce a latent optimization strategy that forces domain-specific losses to accommodate the domain discrimination loss. We now introduce the latent representation optimization strategy. First, we perform one step of stochastic gradient descent on L d on the encoded features z s and z t with learning rate  , z (cid:48) s = z s +   L d ( z s , z t ) z s , (5) z (cid:48) t = z t +   L d ( z s , z t ) z t . (6) We emphasize that this is a descent step because we are minimizing L d . After that, we use the updated z (cid:48) s and z (cid:48) t in the computation of the losses LLO s ( z s , z (cid:48) s ) = L s ( z s ) + L s ( z (cid:48) s ) , (7) LLO t ( z t , z (cid:48) t ) = L t ( z t ) + L t ( z (cid:48) t ) . The new joint objective hence becomes which is optimized using regular stochastic gradient descent (SGD) on w b , w s , w t , w sh ,  s , and  t . Here we show the general case of gradient computation. Consider any weight vector w in the neural network. Equations 5 and 6 introduce two intermediate variables z (cid:48) s and z (cid:48) t , which are a function of the model parameter w . Therefore, we perform SGD using the following total derivative d LLO d w =  LLO w +  LLO s ( z (cid:48) s ) z (cid:48) s z (cid:48) s w +  LLO t ( z (cid:48) t ) z (cid:48) t z (cid:48) t w . For every network parameter other than the encoder weight w b , z / w is zero. The second-order derivative  2 L d ( z ) (cid:14) z w is difficult to compute due to the high dimensionality of w . Since  is usually very small, we adopt a first-order approximation and directly set the second-order derivative to zero. Letting  s = [ w s ,  s ] and  t = [ w t ,  t ] , we now show the total derivatives for all network Algorithm 1: Training of LOANT Input: source data ( x s , y s ) , target data ( x t , y t ) , learning rate  Initialize model parameters w repeat Sample N batches of data pairs for i = 1 to N do Compute forward loss L s , L t , L d ; Compute (cid:52) z s =  L d ( z s ) z s and (cid:52) z t =  L d ( z t ) z t ; Update the latent representations z (cid:48) s = z s +  (cid:52) z s and z (cid:48) t = z t +  (cid:52) z t ; Compute the new joint loss LLO = LLO s + LLO t  L d ; Update w using gradient descent. d LLO d w b =  LANT w b +  L s ( z (cid:48) s ) w b +  L t ( z (cid:48) t ) w b +  L s ( z (cid:48) s ) z (cid:48) s z s w b +  L t ( z (cid:48) t ) z (cid:48) t z t w b (12) d LLO d w sh =  LANT w sh +  L s ( z (cid:48) s ) w sh +  L t ( z (cid:48) t ) w sh (13) d LLO d  s =  L s ( z s )  s +  L s ( z (cid:48) s )  s d LLO d  t =  L t ( z t )  t +  L t ( z (cid:48) t )  t d LLO d  d =  L d ( z s , z t )  d (14) More details can be found in Appendix A. Fig. 2 illustrates the latent optimization process. Algorithm 1 shows the LOANT algorithm. To better understand the LOANT algorithm, we relate LOANT to the extragradient technique and Model-Agnostic Meta Learning (Finn et al., 2017). The vanilla gradient descent (GD) algorithm follows the direction along which the function value decreases the fastest. However, when facing an ill-conditioned problem like the one in Fig. 3, GD is known to exhibit slow convergence because the local gradients are close to being orthogonal to the direction of the local optimum. For comparison with LOANT, we consider the extragradient (EG) method (Korpelevich, 1976; Az-izian et al., 2020) that uses the following update rule when optimizing the function f ( w ) with respect to w , w  w   d f ( w   f ( w ) w ) d w . Similar to LOANT, we can adopt a first-order approximation to EG if we set the Hessian term to zero in the total derivative. Instead of optimizing the immediate function value f ( w ) , this method optimizes f ( w   fw ) , which is the function value after one more GD step. This can be understood as looking one step ahead along the optimization trajectory. In the contour diagrams of Fig. 3, we show the optimization of a 2-dimensional quadratic function. This simple example showcases how the ability to look one step ahead can improve optimization in pathological loss landscapes. We motivate the nested optimization of LOANT by drawing an analogy between EG and LOANT. It is worth noting that LOANT differs from the EG update rule in important ways. Specifically, in EG the inner GD step and the outer GD step are performed on the same function f (  ) , whereas LOANT performs the inner step on L d and the outer step on L s or L t . For a similar idea with multiple losses, we turn to MAML (Finn et al., 2017). In MAML, there are K tasks with losses L 1 , . . . , L k , . . . , LK . On every task, we perform a one-step SGD update to the model parameter w  RL , w T k = w    L k ( w ) w . Utilizing the idea of look ahead, in MAML we update w so that subsequent optimization on any single task or combination of tasks would achieve good results. Adversarial neural transfer has three tasks, the source-domain and target-domain classifications and the negative discriminator loss. The updates performed by LOANT in Eq. 5 and 6 are similar to MAML's look-ahead update in Eq. 16. Specifically, when we update model parameters using the gradient from the total loss LLO , we prepare for the next descent step on L d . Therefore, LOANT can (c) Full-Hessian extragradient, which finds a direct path to the local minimum, enabling a large learning rate  = 0 . 1 . be understood as forcing domain-specific losses to accommodate the domain discrimination loss and mitigating their competition. LOANT differs from MAML since, in the inner update, LOANT updates the sentence-level features z s and z t instead of the model parameters w . As z s and z t are usually of much smaller dimensions than w , this leads to accelerated training and reduced memory footprint. For example, in the BERT-base model (Devlin et al., 2019), L is 110 million and D is 768. Within the regular range of batch size B , BD (cid:28) L . In the experiments, we verify the benefits of LOANT in terms of accuracy and time and space complexity. We conduct four cross-domain sarcasm detection experiments by transferring from an automatically collected dataset to a manually annotated dataset. The two automatically collected datasets include Ptcek (Ptcek et al., 2014) and Ghosh 1 (Ghosh and Veale, 2016), which treat tweets having particular hastags such as #sarcastic , #sarcasm or #not as sarcastic and others as not sarcastic. We crawled the Ptcek dataset using the NLTK API 2 according to the tweet ids published online 3 . The two manually annotated datasets include SemEval-18 4 (Van Hee et al., 2018) and iSarcasm 1 https://github.com/AniSkywalker/ SarcasmDetection/tree/master/resource 2 http://www.nltk.org/howto/twitter. (Oprea and Magdy, 2020). SemEval-18 consists of both sarcastic and ironic tweets supervised by third-party annotators and thus is used for perceived sarcasm detection. The iSarcasm dataset contains tweets written by participants of an online survey and thus is an example of intended sarcasm detection. Table 1 summarizes the statistics of the four datasets. The SemEval-18 dataset is balanced while the iSarcasm dataset is imbalanced. The two source datasets are more than ten times the size of the target datasets. For all datasets, we use the predefined test set and use a random 10% split of the training set as the development set. We preprocessed all datasets using the lexical normalization tool for tweets from Baziotis et al. (2017). We cleaned the four datasets by dropping all the duplicate tweets within and across datasets, and trimmed the texts to a maximum length of 100. To deal with class imbalance, we performed upsampling on the target-domain datasets, so that both the sarcastic and non-sarcastic classes have the same size as source domain datasets. text sarcasm detection model ranked top-1 on the iSarcam dataset. The model is a co-attention based LSTM model which uses the word embeddings pretrained on Twitter data 5 . Dense-LSTM (Wu et al., 2018): A state-of-the-art single-task sarcasm detection model ranked top-1 on the SemEval-18 dataset. The model is a densely connected LSTM network consisting of four Bi-LSTM layers and the word embeddings pretrained on two Twitter datasets. BERT : We finetune the BERT model (Devlin et al., 2019) with an additional simple classifier directly on the target dataset. S-BERT is a two-stage finetuning of the BERT model. We first finetune BERT on the source dataset and the best model is selected for further fine-tuning on the target dataset. MTL : We implemented a multi-task learning (MTL) model, which has the same architecture as LOANT except that the domain discriminator is removed. We use BERT as the shared text encoding network. MTL+LO : In this baseline, we applied latent optimization to MTL. As MTL does not have the adversarial discriminator, we use the domain-specific losses to optimize latent representations: z (cid:48) s = z s    L s ( z s ) z s (18) z (cid:48) t = z t    L t ( z t ) z t (19) We use the above to replace Equations 5 and 6 and keep the rest training steps unchanged. This model is compared against MTL to study the effects of LO in non-adversarial training for cross-domain sarcasm detection. ANT : This is the conventional adversarial neural transfer model with the same architecture as LOANT. The only difference is that we do not apply latent optimization. For fair comparisons, we use BERT as the text encoder. ANT+MAML : In Section 3.3, we discussed the similarity between LO and MAML. Therefore, we create a baseline that uses a MAML-like strategy for encouraging the collaboration of different loss terms. Instead of optimizing the latent representation z s and z t , we first take a SGD step in the 5 https://nlp.stanford.edu/projects/ glove/ parameter space of w b , w (cid:48) b = w b +   L d ( z s , z t ) w b . After that, we use w (cid:48) b to compute the gradients used in the actual updates to all model parameters, including w b . Model Settings. For all models using the BERT text encoder, we use the uncased version of the BERT-base model and take the 768-dimensional output from the last layer corresponding to the [CLS] token to represent a sentence. The BERT parameters are always shared between domains. For other network components, we randomly initialize the dense layers and classifiers. To minimize the effect of different random initializations, we generate the same set of initial parameters for each network component and use them across all baselines wherever possible. The source dense layer, the shared dense layer, and the target dense layer are single linear layers with input size of 768 and output size of 768 followed by the tanh activation. The classifier in all models consists of two linear layers. The first linear layer has input size of 768  2 (taking both shared and domain-specific features) and output size of 768 followed by the ReLU activation. The second linear layer has input size 768 and output size 2 for binary classification. After that we apply the softmax operation. More details can be found in Appendix B. Training Setting. We optimize all models using Adam (Kingma and Ba, 2014) with batch size of 128. We tune the learning rate (LR) on the development set from 1e-5 to 1e-4 in increments of 2e-5. To objectively assess the effects of latent optimization (LO), we first find the best LR for the base models such as ANT and MTL. After that, with the best LR unchanged, we apply LO to ANT and MTL. We use the cosine learning rate schedule for all models. All models are trained for 5 epochs on Nvidia V100 GPUs with 32GB of memory in mixed precision. Due to the large model size and pretrained weights of BERT, 5 epochs are sufficient for convergence. Evaluation Metrics. Following (Wu et al., 2018; Van Hee et al., 2018; Oprea and Magdy, 2020), we select and compare models using the F-score on the sarcastic class in each dataset. We additionally Target: SemEval-18 Model F-score Recall Precision Single-task Random  0.3730 0.3730 0.3730 Unigram SVM  0.5890 0.6590 0.5320 LSTM  0.5260 0.4440 0.6450 DenseLSTM  0.6510 0.7106 0.6005 BERT 0.6626 0.7055 0.6246 Source: Ptce S-BERT 0.6676 0.7055 0.6337 MTL 0.6404 0.7896 0.5386 ANT 0.6348 0.8187 0.5184 MTL+LO 0.6598 0.7346 0.5989 ANT+MAML 0.6454 0.7540 0.5641 LOANT (ours) 0.6702 0.8025 0.5754 Source: Ghosh S-BERT 0.6512 0.7766 0.5607 MTL 0.6525 0.7475 0.5789 ANT 0.6626 0.8899 0.5278 MTL+LO 0.6622 0.8058 0.5620 ANT+MAML 0.6338 0.7281 0.5610 LOANT (ours) 0.6818 0.7734 0.6096 Target: iSarcasm Model F-score Recall Precision SIARN  0.3420 0.7820 0.2190 MIARN  0.3640 0.7930 0.2360 LSTM  0.3360 0.7470 0.2170 DenseLSTM  0.3180 0.2760 0.3750 BERT 0.3492 0.4904 0.2711 S-BERT 0.3710 0.5541 0.2788 MTL 0.3767 0.3503 0.4074 ANT 0.3857 0.5159 0.3079 MTL+LO 0.4379 0.4267 0.4496 ANT+MAML 0.3951 0.5605 0.2923 LOANT (ours) 0.4642 0.4968 0.4357 S-BERT 0.3383 0.5732 0.2400 MTL 0.3838 0.5159 0.3056 ANT 0.4063 0.4904 0.3468 MTL+LO 0.3987 0.4012 0.3962 ANT+MAML 0.3589 0.4904 0.2830 LOANT (ours) 0.4101 0.4649 0.3668  Results reported in (Van Hee et al., 2018),  in (Wu et al., 2018) and  in (Oprea and Magdy, 2020). report the corresponding Recall and Precision. In all our experiments, we use the development set for model selection and report their performance on the test set. To evaluate the efficiency of LOANT versus MAML-based training, we also compare their required GPU memory and average training time in each epoch. We compare models on the target domain datasets. Additional multi-domain performance can be found in Appendix C. 4.4 Comparison with the States of the Art We compare LOANT with state-of-the-art methods on the SemEval-18 dataset (Van Hee et al., 2018) and the iSarcasm datast (Oprea and Magdy, 2020). Table 2 presents the test performance of LOANT and all baseline models. Our LOANT model consistently outperforms all single-task baselines by large margins. In particular, LOANT outperforms MIARN by 10.02% on iSarcasm (Oprea and Magdy, 2020) whereas the fine-tuned BERT achieved 1.48% lower than MIARN. On SemEval18, the fine-tuned BERT achieves better test performance than other four single-task baselines. The results indicate that fine-tuning BERT, a popular baseline, does not always outperform the traditional LSTM networks specifically designed for the task. We hypothesize that the large BERT model can easily overfit the small datasets used, which highlights the challenge of sarcasm detection. The middle and bottom sections of Table 2 present the test performance of six transfer learning models (S-BERT, MTL, ANT, MTL+LO, ANT+MAML, and LOANT) under four groups of transfer learning experiments. These models generally outperform the single-task models, demonstrating the importance of transfer learning. Among these, we have the following observations. Effects of the Domain Discriminator. The performance differences between MTL and ANT can be explained by the addition of the domain discriminator, which encourages the shared features under the source domain and the target domain to have the same distributions. In the four pairs of experiments, ANT marginally outperforms MTL by an average of 0.9% F-score. In the Ptcek  SemEval-18 experiment, the domain discriminator causes F-score to decrease by 0.56%. Overall, the benefits of the adversarial discriminator to transfer learning appear to be limited. As discussed earlier, the competition between the domain-specific losses and the negative domain discrimination loss may have contributed to the ineffectiveness of ANT. Effects of Latent Optimization. We can observe the effects of LO by comparing ANT with LOANT and comparing MTL with MTL+LO. Note that in these experiments we adopted the best learning rates for the baseline models ANT and MTL rather than the latent-optimized models. On average, LOANT outperforms ANT by 3.42% in F-score and MTL+LO outperforms MTL by 2.63%, which clearly demonstrates the benefits provided by latent optimization. Latent Space vs. Model Parameter Space. In the ANT+MAML baseline, we adopt a MAML-like optimization strategy, which performs the lookahead in the BERT parameter space instead of the latent representation space. Interestingly, this strategy does not provide much improvements and on average performs 1.40% worse than ANT. LOANT clearly outperforms ANT+MAML. In addition, optimization in the latent space also provides savings in computational time and space requirements. Table 3 shows the time and memory consumption for different transfer learning methods. Adding LO to ANT has minimal effects on the memory usage, but adding MAML nearly doubles the memory consumption. On average, ANT+MAML increases the running time of LOANT by 3.1 fold. The Influence of Domain Divergence. In transfer learning, the test performance depends on the similarity between the domains. We thus investigate the dissimilarity between datasets using the KullbackLeibler (KL) divergence between the unigram probability distributions, d KL = (cid:88) g  VP t ( g )log P t ( g ) P s ( g ) . where P s ( g ) and P t ( g ) are the probabilities of unigram g for the source domain and target domain respectively. V is the vocabulary. Table 4 shows the results. Ptcek is more similar to the two target datasets than Ghosh. Among the two target datasets, iSarcasm is more similar to Ptcek than SemEval-18. Ptcek  iSarcasm transfer where domain divergence is the smallest. The Ptcek  SemEval-18 transfer comes in second with 3.54%. Transferring from Ghosh yields smaller improvements. Further, we observe the same trend in the comparison between MTL+LO and MTL. The largest improvement brought by LO is 6.12% in the Ptcek  iSarcasm transfer. As one may expect, applying LO leads to greater performance gains when the two domains are more similar. Transfer learning holds the promise for the effective utilization of multiple datasets for sarcasm detection. In this paper, we propose a latent optimization (LO) strategy for adversarial transfer learning for sarcasm detection. By providing look-ahead in the gradient updates, the LO technique allows multiple losses to accommodate each other. This proves to be particularly effective in adversarial transfer learning where the domain-specific losses and the adversarial loss potentially conflict with one an-other. With the proposed LOANT method, we set a new state of the art for the iSarcasm dataset. We hope the joint utilization of multiple datasets will contribute to the creation of contextualized semantic understanding that is necessary for successful sarcasm detection. This research is supported by the National Research Foundation, Singapore under its the AI Singapore Programme (AISG2-RP-2020-019), NRF Inves-tigatorship (NRF-NRFI05-2019-0002), and NRF Fellowship (NRF-NRFF13-2021-0006); the Joint NTU-WeBank Research Centre on Fintech (NWJ-2020-008); the Nanyang Assistant/Associate Professorships (NAP); the RIE 2020 Advanced Manufacturing and Engineering Programmatic Fund (A20G8b0102), Singapore; NTU-SDU-CFAIR (NSC-2019-011). Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not reflect the views of the funding agencies.
method abstain abstain objective abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain objective abstain abstain result abstain abstain abstain objective objective objective objective objective objective other other other other method other other other other other objective other other other other other abstain abstain abstain other other abstain objective other method abstain abstain abstain abstain method method method method abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method method method method method abstain abstain method abstain abstain method abstain abstain method method other abstain abstain method abstain abstain method method abstain abstain method abstain method abstain abstain method abstain method method abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain method method abstain method other abstain abstain abstain abstain abstain abstain method method abstain method abstain abstain abstain abstain method abstain abstain method method method method abstain abstain method method abstain method other method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain result abstain result abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective abstain abstain objective objective other other