{"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/prott3-protein-to-text-generation-for-text","title":"ProtT3: Protein-to-Text Generation for Text-based Protein Understanding","arxiv_id":"2405.12564","date":"2024-05-21","proceeding":null,"authors":["Zhiyuan Liu","An Zhang","Hao Fei","Enzhi Zhang","Xiang Wang","Kenji Kawaguchi","Tat-Seng Chua"],"abstract":"Language Models (LMs) excel in understanding textual descriptions of proteins, as evident in biomedical question-answering tasks. However, their capability falters with raw protein data, such as amino acid sequences, due to a deficit in pretraining on such data. Conversely, Protein Language Models (PLMs) can understand and convert protein data into high-quality representations, but struggle to process texts. To address their limitations, we introduce ProtT3, a framework for Protein-to-Text Generation for Text-based Protein Understanding. ProtT3 empowers an LM to understand protein sequences of amino acids by incorporating a PLM as its protein understanding module, enabling effective protein-to-text generation. This collaboration between PLM and LM is facilitated by a cross-modal projector (i.e., Q-Former) that bridges the modality gap between the PLM's representation space and the LM's input space. Unlike previous studies focusing on protein property prediction and protein-text retrieval, we delve into the largely unexplored field of protein-to-text generation. To facilitate comprehensive benchmarks and promote future research, we establish quantitative evaluations for protein-text modeling tasks, including protein captioning, protein question-answering, and protein-text retrieval. Our experiments show that ProtT3 substantially surpasses current baselines, with ablation studies further highlighting the efficacy of its core components. Our code is available at https://github.com/acharkq/ProtT3.","url_abs":"https://arxiv.org/abs/2405.12564v1","url_pdf":"https://arxiv.org/pdf/2405.12564v1.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":"prott3-protein-to-text-generation-for-text","repo_url":"https://github.com/acharkq/prott3","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"property-prediction","task_name":"Property Prediction"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-retrieval","task_name":"Text Retrieval"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.12564","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.12564"}},"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/prott3","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/acharkq/ProtT3","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"ran":6,"unverified":6},"by_repo_kind":{"official":{"samples":13,"ran":7,"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":13,"samples":[{"code_sha256_prefix":"4cb732f513d69dfd","entry":"disabled_train","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2.py","file_url":"https://github.com/acharkq/ProtT3/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":"40f6effaf853777c","entry":"evaluate_exact_match","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2_stage2.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/blip2_stage2.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":"40f6effaf853777c"}},{"code_sha256_prefix":"01998e2a237f84ab","entry":"get_extended_attention_mask","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/esm_flash_attention.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/esm_flash_attention.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":"01998e2a237f84ab"}},{"code_sha256_prefix":"53d5373b3854c8e7","entry":"get_module_state_dict","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2_stage2.py","file_url":"https://github.com/acharkq/ProtT3/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":"390f604f894e2130","entry":"hf_enable_gradient_checkpointing","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/help_funcs.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/help_funcs.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":"390f604f894e2130"}},{"code_sha256_prefix":"e34d5a438d83d62b","entry":"mask_by_len","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2_opt.py","file_url":"https://github.com/acharkq/ProtT3/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":"e34d5a438d83d62b"}},{"code_sha256_prefix":"b79435d89f8e6ec1","entry":"pad_and_concat","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/help_funcs.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/help_funcs.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":"b79435d89f8e6ec1"}},{"code_sha256_prefix":"ce2b15ddabde616d","entry":"caption_evaluate","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/help_funcs.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/help_funcs.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":"ce2b15ddabde616d"}},{"code_sha256_prefix":"5a3d3c74e94ace2f","entry":"eval_retrieval_fullset","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2_stage1.py","file_url":"https://github.com/acharkq/ProtT3/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":"5a3d3c74e94ace2f"}},{"code_sha256_prefix":"d01e34978d2fa887","entry":"eval_retrieval_fullset_for_rerank","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2_stage1.py","file_url":"https://github.com/acharkq/ProtT3/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":"d01e34978d2fa887"}},{"code_sha256_prefix":"a07a7497a7dc3f75","entry":"forward_original","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/esm_flash_attention.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/esm_flash_attention.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":"a07a7497a7dc3f75"}},{"code_sha256_prefix":"fb63587ed05937c2","entry":"get_gpu_memory","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/blip2.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/blip2.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":"fb63587ed05937c2"}},{"code_sha256_prefix":"5be37733318db298","entry":"original_forward","repo":"acharkq/ProtT3","repo_kind":"official","path":"model/llama_flash_attention.py","file_url":"https://github.com/acharkq/ProtT3/blob/HEAD/model/llama_flash_attention.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":"5be37733318db298"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}