{"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/berttune-fine-tuning-neural-machine","title":"BERTTune: Fine-Tuning Neural Machine Translation with BERTScore","arxiv_id":"2106.02208","date":"2021-06-04","proceeding":"ACL 2021 5","authors":["Inigo Jauregi Unanue","Jacob Parnell","Massimo Piccardi"],"abstract":"Neural machine translation models are often biased toward the limited translation references seen during training. To amend this form of overfitting, in this paper we propose fine-tuning the models with a novel training objective based on the recently-proposed BERTScore evaluation metric. BERTScore is a scoring function based on contextual embeddings that overcomes the typical limitations of n-gram-based metrics (e.g. synonyms, paraphrases), allowing translations that are different from the references, yet close in the contextual embedding space, to be treated as substantially correct. To be able to use BERTScore as a training objective, we propose three approaches for generating soft predictions, allowing the network to remain completely differentiable end-to-end. Experiments carried out over four, diverse language pairs have achieved improvements of up to 0.58 pp (3.28%) in BLEU score and up to 0.76 pp (0.98%) in BERTScore (F_BERT) when fine-tuning a strong baseline.","url_abs":"https://arxiv.org/abs/2106.02208v1","url_pdf":"https://arxiv.org/pdf/2106.02208v1.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":"machine-translation","task_name":"Machine Translation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.02208","atlas_url":"https://app.syntology.ai/?focus=2106.02208","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.02208"}},"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/ijauregiCMCRC/fairseq-bert-loss","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":7,"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":4,"samples":[{"code_sha256_prefix":"26da4f92ba56e785","entry":"label_smoothed_nll_loss","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/criterions/lsce_with_bert_regularization.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/criterions/lsce_with_bert_regularization.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26da4f92ba56e785"}},{"code_sha256_prefix":"13ef8eeae8570519","entry":"padding","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/bert_score/utils.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/bert_score/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"13ef8eeae8570519"}},{"code_sha256_prefix":"2c8538aaf671692c","entry":"aligned_bert_loss","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/criterions/aligned_bert_loss.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/criterions/aligned_bert_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"2c8538aaf671692c"}},{"code_sha256_prefix":"01b5843cbc283166","entry":"bert_loss","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/criterions/bert_loss.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/criterions/bert_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"01b5843cbc283166"}},{"code_sha256_prefix":"7e819d1873379c18","entry":"get_model","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/bert_score/utils.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/bert_score/utils.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e819d1873379c18"}},{"code_sha256_prefix":"0a91572da431f7d0","entry":"score","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/bert_score/score.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/bert_score/score.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"0a91572da431f7d0"}},{"code_sha256_prefix":"51475f693de1e034","entry":"sent_encode","repo":"ijauregiCMCRC/fairseq-bert-loss","repo_kind":"found_in_text","path":"fairseq/bert_score/utils.py","file_url":"https://github.com/ijauregiCMCRC/fairseq-bert-loss/blob/HEAD/fairseq/bert_score/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"51475f693de1e034"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}