{"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/improving-composed-image-retrieval-via","title":"Improving Composed Image Retrieval via Contrastive Learning with Scaling Positives and Negatives","arxiv_id":"2404.11317","date":"2024-04-17","proceeding":null,"authors":["Zhangchi Feng","Richong Zhang","Zhijie Nie"],"abstract":"The Composed Image Retrieval (CIR) task aims to retrieve target images using a composed query consisting of a reference image and a modified text. Advanced methods often utilize contrastive learning as the optimization objective, which benefits from adequate positive and negative examples. However, the triplet for CIR incurs high manual annotation costs, resulting in limited positive examples. Furthermore, existing methods commonly use in-batch negative sampling, which reduces the negative number available for the model. To address the problem of lack of positives, we propose a data generation method by leveraging a multi-modal large language model to construct triplets for CIR. To introduce more negatives during fine-tuning, we design a two-stage fine-tuning framework for CIR, whose second stage introduces plenty of static representations of negatives to optimize the representation space rapidly. The above two improvements can be effectively stacked and designed to be plug-and-play, easily applied to existing CIR models without changing their original architectures. Extensive experiments and ablation analysis demonstrate that our method effectively scales positives and negatives and achieves state-of-the-art results on both FashionIQ and CIRR datasets. In addition, our method also performs well in zero-shot composed image retrieval, providing a new CIR solution for the low-resources scenario. Our code and data are released at https://github.com/BUAADreamer/SPN4CIR.","url_abs":"https://arxiv.org/abs/2404.11317v2","url_pdf":"https://arxiv.org/pdf/2404.11317v2.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":"improving-composed-image-retrieval-via","repo_url":"https://github.com/BUAADreamer/SPN4CIR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":null,"task_name":"Image Retrieval on Fashion IQ"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":null,"task_name":"Triplet"},{"task_slug":"zero-shot-composed-image-retrieval-zs-cir","task_name":"Zero-Shot Composed Image Retrieval (ZS-CIR)"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-retrieval-on-cirr","task":"Image Retrieval","dataset":"CIRR","model":"SPN4CIR (SPRC)","rank_in_archive_order":2,"of":17,"metrics":{"(Recall@5+Recall_subset@1)/2":"82.69","Recall@10":"90.87"},"uses_additional_data":true},{"leaderboard":"/sota/image-retrieval-on-fashion-iq","task":"Image Retrieval","dataset":"Fashion IQ","model":"SPN4CIR (SPRC)","rank_in_archive_order":3,"of":22,"metrics":{"(Recall@10+Recall@50)/2":"66.41","Recall@10":"56.37"},"uses_additional_data":false},{"leaderboard":"/sota/zero-shot-composed-image-retrieval-zs-cir-on-1","task":"Zero-Shot Composed Image Retrieval (ZS-CIR)","dataset":"CIRR","model":"SPN4CIR (SPN-CC)","rank_in_archive_order":25,"of":47,"metrics":{"R@5":"65.42","Rsubset@1":"64.87"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2404.11317","atlas_url":"https://app.syntology.ai/?focus=2404.11317","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.11317"}},"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/BUAADreamer/SPN4CIR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"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":0,"samples":[{"code_sha256_prefix":"1f20723d4586980b","entry":"generate_randomized_fiq_caption","repo":"BUAADreamer/SPN4CIR","repo_kind":"official","path":"blip24cir/data_utils.py","file_url":"https://github.com/BUAADreamer/SPN4CIR/blob/HEAD/blip24cir/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f20723d4586980b"}},{"code_sha256_prefix":"a1580dd1883758f6","entry":"squarepad_transform","repo":"BUAADreamer/SPN4CIR","repo_kind":"official","path":"blip24cir/data_utils.py","file_url":"https://github.com/BUAADreamer/SPN4CIR/blob/HEAD/blip24cir/data_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a1580dd1883758f6"}},{"code_sha256_prefix":"9e2b18431cf6776f","entry":"targetpad_transform","repo":"BUAADreamer/SPN4CIR","repo_kind":"official","path":"blip24cir/data_utils.py","file_url":"https://github.com/BUAADreamer/SPN4CIR/blob/HEAD/blip24cir/data_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9e2b18431cf6776f"}},{"code_sha256_prefix":"d12ba8b8f88ca00d","entry":"collate_fn","repo":"BUAADreamer/SPN4CIR","repo_kind":"official","path":"blip24cir/utils.py","file_url":"https://github.com/BUAADreamer/SPN4CIR/blob/HEAD/blip24cir/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d12ba8b8f88ca00d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}