{"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/hsva-hierarchical-semantic-visual-adaptation","title":"HSVA: Hierarchical Semantic-Visual Adaptation for Zero-Shot Learning","arxiv_id":"2109.15163","date":"2021-09-30","proceeding":"NeurIPS 2021 12","authors":["Shiming Chen","Guo-Sen Xie","Yang Liu","Qinmu Peng","Baigui Sun","Hao Li","Xinge You","Ling Shao"],"abstract":"Zero-shot learning (ZSL) tackles the unseen class recognition problem, transferring semantic knowledge from seen classes to unseen ones. Typically, to guarantee desirable knowledge transfer, a common (latent) space is adopted for associating the visual and semantic domains in ZSL. However, existing common space learning methods align the semantic and visual domains by merely mitigating distribution disagreement through one-step adaptation. This strategy is usually ineffective due to the heterogeneous nature of the feature representations in the two domains, which intrinsically contain both distribution and structure variations. To address this and advance ZSL, we propose a novel hierarchical semantic-visual adaptation (HSVA) framework. Specifically, HSVA aligns the semantic and visual domains by adopting a hierarchical two-step adaptation, i.e., structure adaptation and distribution adaptation. In the structure adaptation step, we take two task-specific encoders to encode the source data (visual domain) and the target data (semantic domain) into a structure-aligned common space. To this end, a supervised adversarial discrepancy (SAD) module is proposed to adversarially minimize the discrepancy between the predictions of two task-specific classifiers, thus making the visual and semantic feature manifolds more closely aligned. In the distribution adaptation step, we directly minimize the Wasserstein distance between the latent multivariate Gaussian distributions to align the visual and semantic distributions using a common encoder. Finally, the structure and distribution adaptation are derived in a unified framework under two partially-aligned variational autoencoders. Extensive experiments on four benchmark datasets demonstrate that HSVA achieves superior performance on both conventional and generalized ZSL. The code is available at \\url{https://github.com/shiming-chen/HSVA} .","url_abs":"https://arxiv.org/abs/2109.15163v2","url_pdf":"https://arxiv.org/pdf/2109.15163v2.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":"hsva-hierarchical-semantic-visual-adaptation","repo_url":"https://github.com/shiming-chen/hsva","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"hsva-hierarchical-semantic-visual-adaptation","repo_url":"https://github.com/uqzhichen/haszsl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"zero-shot-learning","task_name":"Zero-Shot Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.15163","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.15163"}},"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/shiming-chen/HSVA","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uqzhichen/haszsl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shiming-chen/hsva","reach":{"status":"ok"}}],"summary":{"ran":8,"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":11,"ran":7,"repositories":1},"listed":{"samples":2,"ran":1,"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":14,"samples":[{"code_sha256_prefix":"cb5dbf1ce4a01a4e","entry":"LINEAR_LOGSOFTMAX","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb5dbf1ce4a01a4e"}},{"code_sha256_prefix":"dd1409ac78612175","entry":"LINEAR_SOFTMAX_ALE","repo":"uqzhichen/haszsl","repo_kind":"listed","path":"model.py","file_url":"https://github.com/uqzhichen/haszsl/blob/HEAD/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":"dd1409ac78612175"}},{"code_sha256_prefix":"195d6bb4ac124ee4","entry":"TrainDataset","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"195d6bb4ac124ee4"}},{"code_sha256_prefix":"ba9f5083f3083cef","entry":"class_cls","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.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":"ba9f5083f3083cef"}},{"code_sha256_prefix":"4176b327282b8d30","entry":"decoder_template","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4176b327282b8d30"}},{"code_sha256_prefix":"39f94657fe4a4048","entry":"decoder_z","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"39f94657fe4a4048"}},{"code_sha256_prefix":"b5c9d2742191aa15","entry":"domain_classifier","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5c9d2742191aa15"}},{"code_sha256_prefix":"eb58097408519676","entry":"domain_discriminator","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb58097408519676"}},{"code_sha256_prefix":"f017532fc389cbfe","entry":"str2bool","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"f017532fc389cbfe"}},{"code_sha256_prefix":"be16f2023cd3faf1","entry":"CLASSIFIER","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.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":"be16f2023cd3faf1"}},{"code_sha256_prefix":"b919191e390d1bfb","entry":"Model","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.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":"b919191e390d1bfb"}},{"code_sha256_prefix":"1f8bc1f38824777c","entry":"encoder_template","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.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":"1f8bc1f38824777c"}},{"code_sha256_prefix":"1a413e60cf58efb8","entry":"encoder_z","repo":"shiming-chen/hsva","repo_kind":"official","path":"HSVA.py","file_url":"https://github.com/shiming-chen/hsva/blob/HEAD/HSVA.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":"1a413e60cf58efb8"}},{"code_sha256_prefix":"f9219965b1e24724","entry":"resnet_proto_IoU","repo":"uqzhichen/haszsl","repo_kind":"listed","path":"model.py","file_url":"https://github.com/uqzhichen/haszsl/blob/HEAD/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":"f9219965b1e24724"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}