Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoCo

Overview

PoCo is a contrastive learning framework for polymer representation learning, with applications to property prediction and interpretability. This repository contains the source code for PoCo. For more details, please see our paper: Contrastive representation learning for polymer informatics.

poco-overview

Environment setup

Install a PyTorch build that matches your local CUDA environment, then install the dependencies:

pip install -r requirements.txt

Pretraining

  1. PoCo was pretrained on ~1M polymer SMILES from the PI1M dataset. The raw dataset contains invalid SMILES; please clean it with src/pretrain/preprocess.py before pretraining.
  2. Use src/pretrain/train_tokenizer.py to train a tokenizer.
  3. Run the pretraining script ./pretrain.sh.

We provide pretrained PoCo weights at https://huggingface.co/CremaX/PoCo.

Transfer learning

The training entry point for downstream tasks is src/finetune/finetune.py.

Use src/finetune/run_benchmark.py to reproduce the benchmark results. The adaptation code for the baseline models largely follows the original implementations. When running the benchmarks, additional dependencies or minor code modifications may be required to accommodate different local environments.

Benchmark results

Model Params (M)a drepb Khazana-MTL PolyOmics RadonPy OPC Gas
polyBERT 25 600 0.794 ± 0.019 0.790 ± 0.002 0.817 ± 0.028 0.787 ± 0.020 0.750 ± 0.029
TransPolymer 82 768 0.792 ± 0.017 0.795 ± 0.002 0.809 ± 0.026 0.786 ± 0.027 0.762 ± 0.031
PolyCL 25 600 0.794 ± 0.023 0.792 ± 0.001 0.813 ± 0.025 0.766 ± 0.025 0.765 ± 0.023
MMPolymer 129 1280 0.799 ± 0.020 0.795 ± 0.002 0.815 ± 0.026 0.779 ± 0.026 0.761 ± 0.022
PerioGT 91 2304 0.810 ± 0.025 0.805 ± 0.002 0.827 ± 0.021 0.792 ± 0.022 0.779 ± 0.022
PoCo 10 512 0.815 ± 0.016 0.800 ± 0.001 0.830 ± 0.026 0.792 ± 0.023 0.786 ± 0.025
PoCoconcat 10 1536 0.822 ± 0.015 0.806 ± 0.001 0.842 ± 0.024 0.803 ± 0.022 0.786 ± 0.025

a Number of parameters in millions.
b Representation dimension.

Citation

If you use PoCo in your research, please cite our paper:

@article{wang2026poco,
  title = {Contrastive representation learning for polymer informatics},
  author = {Wang, Lida and Long, Donghui},
  journal = {ChemRxiv},
  year = {2026},
  doi = {10.26434/chemrxiv.15003645/v1}
}

About

Contrastive representation learning for polymer informatics

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages