Can an Attacker Find the Seam? Side-Channel Distinguishers as Black-Box Tests for Multiscale Coupling Errors

Large simulations of materials and molecules often stitch two models together. A small region that needs high accuracy, such as a crack tip, a defect, or a ligand, is simulated atom by atom or with a neural-network potential. The surroundings use a cheaper continuum or classical model. A well-built coupling should leave the seam invisible: nothing measured near the boundary should reveal where one model ends and the other begins. In practice the seam shows through. Spurious "ghost forces" act on boundary atoms even when the material is at perfect equilibrium, and these forces corrupt the computed stress. This proposal borrows the main tool of hardware security, where analysts ask whether a device's power trace reveals a secret key, and points it at simulations. The "secret" is the location of the coupling interface. The "trace" is the time series of forces, stresses, or velocities that the simulation produces. A coupling scheme is good to the extent that a strong statistical attacker cannot locate the interface from the data.

This reframing matters because the rigorous tools for interfacial error are narrow. They assume harmonic potentials, nearest-neighbour interactions, static equilibrium, and a perfect reference lattice. The hard cases fall outside all of these assumptions: finite temperature, dynamics, reactive chemistry, and hybrid machine-learned/classical models with no reference lattice at all. Side-channel analysis has spent two decades building distinguishers that detect faint, nonlinear, high-dimensional dependence on a hidden variable with as few samples as possible, and it reports that difficulty as a single number, the traces needed to disclose the secret. We propose to turn that machinery into a model-agnostic, reference-free leakage test for multiscale coupling. We will validate it against the analytic results on ghost forces, and then use it where theory currently says nothing.

Core Claim

Interfacial error is information about the interface. If a coupling scheme has residual error, observables in a probe window will depend statistically on where the interface sits. We can design experiments in which the interface position is the only thing that changes. A two-sample test or a trained classifier that distinguishes those conditions then measures that error directly, without a fully atomistic reference solution. The headline quantity is samples to disclosure. It is the analogue of the minimum traces to disclosure used in side-channel work, and it counts the number of independent snapshots (or trajectory segments) a distinguisher needs to locate the interface reliably. Our claim is falsifiable on two grounds. First, this quantity should reproduce the known analytic structure of ghost-force error where that structure is known. Second, across coupling schemes and parameters, it should track true error, measured against an expensive reference, better than the cheap indicators in current use.

Background and Where the Gap Is

On the mechanics side, three results motivate the proposal by establishing that the interface is the dominant and stubborn source of error. García-Cervera et al. show that interfacial error, not coarsening in the continuum bulk, sets overall accuracy. Ghost Force Influence of a Quasicontinuum Method in Two Dimension proves two further things for harmonic potentials and planar interfaces. Ghost forces cause an order-one error in the strain near the boundary. The polluted layer has width of order $\sqrt{\epsilon}$, where $\epsilon$ is the bond length, and the error decays exponentially away from the interface at a rate governed by $\sqrt{\epsilon}$. Li et al. (2012) show that in dynamics these mismatches launch high-frequency spurious waves that spread across the whole domain.

Two lines of work supply the coupling schemes we will test, and they also mark the limits of current error measurement. The first is blended ghost-force correction, introduced in Atomistic/Continuum Blending with Ghost Force Correction and extended to 3D defects in the 3D BGFC paper. It smooths the interface and subtracts the forces present in the reference lattice. That makes the interface stress-free at zero-temperature equilibrium and restores optimal convergence. The correction is defined relative to a static reference, so whether it removes the dynamic, finite-temperature signature of the interface is an open question. The second is the a posteriori estimator for GRAC coupling of Wang et al.. It splits error into truncation, modelling, and coarsening terms, and its modelling term is the closest existing "interface indicator". The file notes that it is restricted to nearest-neighbour interactions and point defects. Deep-HP (Jaffrelot Inizan et al.) couples a neural potential (ANI-2X) to a polarizable force field (AMOEBA). It reports that the hybrid becomes unstable around reactive events and produces interface outliers. No intrinsic interface-error indicator is reported for it.

On the security side, we reuse methods and do not attack hardware. Two of these define what it means to test for leakage. Test Vector Leakage Assessment (TVLA) is a Welch t-test between traces recorded under fixed and random inputs, used by BoMaNet to certify no detectable leakage up to 2 million traces. Correlation power analysis correlates traces against a hypothesised leakage model; CSI Neural Network uses it to recover floating-point weights. Two deep-learning distinguishers supply the architectures for our learned attackers, because they find leakage without hand-picked windows. These are the multi-scale InceptionNet/LU-Net pipeline of Huang et al. and the patchified transformer of Gammell and Roy for long uncropped traces. The research file found no prior work joining the two fields. The nearest structural analogue is the boundary-tile authentication of Towards Secure and Efficient DNN Accelerators. That paper concerns digital memory integrity and has nothing to do with physical error fields.

Research Program

The basic experiment is an interface-shift test. We fix a physical problem, for example a 2D triangular lattice with a di-vacancy, a lattice with a microcrack, or a solvated host–guest complex. We also fix a probe window, which is a set of atoms whose observables we record. We then run the coupled simulation under two or more conditions that differ only in where the interface is placed relative to the probe. Physically, these conditions are the same problem, so a perfect coupling makes them indistinguishable. Each run produces samples of per-atom forces, local virial stresses, and velocity time series. These samples are pooled into labelled datasets, and an attacker tries to predict the condition. We report three quantities for each attacker: the t-statistic or classifier advantage, the samples to disclosure, and how both vary with the probe's distance from the interface. An attacker succeeds if it identifies the interface position from a sample more often than chance would allow.

The program has three stages. The first is calibration in the regime where theory exists. In harmonic 2D quasicontinuum, the analytic result predicts that leakage decays exponentially with distance, with a characteristic length scaling as $\sqrt{\epsilon}$. The distinguisher's advantage as a function of distance should reproduce that slope, which was reported numerically as a decay power of 0.5. If it does not, the method is measuring something other than interfacial error, and we stop. The same stage also checks the zero-temperature static case under blended ghost-force correction, where leakage should vanish up to solver tolerance.

The second stage moves into regimes the theory does not cover. These are nonlinear potentials (Lennard-Jones and embedded-atom), curved interfaces, dislocations, finite temperature, and dynamic loading. We test a specific hypothesis here. Ghost-force correction subtracts static reference forces, so it removes the zero-temperature leak, but measurable dynamic leakage should remain from wave reflection and anharmonic mismatch at the blend. Samples to disclosure gives this hypothesis a quantitative form.

The third stage applies the test to Deep-HP-style neural/classical coupling. There the "interface" is the boundary of the ANI-2X region. The question is whether solvent observables reveal how far that region extends, and whether leakage spikes during proton-transfer events near the boundary. If the learned attacker exposes structure, we use it as a diagnostic. Saliency over its inputs shows which observables and atoms carry the leak. As an optional extension, the attacker's advantage could serve as an objective for tuning the blending weight function.

Baselines

The naive reference point is the boundary force residual. This is the norm of the net force on interface atoms in the undeformed reference configuration, which is the textbook definition of ghost force. It costs almost nothing and is exactly zero under blended ghost-force correction by construction. The interface-shift test should agree with it in the static case. It counts as beaten if, in finite-temperature or dynamic runs, our measure ranks schemes and parameters in an order that matches true error while the residual cannot discriminate them.

The strongest existing indicator is the modelling-error term $\eta_M$ of Wang et al.. We compute it on the same GRAC di-vacancy configurations, inside the nearest-neighbour setting where it is valid. Its reported performance is an optimal convergence of $N^{-1}$ in the $H^1$ error norm and $N^{-2}$ in energy for an EAM di-vacancy, as reported in that paper. For blended ghost-force correction, the reported benchmark is $(DOF)^{-1/2}$ in $H^1$ on di-vacancy and microcrack tests (BGFC). These are convergence rates of the schemes, not detection rates. No reported result was found on Lacuna for any leakage-style or distinguisher-based measure of interfacial error, so there is no published detection number to beat. A fair comparison gives both indicators the same configurations and the same compute budget. We then measure Spearman rank correlation with true $H^1$ error, which is computed against a fully atomistic reference on systems small enough to afford one. Our measure beats $\eta_M$ if it matches it inside its validity domain and stays correlated with true error outside it, under longer-range potentials, dislocations, and dynamics, where $\eta_M$ is undefined.

The oracle is direct comparison to a fully atomistic or fully neural reference simulation. We run it only to obtain ground truth. It is the gold standard but defeats the purpose of coupling, since it costs as much as the simulation the coupling was meant to avoid.

The key ablation isolates whether the learned attacker matters. We compare three attackers: a TVLA-style Welch t-test per observable; correlation analysis against a "leakage template", which is the strain field predicted by the linear ghost-force theory and plays the role that Hamming-weight models play in power analysis; and the deep distinguishers adapted from Huang et al. and Gammell and Roy. All three see identical samples, with hyperparameter search capped at the same number of runs. In side-channel benchmarks these learned models report striking efficiency: key recovery on ASCAD with 30 traces for InceptionNet (Huang et al.) and minimum traces to disclosure of 1 for the transformer (Gammell and Roy). Those numbers come from AES traces and say nothing yet about simulation data. A learned attacker is worth including only if it reaches disclosure with clearly fewer samples than the t-test in dynamic or nonlinear regimes.

Why not just…?

Why not just measure the ghost force at the reference configuration? In static, zero-temperature problems with a crystal reference, this is the right test, and we use it as the calibration check. It has two limits. Blended ghost-force correction sets it to zero by construction, so it cannot detect anything the correction leaves behind. And Deep-HP-style molecular coupling has no reference lattice at all. Stage two directly tests whether the residual misses error that the reference comparison reveals.

Why not just compare against a fully atomistic run? That comparison is the ground truth we validate against, but it only exists for systems small enough to make coupling unnecessary. The interface-shift test needs only coupled runs, which are cheap. It is worth having exactly when the reference is unaffordable, so we report how well it tracks reference error on small systems before trusting it on large ones.

Why not just use the existing a posteriori estimator? Where it applies, it is stronger than our test, because it is provably related to the error and comes with an adaptive refinement algorithm. Its stated restriction to nearest-neighbour interactions and point defects (Wang et al.) is the gap we target. Inside its domain we expect our measure to agree with it, not beat it, and we will say so.

Why not just run a t-test and skip the deep attackers? This is a real threat. Ghost-force signatures may be mostly first-order mean shifts, which a Welch t-test catches with optimal efficiency. If the ablation shows the t-test matches the learned distinguishers everywhere, the contribution becomes the TVLA-style interface-shift protocol and samples-to-disclosure metric, and the deep models drop out. We expect the learned attacker to pull ahead only in dynamic runs, where the leak lives in high-frequency temporal structure and cross-atom correlations rather than in per-atom means. That is a hypothesis to test, not a premise.

Why not take the literal intersection and attack the hardware running hybrid simulations? Power-analysis extraction of a neural potential's weights would mostly repeat CSI Neural Network on a different model. It would leave the open problem in multiscale accuracy untouched, which is why we transfer the method rather than the threat model.

Decisive Checks

The method lives or dies on three results. First, in harmonic 2D quasicontinuum, distinguisher advantage must decay with distance from the interface at the $\sqrt{\epsilon}$-governed rate proven analytically. Second, across a sweep of coupling schemes and parameters (sharp quasicontinuum, GRAC, blended ghost-force correction, and blend widths) on di-vacancy, microcrack, and dislocation benchmarks, samples to disclosure must rank-correlate with reference $H^1$ error at least as well as $\eta_M$ where both are defined, and better than the boundary residual at finite temperature. Third, on a Deep-HP water box and SAMPL host–guest systems, the test must either locate the neural/classical boundary from solvent observables or certify that it cannot within a stated sample budget. This addresses the regime where Deep-HP reports a host–guest binding RMSE of 0.94 kcal/mol (Jaffrelot Inizan et al.) but no interface diagnostic. A positive result on the second check, combined with a nonzero dynamic leak under blended ghost-force correction, would show that a cheap, reference-free test exposes coupling error that the field's current tools cannot see.