pulsatrix 1.1.0
Loading...
Searching...
No Matches
Interpretability

Post-hoc explanation methods applied to an already-trained model: whole-model LRP over the rules built into each layer in Deep Learning Modules and Layers, plus model-agnostic and gradient-based explainers, and metrics and baselines for judging an explanation's quality. More...

Collaboration diagram for Interpretability:

Modules

 Model-Agnostic Explainers
 Tools that don't depend on a particular explainer: perturbation explainers that only need a model's input/output behavior, explanation-quality metrics (faithfulness, randomization, complexity), the null-model baseline, and dense matrix decompositions for analysing activations and weights.
 
 Gradient-Based Explainers
 Explainers that use a model's gradients, activations, or internal structure directly.
 
 Layer-wise Relevance Propagation
 Whole-model LRP (LRP, LRPTarget, LRPSeed), rule selection (LRPRule, LRPRuleConfig), Zennit-style composites (lrp_composite), conservation checks, and BatchNormFold (folds an eval-mode BatchNorm into the preceding layer before LRP).
 

Files

file  adversarial.hpp
 Adversarial attacks on a classifier (KS-4): the fast gradient sign method (Goodfellow, Shlens and Szegedy, ICLR 2015) and projected gradient descent (Madry et al., ICLR 2018), under the L∞ or L2 norm, untargeted or targeted, and the robust accuracy they leave.
 
file  calibration.hpp
 Calibrating a model's probabilities (KS-13): temperature scaling fitted on held-out data, and the error in log-odds against reference probabilities, by probability band.
 
file  conformal.hpp
 Split conformal prediction (KS-3): prediction sets for a classifier and intervals for a regressor that contain the truth with a chosen probability, whatever the model (Vovk, Gammerman and Shafer, 2005; Angelopoulos and Bates, arXiv 2107.07511).
 
file  explainer_capabilities.hpp
 What each explainer answers: the nine question categories (Liao, Gruen and Miller, CHI 2020), the four reasons to explain (Adadi and Berrada, 2018), and a machine-readable declaration of every explainer's question, scope, model access and inputs (XAI-1).
 
file  explanation_planner.hpp
 Turns a question and a reason into a plan: which explainers can answer the question for this model, ranked, and which checks must run before the answer is trusted (XAI-2).
 
file  explanation_report.hpp
 An explanation that says what it supports (XAI-3): the attribution together with the question and reason it was made for, the method and its settings, the results of the checks the plan asks for, and caveats derived from those results and from the method's known failure modes.
 
file  explanation_robustness.hpp
 How much an explanation changes when its input barely does (KS-4): the max- and average-sensitivity of Yeh et al. (NeurIPS 2019), the local Lipschitz estimate of Alvarez-Melis and Jaakkola (2018), and the sensitivity at the perturbation an attacker would try first, FGSM's.
 
file  fitness_metrics.hpp
 ProteinGym's metrics for how well predicted variant scores track measured fitness (PLM-3), computed exactly as ProteinGym's performance_DMS_benchmarks.py does.
 
file  masked_diffusion_lrp.hpp
 Explaining a masked diffusion LM's generation (DIFF-3): commitment-graph LRP, which explains tokens written at any step back to the prompt by chaining AttnLRP through the tokens committed in between, and the checks that test it by replaying the trajectory.
 
file  performance.hpp
 How well a model does (KS-3): a classifier's accuracy, log loss, Brier score, calibration and per-class scores; a regressor's errors; and the error on each slice of the data, with a test of whether a slice is worse than the rest.
 
file  protein_concepts.hpp
 What a protein language model's representations encode (PLM-8): per-residue concepts from Swiss-Prot annotations, per-layer linear probes with control tasks, and sparse autoencoder features matched to the concepts, as InterPLM does.
 
file  protein_contacts.hpp
 Residue contacts from a protein language model's attention (PLM-4): ESM's contact head, the top-K head average, and precision at L, L/2 and L/5 against a structure's contacts.
 
file  protein_explanations.hpp
 Explaining a protein language model residue by residue (PLM-6): AttnLRP from a masked residue's prediction, a mutation's log-odds or a head on the representations back to the input residues, and the checks that keep such explanations honest.
 
file  proteingym.hpp
 Running ProteinGym's deep-mutational-scanning substitution benchmarks (PLM-3): read an assay, score every variant with a protein language model, and compute ProteinGym's metrics.
 
file  trajectory_lrp.hpp
 Explaining a continuous diffusion sampler end to end (DIFF-5): trajectory LRP (design D1), which seeds a scalar of the final sample x_0 once and carries its relevance back through every reverse step to the starting noise x_T, the conditioning, and named sinks.
 
file  uncertainty.hpp
 How sure a model is of each prediction (KS-3): Monte Carlo dropout (Gal and Ghahramani, ICML 2016), deep ensembles (Lakshminarayanan, Pritzel and Blundell, NeurIPS 2017), and the split of a prediction's uncertainty into the part more data would remove and the part it wouldn't.
 
file  variant_scoring.hpp
 Zero-shot variant effects from a protein language model (PLM-3): how much the model prefers a mutant residue over the wild type, with no training on the protein.
 

Detailed Description

Post-hoc explanation methods applied to an already-trained model: whole-model LRP over the rules built into each layer in Deep Learning Modules and Layers, plus model-agnostic and gradient-based explainers, and metrics and baselines for judging an explanation's quality.