{"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/label2label-a-language-modeling-framework-for","title":"Label2Label: A Language Modeling Framework for Multi-Attribute Learning","arxiv_id":"2207.08677","date":"2022-07-18","proceeding":null,"authors":["Wanhua Li","Zhexuan Cao","Jianjiang Feng","Jie zhou","Jiwen Lu"],"abstract":"Objects are usually associated with multiple attributes, and these attributes often exhibit high correlations. Modeling complex relationships between attributes poses a great challenge for multi-attribute learning. This paper proposes a simple yet generic framework named Label2Label to exploit the complex attribute correlations. Label2Label is the first attempt for multi-attribute prediction from the perspective of language modeling. Specifically, it treats each attribute label as a \"word\" describing the sample. As each sample is annotated with multiple attribute labels, these \"words\" will naturally form an unordered but meaningful \"sentence\", which depicts the semantic information of the corresponding sample. Inspired by the remarkable success of pre-training language models in NLP, Label2Label introduces an image-conditioned masked language model, which randomly masks some of the \"word\" tokens from the label \"sentence\" and aims to recover them based on the masked \"sentence\" and the context conveyed by image features. Our intuition is that the instance-wise attribute relations are well grasped if the neural net can infer the missing attributes based on the context and the remaining attribute hints. Label2Label is conceptually simple and empirically powerful. Without incorporating task-specific prior knowledge and highly specialized network designs, our approach achieves state-of-the-art results on three different multi-attribute learning tasks, compared to highly customized domain-specific methods. Code is available at https://github.com/Li-Wanhua/Label2Label.","url_abs":"https://arxiv.org/abs/2207.08677v1","url_pdf":"https://arxiv.org/pdf/2207.08677v1.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":"label2label-a-language-modeling-framework-for","repo_url":"https://github.com/li-wanhua/label2label","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"clothing-attribute-recognition","task_name":"Clothing Attribute Recognition"},{"task_slug":"facial-attribute-classification","task_name":"Facial Attribute Classification"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"pedestrian-attribute-recognition","task_name":"Pedestrian Attribute Recognition"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/clothing-attribute-recognition-on-clothing","task":"Clothing Attribute Recognition","dataset":"Clothing Attributes Dataset","model":"Label2Label","rank_in_archive_order":1,"of":4,"metrics":{"Accuracy":"92.87"},"uses_additional_data":false},{"leaderboard":"/sota/facial-attribute-classification-on-lfwa","task":"Facial Attribute Classification","dataset":"LFWA","model":"Label2Label","rank_in_archive_order":1,"of":7,"metrics":{"Error Rate":"12.49"},"uses_additional_data":false},{"leaderboard":"/sota/pedestrian-attribute-recognition-on-pa-100k","task":"Pedestrian Attribute Recognition","dataset":"PA-100K","model":"Label2Label","rank_in_archive_order":8,"of":13,"metrics":{"Accuracy":"79.23"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.08677","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.08677"}},"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/li-wanhua/label2label","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Li-Wanhua/Label2Label","reach":{"status":"ok"}}],"summary":{"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"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":5,"samples":[{"code_sha256_prefix":"04bd058e5bab5cba","entry":"GroupWiseLinear","repo":"Li-Wanhua/Label2Label","repo_kind":"official","path":"Face_Attribute/model.py","file_url":"https://github.com/Li-Wanhua/Label2Label/blob/HEAD/Face_Attribute/model.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":"04bd058e5bab5cba"}},{"code_sha256_prefix":"13d57cd5c6586dc6","entry":"PositionEmbeddingSine","repo":"Li-Wanhua/Label2Label","repo_kind":"official","path":"Face_Attribute/model.py","file_url":"https://github.com/Li-Wanhua/Label2Label/blob/HEAD/Face_Attribute/model.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":"13d57cd5c6586dc6"}},{"code_sha256_prefix":"8e1a86bc4c977a2f","entry":"L2L","repo":"Li-Wanhua/Label2Label","repo_kind":"official","path":"Face_Attribute/model.py","file_url":"https://github.com/Li-Wanhua/Label2Label/blob/HEAD/Face_Attribute/model.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":"8e1a86bc4c977a2f"}},{"code_sha256_prefix":"631405dbe2ea9798","entry":"LabelHead","repo":"Li-Wanhua/Label2Label","repo_kind":"official","path":"Face_Attribute/model.py","file_url":"https://github.com/Li-Wanhua/Label2Label/blob/HEAD/Face_Attribute/model.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":"631405dbe2ea9798"}},{"code_sha256_prefix":"94658662ddea28da","entry":"QueryHead","repo":"Li-Wanhua/Label2Label","repo_kind":"official","path":"Face_Attribute/model.py","file_url":"https://github.com/Li-Wanhua/Label2Label/blob/HEAD/Face_Attribute/model.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":"94658662ddea28da"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}