---
title: Signal-Space Projection
sidebar_label: Signal-Space Projection
sidebar_position: 5
---

# The Signal-Space Projection (SSP) Method

The Signal-Space Projection (SSP) is one approach to rejection of external disturbances in software. This section presents the relevant mathematical details of this method.

## General Concepts

Unlike many other noise-cancellation approaches, SSP does not require additional reference sensors to record the disturbance fields. Instead, SSP relies on the fact that the magnetic field distributions generated by the sources in the brain have spatial distributions sufficiently different from those generated by external noise sources. Furthermore, it is implicitly assumed that the linear space spanned by the significant external noise patterns has a low dimension.

Without loss of generality we can always decompose any $n$-channel measurement $b(t)$ into its signal and noise components as:

$$
b(t) = b_s(t) + b_n(t)
$$

Further, if we know that $b_n(t)$ is well characterized by a few field patterns $b_1 \ldots b_m$, we can express the disturbance as:

$$
b_n(t) = Uc_n(t) + e(t)
$$

where the columns of $U$ constitute an orthonormal basis for $b_1 \ldots b_m$, $c_n(t)$ is an $m$-component column vector, and the error term $e(t)$ is small and does not exhibit any consistent spatial distributions over time, i.e., $C_e = E\{ee^\top\} = I$.

We call the column space of $U$ the **noise subspace**. The basic idea of SSP is that we can find a small basis set $b_1 \ldots b_m$ such that the conditions described above are satisfied. We can now construct the **orthogonal complement operator**:

$$
P_\perp = I - UU^\top
$$

and apply it to $b(t)$ yielding:

$$
b_s(t) \approx P_\perp b(t)
$$

since $P_\perp b_n(t) = P_\perp (Uc_n(t) + e(t)) \approx 0$ and $P_\perp b_s(t) \approx b_s(t)$.

The projection operator $P_\perp$ is called the **signal-space projection operator** and generally provides considerable rejection of noise, suppressing external disturbances by a factor of 10 or more.

### Effectiveness of SSP

The effectiveness of SSP depends on two factors:

1. **Complete noise characterization**: The basis set $b_1 \ldots b_m$ should be able to characterize the disturbance field patterns completely. If this requirement is not satisfied, some noise will leak through because $P_\perp b_n(t) \neq 0$.

2. **Orthogonality to signal**: The angles between the noise subspace spanned by $b_1 \ldots b_m$ and the signal vectors $b_s(t)$ should be as close to $\pi/2$ as possible. If any of the brain signal vectors $b_s(t)$ is close to the noise subspace, not only the noise but also the signal will be attenuated by the application of $P_\perp$ and, consequently, there might be little gain in signal-to-noise ratio.

:::important
Since the signal-space projection modifies the signal vectors originating in the brain, it is necessary to apply the projection to the forward solution in the course of inverse computations.
:::

## Estimation of the Noise Subspace

Application of SSP requires the estimation of the signal vectors $b_1 \ldots b_m$ constituting the noise subspace. The most common approach is to:

1. Compute a **covariance matrix of empty room data**
2. Compute its **eigenvalue decomposition**
3. Employ the **eigenvectors corresponding to the highest eigenvalues** as basis for the noise subspace

It is also customary to use a separate set of vectors for magnetometers and gradiometers in the Vectorview system.

SSP vectors can be computed from raw data using **[mne_process_raw](tools-process-raw)** with the `--projon` and `--proj` options. Existing projection files (`.fif`) can also be loaded and applied during batch processing.

## EEG Average Electrode Reference

The EEG average reference is the mean signal over all the sensors. It is typical in EEG analysis to subtract the average reference from all the sensor signals $b^1(t), \ldots, b^n(t)$:

$$
b^j_s(t) = b^j(t) - \frac{1}{n}\sum_k b^k(t)
$$

where the noise term $b^j_n(t)$ is given by:

$$
b^j_n(t) = \frac{1}{n}\sum_k b^k(t)
$$

Thus, the projector vector $P_\perp$ will be given by:

$$
P_\perp = \frac{1}{n}[1, 1, \ldots, 1]
$$

:::warning
When applying SSP, the signal of interest can also be sometimes removed. Therefore, it's always a good idea to check how much the effect of interest is reduced by applying SSP. SSP might remove *both* the artifact and the signal of interest.
:::
