{"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/mc-beit-multi-choice-discretization-for-image","title":"mc-BEiT: Multi-choice Discretization for Image BERT Pre-training","arxiv_id":"2203.15371","date":"2022-03-29","proceeding":null,"authors":["Xiaotong Li","Yixiao Ge","Kun Yi","Zixuan Hu","Ying Shan","Ling-Yu Duan"],"abstract":"Image BERT pre-training with masked image modeling (MIM) becomes a popular practice to cope with self-supervised representation learning. A seminal work, BEiT, casts MIM as a classification task with a visual vocabulary, tokenizing the continuous visual signals into discrete vision tokens using a pre-learned dVAE. Despite a feasible solution, the improper discretization hinders further improvements of image pre-training. Since image discretization has no ground-truth answers, we believe that the masked patch should not be assigned with a unique token id even if a better tokenizer can be obtained. In this work, we introduce an improved BERT-style image pre-training method, namely mc-BEiT, which performs MIM proxy tasks towards eased and refined multi-choice training objectives. Specifically, the multi-choice supervision for the masked image patches is formed by the soft probability vectors of the discrete token ids, which are predicted by the off-the-shelf image tokenizer and further refined by high-level inter-patch perceptions resorting to the observation that similar patches should share their choices. Extensive experiments on classification, segmentation, and detection tasks demonstrate the superiority of our method, e.g., the pre-trained ViT-B achieves 84.1% top-1 fine-tuning accuracy on ImageNet-1K classification, 49.2% AP^b and 44.0% AP^m of object detection and instance segmentation on COCO, 50.8% mIOU on ADE20K semantic segmentation, outperforming the competitive counterparts. The code will be available at https://github.com/lixiaotong97/mc-BEiT.","url_abs":"https://arxiv.org/abs/2203.15371v4","url_pdf":"https://arxiv.org/pdf/2203.15371v4.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":"mc-beit-multi-choice-discretization-for-image","repo_url":"https://github.com/lixiaotong97/mc-beit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"self-supervised-image-classification","task_name":"Self-Supervised Image Classification"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"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":"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":[{"leaderboard":"/sota/self-supervised-image-classification-on-1","task":"Self-Supervised Image Classification","dataset":"ImageNet (finetuned)","model":"mc-BEiT (ViT-B/16)","rank_in_archive_order":36,"of":65,"metrics":{"Number of Params":"86M","Top 1 Accuracy":"84.1%"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2203.15371","atlas_url":"https://app.syntology.ai/?focus=2203.15371","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.15371"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lixiaotong97/mc-beit","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/lixiaotong97/mc-BEiT","reach":{"status":"ok"}}],"summary":{"ran":3,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"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":5,"samples":[{"code_sha256_prefix":"2cddf6be601c390b","entry":"Attention","repo":"lixiaotong97/mc-BEiT","repo_kind":"official","path":"modeling_pretrain.py","file_url":"https://github.com/lixiaotong97/mc-BEiT/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2cddf6be601c390b"}},{"code_sha256_prefix":"11fed9ca25d1f64b","entry":"PatchEmbed","repo":"lixiaotong97/mc-BEiT","repo_kind":"official","path":"modeling_pretrain.py","file_url":"https://github.com/lixiaotong97/mc-BEiT/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"11fed9ca25d1f64b"}},{"code_sha256_prefix":"d6e4999dab1a534a","entry":"RelativePositionBias","repo":"lixiaotong97/mc-BEiT","repo_kind":"official","path":"modeling_pretrain.py","file_url":"https://github.com/lixiaotong97/mc-BEiT/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d6e4999dab1a534a"}},{"code_sha256_prefix":"68aca03e209bac10","entry":"Block","repo":"lixiaotong97/mc-BEiT","repo_kind":"official","path":"modeling_pretrain.py","file_url":"https://github.com/lixiaotong97/mc-BEiT/blob/HEAD/modeling_pretrain.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":"68aca03e209bac10"}},{"code_sha256_prefix":"7fc07a768e177191","entry":"VisionTransformerForMaskedImageModeling","repo":"lixiaotong97/mc-BEiT","repo_kind":"official","path":"modeling_pretrain.py","file_url":"https://github.com/lixiaotong97/mc-BEiT/blob/HEAD/modeling_pretrain.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":"7fc07a768e177191"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}