{"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/cplip-zero-shot-learning-for-histopathology","title":"CPLIP: Zero-Shot Learning for Histopathology with Comprehensive Vision-Language Alignment","arxiv_id":"2406.05205","date":"2024-06-07","proceeding":"CVPR 2024 1","authors":["Sajid Javed","Arif Mahmood","Iyyakutti Iyappan Ganapathi","Fayaz Ali Dharejo","Naoufel Werghi","Mohammed Bennamoun"],"abstract":"This paper proposes Comprehensive Pathology Language Image Pre-training (CPLIP), a new unsupervised technique designed to enhance the alignment of images and text in histopathology for tasks such as classification and segmentation. This methodology enriches vision-language models by leveraging extensive data without needing ground truth annotations. CPLIP involves constructing a pathology-specific dictionary, generating textual descriptions for images using language models, and retrieving relevant images for each text snippet via a pre-trained model. The model is then fine-tuned using a many-to-many contrastive learning method to align complex interrelated concepts across both modalities. Evaluated across multiple histopathology tasks, CPLIP shows notable improvements in zero-shot learning scenarios, outperforming existing methods in both interpretability and robustness and setting a higher benchmark for the application of vision-language models in the field. To encourage further research and replication, the code for CPLIP is available on GitHub at https://cplip.github.io/","url_abs":"https://arxiv.org/abs/2406.05205v1","url_pdf":"https://arxiv.org/pdf/2406.05205v1.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":"cplip-zero-shot-learning-for-histopathology","repo_url":"https://github.com/iyyakuttiiyappan/CPLIP","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"zero-shot-learning","task_name":"Zero-Shot Learning"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.05205","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.05205"}},"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/iyyakuttiiyappan/CPLIP","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":6},"by_repo_kind":{"official":{"samples":11,"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":11,"samples":[{"code_sha256_prefix":"c8ea5e13d55dab48","entry":"get_transforms_ctranspath","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"extract_embeddings.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/extract_embeddings.py","link_basis":"harvester_set","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":"c8ea5e13d55dab48"}},{"code_sha256_prefix":"318d553119497924","entry":"load_pretrained_bert","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/model.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/model.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":"318d553119497924"}},{"code_sha256_prefix":"4b3a4d17e1df3140","entry":"load_state_dict","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/factory.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/factory.py","link_basis":"harvester_set","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":"4b3a4d17e1df3140"}},{"code_sha256_prefix":"046182617bffcc33","entry":"tokenize","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"zeroshot_classification.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/zeroshot_classification.py","link_basis":"harvester_set","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":"046182617bffcc33"}},{"code_sha256_prefix":"03c647e2405f98ba","entry":"zero_shot_classifier","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"zeroshot_classification.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/zeroshot_classification.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":"03c647e2405f98ba"}},{"code_sha256_prefix":"95fb3daa34181ec9","entry":"accuracy","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"zeroshot_classification.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/zeroshot_classification.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":"95fb3daa34181ec9"}},{"code_sha256_prefix":"ea99866a0891dd48","entry":"create_textual_gpt","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/model.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/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":"ea99866a0891dd48"}},{"code_sha256_prefix":"9b5765523c6d17fd","entry":"freeze_batch_norm_2d","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/utils.py","link_basis":"harvester_set","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":"9b5765523c6d17fd"}},{"code_sha256_prefix":"33f0a869b0ef9c80","entry":"load_checkpoint","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/factory.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/factory.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":"33f0a869b0ef9c80"}},{"code_sha256_prefix":"fddbd4292e2ee2c6","entry":"load_ctranspath","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"models/model.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/models/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":"fddbd4292e2ee2c6"}},{"code_sha256_prefix":"c6bbc9c9564d7227","entry":"save_hdf5","repo":"iyyakuttiiyappan/CPLIP","repo_kind":"official","path":"extract_embeddings.py","file_url":"https://github.com/iyyakuttiiyappan/CPLIP/blob/HEAD/extract_embeddings.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":"c6bbc9c9564d7227"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}