Synthetic signal
Two seeded detector channels describe a stylized transition into and out of a channeling-like region.
Adversarial time series
This demo classifies overlapping windows from a synthetic crystal-alignment scan and checks a temporal requirement on the resulting score trace. Draw a small perturbation, or run PGD and inspect the one it finds.
01 / Experiment
The plots start from a seeded synthetic scan. Edit it by hand, sample random noise, or search the perturbation set with projected gradient descent.
Input
Change
Model output
02 / Method
A window begins every two samples, so neighboring 32-sample windows share 30 samples. All 81 predictions are evaluated from the same perturbed scan.
Two seeded detector channels describe a stylized transition into and out of a channeling-like region.
A small ReLU network classifies overlapping 32-sample windows every two samples.
The requirement passes when five consecutive channeling scores reach 0.78. STL robustness gives the distance from that threshold.
A two-window example
Take a signal with three samples. The classifier first reads [x0, x1] and then [x1, x2]. An attack may change the shared sample x1 by at most 0.060.
In this local toy model, raising x1 lowers the first score; lowering x1 lowers the second. Optimizing the windows separately therefore asks the same sample to move in opposite directions.
The slider applies one shared perturbation and recomputes both scores.
Toy requirement: at least one of the two scores must reach 0.780.
window 0
δ1 = +0.060
window 1
δ1 = −0.060
[0.720, 0.720]
apparent violation
y0 = 0.840 − 2δ1
y1 = 0.840 + 2δ1
With δ1 = +0.060, window 0 falls to 0.720, while window 1 rises to 0.960. The toy requirement still holds.
The pair [0.720, 0.720] needs δ1 = +0.060 and δ1 = −0.060 at the same time.
This two-window sketch isolates the shared-variable issue. The main attack uses one 192 × 2 perturbation for all 81 windows before evaluating the F G property.
Projected gradient descent follows a smooth approximation of the temporal robustness value. Every step is projected into the channel-normalized L∞ budget. After the search, the page recomputes the exact STL margin and checks the perturbation bound; a feasible negative margin is reported as a counterexample.
With stride two, adjacent windows share 30 samples. The actual attack maintains one 192 × 2 perturbation array. Gradients from every window accumulate into that array, and the score trace is recomputed from the resulting sensor signal.
Each window is average-pooled into four temporal bins per channel, passed through a 12-unit ReLU layer, and mapped to three softmax scores. Both sets of weights come from reproducible training on synthetic windows. The page evaluates the fixed weights in JavaScript.
A sound verifier would over-approximate all neural-network score traces reachable inside the perturbation set, evaluate interval STL robustness, search abstract violations for a concrete witness, and refine loose bounds. It would return Verified, a concrete counterexample, or Unknown. This version stops at falsification.
03 / Context
The demo connects two lines of work: adversarial robustness in crystal alignment and STL verification of neural-network score traces.
NASA Formal Methods 2026
How bounded perturbations affect a time-series classification task motivated by crystal alignment.
Read the preprintNFM 2026 RE×AI workshop
Relating local classifier robustness to temporal requirements over a complete prediction trace.
Read the paper