Backdoors That Survive Calibration: Cross-Subject Trojans in Alignment-Based BCIs

A brain-computer interface (BCI) reads electrical signals from the brain and turns them into commands — moving a cursor, typing, controlling a prosthetic arm. The classical obstacle to making these systems usable is calibration overhead: because brain signals drift between sessions and differ wildly between people, users historically had to perform 30–60 minutes of repetitive labeled trials before the decoder worked each day. The leading modern fix is unsupervised alignment: instead of collecting labels, the system recenters the statistics of the incoming signals so that a new user's data looks like the data the decoder was trained on. Meanwhile, a separate literature on backdoor attacks has shown that machine-learning models can be poisoned during training so that they behave normally on clean inputs but produce an attacker-chosen output whenever a specific trigger appears in the input. Two papers established that EEG-based BCIs are alarmingly easy to backdoor this way in the classical supervised setting: EEG-Based Brain-Computer Interfaces Are Vulnerable to Backdoor Attacks, whose asynchronous pulse trigger reached an 80% attack success rate by poisoning just 1% of training data, and Professor X: Manipulating EEG BCI with Invisible and Robust Backdoor Attack, whose clean-label frequency-domain trigger achieved a perfect 1.000 attack success rate on the BCI Competition IV 2a motor-imagery benchmark.

Both attack papers, and both defense papers that study backdoors under adaptation in vision (SSDA: Secure Source-Free Domain Adaptation; Can We Trust the Unlabeled Target Data? Towards Backdoor Attack and Defense on Model Adaptation), share one blind spot: nobody knows what happens to a backdoor when the poisoned data or model passes through the geometric alignment step that calibration-free BCIs rely on. This proposal argues that this blind spot is not a corner case but the main event. Alignment recentering can plausibly wash a trigger out — or, if the trigger is crafted correctly, it can launder the trigger: strip away everything subject-specific while leaving the attack fingerprint untouched, so that a backdoor planted once in a public data pool fires on users whose data and devices were never touched by the attacker.

Core Claim

The claim has three parts. First, whether an existing backdoor survives calibration-free alignment is currently unpredictable: Meng et al. and Professor X both evaluate only supervised within-subject training, and the vision-side defenses assume Euclidean convolutional layers that manifold-based decoders do not have. Second, there exists a principled alignment-invariant trigger: because alignment methods such as Riemannian Procrustes Analysis with the Log-Euclidean metric (Riemannian transfer learning based on log-Euclidean metric for EEG classification, which improved motor-imagery accuracy by up to 11.14% on the same benchmark) and the SPD batch normalization of TSMNet (SPD domain-specific batch normalization to crack interpretable unsupervised domain adaptation in EEG, validated across 158 subjects and more than 600 sessions) work by recentering covariance matrices, a trigger whose covariance perturbation tracks the session's own statistics is left invariant by that recentering. Third, the alignment map itself supplies a cheap defense: it is a family of structured, differentiable perturbations that can replace the expensive neuron-pruning and Shapley computations of Test-Time Adaptation for Backdoor Defense, which cut attack success from 88.18% to 2.32% on CIFAR-10 but at a computational cost that real-time neural decoding (4ms per window in Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics) cannot afford.

Concretely, let $\mathcal{R}_s(\cdot)$ be the alignment map for session $s$, which recenters a covariance matrix $C$ by the session's mean $\bar{C}_s$, so $\mathcal{R}_s(C) = \bar{C}_s^{-1/2} C \bar{C}_s^{-1/2}$; and let $g_\theta(x)$ be a trigger injection with parameters $\theta$ (a channel-and-frequency mask of the kind Professor X optimizes). The attack succeeds cross-subject precisely when the trigger's post-alignment fingerprint does not depend on whose session statistics were used:

$$\mathcal{R}_s(g_\theta(x)) - \mathcal{R}_s(x) \;\approx\; \mathcal{R}_t(g_\theta(x)) - \mathcal{R}_t(x), \qquad s \neq t.$$

A useful analytic anchor: if the trigger-induced covariance shift $\Delta$ satisfies $\Delta = \alpha \bar{C}_s$ in every session, its image after recentering is $\alpha I$ — the identity-scaled matrix — regardless of the user. A "self-scaling" trigger of this form is invisible to the very operation designed to remove subject-specific structure. The attack is then a search over $\theta$ maximizing the attack success rate of the aligned classifier $f$ on a held-out target subject,

$$\max_\theta\; \mathrm{ASR}\big(f \circ \mathcal{R}_t \circ g_\theta\big) \;-\; \lambda \big(\mathrm{ACC}_{\text{clean drop}}\big),$$

with $f$ trained only on aligned, poisoned source data. The attacker never touches the target user's recordings, model, or device — the poisoning lives in a public multi-subject data pool, which is exactly how foundation-model-era BCIs are now built (Large Brain Model for Learning Generic Representations with Tremendous EEG Data in BCI).

Research Program

The program has four phases. Phase one is a systematic persistence measurement: take the two published EEG triggers — the asynchronous pulse of Meng et al. and the clean-label frequency trigger of Professor X — poison source-subject data only, and run three calibration-free pipelines on clean target data: RPA-LEM with its probabilistic classifier, TSMNet with SPD domain-specific batch normalization (public code in rkobler/TSMNet), and the multisource adapter MS-MDA (MS-MDA: Multisource Marginal Distribution Adaptation for Cross-Subject and Cross-Session EEG Emotion Recognition, which reached 89.63% cross-subject accuracy on SEED). The output is a map of which pipelines suppress which triggers and at what poisoning rates.

Phase two is the mechanism: project each trigger's induced covariance perturbation onto the tangent space at the session mean, decompose it into the between-subject shift subspace (which alignment removes) and the within-session residual subspace (which alignment preserves), and test the prediction that attack survival correlates with the fraction of the trigger footprint in the preserved subspace. This is what turns phase one from anecdote into theory.

Phase three builds the alignment-invariant trigger. The recentering map is differentiable in the log domain, so the search over $\theta$ can be gradient-based rather than the costly reinforcement-learning search Professor X needed; the self-scaling condition $\Delta \approx \alpha \bar{C}_s$ serves as an analytic initialization. We also test the attack against the LaBraM foundation-model fine-tuning pipeline, where a poisoned pretraining pool meets few-shot target adaptation.

Phase four turns the alignment map into a defense. Instead of TTBD's neuron pruning and Shapley attribution, we use the alignment machinery itself as a structured stress test: re-align inputs under bootstrap-resampled or leave-one-out session statistics and record a per-channel prediction-change score, plus a tangent-space residual test for covariance anomalies that are shared across sessions (the signature any invariant trigger must leave). Both checks are matrix multiplications, compatible with millisecond-scale decoding.

Proposed Experiments

The primary benchmark is BCI Competition IV Dataset 2a (22 channels, 9 subjects, 2 sessions, 4-class motor imagery) — the one dataset used by both the alignment literature (Zhuo et al.) and the attack literature (Professor X), with TSMNet's public pipeline supporting it directly. The secondary benchmark is SEED and SEED-IV for the emotion-recognition setting, where MS-MDA reports 89.63%/88.56% (SEED) and 59.34%/61.43% (SEED-IV) cross-subject/cross-session accuracy, and where Professor X's trigger was also validated. Leave-one-subject-out protocols: poison the source subjects' training trials at matched rates (1%, 5%, 10%), align with the target subject's unlabeled clean session, and measure attack success rate on triggered target trials, clean target accuracy, and — the new metric — alignment-mediated transfer: attack success on a target subject when zero target trials were poisoned. For the defense, we report detection AUC over poisoning rates, post-defense attack success rate, clean-accuracy cost, and added calibration-time latency in milliseconds, benchmarked against the 4ms-per-window inference figure that FDA reports. As an extension, if intracortical speech data access permits, we test whether the intermediate-layer adversarial alignment of ALIGN: Adversarial Learning for Generalizable Speech Neuroprosthesis (which reports a phoneme error rate of 30.46% versus 38.74% for a Transformer baseline on T12) preserves or destroys temporally distributed triggers of the kind Time Bandits demonstrated — its collapse to 50.87% attack success under non-IID conditions suggests data heterogeneity genuinely interacts with backdoor memorization, which is the premise this whole proposal tests.

Baselines

The "do nothing" reference is the supervised, within-subject, poisoned decoder: an EEGNet or DeepCNN trained per subject on poisoned data with no alignment anywhere in the pipeline. Meng et al. report that 1% poisoning yields an 80% attack success rate (exceeding 98% on the error-potential dataset with DeepCNN), and Professor X reports a perfect 1.000 attack success rate on BCI Competition IV 2a across EEGNet, DeepCNN, and LSTM. This is the potency ceiling any cross-subject attack must be judged against, and we run it under identical architectures, poisoning fractions, and tuning budgets.

The strongest existing competitor for the attack question is Professor X itself. It is clean-label, hides inside the physiological spectrum, evades four leading defenses, and was tuned on the same benchmark we use. The fair comparison poisons only source subjects, gives Professor X's trigger search the same compute budget as our gradient-based search, and measures cross-subject attack success after alignment on clean target data. Beating it means achieving materially higher alignment-mediated transfer at matched clean accuracy and poisoning rate — if Professor X's unmodified trigger already transfers under recentering, our attack contribution collapses, and we would report that as the headline finding instead.

For the defense question, the strongest portable competitor is the spectral-norm channel pruning of SSDA, which in vision cut source-free adaptation attack success from nearly 99% to 1.5–3% while holding roughly 74% clean accuracy on Office-Home. Its trace-based bound assumes ordinary convolutional and linear layers, so we port it onto the tangent-space linear head of TSMNet — the only Euclidean component of that pipeline — and give it the same unlabeled target data and adaptation budget. Beating it means lower post-defense attack success at equal clean accuracy with overhead that fits real-time decoding; TTBD is reported only as a latency-infeasible reference, since its Shapley computation cannot run at decoding speed.

The key ablation isolates the invariance ingredient: the same trigger family, poisoning rate, and search budget, optimized with and without the alignment-invariance term in the objective, plus the alignment-naive pulse trigger of Meng et al. transferred cross-subject as a floor. If dropping the invariance term costs little transfer attack success, the mechanism story is wrong even if the numbers look dramatic.

Why not just…?

Why not just apply standard backdoor defenses (STRIP, Neural Cleanse, Fine-Pruning)? The file's evidence says they already fail on neural data: Professor X bypassed all four defenses it tested, with poisoned samples sitting inside the clean data manifold in feature space, and Time Bandits showed STRIP's entropy filter collapses on sparse neural signals because clean and poisoned entropy distributions overlap. Fine-pruning degraded clean accuracy before touching the backdoor. The defenses that do work in vision — TTBD and SSDA — either cost too much compute or assume layer types these decoders lack, which is precisely the gap we fill.

Why not just run a benchmark study of existing attacks under existing alignment methods? This is a real threat to the proposal's novelty, and we are honest about it: phase one is that study, and it would be publishable on its own. But a measurement alone cannot answer the transferability question (no published trigger was designed against alignment, so a washed-out result would be uninterpretable without the tangent-space decomposition), and it yields no defense. The invariance condition, the self-scaling trigger construction, and the alignment-as-stress-test defense are what make this a research program rather than an evaluation.

Why not just filter the signals harder (bandpass, notch, artifact rejection)? Meng et al. explicitly tested bandpass filtering and downsampling against their pulse trigger and the attack survived; Professor X built filter evasion into its objective by scattering the trigger across non-adjacent physiological frequency bands and using authentic EEG segments as triggers. Preprocessing is a defense against the wrong surface here.

Why not just poison the target user's adaptation data, as DIFFADAPT does in vision? Can We Trust the Unlabeled Target Data? achieves over 80% attack success by poisoning unlabeled target images, but its attack depends on CLIP to pseudo-label the unlabeled pool, and no equivalent exists for raw multi-channel neural time series. More importantly, its threat model requires touching the victim's data stream; ours does not, which matches the clinical reality that a patient's implanted device and recordings are far harder to reach than a public pretraining corpus. We will nonetheless test DIFFADAPT's noise-stability signature on our poisoned neural data, since whether backdoored EEG trials are abnormally invariant to Gaussian noise — in signals with 1/f spectra and strong autocorrelation — is genuinely unstudied and could yield a free secondary defense.

Decisive Checks

Three results decide the proposal. First, the phase-one persistence map must show at least one published trigger surviving a mainstream alignment pipeline at clinically relevant poisoning rates; if every trigger is washed out everywhere, the laundering threat is empty and the work pivots to why — a negative result with a mechanism. Second, the alignment-invariant trigger must beat the ablated (invariance-free) trigger and the directly transferred Professor X trigger on alignment-mediated transfer at matched budgets; the tangent-space footprint decomposition must predict survival across pipelines. Third, the alignment stress-test defense must cut attack success substantially (toward the single digits, as SSDA achieved in vision) at under two points of clean-accuracy cost, with overhead measured in milliseconds rather than the per-batch Shapley budgets that rule out existing test-time defenses in this domain.