ribesstefano commited on
Commit
a8f0e36
·
verified ·
1 Parent(s): 1d9b8b8

Update fusion context embeddings

Browse files
README.md CHANGED
@@ -1,8 +1,8 @@
1
  # ailab-bio/TACK-Context-Encoding
2
 
3
  PCA-reduced context embedding tables for the `tackai` fusion surrogates (`tackai.fusion`):
4
- one lookup table plus a PCA side-file per block (assay (8-d), cell (47-d), e3 (7-d), poi (51-d)), and `manifest.json` recording
5
- each file's sha256, byte size and dimensions. Published from a `protein_space="combined"` encoder; `from_pretrained` reproduces that by default.
6
 
7
  These tables are **inputs** to every fusion model, never the output of one — a fitted
8
  ensemble is only meaningful against the exact tables it was built with, so this repo is
@@ -14,7 +14,7 @@ versioned by commit rather than by file content.
14
  from tackai.fusion.data import FusionData
15
 
16
  data = FusionData.from_pretrained("ailab-bio/TACK-Context-Encoding")
17
- context = data.encode_context({"poi_seq": ..., "e3_seq": ..., "cell_id": ..., "assay": ...})
18
  ```
19
 
20
  `from_pretrained` installs these files into `TACKAI_CACHE` and verifies them against this
 
1
  # ailab-bio/TACK-Context-Encoding
2
 
3
  PCA-reduced context embedding tables for the `tackai` fusion surrogates (`tackai.fusion`):
4
+ one lookup table plus a PCA side-file per block (assay (8-d), cell (53-d), e3 (24-d), poi (77-d)), and `manifest.json` recording
5
+ each file's sha256, byte size and dimensions.
6
 
7
  These tables are **inputs** to every fusion model, never the output of one — a fitted
8
  ensemble is only meaningful against the exact tables it was built with, so this repo is
 
14
  from tackai.fusion.data import FusionData
15
 
16
  data = FusionData.from_pretrained("ailab-bio/TACK-Context-Encoding")
17
+ context = data.transform_context({"poi_seq": ..., "e3_seq": ..., "cell_id": ..., "assay": ...})
18
  ```
19
 
20
  `from_pretrained` installs these files into `TACKAI_CACHE` and verifies them against this
assay_embeddings_vocab=open26_model=all-mpnet-base-v1_pooling=mean_pca8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:075cd52960c06eb48d78f5a236f7e31ddcbb02a268d067726af58127f74e3f34
3
+ size 7696
assay_pca_vocab=open26_model=all-mpnet-base-v1_pooling=mean_pca8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3cd72a7821fa64c3f7a8265a677e72c870c4bb3e6d745b7f79b9f18fef70bfa
3
+ size 28480
cell_embeddings_model=sentence-transformer_pooling=mean_pca53.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:250237fe4524c1fa17aa367adcffa668070cfc856238ae41ad8514e87138cb34
3
+ size 169994
cell_embeddings_model=sentence-transformer_pooling=mean_pca53_model.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffedc3e044f8b6fa2b1b8a595f5ce9717bac412114f3a1960be529f8f3366948
3
+ size 166900
manifest.json CHANGED
@@ -1,101 +1,216 @@
1
  {
2
- "format": "tack-fusion-context/v1",
3
  "tackai_version": "1.0.0",
4
- "protein_space": "combined",
5
  "block_dims": {
6
  "assay_time": 1,
7
- "cell": 47,
8
- "poi": 51,
9
- "e3": 7,
10
  "assay": 8
11
  },
12
- "combined_dim": 52,
13
  "models": {
14
- "cell": "sentence-transformers/all-mpnet-base-v1",
15
- "assay": "sentence-transformers/all-mpnet-base-v1",
16
  "poi": "facebook/esm2_t30_150M_UR50D",
17
- "e3": "facebook/esm2_t30_150M_UR50D"
 
 
 
18
  },
19
  "files": {
20
- "cell_embeddings_model=sentence-transformer_pooling=mean_pca47.npz": {
21
- "block": "cell",
22
- "role": "table",
23
- "sha256": "cfa457dbf422d6aae5e5f04fc8501b67041e4eac1462244e785efb01cf20cf2f",
24
- "bytes": 88078,
25
- "dim": 47,
26
- "n_keys": 201
27
- },
28
- "cell_embeddings_model=sentence-transformer_pooling=mean_pca47_model.npz": {
29
- "block": "cell",
30
- "role": "pca_model",
31
- "sha256": "f840755c2bf2d3af55dd0b969d1ba48d689117c9cde81246733e02b990005d0c",
32
- "bytes": 148444,
33
- "full_dim": 768,
34
- "reduced_dim": 47
35
- },
36
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca51.npz": {
37
  "block": "poi",
38
  "role": "table",
39
- "sha256": "a280b37449ddaff2be20ea27d2d402c70b0e8241a67eb349552a25639f899c7f",
40
- "bytes": 395772,
41
- "dim": 51,
42
- "n_keys": 204
43
  },
44
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca51_model.npz": {
45
  "block": "poi",
46
  "role": "pca_model",
47
- "sha256": "eac1aa186537241c131d938828015625a861e99b965ea2619f27c9c8cb11e46f",
48
- "bytes": 134124,
49
  "full_dim": 640,
50
- "reduced_dim": 51
51
  },
52
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca7.npz": {
53
  "block": "e3",
54
  "role": "table",
55
- "sha256": "97d5e2d12ad868ae754b15ed7cfef563dc269647368f5ac4326cd973c9c83462",
56
- "bytes": 24608,
57
- "dim": 7,
58
- "n_keys": 17
59
  },
60
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca7_model.npz": {
61
  "block": "e3",
62
  "role": "pca_model",
63
- "sha256": "35a531ea55728d386f5aa56f2ba805f0bcefe7d045dfdd9f2853452aeef4533e",
64
- "bytes": 21308,
65
  "full_dim": 640,
66
- "reduced_dim": 7
67
  },
68
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca52.npz": {
69
  "block": "combined",
70
  "role": "table",
71
- "sha256": "0d55039f786a33a45fd159bb620d3602c00e8842d5ce13c3b36acb777fb0b3ab",
72
- "bytes": 415824,
73
- "dim": 52,
74
- "n_keys": 215
75
  },
76
- "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca52_model.npz": {
77
  "block": "combined",
78
  "role": "pca_model",
79
- "sha256": "b43fe23b55e0c7296e25aa3696dc4984a40021dbf58c9cac37ab816a8549e0d2",
80
- "bytes": 136688,
81
  "full_dim": 640,
82
- "reduced_dim": 52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  },
84
- "assay_embeddings_vocab=open20_model=all-mpnet-base-v1_pooling=mean_pca8.npz": {
85
  "block": "assay",
86
  "role": "table",
87
- "sha256": "0f8e0b23be2ab77c796ca46e3bc8842138f151edf7d82c163f6e649c8d8ea43f",
88
- "bytes": 5966,
89
  "dim": 8,
90
- "n_keys": 20
91
  },
92
- "assay_pca_vocab=open20_model=all-mpnet-base-v1_pooling=mean_pca8.npz": {
93
  "block": "assay",
94
  "role": "pca_model",
95
- "sha256": "6350cec77e1487fd286d7c87ee965e1c1e45ac9a567b1c50180cc9faedaf38b1",
96
  "bytes": 28480,
97
  "full_dim": 768,
98
  "reduced_dim": 8
99
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  }
101
  }
 
1
  {
2
+ "format": "tack-context-encoding/v1",
3
  "tackai_version": "1.0.0",
4
+ "protein_space": null,
5
  "block_dims": {
6
  "assay_time": 1,
7
+ "poi": 77,
8
+ "e3": 24,
9
+ "cell": 53,
10
  "assay": 8
11
  },
12
+ "combined_dim": 85,
13
  "models": {
 
 
14
  "poi": "facebook/esm2_t30_150M_UR50D",
15
+ "e3": "facebook/esm2_t30_150M_UR50D",
16
+ "combined": "facebook/esm2_t30_150M_UR50D",
17
+ "cell": "sentence-transformers/all-mpnet-base-v1",
18
+ "assay": "sentence-transformers/all-mpnet-base-v1"
19
  },
20
  "files": {
21
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca77.npz": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "block": "poi",
23
  "role": "table",
24
+ "sha256": "e9e907e5201aeb7428f1b669d3756acdb18095165df36b983cf401dc9553530b",
25
+ "bytes": 800974,
26
+ "dim": 77,
27
+ "n_keys": 395
28
  },
29
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca77_model.npz": {
30
  "block": "poi",
31
  "role": "pca_model",
32
+ "sha256": "deef92d16903be63a1de6d99c5c9270ea65c04f6d39056f57f83e9d09398e319",
33
+ "bytes": 200788,
34
  "full_dim": 640,
35
+ "reduced_dim": 77
36
  },
37
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca24.npz": {
38
  "block": "e3",
39
  "role": "table",
40
+ "sha256": "1b51ee4fdaa6cb0c7f3cf2d8240261f09ec6069f184fb6cc0cc166716f886bf0",
41
+ "bytes": 81426,
42
+ "dim": 24,
43
+ "n_keys": 57
44
  },
45
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca24_model.npz": {
46
  "block": "e3",
47
  "role": "pca_model",
48
+ "sha256": "587de277e43d950a9a85d8b1a336d6523d91f71260bc1880fcd740da8455c1ec",
49
+ "bytes": 64896,
50
  "full_dim": 640,
51
+ "reduced_dim": 24
52
  },
53
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca85.npz": {
54
  "block": "combined",
55
  "role": "table",
56
+ "sha256": "a34d98ea0f0c5c5ecaa49dd29e6b23ca9c66abd9a238ebac83266d3f4b4cadc9",
57
+ "bytes": 892670,
58
+ "dim": 85,
59
+ "n_keys": 442
60
  },
61
+ "protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca85_model.npz": {
62
  "block": "combined",
63
  "role": "pca_model",
64
+ "sha256": "d2ec617765efff7a94fc74751e3ca5e21cc6a893d17c3130e65301a3e2bf82d9",
65
+ "bytes": 221300,
66
  "full_dim": 640,
67
+ "reduced_dim": 85
68
+ },
69
+ "cell_embeddings_model=sentence-transformer_pooling=mean_pca53.npz": {
70
+ "block": "cell",
71
+ "role": "table",
72
+ "sha256": "250237fe4524c1fa17aa367adcffa668070cfc856238ae41ad8514e87138cb34",
73
+ "bytes": 169994,
74
+ "dim": 53,
75
+ "n_keys": 362
76
+ },
77
+ "cell_embeddings_model=sentence-transformer_pooling=mean_pca53_model.npz": {
78
+ "block": "cell",
79
+ "role": "pca_model",
80
+ "sha256": "ffedc3e044f8b6fa2b1b8a595f5ce9717bac412114f3a1960be529f8f3366948",
81
+ "bytes": 166900,
82
+ "full_dim": 768,
83
+ "reduced_dim": 53
84
  },
85
+ "assay_embeddings_vocab=open26_model=all-mpnet-base-v1_pooling=mean_pca8.npz": {
86
  "block": "assay",
87
  "role": "table",
88
+ "sha256": "075cd52960c06eb48d78f5a236f7e31ddcbb02a268d067726af58127f74e3f34",
89
+ "bytes": 7696,
90
  "dim": 8,
91
+ "n_keys": 26
92
  },
93
+ "assay_pca_vocab=open26_model=all-mpnet-base-v1_pooling=mean_pca8.npz": {
94
  "block": "assay",
95
  "role": "pca_model",
96
+ "sha256": "e3cd72a7821fa64c3f7a8265a677e72c870c4bb3e6d745b7f79b9f18fef70bfa",
97
  "bytes": 28480,
98
  "full_dim": 768,
99
  "reduced_dim": 8
100
  }
101
+ },
102
+ "provenance": {
103
+ "poi": {
104
+ "model": "facebook/esm2_t30_150M_UR50D",
105
+ "layer": 18,
106
+ "pooling": "lse",
107
+ "window": 1022,
108
+ "n_sequences": 395,
109
+ "embedding_dim": 640,
110
+ "pca_dims": 77,
111
+ "explained_variance": 0.9006981246161649,
112
+ "variance_target": 0.9,
113
+ "similarity_target": 0.95,
114
+ "pinned_pca_dims": null,
115
+ "source": {
116
+ "dataset": "ailab-bio/AutoTPDplus",
117
+ "repo_type": "dataset",
118
+ "config": "autotpdplus-protac",
119
+ "split": "train",
120
+ "revision": "438177a7617386e76188e138a2c6b3da96f010f1",
121
+ "pinned": false
122
+ },
123
+ "generated_at": "2026-11-05T17:02:07+00:00",
124
+ "tackai_version": "1.0.0"
125
+ },
126
+ "e3": {
127
+ "model": "facebook/esm2_t30_150M_UR50D",
128
+ "layer": 30,
129
+ "pooling": "mean_rm_pc2",
130
+ "window": 1022,
131
+ "n_sequences": 57,
132
+ "embedding_dim": 640,
133
+ "pca_dims": 24,
134
+ "explained_variance": 0.9057356808757766,
135
+ "variance_target": 0.9,
136
+ "similarity_target": 0.95,
137
+ "pinned_pca_dims": null,
138
+ "source": {
139
+ "dataset": "ailab-bio/AutoTPDplus",
140
+ "repo_type": "dataset",
141
+ "config": "autotpdplus-protac",
142
+ "split": "train",
143
+ "revision": "438177a7617386e76188e138a2c6b3da96f010f1",
144
+ "pinned": false
145
+ },
146
+ "generated_at": "2026-11-05T17:02:07+00:00",
147
+ "tackai_version": "1.0.0"
148
+ },
149
+ "combined": {
150
+ "model": "facebook/esm2_t30_150M_UR50D",
151
+ "layer": 18,
152
+ "pooling": "lse",
153
+ "window": 1022,
154
+ "n_sequences": 442,
155
+ "embedding_dim": 640,
156
+ "pca_dims": 85,
157
+ "explained_variance": 0.9003527068988317,
158
+ "variance_target": 0.9,
159
+ "similarity_target": 0.95,
160
+ "pinned_pca_dims": null,
161
+ "source": {
162
+ "dataset": "ailab-bio/AutoTPDplus",
163
+ "repo_type": "dataset",
164
+ "config": "autotpdplus-protac",
165
+ "split": "train",
166
+ "revision": "438177a7617386e76188e138a2c6b3da96f010f1",
167
+ "pinned": false
168
+ },
169
+ "generated_at": "2026-11-05T17:02:07+00:00",
170
+ "tackai_version": "1.0.0"
171
+ },
172
+ "cell": {
173
+ "model": "sentence-transformers/all-mpnet-base-v1",
174
+ "pooling": "mean",
175
+ "n_keys": 362,
176
+ "n_distinct_vectors": 264,
177
+ "embedding_dim": 768,
178
+ "pca_dims": 53,
179
+ "explained_variance": 0.9029559898291494,
180
+ "variance_target": 0.9,
181
+ "similarity_target": 0.95,
182
+ "source": {
183
+ "dataset": "ailab-bio/AutoTPDplus",
184
+ "repo_type": "dataset",
185
+ "config": "autotpdplus-protac",
186
+ "split": "train",
187
+ "revision": "438177a7617386e76188e138a2c6b3da96f010f1",
188
+ "pinned": false
189
+ },
190
+ "generated_at": "2026-11-05T17:01:45+00:00",
191
+ "tackai_version": "1.0.0"
192
+ },
193
+ "assay": {
194
+ "model": "sentence-transformers/all-mpnet-base-v1",
195
+ "pooling": {
196
+ "per_description": "mean",
197
+ "across_descriptions": "mean of unit vectors, re-normalised"
198
+ },
199
+ "n_keys": 26,
200
+ "n_descriptions": 3,
201
+ "embedding_dim": 768,
202
+ "pca_dims": 8,
203
+ "explained_variance": 0.6402298212051392,
204
+ "source": {
205
+ "dataset": "ailab-bio/AutoTPDplus",
206
+ "repo_type": "dataset",
207
+ "config": "autotpdplus-protac",
208
+ "split": "train",
209
+ "revision": "438177a7617386e76188e138a2c6b3da96f010f1",
210
+ "pinned": false
211
+ },
212
+ "generated_at": "2026-11-05T17:01:59+00:00",
213
+ "tackai_version": "1.0.0"
214
+ }
215
  }
216
  }
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca85.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a34d98ea0f0c5c5ecaa49dd29e6b23ca9c66abd9a238ebac83266d3f4b4cadc9
3
+ size 892670
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=combined_pca85_model.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2ec617765efff7a94fc74751e3ca5e21cc6a893d17c3130e65301a3e2bf82d9
3
+ size 221300
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca77.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9e907e5201aeb7428f1b669d3756acdb18095165df36b983cf401dc9553530b
3
+ size 800974
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=18_pooling=lse_window=1022_block=poi_pca77_model.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:deef92d16903be63a1de6d99c5c9270ea65c04f6d39056f57f83e9d09398e319
3
+ size 200788
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca24.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b51ee4fdaa6cb0c7f3cf2d8240261f09ec6069f184fb6cc0cc166716f886bf0
3
+ size 81426
protein_embeddings_esm_model=facebook-esm2_t30_150M_UR50D_layer=30_pooling=mean_rm_pc2_window=1022_block=e3_pca24_model.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:587de277e43d950a9a85d8b1a336d6523d91f71260bc1880fcd740da8455c1ec
3
+ size 64896