{"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/virtual-adversarial-training-a-regularization","title":"Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning","arxiv_id":"1704.03976","date":"2017-04-13","proceeding":null,"authors":["Takeru Miyato","Shin-ichi Maeda","Masanori Koyama","Shin Ishii"],"abstract":"We propose a new regularization method based on virtual adversarial loss: a\nnew measure of local smoothness of the conditional label distribution given\ninput. Virtual adversarial loss is defined as the robustness of the conditional\nlabel distribution around each input data point against local perturbation.\nUnlike adversarial training, our method defines the adversarial direction\nwithout label information and is hence applicable to semi-supervised learning.\nBecause the directions in which we smooth the model are only \"virtually\"\nadversarial, we call our method virtual adversarial training (VAT). The\ncomputational cost of VAT is relatively low. For neural networks, the\napproximated gradient of virtual adversarial loss can be computed with no more\nthan two pairs of forward- and back-propagations. In our experiments, we\napplied VAT to supervised and semi-supervised learning tasks on multiple\nbenchmark datasets. With a simple enhancement of the algorithm based on the\nentropy minimization principle, our VAT achieves state-of-the-art performance\nfor semi-supervised learning tasks on SVHN and CIFAR-10.","url_abs":"http://arxiv.org/abs/1704.03976v2","url_pdf":"http://arxiv.org/pdf/1704.03976v2.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":[{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/takerum/vat_chainer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/takerum/vat_tf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/9310gaurav/virtual-adversarial-training","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/JohnYKiyo/VAT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/LYWH/oppo_face_vat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/TOA-ZR/VATcode","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/cherise215/maxstyle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/deepaks2112/vat_lds","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/likelion-hyeonjun/VAT_PYTORCH","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/lyakaap/VAT-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/maxwell0027/pefat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/rtavenar/keras_vat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/tensorflow/neural-structured-learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"virtual-adversarial-training-a-regularization","repo_url":"https://github.com/reeered/VAT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"semi-supervised-image-classification","task_name":"Semi-Supervised Image Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-6","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 250 Labels","model":"VAT","rank_in_archive_order":24,"of":27,"metrics":{"Percentage error":"36.03"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 4000 Labels","model":"VAT+EntMin","rank_in_archive_order":41,"of":49,"metrics":{"Percentage error":"10.55"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 4000 Labels","model":"VAT","rank_in_archive_order":43,"of":49,"metrics":{"Percentage error":"11.36"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn","task":"Semi-Supervised Image Classification","dataset":"SVHN, 1000 labels","model":"VAT","rank_in_archive_order":15,"of":17,"metrics":{"Accuracy":"94.58"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn-1","task":"Semi-Supervised Image Classification","dataset":"SVHN, 250 Labels","model":"VAT","rank_in_archive_order":13,"of":15,"metrics":{"Accuracy":"91.59"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-3","task":"Semi-Supervised Image Classification","dataset":"cifar10, 250 Labels","model":"VAT","rank_in_archive_order":4,"of":4,"metrics":{"Percentage correct":"63.97"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1704.03976","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1704.03976"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LYWH/oppo_face_vat","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deepaks2112/vat_lds","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lyakaap/VAT-pytorch","reach":{"status":"unanswered"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/takerum/vat","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/takerum/vat_chainer","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maxwell0027/pefat","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cherise215/maxstyle","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rtavenar/keras_vat","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JohnYKiyo/VAT","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/9310gaurav/virtual-adversarial-training","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TOA-ZR/VATcode","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/reeered/VAT","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/takerum/vat_tf","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/likelion-hyeonjun/VAT_PYTORCH","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tensorflow/neural-structured-learning","reach":null}],"summary":{"ran":3,"ran_draft_wrong":5,"ran_violates":2,"ran_fixture":1,"unverified":2},"by_repo_kind":{"listed":{"samples":13,"ran":11,"repositories":6}},"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":11,"samples":[{"code_sha256_prefix":"8bf9288f27b1cdee","entry":"VATLoss","repo":"JohnYKiyo/VAT","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/JohnYKiyo/VAT/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8bf9288f27b1cdee"}},{"code_sha256_prefix":"beee0131e9cc6d75","entry":"VATLoss","repo":"likelion-hyeonjun/VAT_PYTORCH","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/likelion-hyeonjun/VAT_PYTORCH/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"beee0131e9cc6d75"}},{"code_sha256_prefix":"03e3536d888d36f6","entry":"VATLoss","repo":"LYWH/oppo_face_vat","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/LYWH/oppo_face_vat/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"03e3536d888d36f6"}},{"code_sha256_prefix":"195da81a35fac4c0","entry":"_disable_tracking_bn_stats","repo":"likelion-hyeonjun/VAT_PYTORCH","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/likelion-hyeonjun/VAT_PYTORCH/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"195da81a35fac4c0"}},{"code_sha256_prefix":"8783f770c09f42c0","entry":"_kl_div","repo":"JohnYKiyo/VAT","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/JohnYKiyo/VAT/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8783f770c09f42c0"}},{"code_sha256_prefix":"e9ad1c524415f51a","entry":"_l2_normalize","repo":"JohnYKiyo/VAT","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/JohnYKiyo/VAT/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e9ad1c524415f51a"}},{"code_sha256_prefix":"a3bc3a948b4efb17","entry":"_l2_normalize","repo":"likelion-hyeonjun/VAT_PYTORCH","repo_kind":"listed","path":"vat.py","file_url":"https://github.com/likelion-hyeonjun/VAT_PYTORCH/blob/HEAD/vat.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a3bc3a948b4efb17"}},{"code_sha256_prefix":"086369d12e1ad6a7","entry":"_l2_normalize","repo":"9310gaurav/virtual-adversarial-training","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/9310gaurav/virtual-adversarial-training/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"086369d12e1ad6a7"}},{"code_sha256_prefix":"38eb87363cf326f2","entry":"kl_div_with_logit","repo":"9310gaurav/virtual-adversarial-training","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/9310gaurav/virtual-adversarial-training/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"38eb87363cf326f2"}},{"code_sha256_prefix":"6a0687b01242a053","entry":"kl_divergence","repo":"cherise215/maxstyle","repo_kind":"listed","path":"src/models/custom_loss.py","file_url":"https://github.com/cherise215/maxstyle/blob/HEAD/src/models/custom_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6a0687b01242a053"}},{"code_sha256_prefix":"5681c48489d856d1","entry":"vat_loss","repo":"9310gaurav/virtual-adversarial-training","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/9310gaurav/virtual-adversarial-training/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5681c48489d856d1"}},{"code_sha256_prefix":"0b20deecf73f5d12","entry":"_virtual_adv_regularizer","repo":"tensorflow/neural-structured-learning","repo_kind":"listed","path":"neural_structured_learning/lib/regularizer.py","file_url":"https://github.com/tensorflow/neural-structured-learning/blob/HEAD/neural_structured_learning/lib/regularizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0b20deecf73f5d12"}},{"code_sha256_prefix":"cc264bc10208617d","entry":"virtual_adv_regularizer","repo":"tensorflow/neural-structured-learning","repo_kind":"listed","path":"neural_structured_learning/lib/regularizer.py","file_url":"https://github.com/tensorflow/neural-structured-learning/blob/HEAD/neural_structured_learning/lib/regularizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cc264bc10208617d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}