Re-referencing
Reference dependence, linked mastoids versus average versus Cz versus REST, how topographies and polarity change, and where re-referencing sits in the pipeline.
Prerequisites: L2.2 · Channel locations and bad channels
3 claims on this page are unverified. TODO(confirm) marks a specific statement the author has not yet checked against a
primary source. Everything else on this page has been reviewed. Treat a marked claim as
provisional and go to the cited source rather than quoting the sentence.
Objectives
- Explain reference dependence
- Apply linked mastoids, average, Cz and REST references
- Predict how topographies and ERP polarity change with reference
- Place re-referencing correctly in the pipeline
Why this matters
There is no such thing as the voltage at an electrode; there is only the difference between two electrodes. That means the reference is not a technical detail but part of the measurement: change it and amplitudes change, topographies change, and a component can change sign. Two labs reporting “the P3 at Pz” with different references are not reporting the same number, and neither is wrong. This lesson makes the dependence visible and gives you a defensible way to choose.
Concepts
The reference is a subtraction
An EEG amplifier measures potential differences. Every channel you see is
V_i(t) − V_ref(t)
where V_ref is whatever the amplifier subtracted — a physical electrode (Cz, a mastoid, an earlobe), a hardware construct (the Biosemi CMS/DRL arrangement, which is why ERP CORE’s sidecars record CMS as the reference), or an average computed afterwards. Re-referencing is nothing more mysterious than subtracting a different signal from every channel:
V_i − V_new = (V_i − V_ref) − (V_new − V_ref)
which is why re-referencing is always possible offline from a referential recording, and why it is lossless in one direction only: you can move from a recorded reference to any linear combination of the recorded channels, but you cannot recover a channel the reference removed.
Two consequences follow immediately, and they are the whole lesson:
- Amplitude is reference-dependent. If the new reference site carries some of the same activity as the measurement site, the difference shrinks; if it carries the opposite polarity, the difference grows. A component measured at Pz against linked mastoids and the same component measured at Pz against the average of 30 channels are two different numbers from one dataset.
- Topography is reference-dependent in a specific way. Subtracting a common signal from every channel shifts the whole map up or down by the same amount at each time point. It cannot change the shape of the map — the pattern of differences between electrodes is preserved — but it does change where the map crosses zero, which is exactly what a colour scale centred on zero displays. Red and blue swap places; the gradient does not move.
The usual choices
Linked mastoids (or linked earlobes). Average of the two mastoid electrodes. Long-standing in the ERP literature, which is its main practical virtue: comparability with decades of published amplitudes. The mastoids are not electrically silent — they sit close enough to temporal and posterior generators to pick up real signal — so this reference attenuates components whose fields reach them. Physically linking the two electrodes during recording creates a low-resistance path across the head and is avoided in favour of recording them separately and averaging offline.
Average reference. Subtract, at each time point, the mean over all EEG channels. The justification is that the potential over a closed surface integrates to zero, so the average over a dense and uniformly distributed set of electrodes approximates the potential at infinity. Two caveats the justification makes explicit: coverage must be adequate (a cap that stops above the ears, as most do, systematically under-samples the inferior surface) and it must be roughly symmetric (a montage crowded on the left biases the average left). With 30 channels over the upper head, the average reference is an approximation whose error you cannot measure from the data.
A single electrode (Cz, a nose reference, FCz). Simple and transparent; the cost is that the reference channel’s own noise and its own signal appear, inverted, on every other channel, and the channel itself is flat by construction. A single-site reference near a generator is the easiest way to make a component vanish.
REST (reference electrode standardization technique). (Yao, 2001) proposes reconstructing potentials relative to a point at infinity by fitting an equivalent source distribution to the recorded data with a head model, then computing what those sources would produce at infinity. It is not reference-free in the sense of needing no assumptions — it needs a forward model (L5.4) — but it removes the dependence on an arbitrary physical site. Its accuracy depends on the head model and on coverage, and its practical differences from an average reference shrink as channel count grows.
Current source density (surface Laplacian). Not a reference at all, but the usual alternative to choosing one: the second spatial derivative of the potential over the scalp is independent of the reference by construction, sharpens topographies and suppresses volume-conducted spread. Its units are µV/m², not µV, so amplitudes are not comparable with anything referential, and it amplifies high spatial frequencies — including noise from a bad channel. L5.3 treats it properly.
Rank, again
An average reference makes the channels sum to zero at every time point, so one degree of freedom is gone: 30 channels with an average reference have rank 29 (and rank 28 if one of them was interpolated, and so on — L2.2). This is the second half of pf-interpolation-rank: ICA fitted on average-referenced, interpolated data must be told the true rank or it will manufacture components out of numerical noise.
Reconstructing the online reference
Data recorded against a physical electrode usually ships without that electrode’s channel, because it is zero by construction. That missing channel is real scalp, and leaving it out biases the average reference: you are averaging N−1 sites and pretending it is N.
The fix is to add the reference channel back as a row of zeros before re-referencing, so that the average is taken over the full set. In MNE that is mne.add_reference_channels(raw, 'FCz') followed by raw.set_eeg_reference('average') — and the added channel then needs a position from the montage like any other. ds-lemon is the worked case: its online reference FCz is absent as a channel and must be reconstructed before average-referencing (§10.9). Note the rank arithmetic: the reconstructed channel is all zeros, so it adds a row without adding rank.
Where re-referencing sits in the pipeline
The ordering argument, which L2.8 makes in full:
- After bad-channel detection and interpolation. A bad channel included in an average reference spreads its badness to every channel, and a flat channel drags the average toward zero. Detect first, interpolate first, then average.
- Before ICA if you intend to analyse average-referenced data, because ICA’s unmixing matrix is estimated for the channel space you give it, and re-referencing afterwards changes that space. Either way, be consistent: the reference used to fit ICA should be the reference the cleaned data carries.
- Linear, so order among linear steps does not change the arithmetic — filtering and re-referencing commute — but it does change what the intermediate stages look like, and every non-linear step (rejection, interpolation with a changed channel set) breaks the commutation.
Reporting, and comparability across labs
State the online reference, the offline reference, and, for an average reference, the number and layout of channels it was computed over. Without those three, a published amplitude is not a quantity anyone can reproduce. When you want to compare with an existing literature that used a different reference, the honest options are to report both, or to report a reference-independent measure (a difference between electrodes, a CSD-based measure, or a scalp-distribution statistic) — not to convert a number and hope.
“Which reference is correct?” has no answer; “which reference makes my measurement interpretable, and what does it cost?” does. Decide from the component and the literature you need to speak to, fix the choice before you look at the effect, and show the map under at least one other reference to prove that the result is not an artifact of the choice.
The data behind this lesson
ds-erpcoreis the ERP dataset for this lesson and the rest of Level 2: CC BY 4.0, open access, per-subject downloadable, 30 EEG + 3 EOG channels in a 10-20 placement scheme, 1024 Hz, mains 60 Hz, no software filters, 40 participants per paradigm, recorded against the Biosemi CMS arrangement. The P3 paradigm is the Phase 2 paradigm; the widget serves grand-average evoked arrays under several references plus the topomap interpolation matrix. TODO(confirm): the author mirrors the ERP CORE entry into the catalog registry and signs off the dataset page (§10.11 item 8).ds-lemonsupplies the reconstruct-the-reference case (absent FCz) in the notebook.- The widget’s REST condition depends on a forward model. If it could not be built inside the asset budget, the data file marks REST
TODO(confirm)and the widget offers the remaining references; read the frame’s provenance line for what actually shipped.
Explore
A productive sequence: put the cursor in the P3 window with the original reference and note the amplitude at Pz; switch to linked mastoids, then average, then Cz, watching the same cursor; then watch the topography rather than the waveform and convince yourself the gradient is unchanged while the zero-crossing moves; finally select the difference wave and repeat — the difference between two conditions is far less reference-dependent than either condition alone, because the reference term largely cancels.
Practice
Re-referencing: the P3 at Pz under four references, what a reference does to a topography, and reconstructing an absent online reference channel nb-2-3-reference
Downloads from ds-erpcore, ds-lemon.
The notebook re-references the ds-erpcore N170 and P3 data, compares component amplitudes and maps across references, and then reconstructs the absent FCz online-reference channel in a ds-lemon raw file before average-referencing it. Its final cell prints the P3 mean amplitude at Pz under each reference — the numbers this lesson’s exercise asks for.
Exercises
Report the P3 mean amplitude at Pz (target minus standard, in the a-priori window stated in the notebook) under three references. The keys are filled from the notebook’s final cell.
Exercise ex-2-3-p3-average
NumericP3 mean amplitude at Pz with an average reference
Exercise ex-2-3-p3-mastoids
NumericP3 mean amplitude at Pz with a linked-mastoid reference
Exercise ex-2-3-p3-cz
NumericP3 mean amplitude at Pz with a Cz reference
Exercise ex-2-3-which-to-report
Free responseYou measured three different numbers from one dataset. Which do you report, and what must accompany it?
Pitfalls
Comparing amplitudes across references
- Symptom
- Component at Pz differs by half between studies.
- Cause
An EEG channel is a difference: the potential at an electrode minus the potential at whatever the amplifier subtracted. There is no absolute voltage to recover. Changing the reference subtracts a different signal from every channel, so every amplitude changes, and by different amounts at different electrodes.
- Detect
- Read the methods of both studies for three things: the online reference, the offline reference, and, for an average, the number and layout of channels it was computed over. If any of the three is missing, the amplitudes are not comparable and you cannot make them so. - Re-reference your own data to the other study’s reference and repeat the measurement. That is the only honest comparison, and i…
- Fix
- Fix the reference before looking at the effect, and choose it from the component and the literature you need to speak to — not from which value looks best. - State all three facts in the methods: online reference, offline reference, and the channel set an average was taken over. - Reconstruct an absent online-reference channel (as a row of zeros with a montage position) before average-referenci…
In other tools
In other toolsEEGLAB · FieldTrip — names only
The equivalents of what this lesson does, for a reader who works in another toolbox. Function names only: their own documentation is the place to learn how to call them.
EEGLAB
pop_rerefEEGLABpop_REST_rerefREST plugin (install separately)
FieldTrip
ft_preprocessing(reref)FieldTrip
Names checked 2026-09-18 against EEGLAB 2026.0.0 (plugins at the versions in EEGLAB’s own plugin list) and FieldTrip 20251218.
Reading
- Yao (2001). REST reference. unverified