Contrastive, Base-Resolution Attribution of PAM Recognition in CRISPR Cleavage Models

CRISPR enzymes only cut DNA next to a short flanking recognition sequence called a PAM (protospacer adjacent motif). The standard SpCas9 enzyme demands an NGG motif, which leaves roughly 6% of the human genome targetable; engineered and natural variants relax this — SpRYc edits all 16 NNN triplets, iSpyMac accepts NAAN, SeqCas9 accepts NNG — but their efficiency swings wildly across non-canonical contexts, and nobody can say precisely which flanking nucleotides drive acceptance at one site and rejection at a neighboring one. Meanwhile, the deep learning models that predict CRISPR cleavage (CRISPR-M, R-CRISPR) treat the PAM as just another input feature and summarize what they learned with coarse positional curves, never asking which exact bases mattered for which enzyme.

This proposal argues that the right tool for this question already exists in computer vision, in a form nobody has transferred to sequence models. Contrastive attribution replaces the question "why was this site cleaved?" with "why was it cleaved by enzyme A and not enzyme B?", subtracting the shared guide-RNA-matching signal — which dominates single-query saliency maps exactly the way generic object shape dominates non-contrastive visual heatmaps — and leaving behind the small, sharp, class-specific evidence. Applied across enzyme pairs on the same target sequence, it should isolate the nucleotide drivers of PAM tolerance at single-base resolution, and its sharpness should partially cure the smearing that pooling layers impose on 1D genomic saliency maps, an effect directly analogous to what Finer-CAM showed for blurry 2D class activation maps.

Core Claim

The claim is twofold. First, methodological: contrastive attribution adapted to 1D sequence models — comparing attributions between enzyme-conditioned outputs on an identical protospacer-PAM input, and fusing attributions across multiple network scales as CAMERAS does in 2D — yields nucleotide-resolution maps that pass sanity checks and localize to the causally implicated PAM positions, where standard single-query attribution highlights the seed region and homology signal regardless of enzyme. Second, scientific: these maps can adjudicate an open dispute in the CRISPR prediction literature — whether high-performing deep models actually learn the biophysical grammar of PAM recognition, or exploit dataset-specific co-occurrences, a generalization failure documented by the large off-target benchmarking study Benchmarking and integrating genome-wide CRISPR off-target detection and prediction, where learning-based tools underperformed energy-based ones (CRISPRoff, uCRISPR) despite deep models like R-CRISPR reporting AUROC of 0.991 and AUPRC of 0.319 on GUIDE_II R-CRISPR: A Deep Learning Network to Predict Off-Target Activities with Mismatch, Insertion and Deletion in CRISPR-Cas9 System.

Research Program

The first build is a single multi-enzyme cleavage model $f(\text{sequence}, \text{enzyme}) \mapsto \hat{p}$, trained on pooled data from the file's benchmarks: the randomized PAM libraries profiled by PAM-SCANR and HT-PAMDA (used to characterize SpRYc, iSpyMac, and SeqCas9), and the GUIDE-seq / CIRCLE-seq off-target datasets with mismatch and indel variants. The architecture follows the proven recipe in CRISPR-M: Predicting sgRNA off-target effect using a multi-view deep learning network — 1D convolutions, bidirectional LSTM, self-attention — with one addition: an enzyme-identity conditioning token covering SpCas9, SeqCas9, iSpyMac, SpRYc, and a canonical-vs-relaxed Cas12a pair. CRISPR-M and R-CRISPR supply the modeling template but stop at pooled positional importance ("valleys" at positions 1–7, 8–13, 14–20); neither computes per-example attribution, contrasts enzymes, or models relaxed variants, which is precisely the gap this proposal fills.

The second build is the attribution machinery. For an enzyme pair $(A, B)$ on the same input, the contrastive channel weight is

$$\alpha_k^{A,B} = \alpha_k^{A} - \gamma\, \alpha_k^{B}$$

where $\alpha_k^{A}$ is the importance of channel $k$ for enzyme $A$'s prediction, $\gamma$ is a comparison strength, and the subtraction cancels shared backbone/homology signal — the same construction Finer-CAM uses to shrink diffuse blobs to sharp discriminative details in vision Finer-CAM: Spotting the Difference Reveals Finer Details for Visual Explanation. The theoretical warrant comes from two papers proving that single-query logit attribution explains generic "objectness" rather than class-specific evidence "Why Not Other Classes?": Towards Class-Contrastive Back-Propagation Explanations, and that standard LRP is dominated by ReLU and max-pooling structure that acts as a generic foreground detector Understanding Individual Decisions of CNNs via Contrastive Backpropagation. On the resolution side, the model is run at $N$ scales (varying stride and pooling configurations over the same sequence), with attributions upsampled back to base resolution and fused, adapting the CAMERAS multi-scale scheme CAMERAS: Enhanced Resolution and Sanity Preserving Class Activation Mapping for Image Saliency from 2D image grids to discrete 1D sequences — an adaptation the file explicitly flags as open, since CAMERAS requires seven forward/backward passes on resized images and discrete tokens cannot be "resized," only re-embedded at different receptive fields.

The scientific payoff is a set of testable, structurally grounded predictions. Contrasting SpCas9 against SeqCas9 should concentrate mass on PAM position 3, where SpCas9's arginine residues R1333/R1335 read out guanine and SeqCas9 tolerates any base Enhanced genome editing with a Streptococcus equinus Cas9. Contrasting SpCas9 against iSpyMac should concentrate on PAM positions 2–3 with adenine preference, reflecting the glutamine substitutions in the SmacCas9 PAM-interacting domain A Cas9 with PAM recognition for adenine dinucleotides. Contrasting SpRYc against SpCas9 should reveal the flanking-context asymmetry (strong on NRN, weak on NTT motifs like the 5'-NTT-3' site where SpRYc-ABE8e reached 21.9% conversion versus 0.05% for SpRY-ABE8e) PAM-flexible genome editing with an engineered chimeric Cas9. A known limitation to be stated up front: attribution covers the DNA side only; protein-side causes (chimeric domains, the Sc++ "molecular glue" loop) enter through the conditioning token and can be probed but not directly attributed.

Proposed Experiments

Experiment 1 is ground-truth recovery. Using the PAM-SCANR / HT-PAMDA library profiles as enzyme-level ground truth for PAM preference, the contrast maps' peak base and magnitude ranking per enzyme pair is scored by a nucleotide-level pointing game (does the maximum-attributed base fall on the structurally implicated PAM position?) and by Spearman correlation between attributed position weights and measured cleavage across the 16 NNN triplets. Success is a pointing-game hit rate clearly above the standard-attribution baseline and above chance, with the contrast map recovering the G3 hot spot for SpCas9 and the AA hot spot for iSpyMac.

Experiment 2 is the resolution study. On pooled 1D CNN variants of varying depth, attribution sharpness is measured as the effective width of the attributed region around the implicated base (full width at half maximum), comparing four configurations: single-scale standard, single-scale contrastive, multi-scale standard, and multi-scale contrastive. The Finer-CAM finding — that coarseness is partly an artifact of the explanatory objective, not only the architecture — predicts the contrastive term alone should shrink blobs even at fixed architecture, and the CAMERAS finding predicts fusion should add resolution without failing sanity. All configurations are subjected to cascading weight randomization: attribution must degrade as weights are randomized, which is the test Guided Backpropagation fails CAMERAS: Enhanced Resolution and Sanity Preserving Class Activation Mapping for Image Saliency, with the mathematical diagnosis in When Explanations Lie: Why Many Modified BP Attributions Fail as backup.

Experiment 3 is the causal perturbation test. For each target site, the top contrast-attributed bases are computationally mutated and the model's predicted enzyme preference flip is checked against held-out measured activity — the direct analogue of Wang et al.'s demonstration that perturbing contrastively isolated features drops accuracy faster than perturbing standard saliency features "Why Not Other Classes?": Towards Class-Contrastive Back-Propagation Explanations. The endogenous-loci assay results (SpRYc's 34.7% correction at the MECP2 CCC site, 28.5% at HTT; iSpyMac's >20% C-to-T conversion at VEGFA NAAN sites) serve as the small, hard validation set where library-derived PAM preferences are known not to transfer uniformly — exactly the context-dependence brute-force profiling misses.

Experiment 4 addresses the tension between learned and energy-based models. If a model matching R-CRISPR's predictive performance on GUIDE_II shows contrast maps concentrated on chemically sensible PAM positions, deep models gain credibility as grammar learners; if the maps instead track dataset artifacts (guide-library position biases, GC content), that is direct mechanistic evidence for the generalization failures the benchmarking study reported, and attribution becomes the diagnostic that energy-based tools like CRISPRoff and uCRISPR — which have no attribution at all — cannot provide.

Baselines

The naive reference point is no attribution at all: the global positional importance curves that CRISPR-M reports (its three "valleys" across protospacer positions) CRISPR-M: Predicting sgRNA off-target effect using a multi-view deep learning network, plus a uniform prior over bases. Beating it means the method identifies the causally implicated PAM base on held-out enzyme pairs above the rate implied by those pooled curves, which encode nothing about PAM tolerance because they were computed on canonical NGG data only.

The strongest attribution competitor is standard single-query attribution — Grad-CAM, Integrated Gradients, and standard LRP — run on our own model, same data, same compute, same tuning budget, differing only in the contrast and multi-scale ingredients. This is the right competitor because the CLRP authors prove standard LRP produces near-identical coarse maps regardless of queried class Understanding Individual Decisions of CNNs via Contrastive Backpropagation; the decisive comparison is whether standard maps, like their vision counterparts, attribute the seed region and homology signal for every enzyme while contrast maps separate SpCas9's G3 dependence from iSpyMac's AA dependence. Guided Backpropagation is included as the high-resolution-but-unfaithful baseline: it should win on sharpness and fail cascading randomization, exactly as CAMERAS demonstrated CAMERAS: Enhanced Resolution and Sanity Preserving Class Activation Mapping for Image Saliency.

On the predictive side, the strongest existing numbers are R-CRISPR's AUROC of 0.991 and AUPRC of 0.319 on GUIDE_II R-CRISPR: A Deep Learning Network to Predict Off-Target Activities with Mismatch, Insertion and Deletion in CRISPR-Cas9 System and the iGWOS AdaBoost ensemble's ROC-AUC of 0.934 on its curated benchmark Benchmarking and integrating genome-wide CRISPR off-target detection and prediction. Our multi-enzyme model must first match these on the canonical-NGG subsets they cover, under matched data splits and tuning budget, before any attribution claim is made — attribution quality on an inaccurate model is meaningless, per the dependence-on-model-correctness limitation Finer-CAM itself documents. Note that iGWOS is restricted to canonical SpCas9 with NGG PAMs; no reported result found on Lacuna for any prediction tool on relaxed-PAM off-target data, which is itself part of the gap.

The key-ingredient ablation is the two-by-two of contrast (on/off) versus multi-scale fusion (on/off). The proposal's specific claim — that contrastive subtraction, not just architecture, buys resolution and discriminativity in 1D — stands or falls on the single-scale-contrastive cell outperforming the multi-scale-standard cell on the nucleotide pointing game. If it does not, the honest conclusion is that the contribution reduces to porting CAMERAS to 1D, and the proposal should be reported that way.

Why not just…?

Why not just use energy-based models like CRISPRoff or uCRISPR? They were the top individual performers in the benchmarking study Benchmarking and integrating genome-wide CRISPR off-target detection and prediction, so this is a real threat. But nearest-neighbor thermodynamics cannot represent engineered perturbations: SpRYc's Sc++ loop adds non-specific backbone stabilization that no energy rule encodes, and energy models handle indels poorly, where CRISPR-M reported a twofold AUPRC improvement. More fundamentally, energy models give a score, not an explanation of a specific prediction — they cannot answer "why this base at this site for this enzyme." That said, the experiment that settles it is in this proposal: if contrast attribution on the deep model recovers energy-model-recovered PAM preferences plus the context effects energy models miss, both coexist; if the deep model's maps are artifacts, energy models win and Experiment 4 says so.

Why not just run standard Grad-CAM on the existing CRISPR-M or R-CRISPR models? Cheapest option, and it would fail for a proven reason. Standard LRP and logit-based attribution are dominated by instance-specific structure — here, guide-target homology and the seed region — producing nearly the same map whichever output you query Understanding Individual Decisions of CNNs via Contrastive Backpropagation. The PAM's three bases sit at the edge of the input and carry a small fraction of the total signal; a non-contrastive map will point at the protospacer every time. This is testable within the proposal: Experiment 1 scores standard attribution on exactly the ground-truth recovery task, so if it somehow suffices at base resolution, the proposal's core claim is wrong and the experiment will show it. Additionally, existing models were trained on single-enzyme NGG data, so no enzyme-contrast is even defined without the multi-enzyme retraining this proposal builds.

Why not just profile all PAM variants experimentally with HT-PAMDA or PAM-SCANR? The assays exist and produced the ground truth we use. But two documented failure modes cap them. First, library preferences do not transfer to endogenous loci: iSpyMac's efficiency fluctuates across genomic NAAN contexts, and SpRYc's NRN-versus-NYN asymmetry appears in cells, not uniformly in plasmid screens PAM-flexible genome editing with an engineered chimeric Cas9. Second, throughput: the recombinase work notes that directed evolution costs 6–12 months per target Prediction of designer-recombinases for DNA editing with generative deep learning, and profiling every enzyme × flanking-context combination scales far worse than 16 triplets. The honest division of labor is that wet-lab profiles supply enzyme-level ground truth (Experiment 1) while attribution targets what assays cannot cover: position-specific, context-dependent determinants at arbitrary genomic sites. A reviewer who says "just sequence everything" is proposing a different, vastly larger project, not a simpler one.

Decisive Checks

The proposal succeeds if, on held-out enzyme pairs, contrastive multi-scale attribution (i) recovers the structurally implicated PAM positions at a pointing-game hit rate materially above standard attribution and above the pooled-curve baseline, (ii) survives cascading weight randomization, and (iii) its top-attributed bases, when mutated, flip predicted enzyme preference in agreement with held-out measured activity. It fails informatively if the maps are sharp but unfaithful — which would itself resolve the learned-versus-artifact dispute by showing that today's best CRISPR deep models do not encode PAM chemistry, redirecting the field toward hybrid energy-plus-learning designs of which iGWOS is an early example.