{"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/pin-tuning-parameter-efficient-in-context","title":"Pin-Tuning: Parameter-Efficient In-Context Tuning for Few-Shot Molecular Property Prediction","arxiv_id":"2411.01158","date":"2024-11-02","proceeding":null,"authors":["Qiang Liu","Shaozhen Liu","Xin Sun","Shu Wu","Liang Wang"],"abstract":"Molecular property prediction (MPP) is integral to drug discovery and material science, but often faces the challenge of data scarcity in real-world scenarios. Addressing this, few-shot molecular property prediction (FSMPP) has been developed. Unlike other few-shot tasks, FSMPP typically employs a pre-trained molecular encoder and a context-aware classifier, benefiting from molecular pre-training and molecular context information. Despite these advancements, existing methods struggle with the ineffective fine-tuning of pre-trained encoders. We attribute this issue to the imbalance between the abundance of tunable parameters and the scarcity of labeled molecules, and the lack of contextual perceptiveness in the encoders. To overcome this hurdle, we propose a parameter-efficient in-context tuning method, named Pin-Tuning. Specifically, we propose a lightweight adapter for pre-trained message passing layers (MP-Adapter) and Bayesian weight consolidation for pre-trained atom/bond embedding layers (Emb-BWC), to achieve parameter-efficient tuning while preventing over-fitting and catastrophic forgetting. Additionally, we enhance the MP-Adapters with contextual perceptiveness. This innovation allows for in-context tuning of the pre-trained encoder, thereby improving its adaptability for specific FSMPP tasks. When evaluated on public datasets, our method demonstrates superior tuning with fewer trainable parameters, improving few-shot predictive performance.","url_abs":"https://arxiv.org/abs/2411.01158v1","url_pdf":"https://arxiv.org/pdf/2411.01158v1.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":"pin-tuning-parameter-efficient-in-context","repo_url":"https://github.com/CRIPAC-DIG/Pin-Tuning","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"drug-discovery","task_name":"Drug Discovery"},{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"property-prediction","task_name":"Property Prediction"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.01158","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.01158"}},"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":"deterministic:regex_extraction","url":"https://github.com/CRIPAC-DIG/Pin-Tuning","reach":{"status":"ok"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"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":6,"samples":[{"code_sha256_prefix":"df989bdc7fb7497f","entry":"create_logger","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"explight.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/explight.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":"df989bdc7fb7497f"}},{"code_sha256_prefix":"4c3a1a0c72972804","entry":"dataset_sampler","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"dataset/sampler.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/dataset/sampler.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":"4c3a1a0c72972804"}},{"code_sha256_prefix":"372efad4b9cc4be2","entry":"get_dump_path","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"explight.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/explight.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":"372efad4b9cc4be2"}},{"code_sha256_prefix":"1fc1b5a753a43608","entry":"get_edge","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"models/graph_connector.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/models/graph_connector.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":"1fc1b5a753a43608"}},{"code_sha256_prefix":"bd1d11411c769e6d","entry":"initialize_exp","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"explight.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/explight.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":"bd1d11411c769e6d"}},{"code_sha256_prefix":"2882d20903d25ad4","entry":"sample_from_candi","repo":"CRIPAC-DIG/Pin-Tuning","repo_kind":"official","path":"dataset/sampler.py","file_url":"https://github.com/CRIPAC-DIG/Pin-Tuning/blob/HEAD/dataset/sampler.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":"2882d20903d25ad4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}