知识蒸馏是一种通过缩小教师模型与学生模型之间表示差异,将表示信息从教师迁移到学生的方法。该方法的一个挑战是会降低学生表示的灵活性,从而导致对教师知识的不准确学习。为在迁移过程中解决这一问题,我们研究了针对三类表示结构的蒸馏:特征内结构、局部特征间结构和全局特征间结构。为迁移这些结构,我们提出了基于中心化核对齐(Centered Kernel Alignment)的特征结构蒸馏方法,该方法为相似的特征结构赋予一致的值,并揭示更具信息量的关系。特别地,针对全局结构,我们实现了一种结合聚类的记忆增强迁移方法。我们使用具有代表性的神经语言模型——来自Transformer的双向编码器表示(Bidirectional Encoder Representations from Transformers,BERT),在GLUE数据集的九项语言理解任务上对这些方法进行了实证分析。结果表明,所提出的方法能够有效迁移这三类结构,并且与最先进的蒸馏方法相比提升了性能。此外,这些方法的代码可在https://github.com/maroo-sky/FSD获取。
英文摘要:
Knowledge distillation is an approach to transfer information on representations from a teacher to a student by reducing their difference. A challenge of this approach is to reduce the flexibility of the student's representations inducing inaccurate learning of the teacher's knowledge. To resolve it in transferring, we investigate distillation of structures of representations specified to three types: intra-feature, local inter-feature, global inter-feature structures. To transfer them, we introduce feature structure distillation methods based on the Centered Kernel Alignment, which assigns a consistent value to similar features structures and reveals more informative relations. In particular, a memory-augmented transfer method with clustering is implemented for the global structures. The methods are empirically analyzed on the nine tasks for language understanding of the GLUE dataset with Bidirectional Encoder Representations from Transformers (BERT), which is a representative neural language model. In the results, the proposed methods effectively transfer the three types of structures and improve performance compared to state-of-the-art distillation methods. Indeed, the code for the methods is available in https://github.com/maroo-sky/FSD.
Recently, BERT has become an essential ingredient of various NLP deep models due to its effectiveness and universal-usability. However, the online deployment of BERT is often blocked by its large-scale parameters and high computational cost. There are plenty of studies showing that the knowledge distillation is efficient in transferring the knowledge from BERT into the model with a smaller size of parameters. Nevertheless, current BERT distillation approaches mainly focus on task-specified distillation, such methodologies lead to the loss of the general semantic knowledge of BERT for universal…
University of Eastern Finland(东芬兰大学);Aalto University(阿尔托大学)
In recent years, transformer models have achieved great success in natural language processing (NLP) tasks. Most of the current state-of-the-art NLP results are achieved by using monolingual transformer models, where the model is pre-trained using a single language unlabelled text corpus. Then, the model is fine-tuned to the specific downstream task. However, the cost of pre-training a new transformer model is high for most languages. In this work, we propose a cost-effective transfer learning method to adopt a strong source language model, trained from a large monolingual corpus to a low-reso…
Answering questions is a primary goal of many conversational systems or search products. While most current systems have focused on answering questions against structured databases or curated knowledge graphs, on-line community forums or frequently asked questions (FAQ) lists offer an alternative source of information for question answering systems. Automatic duplicate question detection (DQD) is the key technology need for question answering systems to utilize existing online forums like StackExchange. Existing annotations of duplicate questions in such forums are community-driven, making the…
Exploring Linguistic Properties of Monolingual BERTs with Typological Classification among Languages
University of Rome Tor Vergata(罗马第二大学);University for foreigners of Siena(锡耶纳外国人大学);Campus Bio-Medico University of Rome(罗马校园生物医学大学);Idiap Research Institute(伊迪亚普研究所)
Pre-trained models have demonstrated their effectiveness in many downstream natural language processing (NLP) tasks. The availability of multilingual pre-trained models enables zero-shot transfer of NLP tasks from high resource languages to low resource ones. However, recent research in improving pre-trained models focuses heavily on English. While it is possible to train the latest neural architectures for other languages from scratch, it is undesirable due to the required amount of compute. In this work, we tackle the problem of transferring an existing pre-trained model from English to othe…
This paper studies the efficiency of transferring BERT learnings to low complexity models like BiLSTM, BiLSTM with attention and shallow CNNs using sentiment analysis on SST-2 dataset. It also compares the complexity of inference of the BERT model with these lower complexity models and underlines the importance of these techniques in enabling high performance NLP models on edge devices like mobiles, tablets and MCU development boards like Raspberry Pi etc. and enabling exciting new applications.
University of Chinese Academy of Sciences(中国科学院大学);NLPR, Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所模式识别国家重点实验室);CAS Center for Excellence in Brain Science and Intelligence Technology(中国科学院脑科学与智能技术卓越创新中心)
Attention-based encoder-decoder (AED) models have achieved promising performance in speech recognition. However, because the decoder predicts text tokens (such as characters or words) in an autoregressive manner, it is difficult for an AED model to predict all tokens in parallel. This makes the inference speed relatively slow. We believe that because the encoder already captures the whole speech utterance, which has the token-level relationship implicitly, we can predict a token without explicitly autoregressive language modeling. When the prediction of a token does not rely on other tokens, t…
Tencent Cloud Xiaowei(腾讯云小微);Institute of Acoustics, CAS(中国科学院声学研究所);University of Chinese Academy of Sciences(中国科学院大学)
Recently, end-to-end automatic speech recognition models based on connectionist temporal classification (CTC) have achieved impressive results, especially when fine-tuned from wav2vec2.0 models. Due to the conditional independence assumption, CTC-based models are always weaker than attention-based encoder-decoder models and require the assistance of external language models (LMs). To solve this issue, we propose two knowledge transferring methods that leverage pre-trained LMs, such as BERT and GPT2, to improve CTC-based models. The first method is based on representation learning, in which the…
Cross-lingual text classification alleviates the need for manually labeled documents in a target language by leveraging labeled documents from other languages. Existing approaches for transferring supervision across languages require expensive cross-lingual resources, such as parallel corpora, while less expensive cross-lingual representation learning approaches train classifiers without target labeled documents. In this work, we propose a cross-lingual teacher-student method, CLTS, that generates "weak" supervision in the target language using minimal cross-lingual resources, in the form of a…
Many NLP tasks have benefited from transferring knowledge from contextualized word embeddings, however the picture of what type of knowledge is transferred is incomplete. This paper studies the types of linguistic phenomena accounted for by language models in the context of a Conversational Question Answering (CoQA) task. We identify the problematic areas for the finetuned RoBERTa, BERT and DistilBERT models through systematic error analysis - basic arithmetic (counting phrases), compositional semantics (negation and Semantic Role Labeling), and lexical semantics (surprisal and antonymy). When…
National University of Defense Technology(国防科技大学);Information Engineering University(信息工程大学)
In light of the success of transferring language models into NLP tasks, we ask whether the full BERT model is always the best and does it exist a simple but effective method to find the winning ticket in state-of-the-art deep neural networks without complex calculations. We construct a series of BERT-based models with different size and compare their predictions on 8 binary classification tasks. The results show there truly exist smaller sub-networks performing better than the full model. Then we present a further study and propose a simple method to shrink BERT appropriately before fine-tunin…
Huazhong University of Science and Technology(华中科技大学);Huawei Technologies Co., Ltd.(华为技术有限公司)
The multilingual pre-trained language models (e.g, mBERT, XLM and XLM-R) have shown impressive performance on cross-lingual natural language understanding tasks. However, these models are computationally intensive and difficult to be deployed on resource-restricted devices. In this paper, we propose a simple yet effective distillation method (LightMBERT) for transferring the cross-lingual generalization ability of the multilingual BERT to a small student model. The experiment results empirically demonstrate the efficiency and effectiveness of LightMBERT, which is significantly better than the …
Recent developments in natural language representations have been accompanied by large and expensive models that leverage vast amounts of general-domain text through self-supervised pre-training. Due to the cost of applying such models to down-stream tasks, several model compression techniques on pre-trained language representations have been proposed (Sun et al., 2019; Sanh, 2019). However, surprisingly, the simple baseline of just pre-training and fine-tuning compact models has been overlooked. In this paper, we first show that pre-training remains important in the context of smaller archite…
Paul G. Allen School of CSE, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院);Google AI Language(谷歌AI语言部门)
In this paper we study yes/no questions that are naturally occurring --- meaning that they are generated in unprompted and unconstrained settings. We build a reading comprehension dataset, BoolQ, of such questions, and show that they are unexpectedly challenging. They often query for complex, non-factoid information, and require difficult entailment-like inference to solve. We also explore the effectiveness of a range of transfer learning baselines. We find that transferring from entailment data is more effective than transferring from paraphrase or extractive QA data, and that it, surprisingl…
The First Affiliated Hospital of Jinan University(暨南大学附属第一医院);The Fifth Affiliated Hospital of Sun Yat-sen University(中山大学附属第五医院);Shenzhen Research Institute of Big Data(深圳大数据研究院);The Chinese University of Hong Kong(香港中文大学);Future Network of Intelligence Institute (FNii)(未来智能网络研究院);Sun Yat-sen University(中山大学);Jinan University(暨南大学);Guangdong Provincial Key Laboratory of Big Data Computing(广东省大数据计算重点实验室)
Medical imaging technologies, including computed tomography (CT) or chest X-Ray (CXR), are largely employed to facilitate the diagnosis of the COVID-19. Since manual report writing is usually too time-consuming, a more intelligent auxiliary medical system that could generate medical reports automatically and immediately is urgently needed. In this article, we propose to use the medical visual language BERT (Medical-VLBERT) model to identify the abnormality on the COVID-19 scans and generate the medical report automatically based on the detected lesion regions. To produce more accurate medical …
Emo Pillars: Knowledge Distillation to Support Fine-Grained Context-Aware and Context-Less Emotion Classification
NLP Group, Pompeu Fabra University, Barcelona, Spain(自然语言处理组,庞培法布拉大学,巴塞罗那,西班牙);Language Technologies Unit, Barcelona Supercomputing Center, Spain(语言技术单元,巴塞罗那超级计算中心,西班牙)
Transferring Natural Language Datasets Between Languages Using Large Language Models for Modern Decision Support and Sci-Tech Analytical Systems
Faculty of Physics and Mathematics and Natural Sciences, RUDN University(俄罗斯人民友谊大学物理与数学及自然科学学院);Institute for Information Transmission Problems of the Russian Academy of Sciences(俄罗斯科学院信息传输问题研究所);Ivannikov Institute for System Programming of the Russian Academy of Sciences(俄罗斯科学院伊万诺夫系统编程研究所)
NLP systems typically require support for more than one language. As different languages have different amounts of supervision, cross-lingual transfer benefits languages with little to no training data by transferring from other languages. From an engineering perspective, multilingual NLP benefits development and maintenance by serving multiple languages with a single system. Both cross-lingual transfer and multilingual NLP rely on cross-lingual representations serving as the foundation. As BERT revolutionized representation learning and NLP, it also revolutionized cross-lingual representation…
Johns Hopkins University(约翰斯·霍普金斯大学);University of Maryland(马里兰大学)
A popular approach to creating a zero-shot cross-language retrieval model is to substitute a monolingual pretrained language model in the retrieval model with a multilingual pretrained language model such as Multilingual BERT. This multilingual model is fined-tuned to the retrieval task with monolingual data such as English MS MARCO using the same training recipe as the monolingual retrieval model used. However, such transferred models suffer from mismatches in the languages of the input text during training and inference. In this work, we propose transferring monolingual retrieval models usin…
Distilling Large Language Models for Efficient Clinical Information Extraction
Poolesville High School(普尔斯维尔高中);University of California Santa Cruz(加州大学圣克鲁兹分校);Stanford University School of Medicine(斯坦福大学医学院);Clinical Excellence Research Center(临床卓越研究中心);Stanford Health Care(斯坦福医疗保健系统)
Pretrained language models (PLMs) such as BERT adopt a training paradigm which first pretrain the model in general data and then finetune the model on task-specific data, and have recently achieved great success. However, PLMs are notorious for their enormous parameters and hard to be deployed on real-life applications. Knowledge distillation has been prevailing to address this problem by transferring knowledge from a large teacher to a much smaller student over a set of data. We argue that the selection of thee three key components, namely teacher, training data, and learning objective, is cr…
Decoding Student Minds: Leveraging Conversational Agents for Psychological and Learning Analysis
STIH Laboratory, Sorbonne University(索邦大学STIH实验室);LIPAH-LR11ES14, National Engineering School of Tunis(突尼斯国家工程学院LIPAH-LR11ES14);Faculty of Sciences of Tunis(突尼斯科学学院);LINFI Laboratory(LINFI实验室)
Faculty of Computer Science and Engineering(计算机科学与工程学院)
The challenge of recognizing named entities in a given text has been a very dynamic field in recent years. This is due to the advances in neural network architectures, increase of computing power and the availability of diverse labeled datasets, which deliver pre-trained, highly accurate models. These tasks are generally focused on tagging common entities, but domain-specific use-cases require tagging custom entities which are not part of the pre-trained models. This can be solved by either fine-tuning the pre-trained models, or by training custom models. The main challenge lies in obtaining r…