{"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/freematch-self-adaptive-thresholding-for-semi","title":"FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning","arxiv_id":"2205.07246","date":"2022-05-15","proceeding":null,"authors":["Yidong Wang","Hao Chen","Qiang Heng","Wenxin Hou","Yue Fan","Zhen Wu","Jindong Wang","Marios Savvides","Takahiro Shinozaki","Bhiksha Raj","Bernt Schiele","Xing Xie"],"abstract":"Semi-supervised Learning (SSL) has witnessed great success owing to the impressive performances brought by various methods based on pseudo labeling and consistency regularization. However, we argue that existing methods might fail to utilize the unlabeled data more effectively since they either use a pre-defined / fixed threshold or an ad-hoc threshold adjusting scheme, resulting in inferior performance and slow convergence. We first analyze a motivating example to obtain intuitions on the relationship between the desirable threshold and model's learning status. Based on the analysis, we hence propose FreeMatch to adjust the confidence threshold in a self-adaptive manner according to the model's learning status. We further introduce a self-adaptive class fairness regularization penalty to encourage the model for diverse predictions during the early training stage. Extensive experiments indicate the superiority of FreeMatch especially when the labeled data are extremely rare. FreeMatch achieves 5.78%, 13.59%, and 1.28% error rate reduction over the latest state-of-the-art method FlexMatch on CIFAR-10 with 1 label per class, STL-10 with 4 labels per class, and ImageNet with 100 labels per class, respectively. Moreover, FreeMatch can also boost the performance of imbalanced SSL. The codes can be found at https://github.com/microsoft/Semi-supervised-learning.","url_abs":"https://arxiv.org/abs/2205.07246v3","url_pdf":"https://arxiv.org/pdf/2205.07246v3.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":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/microsoft/semi-supervised-learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/torchssl/torchssl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/abbaasalif/freematch-improved","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/beandkay/epass","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/shreejalt/freematch-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"freematch-self-adaptive-thresholding-for-semi","repo_url":"https://github.com/siyi-wind/STiL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"},{"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":"FreeMatch","rank_in_archive_order":14,"of":27,"metrics":{"Percentage error":"4.88"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-7","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 40 Labels","model":"FreeMatch","rank_in_archive_order":2,"of":21,"metrics":{"Percentage error":"4.9"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-9","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100, 2500 Labels","model":"FreeMatch","rank_in_archive_order":9,"of":16,"metrics":{"Percentage error":"26.47"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-8","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100, 400 Labels","model":"FreeMatch","rank_in_archive_order":9,"of":21,"metrics":{"Percentage error":"37.98"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-2","task":"Semi-Supervised Image Classification","dataset":"cifar-100, 10000 Labels","model":"FreeMatch","rank_in_archive_order":10,"of":29,"metrics":{"Percentage error":"21.68"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.07246","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.07246"}},"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":"deterministic:regex_extraction","url":"https://github.com/microsoft/Semi-supervised-learning","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/abbaasalif/freematch-improved","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/semi-supervised-learning","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shreejalt/freematch-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/beandkay/epass","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/torchssl/torchssl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/siyi-wind/STiL","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":1,"ran_fixture":1,"ran_draft_wrong":1,"ran_honours":1,"unverified":10},"by_repo_kind":{"official":{"samples":4,"ran":3,"repositories":2},"listed":{"samples":10,"ran":1,"repositories":3}},"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":2,"samples":[{"code_sha256_prefix":"8837096520e4398d","entry":"ConsistencyLoss","repo":"shreejalt/freematch-pytorch","repo_kind":"listed","path":"utils/losses.py","file_url":"https://github.com/shreejalt/freematch-pytorch/blob/HEAD/utils/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8837096520e4398d"}},{"code_sha256_prefix":"8d4e503501f8115a","entry":"consistency_loss","repo":"torchssl/torchssl","repo_kind":"official","path":"models/freematch/freematch.py","file_url":"https://github.com/torchssl/torchssl/blob/HEAD/models/freematch/freematch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d4e503501f8115a"}},{"code_sha256_prefix":"e4d38b3bf55a8430","entry":"entropy_loss","repo":"microsoft/semi-supervised-learning","repo_kind":"official","path":"semilearn/algorithms/freematch/freematch.py","file_url":"https://github.com/microsoft/semi-supervised-learning/blob/HEAD/semilearn/algorithms/freematch/freematch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4d38b3bf55a8430"}},{"code_sha256_prefix":"c5976b5c715825f6","entry":"replace_inf_to_zero","repo":"microsoft/semi-supervised-learning","repo_kind":"official","path":"semilearn/algorithms/freematch/freematch.py","file_url":"https://github.com/microsoft/semi-supervised-learning/blob/HEAD/semilearn/algorithms/freematch/freematch.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5976b5c715825f6"}},{"code_sha256_prefix":"26ae35625bab2b43","entry":"ConsistencyLoss","repo":"abbaasalif/freematch-improved","repo_kind":"listed","path":"utils/losses.py","file_url":"https://github.com/abbaasalif/freematch-improved/blob/HEAD/utils/losses.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":"26ae35625bab2b43"}},{"code_sha256_prefix":"68352b4ace632b5c","entry":"FreeMatch","repo":"torchssl/torchssl","repo_kind":"official","path":"models/freematch/freematch.py","file_url":"https://github.com/torchssl/torchssl/blob/HEAD/models/freematch/freematch.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":true,"mcp_get_code":{"code_sha256":"68352b4ace632b5c"}},{"code_sha256_prefix":"ad8a877057eed809","entry":"SelfAdaptiveThresholdLoss","repo":"abbaasalif/freematch-improved","repo_kind":"listed","path":"utils/losses.py","file_url":"https://github.com/abbaasalif/freematch-improved/blob/HEAD/utils/losses.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":"ad8a877057eed809"}},{"code_sha256_prefix":"a169b5b35ae13821","entry":"SelfAdaptiveThresholdLoss","repo":"shreejalt/freematch-pytorch","repo_kind":"listed","path":"utils/losses.py","file_url":"https://github.com/shreejalt/freematch-pytorch/blob/HEAD/utils/losses.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":true,"mcp_get_code":{"code_sha256":"a169b5b35ae13821"}},{"code_sha256_prefix":"7487c583dca6a842","entry":"conv1x1","repo":"siyi-wind/STiL","repo_kind":"listed","path":"models/resnets.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/models/resnets.py","link_basis":"harvester_set","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":"7487c583dca6a842"}},{"code_sha256_prefix":"c5e915e62a479bd7","entry":"conv3x3","repo":"siyi-wind/STiL","repo_kind":"listed","path":"models/resnets.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/models/resnets.py","link_basis":"harvester_set","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":"c5e915e62a479bd7"}},{"code_sha256_prefix":"b45ebdf32841b261","entry":"convert_to_float","repo":"siyi-wind/STiL","repo_kind":"listed","path":"datasets/ContrastiveImagingAndTabularDataset.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/datasets/ContrastiveImagingAndTabularDataset.py","link_basis":"harvester_set","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":"b45ebdf32841b261"}},{"code_sha256_prefix":"4e0f862bc1278ba0","entry":"convert_to_ts","repo":"siyi-wind/STiL","repo_kind":"listed","path":"datasets/ContrastiveImagingAndTabularDataset.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/datasets/ContrastiveImagingAndTabularDataset.py","link_basis":"harvester_set","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":"4e0f862bc1278ba0"}},{"code_sha256_prefix":"4369fbda3bd2eef3","entry":"convert_to_ts_01","repo":"siyi-wind/STiL","repo_kind":"listed","path":"datasets/ContrastiveImagingAndTabularDataset.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/datasets/ContrastiveImagingAndTabularDataset.py","link_basis":"harvester_set","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":"4369fbda3bd2eef3"}},{"code_sha256_prefix":"cec899f733d5acb7","entry":"resnet18","repo":"siyi-wind/STiL","repo_kind":"listed","path":"models/resnets.py","file_url":"https://github.com/siyi-wind/STiL/blob/HEAD/models/resnets.py","link_basis":"harvester_set","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":"cec899f733d5acb7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}