{"id":20469033,"url":"https://github.com/pfnet-research/vat_nmt","last_synced_at":"2025-10-05T09:52:04.287Z","repository":{"id":86583235,"uuid":"198980125","full_name":"pfnet-research/vat_nmt","owner":"pfnet-research","description":"Implementation of \"Effective Adversarial Regularization  for Neural Machine Translation\", ACL 2019 ","archived":false,"fork":false,"pushed_at":"2020-01-11T07:11:46.000Z","size":38,"stargazers_count":21,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T10:40:36.549Z","etag":null,"topics":["acl2019","adversarial","neural-machine-translation","nlp","nmt","vat"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pfnet-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-26T08:40:08.000Z","updated_at":"2024-01-04T16:36:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcb707c4-6de8-4e19-96b8-435c6d1b6e0a","html_url":"https://github.com/pfnet-research/vat_nmt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pfnet-research/vat_nmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fvat_nmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fvat_nmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fvat_nmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fvat_nmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfnet-research","download_url":"https://codeload.github.com/pfnet-research/vat_nmt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fvat_nmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278437956,"owners_count":25986760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acl2019","adversarial","neural-machine-translation","nlp","nmt","vat"],"created_at":"2024-11-15T14:07:44.514Z","updated_at":"2025-10-05T09:52:04.275Z","avatar_url":"https://github.com/pfnet-research.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual Adversarial Training for NMT (Transformer model)\nImplementation of \"Effective Adversarial Regularization for Neural Machine Translation\", ACL 2019\n\n## References\nMotoki Sato, Jun Suzuki, Shun Kiyono. \"Effective Adversarial Regularization for Neural Machine Translation\", ACL 2019\n[paper](https://www.aclweb.org/anthology/P19-1020) [bib](https://aclweb.org/anthology/papers/P/P19/P19-1020.bib)\n\n# How to use\n## Requirements\n\n- Python3.6+\n- Chainer 6.x+\n- Cupy 6.x+\n```\n# install chainer and cupy\n$ pip install cupy\n$ pip install chainer\n$ pip install logzero\n```\nPlease see how to install chainer: https://docs.chainer.org/en/stable/install.html\n\n## Train (iwslt2016-de-en)\n```\n$ python3 -u chainer_transformer.py --mode train --gpus 0 --dataset iwslt2016-de-en --seed 1212 --epoch 40 --out model_transformer_de-en\n```\n\n## Train with VAT (iwslt2016-de-en)\n```\n$ python3 -u chainer_transformer.py --mode train --gpus 0 --dataset iwslt2016-de-en --seed 1212 --epoch 40 --out model_transformer_de-en_vat_enc --use-vat 1 --eps 1.0 --perturbation-target 0\n```\n\n### perturbation types\n\n| perturbation-target | (enc, dec, enc-dec) |\n----|----\n| 0 | enc |\n| 1 | dec |\n| 0 1 | enc-dec (both) |\n\n\n### VAT, Adv, VAT-Adv\n| use-vat | (vat, adv, vat-adv) |\n----|----\n| 0 | non (baseline) |\n| 1 | vat |\n| 2 | adv |\n| 3 | vat-adv (both) |\n\n\n## Eval\n```\n$ python3 -u chainer_transformer.py --mode test --gpus 0 --dataset iwslt2016-de-en --batchsize 600 --model model_transformer_de-en/model_epoch_40.npz --beam 20 --max-length 60 --datatype eval1\n```\n\n# License\nMIT License. Please see the LICENSE file for details.\n\n# Authors\nWe thank Takeru Miyato ([@takerum](https://github.com/takerum)), who gave us valuable comments about AdvT/VAT.\n\nThe codebase of the transformer is developed by Shun Kiyono ([@butsugiri](https://github.com/butsugiri))\n\n# Contact\nPlease give me comments or questions: [@aonotas](https://github.com/aonotas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fvat_nmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfnet-research%2Fvat_nmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fvat_nmt/lists"}