BiScale-GTR: Fragment-Aware Graph Transformers for Multi-Scale Molecular Representation Learning
Organizations: Department of Computer Science, The University of Texas at Dallas
Abstract
Fragment-level representations provide a natural way to capture recurring molecular substructures and reuse their learned representations across molecules. However, a shared fragment identity alone may not fully describe how a fragment is instantiated in a particular molecule, since the same fragment can exhibit different chemical behavior depending on its surrounding atomic environment. Effective fragment-based molecular learning therefore requires representations that are both reusable across molecules and sensitive to local atomic context. We introduce BiScale-GTR, a self-supervised molecular representation framework built around context-grounded shared fragment tokens. BiScale-GTR constructs a reusable graph Byte Pair Encoding (graph-BPE) vocabulary using Weisfeiler-Lehman (WL)-based fragment identity, chemical validity filtering, and recursive out-of-vocabulary (OOV) decomposition. Each shared fragment token is then grounded with atom-level GNN representations through atom-to-fragment pooling and gated fusion, allowing the same fragment identity to acquire context-dependent representations in different molecular environments. A structure-aware fragment Transformer performs global reasoning over these atom-grounded tokens, capturing reusable substructure identity, local chemical context, and long-range molecular dependencies. Experiments on MoleculeNet, PharmaBench, and the Long Range Graph Benchmark demonstrate strong performance across classification and regression tasks. Attribution analysis further shows that BiScale-GTR highlights chemically meaningful recurring motifs, providing interpretable links between molecular structure and predicted properties.
Figures & tables
| Model | Pretrain Data Size | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|---|
| GraphMVP ( Liu et al., 2021 ) | 50k | 70.8 0.5 | 74.9 0.8 | 77.7 0.6 | 79.3 1.5 | 63.1 0.2 | 60.2 1.1 | 76.0 0.1 |
| GraphMAE ( Hou et al., 2022 ) | 2M | 71.2 1.0 | 75.2 0.9 | 76.4 2.0 | 78.2 1.5 | 63.6 0.3 | 60.5 1.2 | 76.8 0.6 |
| Mole-BERT ( Xia et al., 2023 ) | 2M | 71.9 0.8 | 76.8 0.5 | 78.9 1.8 | 80.8 1.4 | 64.3 0.2 | 62.8 1.1 | 78.2 0.8 |
| SimSGT ( Liu et al., 2023 ) | 2M | 72.2 0.9 | 76.8 0.9 | 81.4 1.4 | 84.3 0.6 | 65.9 0.8 | 61.7 0.8 | 78.0 1.9 |
| GraphFP ( Luong and Singh, 2023 ) | 430k | 72.0 1.7 | 74.0 0.7 | 75.4 1.9 | 80.5 1.8 | 63.9 0.9 | 63.6 1.2 | 78.0 1.5 |
| MORE ( Son et al., 2025 ) | 2M | 71.9 0.9 | 75.6 0.5 | – | 82.8 1.3 | 64.6 0.6 | 60.9 0.6 | 77.0 0.7 |
| Model | CYP2C9 | CYP2D6 | CYP3A4 | HLMC | MLMC | RLMC | LogD | PPB | Sol |
|---|---|---|---|---|---|---|---|---|---|
| RF ( Rigatti, 2017 ) | 18.471 | 18.041 | 16.540 | 0.813 | 0.987 | 0.958 | 1.249 | 0.204 | 0.918 |
| XGBoost ( Chen and Guestrin, 2016 ) | 17.582 | 17.819 | 16.123 | 0.647 | 0.844 | 0.819 | 1.071 | 0.186 | 0.832 |
| CMPNN ( Swanson, 2019 ) | 18.377 | 19.156 | 16.701 | 0.921 | 1.130 | 0.939 | 0.807 | 0.236 | 0.858 |
| FPGNN ( Cai et al., 2022 ) | 16.933 | 17.611 | 15.606 | 0.604 | 0.774 | 0.716 | 0.838 | 0.179 | 0.747 |
| DHTNN ( Song et al., 2023 ) | 17.449 | 17.890 | 16.156 | 0.729 | 0.926 | 0.915 | 0.912 | 0.235 | 0.828 |
| KANO ( Li et al., 2023 ) | 17.350 | 17.622 | 15.307 | 0.554 | 0.767 | 0.762 | 0.766 | 0.185 | 0.772 |
| Model | Peptides-func (AP ) | Peptides-struct (MAE ) |
|---|---|---|
| GCN ( Kipf and Welling, 2016 ) | 0.5930 0.0023 | 0.3496 0.0013 |
| GCNII ( Chen et al., 2020 ) | 0.5543 0.0078 | 0.3471 0.0010 |
| GINE ( Hu et al., 2019 ) | 0.5498 0.0079 | 0.3547 0.0045 |
| GatedGCN ( Bresson and Laurent, 2017 ) | 0.5864 0.0077 | 0.3420 0.0013 |
| GatedGCN+RWSE ( Dwivedi et al., 2022 ) | 0.6069 0.0035 | 0.3357 0.0006 |
| Transformer ( Vaswani et al., 2017 ) + LapPE ( Dwivedi et al., 2023 ) | 0.6326 0.0126 | 0.2529 0.0016 |
| Variant | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|
| Full model (GNN + Transformer) | 68.4 0.8 | 76.1 0.4 | 81.6 0.9 | 85.0 1.1 | 62.2 0.2 | 64.2 0.9 | 79.2 0.6 |
| Transformer-only (w/o GNN) | 62.8 0.8 | 73.2 0.5 | 71.6 0.8 | 65.0 0.9 | 61.1 0.7 | 59.8 0.5 | 77.1 0.4 |
| GNN-only (w/o Transformer) | 58.7 0.3 | 51.9 0.5 | 51.8 0.3 | 59.2 1.1 | 50.2 0.3 | 53.3 0.4 | 51.0 0.5 |
| Fixed sum fusion | 67.4 0.8 | 75.1 0.6 | 78.1 0.5 | 77.0 1.0 | 60.8 0.3 | 62.2 1.1 | 78.4 0.5 |
| Tokenizer | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV | Peptide-func |
|---|---|---|---|---|---|---|---|---|
| Atom | 52.6 10.2 | 74.5 0.3 | 76.7 1.8 | 71.5 13.6 | 61.9 0.2 | 55.1 1.1 | 75.4 0.2 | 42.2 0.03 |
| BRICS | 68.0 1.4 | 75.0 0.3 | 73.0 1.7 | 79.1 2.2 | 62.0 0.1 | 62.7 0.4 | 75.1 0.6 | 62.5 0.01 |
| Graph-BPE (SMILES) | 63.4 0.7 | 73.4 0.1 | 76.1 0.5 | 79.3 2.5 | 60.9 0.6 | 60.1 0.7 | 76.4 1.1 | 58.8 0.03 |
| Graph-BPE + WL (Ours) | 68.4 0.8 | 76.1 0.4 | 81.6 0.9 | 85.0 1.1 | 62.2 0.2 | 64.2 0.9 | 79.2 0.6 | 67.2 0.01 |
| Variant | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|
| w/o pretraining | 59.8 0.3 | 70.5 0.8 | 59.9 0.6 | 66.2 1.3 | 59.8 0.3 | 59.6 0.7 | 74.6 0.4 |
| mask ratio = 0.1 | 69.3 0.5 | 74.3 0.7 | 77.9 0.5 | 83.2 0.8 | 61.3 0.4 | 62.1 0.6 | 77.9 0.3 |
| mask ratio = 0.2 (Full model) | 68.4 0.8 | 76.1 0.4 | 81.6 0.9 | 85.0 1.1 | 62.2 0.2 | 64.2 0.9 | 79.2 0.6 |
| mask ratio = 0.3 | 66.9 0.4 | 75.2 0.6 | 76.8 0.6 | 81.0 1.4 | 61.9 0.6 | 62.3 0.4 | 75.7 0.4 |
| Dataset | Metric | Gap ( ) | ||
|---|---|---|---|---|
| HIV | ROC-AUC | 28.9 | 10.2 | 18.7 |
| Tox21 | ROC-AUC | 11.1 | 4.1 | 7.0 |
| BACE | ROC-AUC | 29.8 | 11.2 | 18.6 |
| BBBP | ROC-AUC | 37.9 | 10 | 27.9 |
| Model | Within-token spread ( ) | Centroid separation ( ) |
|---|---|---|
| BiScale-GTR (Molecule) | 0.3627 | 0.4052 |
| BiScale-GTR (Fragment) | 0.2595 | 0.5549 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Size | Task Type | Description |
|---|---|---|---|
| CYP2C9 | 999 | Regression | Binding affinity to CYP2C9 |
| CYP2D6 | 1,214 | Regression | Binding affinity to CYP2D6 |
| CYP3A4 | 1,980 | Regression | Binding affinity to CYP3A4 |
| HLMC | 2,286 | Regression | Human liver microsomal clearance |
| MLMC | 1,403 | Regression | Mouse liver microsomal clearance |
| RLMC | 1,129 | Regression | Rat liver microsomal clearance |
| Dataset | Size | Tasks | Pos : Neg Ratio | Description |
|---|---|---|---|---|
| BBBP | 2,039 | 1 | 0.8 : 1 | Blood-brain barrier permeability |
| Tox21 | 7,831 | 12 | varies 1–5 : 1 | Toxicity on 12 biological targets |
| ToxCast | 8,575 | 617 | widely variable | High-throughput toxicity screening |
| SIDER | 1,427 | 27 | 1–15 : 1 | Adverse drug reactions |
| MUV | 93,087 | 17 | 500 : 1 | Virtual screening validation |
| HIV | 41,127 | 1 | 11 : 1 | HIV replication inhibition |
| Peptides-func | Peptides-struct | |
| Number of Graphs | 15,535 | 15,535 |
| Number of Tasks | 1 | 5 |
| Number of Classes | 10 | – |
| Task Type | Multi-label classification | Multi-label regression |
| Description | Peptides-func predicts peptide biological activities such as antibacterial and antiviral functions. Peptides-struct predicts global structural properties derived from peptide 3D conformations, including descriptors such as length and sphericity. | |
| Benchmark | Batch Size | Weight Decay | Dropout | Head LR | Backbone LR | Scheduler (factor, patience) |
|---|---|---|---|---|---|---|
| MoleculeNet | 64 | 0.10, 0.20 | None | |||
| PharmaBench | 256 | 0.10 | Plateau (0.8, 6) | |||
| Long-range Peptides | 128 | 0.05 | Plateau (0.5, 20) |
| Stage | Cost | Notes |
|---|---|---|
| Vocabulary construction, 800 fragments | 22 min wall-clock | One-time offline preprocessing |
| Pretraining | 8 GPU-hours | 503k optimization steps |
| Fine-tuning | 0.33–2.5 GPU-hours per dataset | Varies with dataset size and early stopping |
| Inference | 15–25 ms/molecule | Tokenization + forward pass |
| Dataset | Fallback Rate | UNK Rate |
|---|---|---|
| MoleculeNet | ||
| BACE | 0.1248 | 0.0000 |
| BBBP | 0.0525 | 0.0022 |
| Tox21 | 0.0742 | 0.0033 |
| ToxCast | 0.0867 | 0.0089 |
| SIDER | 0.1153 | 0.0067 |
| Vocabulary Size | Valid Fragments | Functional Group Categories |
|---|---|---|
| 400 | 331 | 25 |
| 800 | 677 | 27 |
| 1600 | 1374 | 28 |
| Vocabulary Size | Tox21 ROC-AUC | HIV ROC-AUC | Peptides-func AP |
|---|---|---|---|
| 400 | 74.9 0.3 | 78.0. 0.8 | 0.6571 0.0139 |
| 800 | 76.1 0.4 | 79.2 0.6 | 0.6717 0.0107 |
| 1600 | 76.3 0.3 | 78.9 0.4 | 0.6721 0.0201 |
| Method | Peptides-func (AP) | Peptides-struct (MAE) |
|---|---|---|
| Graph BPE (without validity/OOV handling) | 0.6321 | 0.2929 |
| Graph BPE (with validity/OOV handling) | 0.6717 | 0.2621 |
| Variant | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|
| Full model | 68.4 0.8 | 76.1 0.4 | 81.6 0.9 | 85.0 1.1 | 62.2 0.9 | 64.2 0.9 | 79.2 0.6 |
| w/o | 67.4 0.8 | 75.2 0.4 | 79.8 0.7 | 83.3 0.9 | 61.5 0.3 | 63.1 0.8 | 78.3 0.4 |
| w/o | 67.0 0.7 | 74.1 0.6 | 79.1 0.7 | 82.1 0.9 | 61.3 0.5 | 62.2 0.7 | 77.1 0.5 |
| w/o | 68.3 0.9 | 75.9 0.5 | 80.9 0.8 | 84.1 1.2 | 62.1 0.8 | 63.4 0.8 | 78.4 0.4 |
| w/o all biases | 65.8 0.8 | 73.8 0.8 | 77.9 0.8 | 80.6 0.8 | 60.5 0.4 | 61.4 0.8 | 77.6 0.6 |
| Variant | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|
| 3-layer GNN (Full model) | 68.4 0.8 | 76.1 0.4 | 81.6 0.9 | 85.0 1.1 | 62.2 0.2 | 64.2 0.9 | 79.2 0.6 |
| 6-layer GNN | 62.9 0.9 | 76.2 0.3 | 78.2 0.7 | 81.7 0.8 | 61.3 0.3 | 59.8 0.6 | 79.1 0.4 |
| 8-layer GNN | 60.2 0.7 | 75.3 0.6 | 77.8 0.8 | 79.1 0.9 | 61.1 0.5 | 59.6 0.4 | 78.3 0.7 |
| Mask Ratio | MFP Accuracy (%) | MFP Loss |
|---|---|---|
| 10% | 76.8 | 0.8740 |
| 20% | 70.2 | 1.037 |
| 30% | 70.9 | 0.9991 |
| Variant | BBBP | Tox21 | MUV | BACE | ToxCast | SIDER | HIV |
|---|---|---|---|---|---|---|---|
| Frequency-aware masking (Full) | 68.4 | 76.1 | 81.6 | 85.0 | 62.2 | 64.2 | 79.2 |
| Uniform masking | 67.2 | 75.3 | 80.1 | 83.1 | 61.9 | 63.7 | 77.4 |
| Feature | Description |
|---|---|
| Max valence | Maximum valence of the atom as determined by RDKit |
| Bond order sum | Sum of bond orders of all bonds connected to the atom |
| Remaining valence | Difference between maximum valence and bond order sum |
| Aromatic indicator | Binary flag indicating whether the atom is aromatic |