{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-to-augment-for-data-scarce-domain","title":"Learning to Augment for Data-Scarce Domain BERT Knowledge Distillation","arxiv_id":"2101.08106","date":"2021-01-20","proceeding":null,"authors":["Lingyun Feng","Minghui Qiu","Yaliang Li","Hai-Tao Zheng","Ying Shen"],"abstract":"Despite pre-trained language models such as BERT have achieved appealing performance in a wide range of natural language processing tasks, they are computationally expensive to be deployed in real-time applications. A typical method is to adopt knowledge distillation to compress these large pre-trained models (teacher models) to small student models. However, for a target domain with scarce training data, the teacher can hardly pass useful knowledge to the student, which yields performance degradation for the student models. To tackle this problem, we propose a method to learn to augment for data-scarce domain BERT knowledge distillation, by learning a cross-domain manipulation scheme that automatically augments the target with the help of resource-rich source domains. Specifically, the proposed method generates samples acquired from a stationary distribution near the target data and adopts a reinforced selector to automatically refine the augmentation strategy according to the performance of the student. Extensive experiments demonstrate that the proposed method significantly outperforms state-of-the-art baselines on four different tasks, and for the data-scarce domains, the compressed student models even perform better than the original large teacher model, with much fewer parameters (only ${\\sim}13.3\\%$) when only a few labeled examples available.","url_abs":"https://arxiv.org/abs/2101.08106v2","url_pdf":"https://arxiv.org/pdf/2101.08106v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[],"tasks":[{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2101.08106","atlas_url":"https://app.syntology.ai/?focus=2101.08106","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2101.08106"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/huawei-noah/Pretrained-Language-Model","reach":null}],"summary":{"ran":2,"unverified":13},"by_repo_kind":{"found_in_text":{"samples":15,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":15,"samples":[{"code_sha256_prefix":"c1293a0be49a8674","entry":"SuperBertIntermediate","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c1293a0be49a8674"}},{"code_sha256_prefix":"e6311f65af5f9840","entry":"SuperBertPooler","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e6311f65af5f9840"}},{"code_sha256_prefix":"92bb80eba426ec5f","entry":"BertConfig","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"92bb80eba426ec5f"}},{"code_sha256_prefix":"aa473329a2bdbd95","entry":"BertPreTrainedModel","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aa473329a2bdbd95"}},{"code_sha256_prefix":"334a8d97f2ffa8a3","entry":"SuperBertAttention","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"334a8d97f2ffa8a3"}},{"code_sha256_prefix":"1c3e57fe19c49c14","entry":"SuperBertEmbeddings","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c3e57fe19c49c14"}},{"code_sha256_prefix":"4cb493cd45952cc0","entry":"SuperBertEncoder","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4cb493cd45952cc0"}},{"code_sha256_prefix":"977b5ff098ce7872","entry":"SuperBertLayer","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"977b5ff098ce7872"}},{"code_sha256_prefix":"e86b5457a91cc855","entry":"SuperBertLayerNorm","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e86b5457a91cc855"}},{"code_sha256_prefix":"cd3c1431cd8eacc2","entry":"SuperBertModel","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cd3c1431cd8eacc2"}},{"code_sha256_prefix":"f4e5fbf0df9c65ad","entry":"SuperBertOutput","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4e5fbf0df9c65ad"}},{"code_sha256_prefix":"a98f9a3c4ea098b0","entry":"SuperBertSelfAttention","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a98f9a3c4ea098b0"}},{"code_sha256_prefix":"10cb79ce31e3d2ce","entry":"SuperBertSelfOutput","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"10cb79ce31e3d2ce"}},{"code_sha256_prefix":"981046902300b03e","entry":"SuperEmbedding","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"981046902300b03e"}},{"code_sha256_prefix":"9c9f54b844986280","entry":"SuperLinear","repo":"huawei-noah/Pretrained-Language-Model","repo_kind":"found_in_text","path":"AutoTinyBERT/transformer/modeling_super_kd.py","file_url":"https://github.com/huawei-noah/Pretrained-Language-Model/blob/HEAD/AutoTinyBERT/transformer/modeling_super_kd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9c9f54b844986280"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}