{"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/lpt-long-tailed-prompt-tuning-for-image","title":"LPT: Long-tailed Prompt Tuning for Image Classification","arxiv_id":"2210.01033","date":"2022-10-03","proceeding":null,"authors":["Bowen Dong","Pan Zhou","Shuicheng Yan","WangMeng Zuo"],"abstract":"For long-tailed classification, most works often pretrain a big model on a large-scale dataset, and then fine-tune the whole model for adapting to long-tailed data. Though promising, fine-tuning the whole pretrained model tends to suffer from high cost in computation and deployment of different models for different tasks, as well as weakened generalization ability for overfitting to certain features of long-tailed data. To alleviate these issues, we propose an effective Long-tailed Prompt Tuning method for long-tailed classification. LPT introduces several trainable prompts into a frozen pretrained model to adapt it to long-tailed data. For better effectiveness, we divide prompts into two groups: 1) a shared prompt for the whole long-tailed dataset to learn general features and to adapt a pretrained model into target domain; and 2) group-specific prompts to gather group-specific features for the samples which have similar features and also to empower the pretrained model with discrimination ability. Then we design a two-phase training paradigm to learn these prompts. In phase 1, we train the shared prompt via supervised prompt tuning to adapt a pretrained model to the desired long-tailed domain. In phase 2, we use the learnt shared prompt as query to select a small best matched set for a group of similar samples from the group-specific prompt set to dig the common features of these similar samples, then optimize these prompts with dual sampling strategy and asymmetric GCL loss. By only fine-tuning a few prompts while fixing the pretrained model, LPT can reduce training and deployment cost by storing a few prompts, and enjoys a strong generalization ability of the pretrained model. Experiments show that on various long-tailed benchmarks, with only ~1.1% extra parameters, LPT achieves comparable performance than previous whole model fine-tuning methods, and is more robust to domain-shift.","url_abs":"https://arxiv.org/abs/2210.01033v2","url_pdf":"https://arxiv.org/pdf/2210.01033v2.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":"lpt-long-tailed-prompt-tuning-for-image","repo_url":"https://github.com/dongsky/lpt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"long-tail-learning","task_name":"Long-tail Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/long-tail-learning-on-cifar-10-lt-r-100","task":"Long-tail Learning","dataset":"CIFAR-10-LT (ρ=100)","model":"LPT","rank_in_archive_order":3,"of":28,"metrics":{"Error Rate":"10.9"},"uses_additional_data":true},{"leaderboard":"/sota/long-tail-learning-on-cifar-100-lt-r-10","task":"Long-tail Learning","dataset":"CIFAR-100-LT (ρ=10)","model":"LPT","rank_in_archive_order":2,"of":31,"metrics":{"Error Rate":"9"},"uses_additional_data":true},{"leaderboard":"/sota/long-tail-learning-on-cifar-100-lt-r-100","task":"Long-tail Learning","dataset":"CIFAR-100-LT (ρ=100)","model":"LPT","rank_in_archive_order":1,"of":66,"metrics":{"Error Rate":"10.9"},"uses_additional_data":true},{"leaderboard":"/sota/long-tail-learning-on-cifar-100-lt-r-50","task":"Long-tail Learning","dataset":"CIFAR-100-LT (ρ=50)","model":"LPT","rank_in_archive_order":2,"of":25,"metrics":{"Error Rate":"10"},"uses_additional_data":true}],"syntology":{"syntology_url":"https://syntology.ai/paper/2210.01033","atlas_url":"https://app.syntology.ai/?focus=2210.01033","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.01033"}},"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/DongSky/LPT","reach":{"status":"ok","spdx":"AGPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dongsky/lpt","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"summary":{"ran":2},"by_repo_kind":{"official":{"samples":2,"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":2,"samples":[{"code_sha256_prefix":"c508d9b7457e7689","entry":"NormedLinear","repo":"dongsky/lpt","repo_kind":"official","path":"phase2_test/PromptModels_pool/structure.py","file_url":"https://github.com/dongsky/lpt/blob/HEAD/phase2_test/PromptModels_pool/structure.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c508d9b7457e7689"}},{"code_sha256_prefix":"2f28176bcab7b682","entry":"PromptLearner","repo":"dongsky/lpt","repo_kind":"official","path":"phase2_test/PromptModels_pool/structure.py","file_url":"https://github.com/dongsky/lpt/blob/HEAD/phase2_test/PromptModels_pool/structure.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"2f28176bcab7b682"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}