Anonymoususer2223 commited on
Commit
713f374
·
verified ·
1 Parent(s): 270c4c9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +385 -159
README.md CHANGED
@@ -1,176 +1,402 @@
1
  ---
2
  license: mit
 
 
 
 
 
3
  ---
4
 
5
- # ProtCompass Embeddings
6
-
7
- Pre-computed protein embeddings from 70+ encoders across 15 downstream tasks, plus probing results and evaluation outputs.
8
-
9
- ## Dataset Structure
10
-
11
- ```
12
- embeddings/ # Compressed embeddings (~150GB)
13
- ├── contact_prediction/ # Per-encoder compressed (300GB → ~60GB)
14
- │ ├── esm2.tar.gz
15
- │ ├── gearnet.tar.gz
16
- │ └── ... (36 encoders)
17
- ├── secondary_structure/ # Per-encoder compressed (129GB → ~30GB)
18
- ├── ppi_site/ # Per-encoder compressed (80GB → ~20GB)
19
- ├── metal_binding/ # Per-encoder compressed (41GB → ~10GB)
20
- ├── mutation_effect.tar.gz # Per-task compressed (27GB → ~7GB)
21
- ├── go_bp.tar.gz # Per-task compressed (7.9GB → ~2GB)
22
- ├── stability.tar.gz # Per-task compressed (4.1GB → ~1GB)
23
- ├── solubility.tar.gz # Per-task compressed (3.6GB → ~900MB)
24
- ├── go_mf.tar.gz # Per-task compressed (3.1GB → ~800MB)
25
- ├── fluorescence.tar.gz # Per-task compressed (3.0GB → ~800MB)
26
- ├── ec_classification.tar.gz # Per-task compressed (1.9GB → ~500MB)
27
- ├── subcellular_localization.tar.gz # Per-task compressed (1.4GB → ~400MB)
28
- ├── membrane_soluble.tar.gz # Per-task compressed (1.4GB → ~400MB)
29
- ├── remote_homology.tar.gz # Per-task compressed (805MB → ~200MB)
30
- └── ppi_affinity.tar.gz # Per-task compressed (169MB → ~50MB)
31
-
32
- probing_IF/ # Probing results (2.8GB)
33
- ├── probing_embeddings/ # Invariant family embeddings (12 encoders)
34
- └── probing_results_architecture_full/ # Full probing results (195 files)
35
-
36
- results/ # Evaluation results (6.9MB)
37
- └── {encoder}/{task}/ # Per-encoder, per-task results
38
-
39
- outputs/ # Analysis outputs (12MB)
40
- ├── alignment_analysis/ # Alignment analysis figures
41
- ├── paper_figures_v12/ # Final paper figures
42
- └── uncertainty_appendix/ # Uncertainty analysis
43
- ```
44
-
45
- ## Decompression Instructions
46
-
47
- All embeddings are compressed with gzip. Decompress before use:
48
-
49
- ### Large Tasks (per-encoder compression)
50
- For `contact_prediction`, `secondary_structure`, `ppi_site`, `metal_binding`:
51
-
52
- ```bash
53
- # Decompress all encoders in a task
54
- cd embeddings/contact_prediction/
55
- for f in *.tar.gz; do tar -xzf "$f"; done
56
-
57
- # Or decompress specific encoder
58
- tar -xzf esm2.tar.gz
59
- ```
60
-
61
- ### Medium/Small Tasks (per-task compression)
62
- For all other tasks:
63
-
64
- ```bash
65
- # Decompress entire task
66
- cd embeddings/
67
- tar -xzf mutation_effect.tar.gz
68
- tar -xzf secondary_structure.tar.gz
69
- # etc.
70
-
71
- # Or decompress all tasks at once
72
- for f in *.tar.gz; do tar -xzf "$f"; done
73
- ```
74
-
75
- ## File Format
76
-
77
- After decompression, each encoder directory contains:
78
- - `train_embeddings.npy`: Training set embeddings (N × D)
79
- - `test_embeddings.npy`: Test set embeddings (M × D)
80
- - `train_labels.npy`: Training labels
81
- - `test_labels.npy`: Test labels
82
- - `train_ids.txt`: Protein IDs for training set
83
- - `test_ids.txt`: Protein IDs for test set
84
- - `meta.json`: Metadata (encoder name, dimensions, dataset info)
85
-
86
- ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
88
  ```python
89
  import numpy as np
90
- from huggingface_hub import hf_hub_download
91
- import tarfile
92
-
93
- # Download and decompress embeddings
94
- tar_path = hf_hub_download(
95
- repo_id="Anonymoususer2223/ProtCompass_Embeddings",
96
- filename="embeddings/mutation_effect.tar.gz",
97
- repo_type="dataset"
98
- )
99
-
100
- # Extract
101
- with tarfile.open(tar_path, 'r:gz') as tar:
102
- tar.extractall(path="./embeddings/")
103
-
104
- # Load embeddings
105
- train_emb = np.load("embeddings/mutation_effect/esm2/train_embeddings.npy")
106
- test_emb = np.load("embeddings/mutation_effect/esm2/test_embeddings.npy")
107
- train_labels = np.load("embeddings/mutation_effect/esm2/train_labels.npy")
108
- test_labels = np.load("embeddings/mutation_effect/esm2/test_labels.npy")
109
-
110
- # Use for downstream tasks
111
- from sklearn.linear_model import Ridge
112
- model = Ridge()
113
- model.fit(train_emb, train_labels)
114
- score = model.score(test_emb, test_labels)
115
- print(f"Test R²: {score:.3f}")
116
  ```
117
 
118
- ## Encoders Included
119
-
120
- ### Sequence Encoders (8)
121
- ESM2 (650M, 150M, 35M), ESM1b, ESM3, ProtTrans, ProstT5, ProteinBERT-BFD, Ankh
122
-
123
- ### Structure Encoders (50+)
124
- GearNet, GCPNet, EGNN, GVP, IPA, TFN, SchNet, DimeNet, MACE, CDConv, ProteinMPNN, PottsMPNN, dMaSIF, and more
125
-
126
- ### Multimodal Encoders (5)
127
- SaProt, ESM-IF, FoldVision
128
-
129
- ### Baselines (5)
130
- Random, Length, Torsion, One-hot, BLOSUM
131
-
132
- ## Dataset Statistics
133
-
134
- - **Compressed size**: ~150GB
135
- - **Uncompressed size**: ~600GB
136
- - **Total encoders**: 70+
137
- - **Total tasks**: 15
138
- - **Total proteins**: ~500K across all tasks
139
- - **Compression ratio**: ~4x (gzip)
140
 
141
- ## Compression Details
142
-
143
- - **Large tasks** (>30GB): Per-encoder compression for flexibility
144
- - Users can download only specific encoders
145
- - Enables parallel decompression
146
-
147
- - **Medium/Small tasks** (<30GB): Per-task compression
148
- - Single archive per task
149
- - Faster download for complete task data
150
-
151
- ## Citation
152
-
153
- If you use these embeddings, please cite:
154
-
155
- ```bibtex
156
- @article{protcompass2026,
157
- title={ProtCompass: Interpretable Benchmarking and Task-Aware Evaluation of Protein Encoders},
158
- author={Your Name et al.},
159
- journal={NeurIPS},
160
- year={2026}
161
- }
162
  ```
163
 
164
- ## Related Resources
165
 
166
- - **Code Repository**: [GitHub](https://github.com/yourusername/protcompass)
167
- - **Raw Datasets**: [ProtEnv on HuggingFace](https://huggingface.co/datasets/Anonymoususer2223/ProtEnv)
168
- - **Paper**: [arXiv](https://arxiv.org/abs/xxxx.xxxxx)
 
 
 
169
 
170
- ## License
171
 
172
- MIT License
 
 
 
 
173
 
174
- ## Contact
175
 
176
- For questions or issues, please open an issue on the [GitHub repository](https://github.com/yourusername/protcompass).
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - biology
5
+ - protein
6
+ - protein-embeddings
7
+ - benchmark
8
  ---
9
 
10
+ # ProtCompass embeddings
11
+
12
+ Frozen protein embeddings, input-audit records and label files for the paper
13
+ **ProtCompass: Biological Information and Predictive Utility in Protein Representations**
14
+ (anonymous submission to ICLR 2027).
15
+
16
+ Protein encoders are usually evaluated by structural probing, downstream prediction and concept erasure. These
17
+ measurements can mix signal learned by the encoder with information that is already present in the input or that the
18
+ evaluation adds. ProtCompass separates these sources. It audits which inputs each encoder actually reads, compares
19
+ structural probe scores with non-learned descriptions of the same inputs, compares downstream scores with simple
20
+ sequence baselines, and controls concept-erasure experiments for the representation capacity that is removed together
21
+ with the target property. The paper evaluates 33 encoders on a probing suite of 21 probes built from CATH 4.3 domains
22
+ and on ten downstream tasks.
23
+
24
+ - Code, result tables and analysis scripts: <https://anonymous.4open.science/r/ProEmbedEva-C4F6>
25
+ - Predicted structures for four downstream tasks: <https://huggingface.co/datasets/Anonymoususer2223/ProtEnv>
26
+
27
+ This repository holds the release that backs the paper: embeddings, labels, the input audit and the pretrained
28
+ weights of the structure encoders. Its paths mirror the working directory of the code (for example
29
+ `extract/embeddings/<task>/<encoder>/` and `checkpoints/`). An earlier release was removed; see
30
+ [Earlier release (removed)](#earlier-release-removed).
31
+
32
+ ## Contents
33
+
34
+ Sizes are in GB (10^9 bytes).
35
+
36
+ | Path | Content | Files | Size | Paper appendix |
37
+ |---|---|---:|---:|---|
38
+ | `extract/embeddings/<task>/<encoder>/` | pooled embeddings of 33 encoders and one non-learned reference on the ten downstream tasks | 2,237 | 6.5 | Tasks and protocols (The downstream tasks); Controls for the downstream comparison; Controls for the erasure analysis; Seed variability |
39
+ | `extract/manifest/<task>.csv` | one row per protein: id, split, sequence, structure file, label | 11 | 0.12 | Tasks and protocols (The downstream tasks) |
40
+ | `extract/pairs/ppi_affinity_pairs.csv` | chain pairs and labels of the PPI affinity task | 1 | <0.01 | Tasks and protocols (The downstream tasks) |
41
+ | `extract/encoder_input_audit.csv`, `encoder_atom_audit.csv`, `encoder_sidechain_audit.csv` | measured input audit | 3 | <0.01 | Study Design; The Encoder Panel |
42
+ | `probing_embeddings/<encoder>/` | per-residue and pooled embeddings of the 33 encoders on 19,461 CATH 4.3 domains | 101 | 96.9 | Tasks and protocols (Probe protocol); Controls for the probing comparison; Two residue-level tasks, and what the pooled readout hides |
43
+ | `probing_embeddings_vframe/<encoder>_vframe/` | GVP, GCPNet (random and pretrained) and MACE with the direction of their vector channels kept | 19 | 5.2 | Controls for the probing comparison (Equivariant encoders with the direction of their vector channels kept) |
44
+ | `probing_data/labels.h5`, `probing_data/splits/` | probe labels, coordinates and splits of the CATH domains | 8 | 0.32 | Tasks and protocols (The probing suite; Probe protocol) |
45
+ | `extract/ab_modality/embeddings/`, `extract/ab_modality/probing_embeddings/` | ESM3 and SaProt with the structure input removed, and SaProt with shuffled 3Di tokens | 210 | 24.9 | Controls for the downstream comparison (Removing the structure input from the same checkpoint) |
46
+ | `extract/ab_modality/encoder_input_audit_ab*.csv` | input audit of those three sources | 2 | <0.01 | same |
47
+ | `confirmation/`, `confirmation2/` | probing cohorts A and B: CATH 4.4 domains absent from CATH 4.3 | 52 | 6.3 | Confirmation on data and splits the development did not use (The probing headline on CATH 4.4 domains absent from CATH 4.3) |
48
+ | `confirmation_downstream/` | held-out downstream proteins never used in development | 280 | 0.54 | Confirmation on data and splits the development did not use (The demand results on downstream proteins never scored) |
49
+ | `masif_site/` | residue-level interface task rebuilt from MaSIF-site | 90 | 20.2 | Two residue-level tasks, and what the pooled readout hides (Interface residues) |
50
+ | `atlas/data_v4/` | latent-space atlas: 2D maps, k-NN purity and CKA for every task layer | 12 | 0.06 | Latent-Space Atlas |
51
+ | `checkpoints/<encoder>/` | pretrained weights of six structure encoders, with licences and `SHA256SUMS` | 14 | 0.16 | The Encoder Panel |
52
+
53
+ The current release has 3,040 files and 161.2 GB in total. The appendix names are section and subsection titles of
54
+ the paper.
55
+
56
+ ## Encoders
57
+
58
+ The paper evaluates 33 encoders. They are declared as 9 sequence-based, 19 structure-based and 5 multimodal models.
59
+ The analyses group them by a measured input audit, which finds that 10 encoders do not read coordinates
60
+ (sequence-only) and 23 do (coordinate-reading). The only encoder whose measured group differs from its declared class
61
+ is ProstT5, which is declared multimodal and read on its amino-acid track only.
62
+
63
+ The directory name is the key used in every path. *Width* is the width of the stored array. *Atoms read* comes from
64
+ the atom audit (`extract/encoder_atom_audit.csv`); "side chain" marks the three encoders that the side-chain audit
65
+ (`extract/encoder_sidechain_audit.csv`) finds to read atoms beyond CB.
66
+
67
+ | Directory | Paper name | Declared class | Weights | Width | Audit group | Reads residue identity | Atoms read |
68
+ |---|---|---|---|---:|---|---|---|
69
+ | `ankh_base` | Ankh | sequence | pretrained | 768 | sequence-only | yes | - |
70
+ | `esm1b` | ESM-1b | sequence | pretrained | 1280 | sequence-only | yes | - |
71
+ | `esm2_8m` | ESM2-8M | sequence | pretrained | 320 | sequence-only | yes | - |
72
+ | `esm2_35m` | ESM2-35M | sequence | pretrained | 480 | sequence-only | yes | - |
73
+ | `esm2_150m` | ESM2-150M | sequence | pretrained | 640 | sequence-only | yes | - |
74
+ | `esm2_650m` | ESM2-650M | sequence | pretrained | 1280 | sequence-only | yes | - |
75
+ | `esm2_3b` | ESM2-3B | sequence | pretrained | 2560 | sequence-only | yes | - |
76
+ | `protbert_bfd` | ProtBert | sequence | pretrained | 1024 | sequence-only | yes | - |
77
+ | `prottrans_t5_xl_u50` | ProtT5-XL | sequence | pretrained | 1024 | sequence-only | yes | - |
78
+ | `prostt5` | ProstT5 | multimodal | pretrained | 1024 | sequence-only | yes | - |
79
+ | `dimenet` | DimeNet | structure | random | 128 | coordinate-reading | yes | CA |
80
+ | `esm_if1` | ESM-IF1 | structure | pretrained | 512 | coordinate-reading | no | N, CA, C |
81
+ | `foldseek_3di` | Foldseek | structure | pretrained (tokeniser, no learned parameters) | 20 | coordinate-reading | no | N, CA, CB |
82
+ | `gcpnet_random` | GCPNet | structure | random | 116 | coordinate-reading | yes | N, CA, C, O, CB, side chain |
83
+ | `gcpnet_pretrained` | GCPNet-pre | structure | pretrained | 116 | coordinate-reading | yes | N, CA, C, O, CB, side chain |
84
+ | `gvp` | GVP | structure | random | 116 | coordinate-reading | yes | N, CA, C |
85
+ | `gearnet` | GearNet | structure | random | 512 | coordinate-reading | yes | CA |
86
+ | `gearnet_pretrained` | GearNet-pre | structure | pretrained | 512 | coordinate-reading | yes | CA |
87
+ | `ipa` | IPA | structure | random | 128 | coordinate-reading | yes | CA |
88
+ | `ipa_pretrained` | IPA-pre | structure | pretrained | 128 | coordinate-reading | yes | CA |
89
+ | `mace` | MACE | structure | random | 128 | coordinate-reading | yes | CA |
90
+ | `pottsmpnn` | PottsMPNN | structure | random | 128 | coordinate-reading | no | N, CA, C, O |
91
+ | `pottsmpnn_ft` | PottsMPNN-ft | structure | pretrained | 128 | coordinate-reading | no | N, CA, C, O |
92
+ | `pottsmpnn_pretrained` | PottsMPNN-pre | structure | pretrained | 128 | coordinate-reading | no | N, CA, C, O |
93
+ | `pottsmpnn_soluble` | PottsMPNN-sol | structure | pretrained | 128 | coordinate-reading | no | N, CA, C, O |
94
+ | `proteinmpnn` | ProteinMPNN | structure | pretrained | 128 | coordinate-reading | no | N, CA, C, O |
95
+ | `schnet` | SchNet | structure | random | 128 | coordinate-reading | yes | CA |
96
+ | `tfn` | TFN | structure | random | 128 | coordinate-reading | yes | CA |
97
+ | `tfn_pretrained` | TFN-pre | structure | pretrained | 128 | coordinate-reading | yes | CA |
98
+ | `cdconv` | CDConv | multimodal | random | 256 | coordinate-reading | yes | CA |
99
+ | `esm3` | ESM3 | multimodal | pretrained | 1536 | coordinate-reading | yes | N, CA, C |
100
+ | `foldvision` | FoldVision | multimodal | pretrained | 1024 | coordinate-reading | yes | N, CA, C, O, CB, side chain |
101
+ | `saprot` | SaProt | multimodal | pretrained | 1280 | coordinate-reading | yes | N, CA, CB |
102
+
103
+ Randomly initialised encoders use one fixed seed for all proteins; the hash of their weights is recorded in
104
+ `meta.json`. Three further encoders were audited and are not released: EGNN (its embeddings do not change when the
105
+ coordinates change), GeoBPE (its output changes under a rigid motion) and dMaSIF (all-zero embeddings). FoldVision has
106
+ no extraction on remote homology, so it is scored on nine tasks.
107
+
108
+ ### Which layer is read
109
+
110
+ Every embedding is taken from the last representation the encoder computes before any task head or decoder. Where an
111
+ encoder has residue states, a protein is the masked mean of its residue states. The rule of each encoder is recorded in
112
+ the `rule` field of its `meta.json`.
113
+
114
+ | Encoders | Representation read |
115
+ |---|---|
116
+ | Ankh, ESM-1b, ESM2 (all sizes), ProtBert, ProtT5-XL | final hidden state, special tokens removed |
117
+ | ProstT5 | final hidden state of the amino-acid track with the `<AA2fold>` prefix, special tokens removed; no 3Di input |
118
+ | ESM3 | final trunk residue embeddings, sequence and structure tracks |
119
+ | SaProt | final hidden states at the residue positions of the combined amino-acid and 3Di tokens |
120
+ | SchNet, TFN, DimeNet, MACE, GearNet, CDConv, IPA (random and pretrained versions) | final invariant node states; IPA reads the structure in a canonical pose |
121
+ | GVP, GCPNet (random and pretrained) | final scalar channels plus the norm of each vector channel (100 + 16 = 116) |
122
+ | ProteinMPNN, PottsMPNN (all four) | encoder output h_V, before the decoder |
123
+ | ESM-IF1 | output of the GVP-Transformer encoder, before decoding |
124
+ | Foldseek | one-hot 3Di state per residue; the protein vector is the 3Di state frequency |
125
+ | FoldVision | the model's global embedding; no residue states |
126
+
127
+ ## Pretrained weights
128
+
129
+ `checkpoints/` holds the local checkpoint files that six of the released structure encoders read. Every file is
130
+ byte-identical to its upstream release, and loading it with the project's wrapper on CPU reproduces the weight hash
131
+ (`weights_sha256`) recorded in the `meta.json` of the released embeddings. The upstream licence is stored next to each
132
+ file, and `checkpoints/SHA256SUMS` lists the full hashes. `checkpoints/README.md` has a script that links the files
133
+ to the paths the code reads.
134
+
135
+ | Encoder | File in this repository | Size (MB) | SHA-256 (first 16) | Source | Licence | Path the code reads |
136
+ |---|---|---:|---|---|---|---|
137
+ | ProteinMPNN | `checkpoints/proteinmpnn/proteinmpnn_v48_020.pt` | 6.7 | `c9cb4a671d796041` | ProteinMPNN repository, `vanilla_model_weights/v_48_020.pt` | MIT | `protcompass/checkpoints/proteinmpnn_v48_020.pt` |
138
+ | GearNet-pre | `checkpoints/gearnet_pretrained/mc_gearnet_edge.pth` | 80.7 | `6dc11e2db6eff3c9` | Zenodo, DOI 10.5281/zenodo.7593637 | CC BY 4.0 | `protcompass/checkpoints/gearnet/mc_gearnet_edge.pth` |
139
+ | GCPNet-pre (GCPNet reads its hyper-parameters) | `checkpoints/gcpnet_pretrained/model_epoch_115_..._globalkendall_0_676.ckpt` | 14.3 | `ff7b73be01fb57d5` | GCPNet repository, `checkpoints/PSR/` (PSR task model) | MIT | `protcompass/external_repos/GCPNet/checkpoints/PSR/` |
140
+ | PottsMPNN-pre | `checkpoints/pottsmpnn_pretrained/pottsmpnn_20.pt` | 20.5 | `28b1620a71883142` | PottsMPNN repository, `proteinmpnn_compatible_model_weights/` | MIT | `protcompass/external_repos/PottsMPNN/proteinmpnn_compatible_model_weights/pottsmpnn_20.pt` |
141
+ | PottsMPNN-sol | `checkpoints/pottsmpnn_soluble/sol_pottsmpnn_20.pt` | 20.7 | `f203a69773df41a1` | PottsMPNN repository, `soluble_model_weights/` | MIT | `protcompass/external_repos/PottsMPNN/soluble_model_weights/sol_pottsmpnn_20.pt` |
142
+ | PottsMPNN-ft | `checkpoints/pottsmpnn_ft/potts_ft.pt` | 20.7 | `b672ff4ed1492560` | PottsMPNN repository, `ft_model_weights/` | MIT | `protcompass/external_repos/PottsMPNN/ft_model_weights/potts_ft.pt` |
143
+
144
+ The code paths are relative to the root of the code repository, whose `protcompass/` folder mirrors this repository.
145
+ The upstream repositories are github.com/dauparas/ProteinMPNN (commit 8907e66), github.com/BioinfoMachineLearning/GCPNet
146
+ (commit 172733b) and github.com/KeatingLab/PottsMPNN (commit a6ccac3); a clone of GCPNet or PottsMPNN at that commit
147
+ already holds its files at the paths the code reads.
148
+
149
+ Weights loaded from a public source, which this repository does not copy:
150
+
151
+ | Encoder | Source | Revision |
152
+ |---|---|---|
153
+ | ESM-1b | `facebook/esm1b_t33_650M_UR50S` | `7b37824baec4d3658e1df7479222a7c79b465b76` |
154
+ | ESM2-8M | `facebook/esm2_t6_8M_UR50D` | `c731040fcd8d73dceaa04b0a8e6329b345b0f5df` |
155
+ | ESM2-35M | `facebook/esm2_t12_35M_UR50D` | `6fbf070e65b0b7291e7bbcd451118c216cff79d8` |
156
+ | ESM2-150M | `facebook/esm2_t30_150M_UR50D` | `a695f6045e2e32885fa60af20c13cb35398ce30c` |
157
+ | ESM2-650M | `facebook/esm2_t33_650M_UR50D` | `08e4846e537177426273712802403f7ba8261b6c` |
158
+ | ESM2-3B | `facebook/esm2_t36_3B_UR50D` | `476b639933c8baad5ad09a60ac1a87f987b656fc` |
159
+ | ProtBert | `Rostlab/prot_bert_bfd` | `6c5c8a55a52ff08a664dfd584aa1773f125a0487` |
160
+ | ProtT5-XL | `Rostlab/prot_t5_xl_half_uniref50-enc` | `94a6abc029ae13029317b140b7424e012bf8dfbf` |
161
+ | Ankh | `ElnaggarLab/ankh-base` | `d99cb6b966530dfc2ae96bc69d9255c2a07308b0` |
162
+ | ProstT5 | `Rostlab/ProstT5` | `d7d097d5bf9a993ab8f68488b4681d6ca70db9e5` |
163
+ | SaProt | `westlake-repl/SaProt_650M_AF2` | `d9b9ad00ef61c0990e611b2b43f2231c7de24b38` |
164
+ | FoldVision | `AlexanderKroll/foldvision-encoder` | not recorded |
165
+ | ESM-IF1 | `torch.hub.load("facebookresearch/esm:main", "esm_if1_gvp4_t16_142M_UR50")` (ESM release, MIT) | not recorded |
166
+ | Foldseek 3Di | the `mini3di` package, version 0.2.1 (BSD-3-Clause); no weights file | 0.2.1 |
167
+
168
+ The first twelve are Hugging Face hub ids; the revisions are those recorded in the `checkpoint_revision` field of each
169
+ `meta.json`.
170
+
171
+ - **ESM3.** The `esm3-sm-open-v1` weights are distributed by EvolutionaryScale under the Cambrian Non-Commercial
172
+ License Agreement, which does not allow redistribution, so they are not in this repository. Accept the licence and
173
+ download them from the gated Hugging Face repository `EvolutionaryScale/esm3-sm-open-v1`. The code expects them under
174
+ `protcompass/esm3-sm-open-v1/` (weights file `data/weights/esm3_sm_open_v1.pth`).
175
+ - **TFN-pre and IPA-pre.** Their weights were taken from the models' released repositories and are not redistributed
176
+ here. The `meta.json` of their embeddings records the SHA-256 prefix of the file that was used (`17af58de61a4674c`
177
+ for TFN-pre, `cd4ca8e7f61daba2` for IPA-pre). The code expects them at `protcompass/checkpoints/tfn_pretrained/best.pt`
178
+ and `protcompass/checkpoints/ipa_pretrained/best.pt`.
179
+ - **Randomly initialised encoders** (SchNet, TFN, DimeNet, MACE, GearNet, IPA, GVP, GCPNet, CDConv, PottsMPNN) have no
180
+ weights file. They are built with the fixed seed 20260919, and the hash of the resulting weights is in each
181
+ `meta.json`.
182
+
183
+ ## Downstream tasks
184
+
185
+ Fourteen tasks were assembled. Four (contact prediction, mutation effect, PPI sites and metal binding) were excluded
186
+ because their labels or metric were unsuitable (appendix "Tasks and analyses the paper evaluated and does not use"),
187
+ and ten are scored. Every encoder reads the same rows of a task. For
188
+ each task the embeddings cover the rows of the manifest with `stage1 == 1`.
189
+
190
+ | Directory | Task | Metric | Source dataset | Structures | train / valid / test |
191
+ |---|---|---|---|---|---|
192
+ | `ec_classification` | EC classification | accuracy | ProteinWorkshop | experimental (PDB) | 6,000 / 1,500 / 3,000 |
193
+ | `go_mf` | GO molecular function | F_max | ProteinWorkshop | experimental (PDB) | 6,000 / 1,500 / 2,904 |
194
+ | `go_bp` | GO biological process | F_max | ProteinWorkshop | experimental (PDB) | 6,000 / 1,500 / 2,903 |
195
+ | `remote_homology` | remote homology (fold) | accuracy | TAPE | experimental (PDB) | 6,000 / 506 / 480 |
196
+ | `subcellular_localization` | localisation, 10 classes | accuracy | DeepLoc 2 | predicted (AlphaFold DB) | 6,000 / 1,500 / 2,473 |
197
+ | `membrane_soluble` | membrane versus soluble | AUROC | DeepLoc 2 | predicted (AlphaFold DB) | 6,000 / 1,500 / 3,000 |
198
+ | `stability` | stability | Spearman | TAPE | predicted (ESMFold) | 6,000 / 1,500 / 3,000 |
199
+ | `fluorescence` | fluorescence | Spearman | TAPE | predicted (ESMFold) | 6,000 / 1,500 / 3,000 |
200
+ | `solubility` | solubility | AUROC | FLIP | predicted (ESMFold) | 5,417 / 1,363 / 1,329 |
201
+ | `ppi_affinity` | PPI affinity | Spearman | SKEMPI2 | predicted (ESMFold) | 2,589 chains; 2,352 / 194 / 326 pairs |
202
+
203
+ The structure sources and split sizes are those of the paper's table "Structures and splits of the ten scored tasks".
204
+ Every extracted row has a structure file whose sequence equals the task sequence (`structure_coverage` in `meta.json`).
205
+
206
+ ## File formats
207
+
208
+ ### Downstream embeddings: `extract/embeddings/<task>/<encoder>/`
209
+
210
+ | File | Content |
211
+ |---|---|
212
+ | `train.npy`, `valid.npy`, `test.npy` | float32 array of shape (number of proteins in the split, width) |
213
+ | `ids_train.txt`, `ids_valid.txt`, `ids_test.txt` | one protein id per line; line i is row i of the array of the same split |
214
+ | `meta.json` | extraction record (fields below) |
215
+ | `chains.npy`, `ids_chains.txt` | PPI affinity only: one row per chain, in place of the three splits |
216
+
217
+ - Row order equals the order of the manifest rows with `stage1 == 1` and the same `split`. The id files are identical
218
+ for every encoder of a task.
219
+ - Labels are in the `label` column of `extract/manifest/<task>.csv`: an integer class index (EC, localisation), a
220
+ fold index (remote homology), a list of term indices written as a string (GO-MF, GO-BP), 0 or 1 (solubility,
221
+ membrane versus soluble) or a real value (stability, fluorescence).
222
+ - PPI affinity: `extract/pairs/ppi_affinity_pairs.csv` has columns `id, split, chain_a, chain_b, label`. The paper
223
+ represents a pair by concatenating the embeddings of `chain_a` and `chain_b` in that order.
224
+ - `ref_composition/` in every task directory is not an encoder. It is the non-learned composition reference of the
225
+ paper: 20 amino-acid frequencies, log length, length/600 and the fraction of residues outside the 20-letter
226
+ alphabet (23 values).
227
+ - `extract/manifest/<task>.csv` has columns `id, split, sequence, structure_path, length, label, stage1`, plus
228
+ `align_path, struct_coverage` (experimental and AlphaFold DB structures) or `mean_plddt, chain_break` (ESMFold
229
+ structures).
230
+
231
+ Fields of `meta.json` (not every field is present for every encoder):
232
+
233
+ | Field | Meaning |
234
+ |---|---|
235
+ | `encoder`, `task` | directory keys |
236
+ | `family`, `target`, `patch`, `env` | how the encoder was loaded: a Hugging Face language model (`hf_plm`), a model wrapper (`registry`) or a patched official implementation (`patched`) |
237
+ | `weights` | `pretrained`, `random` or `none` |
238
+ | `checkpoint`, `checkpoint_revision`, `checkpoint_sha256`, `checkpoint_loaded_by`, `weights_sha256`, `seed` | the weights used. Hub checkpoints give the hub id and revision; local checkpoint paths are given relative to the project directory |
239
+ | `rule` | which representation is read (see [Which layer is read](#which-layer-is-read)) |
240
+ | `pooling` | how residue states become one protein vector (masked mean over all residues of the chain) |
241
+ | `inputs_passed`, `pose` | what the encoder receives |
242
+ | `dtype`, `hidden_size`, `n_layers`, `n_parameters` | model details |
243
+ | `manifest`, `rows`, `structure_coverage`, `n_per_split` | which manifest rows were extracted |
244
+ | `health` | `n_rows`, `dim`, `nan_values`, `all_zero_rows`, `distinct_rows`, `numerical_rank`, `max_abs` of the stored array |
245
+ | `input_audit` | relative change of the embedding under a 1 Å coordinate jitter, a coordinate swap, a sequence shuffle and a rigid motion, and the audit verdict |
246
+ | `date`, `seconds` | when and how long |
247
+
248
+ ### Probing embeddings: `probing_embeddings/`
249
+
250
+ The probing set is 19,461 CATH 4.3 domains with 2,823,525 residues. The same row convention holds for every probing
251
+ directory in this repository.
252
+
253
+ | File | Content |
254
+ |---|---|
255
+ | `ids.txt` | CATH domain id per line; line k is domain k |
256
+ | `offsets.npy`, `lengths.npy` | int64, shape (19461,); the residues of domain k are rows `offsets[k]` to `offsets[k] + lengths[k] - 1` |
257
+ | `<encoder>/residue_fp16.npy` | float16, shape (2823525, width); row r is row r of `residue/*` in `probing_data/labels.h5` |
258
+ | `<encoder>/pooled_fp32.npy` | float32, shape (19461, width); row k is domain k (mean over its residues) |
259
+ | `<encoder>/meta.json` | extraction record; its `row_convention` or `rows` field states the row order |
260
+
261
+ FoldVision has no residue states, so `probing_embeddings/foldvision/` holds `pooled_fp32.npy` only, and only the
262
+ protein-level probes apply to it. Language models were run on the sequence of the residues kept in `labels.h5`; a
263
+ discontinuous CATH domain is passed as one concatenated sequence.
264
+
265
+ `probing_data/labels.h5` holds three groups. `protein/` has one row per domain (id, length, CATH labels, split codes,
266
+ protein-level targets). `residue/` has one row per residue (amino acid, N, CA, C, O and CB coordinates with CB built
267
+ from ideal geometry where it is absent, DSSP 3- and 8-state, relative solvent accessibility, B-factor, backbone angles, contact counts and other residue labels). `pair/`
268
+ has the sampled residue pairs with their distances. The split codes are `split_superfamily` (15,565 train, 1,948
269
+ validation, 1,948 test; no superfamily is shared between splits) and `split_topology` (15,378 / 2,159 / 1,924; the
270
+ topology-disjoint split of the confirmation experiments), with 0 = train, 1 = validation and 2 = test.
271
+ `probing_data/splits/` lists the same splits as domain ids. The CATH domain structure files are public and are not
272
+ redistributed here.
273
+
274
+ `probing_embeddings_vframe/<encoder>_vframe/` follows the same layout. It stores the scalar channels together with the
275
+ vector channels projected onto a per-residue frame built from N, CA and C (width 148 for GVP and the two GCPNets, 176
276
+ for MACE). The two GCPNet directories also hold `residue_atommean_fp16.npy` and `pooled_atommean_fp32.npy`, the same
277
+ representation averaged over the heavy atoms of each residue. The frame definition is in each `meta.json`.
278
+
279
+ ### Modality ablation: `extract/ab_modality/`
280
+
281
+ Three extra sources hold the weights fixed and change only the input.
282
+
283
+ | Source | Input |
284
+ |---|---|
285
+ | `esm3_seqonly` | ESM3 with the true sequence and the mask token at every structure position (no coordinates) |
286
+ | `saprot_seqonly` | SaProt with every 3Di token replaced by `#` (the token for a residue without structure) |
287
+ | `saprot_shuf3di` | SaProt with each protein's own 3Di tokens permuted within the protein (seed from the protein id) |
288
+
289
+ `extract/ab_modality/embeddings/<task>/<source>/` follows the downstream format for all ten tasks, and
290
+ `extract/ab_modality/probing_embeddings/<source>/` follows the probing format. The audit rows of these sources are in
291
+ `extract/ab_modality/encoder_input_audit_ab.csv` and `encoder_input_audit_ab_shuf.csv`. The full-input ESM3 and
292
+ SaProt embeddings they are compared with are the `esm3` and `saprot` entries of the main release.
293
+
294
+ ### Confirmation sets
295
+
296
+ | Path | Content |
297
+ |---|---|
298
+ | `confirmation/` | cohort A: 1,990 CATH v4.4 S40 domains absent from CATH v4.3. `embeddings/<encoder>/` in the probing format for Ankh, ESM2-650M, ESM3, ESM-IF1, ProteinMPNN and ProtT5-XL; `labels_v44.h5` in the schema of `labels.h5`; `cohort_manifest.csv` with the CATH class, architecture, topology and superfamily of each domain |
299
+ | `confirmation2/` | cohort B: 1,316 further CATH v4.4 domains, same layout, the six encoders of cohort A plus both GCPNets |
300
+ | `confirmation_downstream/` | eight held-out downstream cohorts, 13,632 proteins taken from manifest rows that were never extracted or scored in development. `embeddings/<task>/<encoder>/` holds `test.npy`, `ids_test.txt` and `meta.json`; `ids_<task>.txt` and `cohort_<task>.csv` list the proteins and labels. Solubility and PPI affinity have no unused rows and have no cohort |
301
+
302
+ ### Residue-level interface task: `masif_site/`
303
+
304
+ Interface residues rebuilt from MaSIF-site with a label defined from geometry: a residue of the target chain is an
305
+ interface residue if any of its heavy atoms lies within 5 Å of a heavy atom of another chain. There are 3,327 chains
306
+ (2,677 train, 297 validation, 353 test) and 647,332 residues. `embeddings/<encoder>/` follows the probing format for 28
307
+ of the 33 encoders (SaProt, Foldseek, both GCPNets and FoldVision are not scored on this task). `labels.h5` holds the
308
+ residue labels (`residue/interface`) and the split (`protein/split_masif`); `exclusions.csv` lists the 35 entries that
309
+ were removed.
310
+
311
+ ### Latent-space atlas: `atlas/data_v4/`
312
+
313
+ `atlas.json` holds every layer; the other files hold one task layer each (`ec`, `go_mf`, `go_bp`, `localisation`,
314
+ `homology`, `solubility`, `membrane`, `stability`, `fluorescence`, `affinity`). Each layer is a stratified sample of
315
+ about 2,000 proteins of the task's own rows. For every protein it gives the id, split and label; for every encoder the
316
+ UMAP coordinates (k = 10, seed 42, Procrustes-aligned to ESM2-150M), the k-NN purity with its chance level and a
317
+ five-fold linear probe accuracy; and between encoders the
318
+ debiased linear CKA and k-NN overlap, both computed on the full embeddings. `summary.json` holds the per-layer
319
+ summary. The atlas is built from the embeddings in `extract/embeddings/`.
320
+
321
+ ### Input audit
322
+
323
+ `extract/encoder_input_audit.csv` has one row per encoder and dataset (`probing` for the CATH set, `stage1` for the
324
+ downstream set). Each row gives the relative change of the pooled embedding over the same 32 proteins under a 1 Å
325
+ coordinate jitter, a coordinate swap with another protein, a sequence shuffle and a rigid motion, the measured
326
+ `uses_coordinates`, `uses_residue_identity` and `invariant`, the declared inputs, and a `verdict`. The file also holds
327
+ the failing rows of EGNN and GeoBPE. `extract/encoder_atom_audit.csv` gives the change when each of the N, CA, C, O
328
+ and CB coordinates is perturbed and the resulting `atom_set`. `extract/encoder_sidechain_audit.csv` gives the same for
329
+ side-chain atoms.
330
+
331
+ ## Loading example
332
 
333
  ```python
334
  import numpy as np
335
+ import pandas as pd
336
+ from huggingface_hub import snapshot_download
337
+
338
+ repo = "Anonymoususer2223/ProtCompass_Embeddings"
339
+ task, encoder = "subcellular_localization", "esm2_650m"
340
+
341
+ # Download one encoder on one task and the task manifest (about 65 MB).
342
+ local = snapshot_download(repo, allow_patterns=[f"extract/embeddings/{task}/{encoder}/*",
343
+ f"extract/manifest/{task}.csv"])
344
+ d = f"{local}/extract/embeddings/{task}/{encoder}"
345
+ splits = ("train", "valid", "test")
346
+ X = {s: np.load(f"{d}/{s}.npy") for s in splits}
347
+ ids = {s: open(f"{d}/ids_{s}.txt").read().split() for s in splits}
348
+
349
+ manifest = pd.read_csv(f"{local}/extract/manifest/{task}.csv")
350
+ manifest = manifest[manifest.stage1 == 1].set_index("id")
351
+ y = {s: manifest.loc[ids[s], "label"].to_numpy() for s in splits}
352
+
353
+ # A quick check with a logistic regression. The paper's heads (linear and MLP-2, selected on validation,
354
+ # three seeds) are in extract/score2.py of the code repository.
355
+ from sklearn.linear_model import LogisticRegression
356
+ from sklearn.preprocessing import StandardScaler
357
+ scaler = StandardScaler().fit(X["train"])
358
+ clf = LogisticRegression(max_iter=1000).fit(scaler.transform(X["train"]), y["train"])
359
+ print("test accuracy", clf.score(scaler.transform(X["test"]), y["test"]))
 
360
  ```
361
 
362
+ Per-residue probing embeddings are large (up to 14.5 GB for ESM2-3B), so open them with `mmap_mode="r"`:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
 
364
+ ```python
365
+ import h5py
366
+ # In allow_patterns a * also matches '/', so the top-level files are named one by one.
367
+ local = snapshot_download(repo, allow_patterns=["probing_embeddings/esm2_650m/*", "probing_embeddings/offsets.npy",
368
+ "probing_embeddings/lengths.npy", "probing_embeddings/ids.txt",
369
+ "probing_data/labels.h5"])
370
+ R = np.load(f"{local}/probing_embeddings/esm2_650m/residue_fp16.npy", mmap_mode="r")
371
+ offsets = np.load(f"{local}/probing_embeddings/offsets.npy")
372
+ lengths = np.load(f"{local}/probing_embeddings/lengths.npy")
373
+ with h5py.File(f"{local}/probing_data/labels.h5", "r") as f:
374
+ k = 10
375
+ rows = slice(offsets[k], offsets[k] + lengths[k])
376
+ residue_embeddings = R[rows] # (lengths[k], 1280)
377
+ dssp3 = f["residue/dssp3"][rows] # 0 = H, 1 = E, 2 = C
378
+ split = f["protein/split_superfamily"][k]
 
 
 
 
 
 
379
  ```
380
 
381
+ ## Structures and datasets
382
 
383
+ The manifests give, for every row, the structure file the extraction read (`structure_path`, relative to the
384
+ directory that holds the code repository's `protcompass/` folder). The ESMFold structures of stability, fluorescence, solubility and PPI affinity are in the
385
+ [ProtEnv](https://huggingface.co/datasets/Anonymoususer2223/ProtEnv) dataset under `predicted_structures/`; the last
386
+ two components of `structure_path` (for example `predictions_fluorescence/fluor_20897.pdb`) are the member name in the
387
+ corresponding archive. The experimental (PDB), AlphaFold DB and CATH structures are public and are not redistributed.
388
+ The scripts that fetch them and build the manifests are in the code repository.
389
 
390
+ ## Earlier release (removed)
391
 
392
+ An earlier release, produced by an earlier extraction pipeline for a previous version of this work, was stored
393
+ under `embeddings/` and `probing_IF/`. The current paper does not use it. An audit in September 2026 found defects
394
+ in it: structure encoders received placeholder or all-zero coordinates on several tasks, some entries were
395
+ degenerate or mislabelled, and four of its tasks had defects in their labels or metric. It was removed from this
396
+ repository. Every file the paper uses is in the current release.
397
 
398
+ ## License
399
 
400
+ The embeddings, labels, manifests, audit files and atlas data produced for this work are released under the MIT
401
+ licence. The files under `checkpoints/` keep their upstream licences: MIT for the ProteinMPNN, GCPNet and PottsMPNN
402
+ files (the licence text is next to each file) and CC BY 4.0 for the GearNet weights (`checkpoints/gearnet_pretrained/NOTICE.md`).