Model Interpretability
XAI SUITEComplete explainability suite for PaTz. IG attribution and MC Dropout uncertainty are fully implemented. Real results available for all 525 test proteins.
Per-residue attribution from Captum. Baseline: zero embedding. 50 Riemann interpolation steps. real residue_attributions stored in results/xai_results.json for all 525 test proteins.
β Open Integrated Gradients (IG) pageN=20 stochastic forward passes at inference. Predictive entropy H[p] per protein. Variance across MC samples per GO term. High-entropy proteins flagged as uncertain.
β Open MC Dropout Uncertainty pageLΓL pairwise importance matrix from outer product of per-residue IG scores. proxy for Pairformer attention. Live interactive visualization on the Attention page.
β Open Residue-Pair Attribution (Outer-Product IG) pageShapley value estimation via Kernel SHAP. Not feasible on 6 GB GPU (5,000+ forward passes per protein). IG provides equivalent per-residue attribution with better axiomatic guarantees.
β Open SHAP Values (Kernel) pageLocal Interpretable Model-agnostic Explanations. Not implemented β perturbation sampling prohibitive for variable-length protein sequences. IG + MC Dropout covers local explanation needs.
β Open LIME (Local Explanations) pageLinear probes on intermediate Pairformer h_i (256-dim) and z_ij (64-dim) representations to decode what biological features are encoded. Secondary structure, solvent accessibility, contact number.
Input: h_i (256-dim), all 4 layers
Expected: Expected ~75β85%
Input: h_i post layer 4
Expected: Expected ~65%
Input: z_ij row-mean (64-dim)
Expected: Expected ~70%
Input: Protein emb (256-dim)
Expected: Expected ~80%
Probe classifiers train a 1-hidden-layer MLP on frozen Pairformer representations. Accuracy measures how much biological info is encoded at each layer.
Ξ£α΅’ IG(xα΅’) = f(x) β f(x_baseline). The sum of per-residue attributions equals the model output change from baseline. Guaranteed by Captum implementation.
Baseline = zero embedding vector (all-zero ESM-2 embedding). Represents an uninformative "null" protein. Attribution measures deviation from null prediction.
IG computed separately for each GO term prediction. Residue i importance for GO:XXXXXXX = β«βΒΉ βf_{GO}/βxα΅’ Β· (xα΅’ β xΜα΅’) dΞ±, 50 Riemann steps.