{"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/advancing-multi-grained-alignment-for","title":"Advancing Multi-grained Alignment for Contrastive Language-Audio Pre-training","arxiv_id":"2408.07919","date":"2024-08-15","proceeding":null,"authors":["Yiming Li","Zhifang Guo","Xiangdong Wang","Hong Liu"],"abstract":"Recent advances have been witnessed in audio-language joint learning, such as CLAP, that shows much success in multi-modal understanding tasks. These models usually aggregate uni-modal local representations, namely frame or word features, into global ones, on which the contrastive loss is employed to reach coarse-grained cross-modal alignment. However, frame-level correspondence with texts may be ignored, making it ill-posed on explainability and fine-grained challenges which may also undermine performances on coarse-grained tasks. In this work, we aim to improve both coarse- and fine-grained audio-language alignment in large-scale contrastive pre-training. To unify the granularity and latent distribution of two modalities, a shared codebook is adopted to represent multi-modal global features with common bases, and each codeword is regularized to encode modality-shared semantics, bridging the gap between frame and word features. Based on it, a locality-aware block is involved to purify local patterns, and a hard-negative guided loss is devised to boost alignment. Experiments on eleven zero-shot coarse- and fine-grained tasks suggest that our model not only surpasses the baseline CLAP significantly but also yields superior or competitive results compared to current SOTA works.","url_abs":"https://arxiv.org/abs/2408.07919v1","url_pdf":"https://arxiv.org/pdf/2408.07919v1.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":"advancing-multi-grained-alignment-for","repo_url":"https://github.com/ming-er/mga-clap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"cross-modal-alignment","task_name":"cross-modal alignment"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.07919","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.07919"}},"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/ming-er/mga-clap","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_fixture":1,"unverified":4},"by_repo_kind":{"official":{"samples":9,"ran":5,"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":9,"samples":[{"code_sha256_prefix":"d54701181d5e77fb","entry":"binarize","repo":"ming-er/mga-clap","repo_kind":"official","path":"zero_shot_grounding.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/zero_shot_grounding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d54701181d5e77fb"}},{"code_sha256_prefix":"3ac6b7d76e8e3584","entry":"drop_path","repo":"ming-er/mga-clap","repo_kind":"official","path":"models/htsat.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/models/htsat.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3ac6b7d76e8e3584"}},{"code_sha256_prefix":"53d22b3aae5396d5","entry":"find_contiguous_regions","repo":"ming-er/mga-clap","repo_kind":"official","path":"zero_shot_grounding.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/zero_shot_grounding.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":"53d22b3aae5396d5"}},{"code_sha256_prefix":"b922b8ae79864faa","entry":"interpolate","repo":"ming-er/mga-clap","repo_kind":"official","path":"models/htsat.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/models/htsat.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b922b8ae79864faa"}},{"code_sha256_prefix":"bdd9d19a6f1c01cd","entry":"median_filter","repo":"ming-er/mga-clap","repo_kind":"official","path":"zero_shot_grounding.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/zero_shot_grounding.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":"bdd9d19a6f1c01cd"}},{"code_sha256_prefix":"2570f2ac20b362fe","entry":"train","repo":"ming-er/mga-clap","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/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":"2570f2ac20b362fe"}},{"code_sha256_prefix":"5436174f8c0e64e0","entry":"trunc_normal_","repo":"ming-er/mga-clap","repo_kind":"official","path":"models/htsat.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/models/htsat.py","link_basis":"plan_row","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":"5436174f8c0e64e0"}},{"code_sha256_prefix":"7935ca405cc8fdff","entry":"validate_re","repo":"ming-er/mga-clap","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/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":"7935ca405cc8fdff"}},{"code_sha256_prefix":"a4131b23db52bc67","entry":"validate_sed","repo":"ming-er/mga-clap","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/ming-er/mga-clap/blob/HEAD/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":"a4131b23db52bc67"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}