Removing a high-amplitude single-channel artifact with local SSA#

Can local SSA remove a large EOG-like waveform from a single-channel EEG-like signal while preserving a known neural transient? The transient deliberately overlaps the artifact so that recovery and preservation are evaluated as separate endpoints.

Local SSA targets high-amplitude artifacts in single-channel EEG by clustering delay-coordinate vectors and reconstructing local PCA subspaces [1]. This is a controlled methodological illustration, not a replication of the paper’s clinical EEG, and the synthetic transient is not a clinical epileptiform model.

Local SSA treats high-energy local subspace structure as artifact-like. Genuine neural activity that occupies the same structure can also be removed, which is the central limitation evaluated here.

References#

Apply local SSA and evaluate artifact recovery and transient preservation#

Artifact residual ratio: 0.110
Neural-transient gain: 0.055
Neural-transient correlation: 0.276
Effective local cluster count: 3
Selected local subspace dimensions: [7 7 8]

Inspect the artifact/transient interval#

plot_signal_overlay(
    observed,
    cleaned,
    times,
    start=2.0,
    stop=4.2,
    reference=clean_reference,
    reference_label="known clean reference",
    highlight_mask=artifact_mask,
    highlight_label="EOG-like artifact window",
    highlight_spans=[
        {
            "onset": 2.9,
            "duration": 0.5,
            "color": "C4",
            "alpha": 0.12,
            "label": "neural transient window",
        }
    ],
    scale_after=False,
    before_label="observed",
    after_label="Local SSA residual",
    x_label="Time (s)",
    y_label="Amplitude (a.u.)",
    title="Local SSA around an EOG-like artifact and neural transient",
    show=False,
)
Local SSA around an EOG-like artifact and neural transient
<Figure size 2400x800 with 1 Axes>

Interpret the overlap stress test#

In this deliberately difficult overlapping case, Local SSA strongly reduces the high-amplitude EOG-like artifact but also substantially attenuates the known neural transient. This is the intended preservation stress test: high-amplitude neural structure that overlaps the learned local artifact subspaces is not guaranteed to survive.