Do Vision CIL Methods Transfer to Protein? A Diagnostic Benchmark of Frozen Protein Encoders
Organizations: Department of Computer Science and Technology, University of Cambridge
Abstract
Protein function annotation operates over an expanding label space, making class-incremental learning (CIL) a natural framework for incorporating newly discovered functions without full retraining. Yet existing CIL methods have been developed largely in vision and have not been systematically evaluated over frozen protein representations. We conduct a controlled benchmark of nine representative CIL methods across five sequence-, structure-, and sequence--structure-based protein encoders and two enzyme function datasets at different scales, while keeping the encoders frozen and evaluation settings consistent across representations. We find that no method transfers reliably across encoders, and that these failures persist across alternative phase constructions. Diagnostic analyses reveal that this instability arises from weak gradient-based stability signals, substantial heterogeneity in embedding geometry, and covariance assumptions whose appropriate capacity changes with both dataset scale and encoder. These findings suggest that the representation itself should be treated as a central component of continual-learning design rather than a passive feature extractor. More generally, reliable protein CIL will require encoder-aware methods that adapt their statistical assumptions and capacity to the geometry of the representation on which they operate. Code is available at https://github.com/zygao930/ProteinCIL.
Figures & tables
| Enzyme Reaction (348 classes) | EC Number (4788 classes) | ||||||||||
| ESM2 | ESM2 | GearNet | ESM2 | ESM2 | GearNet | ||||||
| Cat. | Method | 650M | 150M | Edge | SaProt | ProtBert | 650M | 150M | Edge | SaProt | ProtBert |
| Average Incremental Accuracy (%) | |||||||||||
| LB | Naive | 13.7 0.5 | 12.6 1.5 | 7.4 1.4 | 13.4 0.7 | 10.7 0.5 | 25.4 1.6 | 23.5 1.4 | 8.6 0.3 | 20.7 0.8 | 21.4 0.2 |
| Joint | Joint MLP | 73.9 0.8 | 69.1 0.8 | 52.1 1.1 | 71.2 0.4 | 65.5 0.3 | 99.5 0.2 | 99.5 0.1 | 68.4 0.7 | 99.4 0.0 | 99.5 0.0 |
| Reg. | EWC | 21.8 4.0 | 17.7 4.1 | 6.9 1.1 | 20.8 4.0 | 15.0 1.8 | 45.2 5.4 | 40.2 2.9 | 8.7 1.2 | 32.6 1.8 | 40.2 1.3 |
| Data- set | Method | Random classes | Finer-EC buckets | Mixed hierarchy | ||||||
| Acc | Fgt | Plast | Acc | Fgt | Plast | Acc | Fgt | Plast | ||
| Enzyme Reaction | EWC | 14.5 2.8 | 76.3 4.6 | 79.9 6.5 | 14.8 3.1 | 71.5 4.0 | 76.1 6.5 | 15.4 3.3 | 76.5 3.5 | 81.0 6.2 |
| FeTrIL | 21.4 2.2 | 68.3 6.4 | 79.9 7.6 | 23.4 3.0 | 62.6 4.8 | 77.0 7.2 | 22.1 2.7 | 68.1 5.5 | 80.5 7.4 | |
| EASE | 39.2 9.4 | 14.8 0.5 | 51.8 9.4 | 42.8 9.9 | 12.6 0.7 | 53.5 9.9 | 39.3 9.3 | 14.5 1.0 | 51.6 9.8 | |
| RER | 46.6 6.9 | 35.2 2.1 | 76.6 7.1 | 49.3 8.1 | 29.2 1.5 | 74.1 7.2 | 49.4 7.3 | 32.8 1.5 | 77.5 7.2 | |
| Replay | 46.5 6.9 | 35.5 2.0 | 76.8 6.7 | 48.9 8.2 | 29.8 2.0 | 74.3 6.7 | 49.1 6.9 | 33.1 0.9 | 77.6 6.7 | |
| Gradient signal (Hypo.A) | Embedding geometry (Hypo.B) | |||||||
| Dataset | Encoder | Conflict cosine | Fisher concentration | Embedding dimension | Intrinsic rank | Effective rank | Condition number | Class separability |
| Enzyme Reaction (348 classes) | ESM2-650M | 0.90 | 1280 | 179 | 17.2 | 0.205 | ||
| ESM2-150M | 0.88 | 640 | 60 | 7.5 | 0.203 | |||
| GearNet-Edge | 0.96 | 3072 | 84 | 31.7 | 0.241 | |||
| SaProt | 0.78 | 1280 | 177 | 29.4 | 0.209 | |||
| ProtBert | 0.92 | 1024 | 75 | 9.6 | 0.165 | |||
| ESM2-150M | SaProt | ||||||
| True | Pred. | # mis. | Example | True | Pred. | # mis. | Example |
| 3 (hydro.) | 2 (transf.) | 461 | 3.1.4.35 2.4.1.229 | 2 (transf.) | 3 (hydro.) | 84 | 2.3.2.27 3.2.2.6 |
| 2 (transf.) | 3 (hydro.) | 270 | 2.7.2.3 3.5.1.76 | 3 (hydro.) | 2 (transf.) | 77 | 3.5.4.26 2.1.1.85 |
| 2 (transf.) | 1 (oxidored.) | 170 | 2.7.1.148 1.1.1.193 | 3 (hydro.) | 1 (oxidored.) | 39 | 3.5.4.19 1.1.1.23 |
| 3 (hydro.) | 1 (oxidored.) | 159 | 3.1.21.4 1.13.11.58 | 7 (transl.) | 1 (oxidored.) | 33 | 7.1.1.9 1.7.2.5 |
| 2 (transf.) | 4 (lyases) | 117 | 2.4.2.9 4.2.1.91 | 2 (transf.) | 1 (oxidored.) | 28 | 2.7.2.3 1.2.1.28 |
| No covariance assumption | Mahalanobis (covariance granularity) | |||||||
| Dataset | Encoder | Euclidean NCM | Cosine NCM | Ridge classifier | Shared (diagonal) | Full shared | Grouped | Per- class |
| Enzyme Reaction (348 classes) | ESM2-650M | 0.130 | 0.167 | 0.506 | 0.594 | 0.610 | 0.490 | 0.541 |
| ESM2-150M | 0.108 | 0.147 | 0.484 | 0.586 | 0.591 | 0.478 | 0.523 | |
| GearNet-Edge | 0.183 | 0.198 | 0.295 | 0.371 | 0.472 | 0.267 | 0.248 | |
| SaProt | 0.220 | 0.236 | 0.474 | 0.603 | 0.615 | 0.566 | 0.552 | |
| ProtBert | 0.058 | 0.074 | 0.451 | 0.576 | 0.604 | 0.451 | 0.473 | |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Classes | Train | Test | Train/class | Phases |
| Enzyme Reaction | 348 | 29,215 | 5,651 | 84 | 7 |
| EC Number | 4,788 | 73,259 | 9,112 | 15 | 7 |
| Encoder | Type | Input | Dim. | Pooling |
| ESM2-650M [ 6 ] | Sequence PLM | AA sequence | 1280 | Mean pool, final layer |
| ESM2-150M [ 6 ] | Sequence PLM | AA sequence | 640 | Mean pool, final layer |
| ProtBert [ 10 ] | Sequence PLM | Space-separated AA | 1024 | Attention-weighted mean |
| SaProt [ 11 ] | Seq.+Struct. | AA + 3Di tokens | 1280 | Attention-weighted mean |
| GearNet-Edge [ 7 ] | Structure GNN | Residue graph from 3D coords | 3072 | Node mean; L2 norm. |
| Method | Strategy | Core Mechanism | Key Hyperparameters |
| Naive | Lower bound | Train on new phase only | Hidden=1024, lr= , 100 epochs |
| Joint MLP | Joint reference | Retrain on all data | Same as Naive |
| EWC [ 5 ] | Regularization | Fisher-weighted L2 penalty | |
| Replay [ 20 ] | Replay | Fixed-size reservoir buffer | Buffer=2,000 |
| iCaRL [ 4 ] | Replay + Distillation | Exemplar replay + distillation | Buffer=2,000 |
| DER++ [ 21 ] | Replay + Distillation | Logit replay + label replay | Buffer=2,000, , |
| Dataset | Method | Random classes | Finer-EC buckets | Mixed hierarchy | ||||||
| Acc | Fgt | Plast | Acc | Fgt | Plast | Acc | Fgt | Plast | ||
| ESM2-150M | ||||||||||
| Enzyme Reaction | EWC | 14.8 0.8 | 78.9 1.8 | 82.4 2.3 | 15.7 2.5 | 73.2 3.0 | 78.4 0.1 | 15.8 1.8 | 78.0 2.0 | 82.6 0.5 |
| FeTrIL | 22.4 5.0 | 70.7 6.8 | 83.0 1.7 | 24.4 5.2 | 62.9 6.0 | 78.3 0.4 | 23.3 4.9 | 69.9 5.0 | 83.2 0.6 | |
| EASE | 41.8 1.9 | 14.2 1.6 | 53.8 1.7 | 45.1 1.2 | 11.4 1.8 | 54.7 0.7 | 41.0 4.1 | 14.6 3.9 | 53.5 1.5 | |
| RER | 47.0 3.4 | 36.8 2.6 | 78.5 2.2 | 52.8 1.6 | 28.0 2.1 | 76.7 0.4 | 51.6 2.6 | 33.1 2.0 | 80.0 1.0 | |
| Dataset | Method | Random classes | Finer-EC buckets | Mixed hierarchy | ||||||
| Acc | Fgt | Plast | Acc | Fgt | Plast | Acc | Fgt | Plast | ||
| GearNet-Edge | ||||||||||
| Enzyme Reaction | EWC | 10.5 0.7 | 68.3 2.0 | 69.1 2.4 | 9.9 1.2 | 65.0 1.8 | 65.5 1.3 | 10.0 0.3 | 70.7 2.0 | 70.6 1.9 |
| FeTrIL | 17.5 3.9 | 57.3 4.1 | 66.6 2.8 | 18.5 2.9 | 54.3 4.7 | 64.6 1.5 | 17.7 4.8 | 58.6 4.6 | 67.9 0.9 | |
| EASE | 24.0 3.2 | 15.0 4.1 | 36.9 1.1 | 27.1 0.9 | 12.8 2.8 | 37.8 1.9 | 25.0 2.6 | 13.3 3.3 | 36.4 0.4 | |
| RER | 36.6 2.8 | 33.6 2.2 | 64.7 2.8 | 36.3 1.4 | 31.2 2.1 | 62.3 2.1 | 37.5 2.1 | 32.2 2.7 | 65.1 0.3 | |
| Enzyme Reaction | EC Number | ||||||
| True | Pred. | # mis. | Example | True | Pred. | # mis. | Example |
| ESM2-150M | ESM2-150M | ||||||
| 2 (transf.) | 3 (hydro.) | 96 | 2.1.1.- 3.1.21.4 | 3 (hydro.) | 2 (transf.) | 461 | 3.1.4.35 2.4.1.229 |
| 3 (hydro.) | 2 (transf.) | 48 | 3.4.19.12 2.7.10.- | 2 (transf.) | 3 (hydro.) | 270 | 2.7.2.3 3.5.1.76 |
| 2 (transf.) | 4 (lyases) | 34 | 2.7.7.- 4.2.1.- | 2 (transf.) | 1 (oxidored.) | 170 | 2.7.1.148 1.1.1.193 |
| 3 (hydro.) | 5 (isomer.) | 16 | 3.6.4.- 5.6.1.- | 3 (hydro.) | 1 (oxidored.) | 159 | 3.1.21.4 1.13.11.58 |