Proceedings

Sentence-Level or Token-Level? A Comprehensive Study on Knowledge Distillation

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. Main Track. Pages 6531-6540.

https://doi.org/10.24963/ijcai.2024/722

Abstract

Knowledge distillation, transferring knowledge from a teacher model to a student model, has emerged as a powerful technique in neural machine translation for compressing models or simplifying training targets. Knowledge distillation encompasses two primary methods: sentence-level distillation and token-level distillation. In sentence-level distillation, the student model is trained to align with the output of the teacher model, which can alleviate the training difficulty and give student model a comprehensive understanding of global structure. Differently, token-level distillation requires the student model to learn the output distribution of the teacher model, facilitating a more fine-grained transfer of knowledge. Studies have revealed divergent performances between sentence-level and token-level distillation across different scenarios, leading to the confusion on the empirical selection of knowledge distillation methods. In this study, we argue that token-level distillation, with its more complex objective (i.e., distribution), is better suited for “simple” scenarios, while sentence-level distillation excels in “complex” scenarios. To substantiate our hypothesis, we systematically analyze the performance of distillation methods by varying the model size of student models, the complexity of text, and the difficulty of decoding procedure. While our experimental results validate our hypothesis, defining the complexity level of a given scenario remains a challenging task. So we further introduce a novel hybrid method that combines token-level and sentence-level distillation through a gating mechanism, aiming to leverage the advantages of both individual methods. Experiments demonstrate that the hybrid method surpasses the performance of token-level or sentence-level distillation methods and the previous works by a margin, demonstrating the effectiveness of the proposed hybrid method.

  1. [Baskar et al., 2019] Murali Karthick Baskar, Lukáš Bur- get, Shinji Watanabe, Martin Karafiát, Takaaki Hori, and Jan Honza Černockỳ. Promising accurate prefix boosting for sequence-to-sequence asr. In ICASSP, pages 5646-5650. IEEE, 2019.
  2. [Blain et al., 2023] Frédéric Blain, Chrysoula Zerva, Ricardo Ribeiro, Nuno M Guerreiro, Diptesh Kanojia, José GC de Souza, Beatriz Silva, Tânia Vaz, Yan Jingxuan, Fatemeh Azadi, et al. Findings of the wmt 2023 shared task on quality estimation. In Proceedings of the Eighth Conference on Machine Translation, pages 629-653, 2023.
  3. [Chen et al., 2020] Yen-Chun Chen, Zhe Gan, Yu Cheng, Jingzhou Liu, and Jingjing Liu. Distilling knowledge learned in bert for text generation. In ACL, pages 7893- 7905, 2020.
  4. [Deng et al., 2023] Hexuan Deng, Liang Ding, Xuebo Liu, Meishan Zhang, Dacheng Tao, and Min Zhang. Improving simultaneous machine translation with monolingual data. In AAAI, pages 12728-12736, 2023.
  5. [Ding et al., 2020] Liang Ding, Longyue Wang, Xuebo Liu, Derek F Wong, Dacheng Tao, and Zhaopeng Tu. Understanding and improving lexical choice in non- autoregressive translation. In ICLR, 2020.
  6. [Ding et al., 2021] Liang Ding, Longyue Wang, Xuebo Liu, Derek F Wong, Dacheng Tao, and Zhaopeng Tu. Pro- gressive multi-granularity training for non-autoregressive translation. In Findings of the ACL-IJCNLP 2021, pages 2797-2803, 2021.
  7. [Edunov et al., 2018] Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. Understanding back-translation at scale. In EMNLP, pages 489-500, 2018.
  8. [Farinha et al., 2022] Ana C Farinha, M Amin Farajian, Mar- ianna Buchicchio, Patrick Fernandes, José GC De Souza, Helena Moniz, and André FT Martins. Findings of the wmt 2022 shared task on chat translation. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 724-743, 2022.
  9. [Freitag et al., 2017] Markus Freitag, Yaser Al-Onaizan, and Baskaran Sankaran. Ensemble distillation for neural ma- chine translation. arXiv preprint arXiv:1702.01802, 2017.
  10. [Gajbhiye et al., 2021] Amit Gajbhiye, Marina Fomicheva, Fernando Alva-Manchego, Frédéric Blain, Abiola Oba- muyide, Nikolaos Aletras, and Lucia Specia. Knowledge distillation for quality estimation. In ACL, pages 5091- 5099, 2021.
  11. [Gao et al., 2022] Pengzhi Gao, Zhongjun He, Hua Wu, and Haifeng Wang. Bi-simcut: A simple strategy for boosting neural machine translation. In NAACL, pages 3938-3948, 2022.
  12. [Ge et al., 2023] Ling Ge, Chunming Hu, Guanghui Ma, Hong Zhang, and Jihong Liu. Prokd: an unsupervised pro- totypical knowledge distillation network for zero-resource cross-lingual named entity recognition. In AAAI, pages 12818-12826, 2023.
  13. [Gou et al., 2021] Jianping Gou, Baosheng Yu, Stephen J Maybank, and Dacheng Tao. Knowledge distillation: A sur- vey. International Journal of Computer Vision, 129:1789- 1819, 2021.
  14. [He et al., 2021] Haoyu He, Xingjian Shi, Jonas Mueller, Sheng Zha, Mu Li, and George Karypis. Distiller: A systematic study of model distillation methods in natural language processing. In Proceedings of the Second Work- shop on Simple and Efficient Natural Language Processing, pages 119-133, 2021.
  15. [Hinton et al., 2015] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
  16. [Iyer et al., 2023] Nikhil Iyer, V. Thejas, Nipun Kwatra, Ra- machandran Ramjee, and Muthian Sivathanu. Wide- minima density hypothesis and the explore-exploit learning rate schedule. Journal of Machine Learning Research, 24(65):1-37, 2023.
  17. [Jaszkiewicz and Słowiński, 1999] Andrzej Jaszkiewicz and Roman Słowiński. The 'light beam search'approach-an overview of methodology applications. European Journal of Operational Research, 113(2):300-314, 1999.
  18. [Kambhatla et al., 2022] Nishant Kambhatla, Logan Born, and Anoop Sarkar. Cipherdaug: Ciphertext based data augmentation for neural machine translation. In Proceed- ings of the ACL, pages 201-218, 2022.
  19. [Kim and Rush, 2016] Yoon Kim and Alexander M Rush. Sequence-level knowledge distillation. In EMNLP, pages 1317-1327, 2016.
  20. [Lamb et al., 2016] Alex M Lamb, Anirudh Goyal ALIAS PARTH GOYAL, Ying Zhang, Saizheng Zhang, Aaron C Courville, and Yoshua Bengio. Professor forcing: A new algorithm for training recurrent networks. NeurIPS, 29, 2016.
  21. [Lee et al., 2022] Dongkyu Lee, Zhiliang Tian, Yingxiu Zhao, Ka Chun Cheung, and Nevin Zhang. Hard gate knowledge distillation-leverage calibration for robust and reliable lan- guage model. In EMNLP, pages 9793-9803, 2022.
  22. [Lei et al., 2022] Yuanyuan Lei, Ruihong Huang, Lu Wang, and Nick Beauchamp. Sentence-level media bias analysis informed by discourse structures. In EMNLP, pages 10040- 10050, 2022.
  23. [Li et al., 2021] Zheng Li, Danqing Zhang, Tianyu Cao, Ying Wei, Yiwei Song, and Bing Yin. Metats: Meta teacher- student network for multilingual sequence labeling with minimal supervision. In EMNLP, pages 3183-3196, 2021.
  24. [Liao et al., 2020] Baohao Liao, Yingbo Gao, and Hermann Ney. Multi-agent mutual learning at sentence-level and token-level for neural machine translation. In EMNLP, pages 1715-1724, 2020.
  25. [Liu et al., 2020] Yuang Liu, Wei Zhang, and Jun Wang. Adaptive multi-teacher multi-level knowledge distillation. Neurocomputing, 415:106-113, 2020.
  26. [Lohrenz et al., 2023] Timo Lohrenz, Björn Möller, Zhengyang Li, and Tim Fingscheidt. Relaxed attention for transformer models. In IJCNN, pages 1-10, 2023.
  27. [Ma et al., 2023] Cong Ma, Yaping Zhang, Mei Tu, Yang Zhao, Yu Zhou, and Chengqing Zong. Multi-teacher knowl- edge distillation for end-to-end text image machine transla- tion. In ICDAR, pages 484-501. Springer, 2023.
  28. [Mhamdi et al., 2023] Meryem Mhamdi, Jonathan May, Franck Dernoncourt, Trung Bui, and Seunghyun Yoon. Multilingual sentence-level semantic search using meta- distillation learning. arXiv preprint arXiv:2309.08185, 2023.
  29. [Mun'im et al., 2019] Raden Mu'az Mun'im, Nakamasa In- oue, and Koichi Shinoda. Sequence-level knowledge distil- lation for model compression of attention-based sequence- to-sequence speech recognition. In ICASSP, pages 6151- 6155, 2019.
  30. [Oka et al., 2021] Yui Oka, Katsuhito Sudoh, and Satoshi Nakamura. Using perturbed length-aware positional en- coding for non-autoregressive neural machine translation. arXiv preprint arXiv:2107.13689, 2021.
  31. [Ott et al., 2019] Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for se- quence modeling. In NAACL, pages 48-53, 2019.
  32. [Peng et al., 2023] Keqin Peng, Liang Ding, Qihuang Zhong, Yuanxin Ouyang, Wenge Rong, Zhang Xiong, and Dacheng Tao. Token-level self-evolution training for sequence-to- sequence learning. In Proceedings of the ACL, pages 841- 850, 2023.
  33. [Phuong and Lampert, 2019] Mary Phuong and Christoph Lampert. Towards understanding knowledge distillation. In ICML, pages 5142-5151. PMLR, 2019.
  34. [Ren et al., 2019] Yi Ren, Yangjun Ruan, Xu Tan, Tao Qin, Sheng Zhao, Zhou Zhao, and Tie-Yan Liu. Fastspeech: Fast, robust and controllable text to speech. NeurIPS, 32, 2019.
  35. [Shao et al., 2022] Chenze Shao, Xuanfu Wu, and Yang Feng. One reference is not enough: Diverse distillation with reference selection for non-autoregressive translation. In NAACL, pages 3779-3791, 2022.
  36. [Shen et al., 2020] Dinghan Shen, Mingzhi Zheng, Yelong Shen, Yanru Qu, and Weizhu Chen. A simple but tough-to-beat data augmentation approach for natural lan- guage understanding and generation. arXiv preprint arXiv:2009.13818, 2020.
  37. [Stahlberg, 2020] Felix Stahlberg. Neural machine transla- tion: A review. Journal of Artificial Intelligence Research, 69:343-418, 2020.
  38. [Sun et al., 2019] Hao Sun, Xu Tan, Jun-Wei Gan, Hongzhi Liu, Sheng Zhao, Tao Qin, and Tie-Yan Liu. Token-level ensemble distillation for grapheme-to-phoneme conversion. In ISCA, pages 2115-2119, 2019.
  39. [Sun et al., 2020] Haipeng Sun, Rui Wang, Kehai Chen, Masao Utiyama, Eiichiro Sumita, and Tiejun Zhao. Knowl- edge distillation for multilingual unsupervised neural ma- chine translation. In ACL, pages 3525-3535, 2020.
  40. [Tan et al., 2019] Xu Tan, Yi Ren, Di He, Tao Qin, Zhou Zhao, and Tie-Yan Liu. Multilingual neural machine trans- lation with knowledge distillation. In ICLR, 2019.
  41. [Tan et al., 2022] Qingyu Tan, Ruidan He, Lidong Bing, and Hwee Tou Ng. Document-level relation extraction with adaptive focal loss and knowledge distillation. In ACL, pages 1672-1681, 2022.
  42. [Tang et al., 2019] Raphael Tang, Yao Lu, Linqing Liu, Lili Mou, Olga Vechtomova, and Jimmy Lin. Distilling task- specific knowledge from bert into simple neural networks. arXiv preprint arXiv:1903.12136, 2019.
  43. [Tang et al., 2021] Zineng Tang, Jaemin Cho, Hao Tan, and Mohit Bansal. Vidlankd: Improving language under- standing via video-distilled knowledge transfer. NeurIPS, 34:24468-24481, 2021.
  44. [Toomarian and Barhen, 1992] Nikzad Benny Toomarian and Jacob Barhen. Learning a trajectory using adjoint functions and teacher forcing. Neural networks, 5(3):473-484, 1992.
  45. [Wang and Yoon, 2021] Lin Wang and Kuk-Jin Yoon. Knowl- edge distillation and student-teacher learning for visual in- telligence: A review and new outlooks. IEEE transactions on pattern analysis and machine intelligence, 44(6):3048- 3068, 2021.
  46. [Wang et al., 2020] Xinyu Wang, Yong Jiang, Nguyen Bach, Tao Wang, Fei Huang, and Kewei Tu. Structure-level knowl- edge distillation for multilingual sequence labeling. In ACL, pages 3317-3330, 2020.
  47. [Wang et al., 2021] Fusheng Wang, Jianhao Yan, Fandong Meng, and Jie Zhou. Selective knowledge distillation for neural machine translation. In ACL and IJCAI, pages 6456- 6466, 2021.
  48. [Wu et al., 2021] Lijun Wu, Juntao Li, Yue Wang, Qi Meng, Tao Qin, Wei Chen, Min Zhang, Tie-Yan Liu, et al. R- drop: Regularized dropout for neural networks. NeurIPS, 34:10890-10905, 2021.
  49. [Xiao et al., 2023] Yisheng Xiao, Lijun Wu, Junliang Guo, Juntao Li, Min Zhang, Tao Qin, and Tie-yan Liu. A survey on non-autoregressive generation for neural machine trans- lation and beyond. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023.
  50. [Xu et al., 2021a] Haoran Xu, Benjamin Van Durme, and Kenton W. Murray. Bert, mbert, or bibert? A study on contextualized embeddings for neural machine translation. In EMNLP, pages 6663-6675, 2021.
  51. [Xu et al., 2021b] Weijia Xu, Shuming Ma, Dongdong Zhang, and Marine Carpuat. How does distilled data complexity impact the quality and confidence of non- autoregressive machine translation? In ACL, pages 4392- 4400, 2021.
  52. [Yang et al., 2022a] Zhixian Yang, Renliang Sun, and Xiao- jun Wan. Nearest neighbor knowledge distillation for neural machine translation. In NAACL, pages 5546-5556, 2022.
  53. [Yang et al., 2022b] Zhixian Yang, Renliang Sun, and Xiao- jun Wan. Nearest neighbor knowledge distillation for neural machine translation. In NAACL, pages 5546-5556, 2022.
  54. [Zhang et al., 2019] Biao Zhang, Deyi Xiong, Jinsong Su, and Jiebo Luo. Future-aware knowledge distillation for neural machine translation. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 27(12):2278- 2287, 2019.
  55. [Zhang et al., 2022] Lin Zhang, Li Shen, Liang Ding, Dacheng Tao, and Ling-Yu Duan. Fine-tuning global model via data-free knowledge distillation for non-iid federated learning. In CVPR, pages 10174-10183, 2022.
  56. [Zhang et al., 2024] Shuoxi Zhang, Hanpeng Liu, and Kun He. Knowledge distillation via token-level relationship graph based on the big data technologies. Big Data Re- search, page 100438, 2024.
  57. [Zhou et al., 2020] Chunting Zhou, Jiatao Gu, and Graham Neubig. Understanding knowledge distillation in non- autoregressive machine translation. In ICLR, 2020.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards