Precision instruments rarely remove noise by filtering. They build a second sensing path that sees the same disturbance but not the target, and they subtract the two: a dummy photodetector placed beside the active one, an enzyme-free "sentinel" electrode placed beside the measuring one, or two coils wired in opposite directions. Deep networks that adapt a pretrained model to a new task do something different. They insert small add-on modules that gate, attend, or statistically separate features, and those modules work from a single input stream.
This note proposes a plug-in module that brings the instrument trick into the network. The module sends a "reference" input through the same frozen pretrained layers as the "active" input. That reference is something recorded from the same person or device that contains the shared disturbance but not the target, and it costs no labels to obtain. The module then learns a small, nonlinear correction for how the two paths differ before subtracting. The aim is to cancel disturbances shared between the two inputs inside the network's internal features.
The application regime is cross-subject brain–computer interfaces. A brain–computer interface decodes intent from scalp electrical recordings (EEG). In this setting each new user's physiology acts as a large shared disturbance, and a short unlabeled rest recording from that user is available for free at deployment.
Core Claim
The physical principle that makes differential sensing work is noise symmetry with signal asymmetry. The disturbance must reach both channels through the same transfer function, while the target reaches only one. In hardware this matching is never perfect. The ultra-precision angle sensor of Development of an Ultra-Precision Angle Sensor. Compensation of the Thermal Drift of the Light Source subtracts a compensation path scaled by a hand-tuned constant $k$, and it still leaves about a third of the directional drift. The unshielded magnetocardiography device of A Portable Diagnostic Device for Cardiac Magnetic Field Mapping subtracts an array-average reference and gets roughly 10x rejection, yet it still cannot resolve T-waves.
Inside a neural network, symmetry can be enforced by construction. If the active and reference inputs pass through identical frozen weights, their shared disturbance is transformed identically. The only thing left to learn is the residual mismatch, which is a far smaller problem than learning the cancellation from scratch. Concretely, let $h$ be the frozen backbone up to an intermediate layer, $x_a$ the active trial, and $x_r$ an unlabeled reference segment from the same subject. The module outputs
$$z = h(x_a) - g_\phi\big(h(x_r),\, h(x_a)\big),$$
where $g_\phi$ is a small learned map with parameters $\phi$. The simplest form of $g_\phi$ is a per-channel gain, which is a learned version of $k$. The fuller form uses context-dependent gates in the style of FRNet's bit-level selection gate.
We also impose a "balance" constraint borrowed from gradiometer calibration. When two different reference segments of the same subject are fed in, the module's output should be near zero:
$$\mathcal{L}_{\text{null}} = \big\| h(x_{r_1}) - g_\phi(h(x_{r_2}), h(x_{r_1})) \big\|^2.$$
This loss is self-supervised. It can be applied to unlabeled data from unseen subjects at test time, without any intent labels.
What is new is the combination of three things. The reference is explicit and comes from a second input rather than from statistical invariance. Path matching is guaranteed by weight sharing. The residual nonlinear transfer function is learned and checked with a null test.
Relation to Prior Work
The closest work, and our strongest competitor, is Mutual Information-Driven Subject-Invariant and Class-Relevant Deep Representation Learning in BCI. It plugs into EEGNet and Deep ConvNet and splits features into an intent path and a subject path. The two paths are pushed apart by minimizing mutual information through a gradient-reversal estimator, and Deep InfoMax losses keep the intent path coherent. That work motivates ours, since it shows subject variability behaves like a removable shared nuisance. Its weakness is that invariance is learned statistically at training time. At test time it cannot use what an unseen subject's own data reveals about that subject's disturbance. Our module consumes that information directly.
Plug-and-play Feature Causality Decomposition for Multimodal Representation Learning similarly discards "redundant" noise through causal decomposition. It treats noise as label-irrelevant variance inside each modality and has no notion of a disturbance shared across channels that a reference could cancel.
Capturing forceful interaction with deformable objects using a deep learning-powered stretchable tactile array supplies the opposite design point, cancelling strain with symmetric sensing films. That cancellation happens entirely in hardware, and the downstream network never participates. Together these three papers bracket the gap: one cancels physically with no learning, and the other two learn without any physical reference.
The add-on module literature supplies the mechanics. FRNet in Enhancing CTR Prediction with Context-Aware Feature Representation Learning shows that bit-level sigmoid gating can be added for about 104K parameters. We reuse that gating form for $g_\phi$. tSF: Transformer-Based Semantic Filter for Few-Shot Learning acts as a constraint on design. It reports that heavy self-attention inserted in low-data regimes overfits, which argues against making $g_\phi$ a full attention block and in favor of a gated, low-capacity map.
Research Program
We will build the module on top of EEGNet and Deep ConvNet, frozen after standard pooled pretraining on training subjects. The module will be inserted at one or two intermediate layers. The reference input will be a non-task segment from the same subject: the pre-cue interval of the same trial where the dataset provides one, or otherwise a short rest or calibration recording from the same session. The module trains with cross-entropy on intent labels plus $\mathcal{L}_{\text{null}}$.
The work has three parts. The first is a controlled synthetic study. We will add known shared disturbances to clean EEG: drifts, line noise with a channel-dependent phase, and nonlinear gain such as saturation. This lets us measure how close each variant gets to the true signal as mismatch grows. The study mirrors the static-$k$ failure in the angle sensor, and it should show where a linear gain stops being sufficient.
The second part is cross-subject evaluation on the two EEG motor-imagery datasets in the file: GIST, with 50 subjects, and KU, with 54 subjects over two sessions.
The third part is test-time adaptation. For an unseen subject we update only $\phi$ using $\mathcal{L}_{\text{null}}$ on that subject's unlabeled reference data. This tests whether the balance constraint does useful work without labels.
Baselines
The naive reference point is pooled training of EEGNet across subjects with no adaptation. Mutual Information-Driven Subject-Invariant and Class-Relevant Deep Representation Learning in BCI reports 55.38% accuracy for this setting on GIST. We will reproduce it with the same splits so that every other number is relative to a shared floor.
The strongest existing method is that paper's mutual-information decomposition module on EEGNet. It reports 76.60% accuracy on GIST and 70–73% in zero-training evaluation on unseen subjects. For KU no reported result was found on Lacuna, so we will rerun it ourselves.
We will run both methods with identical backbones, splits, epochs, and hyperparameter search budgets. Our module will have a parameter count at or below that of the mutual-information estimator heads. Beating this baseline means exceeding its reproduced zero-training accuracy on unseen subjects by more than the across-seed standard deviation, on both GIST and KU. Matching it with fewer parameters and no adversarial training would count as a partial result, not a win.
The input-space differential baseline subtracts the reference in raw signal space before the frozen network sees anything. It covers raw-signal subtraction, rest-baseline correction, and common-average referencing. This is the classical answer, and it tests whether the subtraction needs to happen in feature space at all.
Two ablations isolate the key ingredient. In the first, the reference is fed as a concatenated extra input with no subtraction structure, which tests whether the explicit difference matters or whether extra information alone helps. In the second, the reference passes through a separate, unshared copy of the backbone, which tests whether path matching through shared weights is what does the work. Further ablations replace $g_\phi$ with a scalar or per-channel linear gain, and remove $\mathcal{L}_{\text{null}}$.
Why not just…?
Why not just re-reference or baseline-correct the raw EEG before the network? The magnetocardiography device shows the limit of this approach. It stacked cycle averaging, array-average subtraction, and FIR filtering, and it still could not recover T-waves (A Portable Diagnostic Device for Cardiac Magnetic Field Mapping). Linear subtraction also leaves residual drift whenever the transfer functions differ (Development of an Ultra-Precision Angle Sensor. Compensation of the Thermal Drift of the Light Source). Still, this is a real threat on EEG, where much subject variability may be linear. The synthetic study and the input-space baseline will settle it. If raw subtraction matches our module on GIST and KU, the honest conclusion is that latent referencing adds nothing for this regime.
Why not just concatenate the reference and let the network figure it out? A flexible network could in principle learn subtraction. However, nothing forces it to treat the reference symmetrically, and in low-data regimes high-capacity fusion overfits (tSF: Transformer-Based Semantic Filter for Few-Shot Learning). The concatenation ablation, given the same parameter budget, answers this directly. We also expect concatenation to fail the reference-shuffle check described below less sharply, because it never commits to cancellation.
Why not just use the mutual-information invariance module, which already reaches 76.60%? That module cannot see the unseen subject's own disturbance at test time. Its zero-training accuracy of 70–73% sits below its within-pool 76.60%, which is exactly the gap a subject-specific reference should close. If our module does not narrow that gap, the reference carries no information the statistical approach lacks. We would report this as a negative result.
Why not just fine-tune the whole backbone per subject? Fine-tuning the whole backbone requires labeled calibration trials from each new user. Our setting assumes only unlabeled rest data. We include full fine-tuning with a small labeled budget as an upper reference, to show how much of its gain the label-free module recovers.
Proposed Experiments and Decisive Checks
The headline experiment is leave-subjects-out evaluation on GIST and KU with all of the baselines above, over five seeds. We report accuracy on unseen subjects with and without test-time updates driven by $\mathcal{L}_{\text{null}}$.
Three checks decide whether the mechanism is real. First, the reference-shuffle test: at test time we replace each subject's reference with another subject's. If the module truly uses shared disturbance information, accuracy should fall toward the pooled baseline, whereas a module that merely gained capacity would be unaffected. Second, the shared-versus-unshared-weights ablation should show that weight sharing, not extra parameters, drives the gain. Third, in the synthetic study, the learned nonlinear $g_\phi$ should beat a learned scalar gain only when the injected mismatch is nonlinear or frequency-dependent. We will also verify that $\mathcal{L}_{\text{null}}$ on held-out reference pairs falls, as a direct measure of latent balance analogous to a gradiometer's null.
If all three checks pass and the zero-training gap to the mutual-information module closes, the result is a general recipe. It would apply to any sensing domain where a cheap, label-free reference exists, including unshielded magnetic sensing, tactile arrays, and biosensors.
References
- Development of an Ultra-Precision Angle Sensor. Compensation of the Thermal Drift of the Light Source.
- A portable diagnostic device for cardiac magnetic field mapping
- Mutual Information-Driven Subject-Invariant and Class-Relevant Deep Representation Learning in BCI
- Plug-and-play Feature Causality Decomposition for Multimodal Representation Learning
- Capturing forceful interaction with deformable objects using a deep learning-powered stretchable tactile array
- Enhancing CTR Prediction with Context-Aware Feature Representation Learning
- tSF: Transformer-Based Semantic Filter for Few-Shot Learning