{"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/molca-molecular-graph-language-modeling-with","title":"MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter","arxiv_id":"2310.12798","date":"2023-10-19","proceeding":null,"authors":["Zhiyuan Liu","Sihang Li","Yanchen Luo","Hao Fei","Yixin Cao","Kenji Kawaguchi","Xiang Wang","Tat-Seng Chua"],"abstract":"Language Models (LMs) have demonstrated impressive molecule understanding ability on various 1D text-related tasks. However, they inherently lack 2D graph perception - a critical ability of human professionals in comprehending molecules' topological structures. To bridge this gap, we propose MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter. MolCA enables an LM (e.g., Galactica) to understand both text- and graph-based molecular contents via the cross-modal projector. Specifically, the cross-modal projector is implemented as a Q-Former to connect a graph encoder's representation space and an LM's text space. Further, MolCA employs a uni-modal adapter (i.e., LoRA) for the LM's efficient adaptation to downstream tasks. Unlike previous studies that couple an LM with a graph encoder via cross-modal contrastive learning, MolCA retains the LM's ability of open-ended text generation and augments it with 2D graph information. To showcase its effectiveness, we extensively benchmark MolCA on tasks of molecule captioning, IUPAC name prediction, and molecule-text retrieval, on which MolCA significantly outperforms the baselines. Our codes and checkpoints can be found at https://github.com/acharkq/MolCA.","url_abs":"https://arxiv.org/abs/2310.12798v4","url_pdf":"https://arxiv.org/pdf/2310.12798v4.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":"molca-molecular-graph-language-modeling-with","repo_url":"https://github.com/acharkq/molca","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"iupac-name-prediction","task_name":"IUPAC Name Prediction"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"molecule-captioning","task_name":"Molecule Captioning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-retrieval","task_name":"Text Retrieval"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/molecule-captioning-on-chebi-20","task":"Molecule Captioning","dataset":"ChEBI-20","model":"MolCA, Galac1.3B","rank_in_archive_order":8,"of":33,"metrics":{"BLEU-2":"62.0","BLEU-4":"53.1","METEOR":"65.1","ROUGE-1":"68.1","ROUGE-2":"53.7","ROUGE-L":"61.8"},"uses_additional_data":false},{"leaderboard":"/sota/molecule-captioning-on-chebi-20","task":"Molecule Captioning","dataset":"ChEBI-20","model":"MolCA, Galac125M","rank_in_archive_order":9,"of":33,"metrics":{"BLEU-2":"61.6","BLEU-4":"52.9","METEOR":"63.9","ROUGE-1":"67.4","ROUGE-2":"53.3","ROUGE-L":"61.5"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.12798","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.12798"}},"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/acharkq/molca","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/acharkq/MolCA","reach":{"status":"ok"}}],"summary":{"ran_fixture":1,"ran_violates":1,"ran":5,"ran_draft_wrong":1,"unverified":8},"by_repo_kind":{"official":{"samples":16,"ran":8,"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":16,"samples":[{"code_sha256_prefix":"9b4dff79d5e6102c","entry":"apply_rotary_pos_emb","repo":"acharkq/molca","repo_kind":"official","path":"model/modeling_llama.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b4dff79d5e6102c"}},{"code_sha256_prefix":"4cb732f513d69dfd","entry":"disabled_train","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4cb732f513d69dfd"}},{"code_sha256_prefix":"f0e4be065f35a5c6","entry":"escape_custom_split_sequence","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2_opt.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2_opt.py","link_basis":"harvester_set","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":"f0e4be065f35a5c6"}},{"code_sha256_prefix":"53d5373b3854c8e7","entry":"get_module_state_dict","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2_stage2.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2_stage2.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":"53d5373b3854c8e7"}},{"code_sha256_prefix":"e34d5a438d83d62b","entry":"mask_by_len","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2_llama.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2_llama.py","link_basis":"harvester_set","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":"e34d5a438d83d62b"}},{"code_sha256_prefix":"b79435d89f8e6ec1","entry":"pad_and_concat","repo":"acharkq/molca","repo_kind":"official","path":"model/help_funcs.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/help_funcs.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":"b79435d89f8e6ec1"}},{"code_sha256_prefix":"56972cffbe2a2794","entry":"pad_and_concat","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2_stage1.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2_stage1.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":"56972cffbe2a2794"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"acharkq/molca","repo_kind":"official","path":"model/modeling_llama.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"660f9864cd93732e","entry":"GATConv","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"660f9864cd93732e"}},{"code_sha256_prefix":"c650a5b893dc459f","entry":"GCNConv","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"c650a5b893dc459f"}},{"code_sha256_prefix":"c0c440f396ed14ca","entry":"GINConv","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"c0c440f396ed14ca"}},{"code_sha256_prefix":"7282c89d36347662","entry":"GNN","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"7282c89d36347662"}},{"code_sha256_prefix":"de40648fba620653","entry":"GNN_graphpred","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"de40648fba620653"}},{"code_sha256_prefix":"5df3801f59025e96","entry":"GraphSAGEConv","repo":"acharkq/MolCA","repo_kind":"official","path":"model/gin_model.py","file_url":"https://github.com/acharkq/MolCA/blob/HEAD/model/gin_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":"5df3801f59025e96"}},{"code_sha256_prefix":"2f19d209d89cd777","entry":"caption_evaluate","repo":"acharkq/molca","repo_kind":"official","path":"model/help_funcs.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/help_funcs.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":"2f19d209d89cd777"}},{"code_sha256_prefix":"10e8a7ed05ed56f5","entry":"eval_retrieval_fullset","repo":"acharkq/molca","repo_kind":"official","path":"model/blip2_stage1.py","file_url":"https://github.com/acharkq/molca/blob/HEAD/model/blip2_stage1.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":"10e8a7ed05ed56f5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}