SlowGuess/NAACL_2021_OCR huggingface dataset:
the Association for Computational Linguistics (Volume 1: Long Papers), pages 1297-1307.
Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
G. M. Korpelevich. 1976. An extragradient method for finding saddle points and for other problems. *Ekonomika i Matematicheskie Metody*, 12:747-756.
Roger Kreuz and Gina Caucci. 2007. Lexical influences on the perception of sarcasm. In Proceedings of the Workshop on Computational Approaches to Figurative Language, pages 1-4, Rochester, New York. Association for Computational Linguistics.
Pengfei Liu, Xipeng Qiu, and Xuanjing Huang. 2017. Adversarial multi-task learning for text classification. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1-10, Vancouver, Canada. Association for Computational Linguistics.
Qi Liu, Yue Zhang, and Jiangming Liu. 2018. Learning domain representation for multi-domain sentiment classification. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 541-550.
Diana G Maynard and Mark A Greenwood. 2014. Who cares about sarcastic tweets? investigating the impact of sarcasm on sentiment analysis. In LREC 2014 Proceedings. ELRA.
Robert McHardy, Heike Adel, and Roman Klinger. 2019. Adversarial training for satire detection: Controlling for confounding variables. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 660-665, Minneapolis, Minnesota. Association for Computational Linguistics.
Luke Metz, Ben Poole, David Pfau, and Jascha Sohl-Dickstein. 2016. Unrolled generative adversarial networks. In NeurIPS.
Abhijit Mishra, Kuntal Dey, and Pushpak Bhattacharyya. 2017. Learning cognitive features from gaze data for sentiment and sarcasm classification using convolutional neural network. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
Silviu Oprea and Walid Magdy. 2020. isarcasm: A dataset of intended sarcasm. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics.
Shereen Oraby, Vrindavan Harrison, Lena Reed, Ernesto Hernandez, Ellen Riloff, and Marilyn Walker. 2016. Creating and characterizing a diverse corpus of sarcasm in dialogue. In Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 31-41, Los Angeles. Association for Computational Linguistics.
Tomáš Ptáček, Ivan Habernal, and Jun Hong. 2014. Sarcasm detection on Czech and English twitter. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pages 213-223.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
Ashwin Rajadesingan, Reza Zafarani, and Huan Liu. 2015. Sarcasm detection on twitter: A behavioral modeling approach. In Proceedings of the eighth ACM international conference on web search and data mining, pages 97-106.
Ellen Riloff, Ashequl Qadir, Prafulla Surve, LalindraDe Silva, Nathan Gilbert, and Ruihong Huang. 2013. Sarcasm as contrast between a positive sentiment and negative situation. In EMNLP.
Yi Tay, Anh Tuan Luu, Siu Cheung Hui, and Jian Su. 2018. Reasoning with sarcasm by reading in between. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1010-1020, Melbourne, Australia. Association for Computational Linguistics.
Joseph Tepperman, David Traum, and Shrikanth Narayanan. 2006. "yeah right": Sarcasm recognition for spoken dialogue systems. In Ninth international conference on spoken language processing.
Cynthia Van Hee, Els Lefever, and Véronique Hoste. 2018. Semeval-2018 task 3: Irony detection in english tweets. In Proceedings of The 12th International Workshop on Semantic Evaluation, pages 39-50.
Tony Veale, F Amílcar Cardoso, and Rafael Pérez y Pérez. 2019. Systematizing creativity: A computational view. In Computational Creativity, pages 1-19. Springer.
Marilyn A Walker, Jean E Fox Tree, Pranav Anand, Rob Abbott, and Joseph King. 2012. A corpus for research on deliberation and debate. In LREC, volume 12, pages 812-817. Istanbul.
Byron C Wallace, Laura Kertz, Eugene Charniak, et al. 2014. Humans require context to infer ironic intent (so computers probably do, too). In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 512-516.
Chuhan Wu, Fangzhao Wu, Sixing Wu, Junxin Liu, Zhigang Yuan, and Yongfeng Huang. 2018. Thu_ngn at SemEval-2018 task 3: Tweet irony detection with densely connected LSTM and multitask learning. In Proceedings of The 12th International Workshop on Semantic Evaluation, pages 51-56.
Yan Wu, Jeff Donahue, David Balduzzi, Karen Simonyan, and Timothy Lillicrap. 2019a. Logan: Latent optimisation for generative adversarial networks. arXiv preprint arXiv:1912.00953.
Yan Wu, Mihaela Rosca, and Timothy Lillicrap. 2019b. Deep compressed sensing. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 6850-6860. PMLR.
Tao Xiong, Peiran Zhang, Hongbo Zhu, and Yihui Yang. 2019. Sarcasm detection with self-matching networks and low-rank bilinear pooling. In The World Wide Web Conference, pages 2115-2124.
Zhilin Yang, Ruslan Salakhutdinov, and William W. Cohen. 2017. Transfer learning for sequence tagging with hierarchical recurrent networks. In ICLR.
Jianfei Yu, Minghui Qiu, Jing Jiang, Jun Huang, Shangyong Song, Wei Chu, and Haiqing Chen. 2018. Modelling domain relationships for transfer learning on retrieval-based question answering systems in e-commerce. In Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining.
Meishan Zhang, Yue Zhang, and Guohong Fu. 2016. Tweet sarcasm detection using deep neural network. In Proceedings of COLING 2016, The 26th International Conference on Computational Linguistics: Technical Papers, pages 2449-2460.
Joey Tianyi Zhou, Hao Zhang, Di Jin, Hongyuan Zhu, Meng Fang, Rick Siow Mong Goh, and Kenneth Kwok. 2019. Dual adversarial neural transfer for low-resource named entity recognition. In ACL, pages 3461-3471.
Appendix for "Latent-Optimized Adversarial Neural Transfer for Sarcasm Detection"
A First-order Approximation
Here we explain the gradients for the model parameters  $w_{b}, w_{sh}, \phi_{s}, \phi_{t}$  and  $\theta_{d}$ . Generically, we apply the first-order approximation by substituting Eq.11 into Eq. 10 and setting the Hessian to zero, which gives
$$
\begin{array}{l} \frac {\mathrm {d} \mathcal {L} ^ {\mathrm {L O}}}{\mathrm {d} w} = \frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial w} + \frac {\partial \mathcal {L} _ {s} ^ {\mathrm {L O}} \left(z _ {s} ^ {\prime}\right)}{\partial z _ {s} ^ {\prime}} \frac {\partial z _ {s}}{\partial w} \tag {22} \\ + \frac {\partial \mathcal {L} _ {t} ^ {\mathrm {L O}} (z _ {t} ^ {\prime})}{\partial z _ {t} ^ {\prime}} \frac {\partial z _ {t}}{\partial w}. \\ \end{array}
$$
Note that  $z_{s}$  and  $z_{t}$  depend on only the parameter  $w_{b}$ . For the rest of the parameters,  $w_{sh}, \phi_{s}, \phi_{t}$  and  $\theta_{d}$ , the partial derivatives  $\frac{\partial z_{s}}{\partial w}$  and  $\frac{\partial z_{t}}{\partial w}$  are zero.
Now we consider the joint objective (Eq. 9), which contains domain-specific classification losses produced by both the old latent vector  $z$  and the new latent vector  $z'$ . Thus, we derive at the generic formula
$$
\begin{array}{l} \frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial w} = \frac {\partial \mathcal {L} _ {s} ^ {\mathrm {L O}}}{\partial w} + \frac {\partial \mathcal {L} _ {t} ^ {\mathrm {L O}}}{\partial w} - \frac {\partial \mathcal {L} _ {d}}{\partial w} \\ = \frac {\partial \mathcal {L} _ {s} \left(z _ {s}\right)}{\partial w} + \frac {\partial \mathcal {L} _ {t} \left(z _ {t}\right)}{\partial w} - \frac {\partial \mathcal {L} _ {d} \left(z _ {s} , z _ {t}\right)}{\partial w} \tag {23} \\ + \frac {\partial \mathcal {L} _ {s} (z _ {s} ^ {\prime})}{\partial w} + \frac {\partial \mathcal {L} _ {t} (z _ {t} ^ {\prime})}{\partial w} \\ \end{array}
$$
By the same reasoning above, the total derivative of  $\mathcal{L}^{\mathrm{LO}}$  against  $w_{b}$  is
$$
\begin{array}{l} \frac {\mathrm {d} \mathcal {L} ^ {\mathrm {L O}}}{\mathrm {d} w _ {b}} = \frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial w _ {b}} + \frac {\partial \mathcal {L} _ {s} ^ {\mathrm {L O}} \left(z _ {s} ^ {\prime}\right)}{\partial z _ {s} ^ {\prime}} \frac {\partial z _ {s}}{\partial w _ {b}} \tag {24} \\ + \frac {\partial \mathcal {L} _ {t} ^ {\mathrm {L O}} (z _ {t} ^ {\prime})}{\partial z _ {t} ^ {\prime}} \frac {\partial z _ {t}}{\partial w _ {b}} \\ \end{array}
$$
$$
\begin{array}{l} \frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial w _ {b}} = \frac {\partial \mathcal {L} _ {s} (z _ {s})}{\partial w _ {b}} + \frac {\partial \mathcal {L} _ {t} (z _ {t})}{\partial w _ {b}} - \frac {\partial \mathcal {L} _ {d} (z _ {s} , z _ {t})}{\partial w _ {b}} \\ + \frac {\partial \mathcal {L} _ {s} \left(z _ {s} ^ {\prime}\right)}{\partial w _ {b}} + \frac {\partial \mathcal {L} _ {t} \left(z _ {t} ^ {\prime}\right)}{\partial w _ {b}} \tag {25} \\ \end{array}
$$
For the rest of the parameters, the computation is slightly different as they do not contribute to  $z_{s}$  and  $z_{t}$ .
$$
\begin{array}{l} \frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial w _ {s h}} = \frac {\partial \mathcal {L} _ {s} (z _ {s})}{\partial w _ {s h}} + \frac {\partial \mathcal {L} _ {t} (z _ {t})}{\partial w _ {s h}} - \frac {\partial \mathcal {L} _ {d} (z _ {s} , z _ {t})}{\partial w _ {s h}} \\ + \frac {\partial \mathcal {L} _ {s} (z _ {s} ^ {\prime})}{\partial w _ {s h}} + \frac {\partial \mathcal {L} _ {t} (z _ {t} ^ {\prime})}{\partial w _ {s h}} \\ \end{array}
$$
$$
\frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial \phi_ {s}} = \frac {\partial \mathcal {L} _ {s} \left(z _ {s}\right)}{\partial \phi_ {s}} + \frac {\partial \mathcal {L} _ {s} \left(z _ {s} ^ {\prime}\right)}{\partial \phi_ {s}} \tag {27}
$$
$$
\frac {\partial \mathcal {L} ^ {\mathrm {L O}}}{\partial \phi_ {t}} = \frac {\partial \mathcal {L} _ {t} \left(z _ {t}\right)}{\partial \phi_ {t}} + \frac {\partial \mathcal {L} _ {t} \left(z _ {t} ^ {\prime}\right)}{\partial \phi_ {t}} \tag {28}
$$
The parameter of the domain discriminator  $\theta_{d}$  is updated to minimize  $\mathcal{L}_d(z_s,z_t)$ . This is in contrast to the rest of the model, which minimizes  $-\mathcal{L}_d(z_s,z_t)$ . The update rule for  $\theta_{d}$  is
$$
\theta_ {d} \leftarrow \theta_ {d} - \eta \frac {\partial \mathcal {L} _ {d} \left(z _ {s} , z _ {t}\right)}{\partial \theta_ {d}} \tag {29}
$$
B Hyperparameters and Model Initialization
We set the batch size to 128 for all models and search for the optimal learning rate (LR) from 2e-5 to 1e-4 in increments of 2e-5 using the F-score on the development set. We show the best learning rates found in Table 5.
The best learning rate for fine-tuning BERT on SemEval-18 and iSarcasm is 4e-5. S-BERT model is finetuned twice, first on the source domain and then on the target domain. Thus, we search for one best learning rate for each finetuning using the source and target development sets respectively. The best first-round LR is 6e-05 for Ptáče and 8e-5 for Ghosh.
Other models, MTL, ANT and the LO-adpated versions are selected using the target development set. For a rigorous comparison, we use the best LR for ANT when training LOANT and the best LR for MTL when training  $\mathrm{MTL + LO}$
We follow the released code to implement the Gradient Reversal Layer. It is controlled by a schedule which gradually increases the weight of the gradients from the domain discrimination loss.
C Source Domain Performance
The original goal of the paper is to use automatically collected sarcasm datasets, which are large but noisy, to improve performance on human-annotated datasets, which are clean and provide good performance measure. That is why we provided only the target domain performance.
Upon close inspection, LOANT also improves the performance on the source domain, even though
$^{6}$ https://github.com/fungtion/DANN
Models	Ptáče → SemEval	Ghosh → SemEval	Ptáče → iSarcasm	Ghosh → iSarcasm
S-BERT	1e-4	1e-4	4e-5	2e-5
MTL	6e-4	8e-5	4e-5	1e-4
MTL+LO	6e-4	8e-5	4e-5	1e-4
ANT	2e-5	4e-5	2e-5	2e-5
ANT+MAML	2e-5	4e-5	2e-5	2e-5
LOANT	2e-5	4e-5	2e-5	2e-5
Table 5: Learning rate chosen by each model on the given search grid.
Domain	ANT	LOANT	MTL	MTL+LO
Ptacek	0.8307	0.8484	0.8640	0.8629
iSarcasm	0.3857	0.4642	0.3767	0.4379
Average	0.6082	0.6563	0.62035	0.6504
Ghosh	0.7345	0.6596	0.6609	0.6688
iSarcasm	0.4063	0.4101	0.3838	0.3953
Average	0.5704	0.5349	0.5224	0.5321
Ptacek	0.8626	0.8612	0.8722	0.8666
SemEval18	0.6348	0.6702	0.6404	0.6598
Average	0.7487	0.7657	0.7563	0.7632
Ghosh	0.7161	0.7752	0.7700	0.7579
SemEval18	0.6626	0.6818	0.6525	0.6622
Average	0.6894	0.7285	0.7113	0.7101
Table 6: Test F1 score for both domains using model selection on the target domain only.
Domain	ANT	LOANT	MTL	MTL+LO
Ptacek	0.8307	0.8484	0.8640	0.8629
iSarcasm	0.3857	0.4642	0.3767	0.4379
Average	0.6082	0.6563	0.6204	0.6504
Ghosh	0.7787	0.7826	0.7859	0.7807
iSarcasm	0.3965	0.3215	0.3764	0.3953
Average	0.5876	0.5521	0.5812	0.5880
Ptacek	0.8567	0.8612	0.8720	0.8632
SemEval18	0.6463	0.6702	0.6594	0.6666
Average	0.7515	0.7657	0.7657	0.7649
Ghosh	0.7919	0.7962	0.7672	0.7884
SemEval18	0.6427	0.6490	0.6357	0.6442
Average	0.7173	0.7226	0.7015	0.7163
Table 7: Test F1 score for both domains using model selection on the average F1 of the two domains.
model selection was performed on the target domain. Table 6shows the results.
In Table 7, we also show the results after model selection on both domains. Naturally, this might lead to slightly lowered target-domain performance than achieved by model selection on target domain only. Comparing LOANT with ANT, and MTL+LO with MTL, our results show that, in most cases, LO-based models improve both source and target domain F1. In particular, target domain F1 obtains more improvement than source domain F1. This suggests that LO provides benefits to knowledge transfer.