INTRO TO MEG

Overview of MEG

  • Nature of Measurement:

    • MEG measures magnetic waves generated by the brain.

    • It captures a summation of population-level activity in the brain, providing a signal that reflects neuronal firing.

    • Functional Neuroimaging: MEG offers a view into brain function rather than structure, unlike MRI.

  • Types of MEG:

    • Cryogenic vs. Optically-pumped (laser): Two main types of MEG sensors.

Advantages of Using MEG

Why MEG is often preferred over EEG

MEG and EEG both measure brain activity with millisecond temporal resolution, but MEG is often preferred when accurate spatial localisation is important.

Magnetic fields measured by MEG are much less distorted by the skull and scalp than the electrical potentials measured by EEG. As a result, MEG can estimate the origin of neural signals more accurately.

MEG therefore provides high spatiotemporal resolution, combining millisecond timing with spatial precision on the order of millimetres. Although it is non-invasive, its spatial accuracy is closer to invasive recordings than to EEG.

Because of this reduced distortion, source localisation and solving the inverse problem are generally more reliable in MEG. This is why MEG is considered a gold standard for presurgical functional mapping, particularly for identifying “must-not-cut” regions such as motor and language cortex.

MEG is especially sensitive to activity in the cerebral cortex, where pyramidal neurons are aligned perpendicular to the cortical surface, allowing their magnetic fields to summate effectively.


Limitations compared to EEG

MEG is significantly more expensive than EEG and usually requires a magnetically shielded room and cryogenic cooling. In contrast, EEG is portable, widely available, and far more cost-effective, making it better suited for routine clinical use and large-scale or bedside studies.

  • Why MEG?:

    • High spatiotemporal resolution allowing researchers to pinpoint brain activity with great accuracy.

    • Direct measure of neural activity, allowing insights into the brain's real-time processes.

    • Richness of Data: MEG provides detailed information about the timing and location of brain activity, offering insights into various neural processes.

  • Source of Signals: Discusses the strength and origins of MEG signals.

How MEG localises activity

MEG measures tiny magnetic fields made when neurons send electrical signals. These magnetic fields pass through the skull almost unchanged. Because the signal is not bent or blurred very much, the computer can make a fairly accurate guess about where in the brain the activity came from.

MEG can usually localise activity to within a few millimetres, especially for activity near the surface of the brain (the cortex).


How this compares to EEG

EEG measures electrical signals at the scalp. These electrical signals get spread out and blurred as they pass through the brain, skull, and scalp. By the time they reach the electrodes, it is harder to tell exactly where they started.

So:

  • EEG = excellent timing, weaker location accuracy

  • MEG = excellent timing, better location accuracy

How this compares to fMRI

fMRI does not measure neural activity directly. It measures changes in blood flow and oxygen that happen after neurons become active.

This means:

  • fMRI is very good at spatial localisation (often 1–3 mm)

  • but very slow in time (seconds, not milliseconds)

MEG is the opposite:

  • MEG is very fast (milliseconds)

  • spatial localisation is good but not as precise as fMRI

Simple comparison summary

  • MEG: tells you where brain activity happened pretty well, and exactly when it happened

  • EEG: tells you when activity happened very well, but where is less clear

  • fMRI: tells you where activity happened very precisely, but when is delayed and blurred

Historical Background

Instrument Development Timeline

  • Notable Advancements:

    • 1964: First single-channel MEG developed.

    • 1965: Creation of SQUID (Superconducting QUantum Interference Device).

    • 1992: First whole-head MEG system with 122 sensors.

    • 1998: Introduction of a high-density array with 306 sensors.

    • 2017: First single-channel OPM (Optically Pumped Magnetometer).

    • 2020: Development of the first whole-head OPM-MEG with 50 channels.

    • 2022: Introduction of high-density whole-head OPM-MEG with 128 channels.

Mechanics and Properties of MEG

Mechanics and properties of MEG (Magnetoencephalography)

MEG measures the tiny magnetic fields produced by electrical activity in the brain, mainly from synchronised activity in pyramidal neurons. Because magnetic fields change extremely quickly, MEG has very high temporal resolution, on the order of milliseconds. This makes it comparable to EEG in timing, and much faster than MRI or fMRI.

MEG also has relatively high spatial resolution, measured in millimetres. It is not invasive, but its spatial precision is closer to invasive recordings than to EEG. Compared with EEG, MEG is better at localising where activity is coming from because magnetic fields are less distorted by the skull and scalp than electrical potentials.

In short: MEG is fast like EEG, but localises better.

Why MEG needs a magnetically shielded room

The main weakness of MEG is that the brain signals it measures are extremely small. They are many orders of magnitude smaller than the Earth’s magnetic field, and also much smaller than everyday environmental noise from electronics, computers, power lines, and even the body itself.

Because of this sensitivity, MEG recordings must take place inside a magnetically shielded room. This room does not “block” magnetic fields in the way lead blocks X-rays. Magnetic fields are hard to block directly.

Instead, the room is built from high-permeability metals (and copper layers). These materials strongly attract magnetic fields. When external magnetic fields hit the room, they are diverted and guided around the recording space rather than passing through it. The result is a relatively “quiet” magnetic environment inside the room where brain signals can be detected.

Active shielding and noise correction

Even with passive shielding, some background magnetic noise remains. MEG systems therefore use active shielding, where sensors measure residual magnetic fields in the room. The system then applies an equal and opposite magnetic field to cancel this noise out, effectively reducing it towards zero.

This is necessary because environmental noise, as well as biological noise, is much stronger than the brain signals of interest.

Sources of noise in MEG recordings

Non-brain sources of magnetic signals include the Earth’s magnetic field, electronic equipment in the room, and physiological activity such as the heartbeat, neck and facial muscles, swallowing, and small head movements. These signals are much larger than cortical signals and can dominate the recording if not controlled.

Participants are therefore encouraged to keep still, but some movement is possible. Brain signals are still present even with movement, they are just much smaller compared to muscle and environmental signals, which makes careful shielding and noise handling essential.

Comparing MEG with fMRI, fNIRS, and EEG

fMRI and fNIRS measure the BOLD signal, which reflects changes in blood oxygenation and blood flow. The logic is indirect: if blood flow and oxygenation increase in a region, that region is inferred to be active. This process is slow and reflects vascular responses rather than neural activity itself.

EEG and MEG, in contrast, are direct measures of neural activity. EEG measures electrical potentials at the scalp. MEG measures the magnetic fields generated by the same underlying neural currents, just outside the head. Because they directly reflect neuronal activity, EEG and MEG have millisecond temporal resolution.


What MEG is actually measuring

Neurons communicate using electrical currents. When current flows along a neuron, it produces a surrounding magnetic field. This relationship follows basic electromagnetism and is described by the right-hand rule.

If you point your right thumb in the direction of current flow, your curled fingers show the direction of the magnetic field looping around that current. MEG sensors sit outside the head and detect these tiny magnetic fields produced by current flow in cortical neurons.

Importantly, MEG is not measuring single neurons. The signal only becomes detectable when large populations of neurons are active together.


Why alignment of neurons matters

MEG signals depend critically on summation. When many neurons are aligned in the same direction and active at the same time, their magnetic fields add together and produce a measurable signal.

If neurons are oriented in different directions, their magnetic fields cancel each other out. These cancelling arrangements are called closed fields.

This is why MEG (and EEG) are most sensitive to activity in the cerebral cortex, where pyramidal neurons are aligned perpendicular to the cortical surface. Deep structures such as the amygdala or hippocampus often have more complex, folded arrangements, so their signals tend to cancel and are harder to detect.


Deep sources are hard, but not impossible

Signals from deep brain regions are harder to measure for two reasons. First, closed-field geometries cause cancellation. Second, magnetic field strength falls off with the square of the distance, so deeper sources produce weaker signals at the sensors.

However, deep sources are not impossible to study. With strong experimental designs, many repeated trials, and good control conditions, activity from regions like the amygdala can sometimes be detected. This is easier in task-based paradigms than in spontaneous or resting-state activity.


What determines MEG signal strength

MEG signal strength depends on several interacting factors. The number of neurons involved matters, because more neurons produce a larger summed signal. Cell density also matters, because tightly packed neurons generate stronger fields.

Crucially, alignment is key. Large, well-aligned neuronal populations (such as in sensory cortices) produce strong signals. Regions with many competing subpopulations doing different computations (such as parts of prefrontal cortex) often produce weaker, more complex signals.

Distance also matters. Superficial cortical sources are easier to detect than deep ones.


From sensors to brain: source modelling

MEG sensors measure magnetic fields at the scalp, but researchers want to know where those signals came from in the brain. This requires source modelling, which is a mathematical inference process rather than a direct measurement.

Using a structural MRI, the known positions of the sensors, and a model of how magnetic fields propagate, the brain is treated as a grid of small 3D units called voxels. Each voxel is assigned a predicted contribution to each sensor.

The measured sensor data are then compared against these predictions to estimate the most likely configuration of neural sources. This is known as solving the inverse problem.

There is no single correct solution. The result always depends on modelling assumptions and constraints. That is why MEG source localisation is described as a model, not ground truth.


MEG sensors: old school and new school

Cryogenic MEG (SQUID-based)

Traditional MEG systems use SQUID sensors (superconducting quantum interference devices). These sensors are incredibly sensitive but must be cooled with liquid helium to superconducting temperatures.

The sensors sit inside a large helmet-like device called a dewar. These systems are expensive, require regular helium refills, and are not very flexible in terms of head size or movement.

Different coil configurations are used. A magnetometer measures all magnetic fields equally, whether they come from nearby brain sources or distant noise. Gradiometers use pairs or sets of coils arranged so that distant signals cancel out, while nearby brain signals remain. This helps suppress environmental noise.


Newer MEG: optically pumped magnetometers (OPMs)

Newer systems use optically pumped magnetometers. These do not require liquid helium. Instead, a laser passes through a small glass cell containing a gas such as rubidium or helium.

The magnetic field changes how the gas interacts with the laser light. A photodiode measures how much light gets through, which directly reflects the local magnetic field strength.

OPMs act like magnetometers and cannot perform coil-based cancellation in the same way as gradiometers. However, they can be placed much closer to the scalp, improving signal strength. They are also lighter, wearable, and better suited for children and movement.

OPMs can be single-axis, dual-axis, or tri-axial, meaning they can detect magnetic fields in one, two, or three spatial directions, increasing sensitivity to complex field patterns.

What “functional” means (in MEG/EEG context)

“Functional” means what the brain is doing, measured as neurophysiological activity that changes with brain state. The state could be rest, a task, or an interaction between regions (connectivity). This is different from “structural,” which is about anatomy (lesions, grey/white matter shape, etc.). Even though MEG/EEG are functional, you often still need a structural MRI (T1) or a template brain to place the functional activity onto anatomy.


Four common kinds of “functional” data

1) Spontaneous rhythms (resting activity)

These are ongoing oscillations that happen without a specific event trigger. They reflect “default” readiness or idling patterns in networks.

A classic example is occipital alpha: when you close your eyes at rest, occipital cortex often shows a strong, synchronous alpha rhythm. Motor cortex often shows beta at rest, which is commonly framed as a “readiness / maintenance” state.

When a region starts actively processing a task, its neurons often become less synchronised in that resting rhythm, because smaller subpopulations split into specialised computations. That commonly shows up as a drop in power in that band relative to baseline (you’ll see this as blues vs reds on time–frequency plots).


2) Evoked responses (time-locked)

These are the classic “average the signal after a stimulus” responses. You pick time 0 (e.g., flash of light) and look at the waveform that follows. They’re useful clinically and experimentally because you can see delays (latency shifts) or shape differences (morphology).

But evoked responses are just one slice of the story: they can miss what’s happening before the stimulus and a lot of activity after, and they can hide oscillatory changes because the evoked component can be a small part of the overall signal.


3) Induced responses (not strictly phase-locked)

These are task-related changes in oscillatory power that don’t line up perfectly in phase across trials. You won’t see them well by simple averaging in the time domain, so you typically look in time–frequency space.


4) Connectivity

Here you’re asking whether two regions are interacting, often by looking at whether their oscillations are related over time (for example, synchronising in a frequency band with a consistent lag). The big idea is: coordinated timing can imply functional coupling, and sometimes directionality hypotheses (bottom-up vs top-down) are tested using timing/lag patterns.


Oscillations: what they are, and why the “bands” are a scaffold not a law

An oscillation is rhythmic activity from a neural population. We group rhythms into canonical frequency bands as a shared language:

  • Delta ~0.5–4 Hz (often prominent in sleep; also pathology contexts)

  • Theta ~4–7 Hz (sleep and memory/attention contexts; varies by region/task)

  • Alpha ~8–13 Hz (very common at rest; strong with eyes closed in occipital cortex)

  • Beta ~14–30 Hz (often prominent in motor systems at rest/readiness)

  • Gamma ~30–100 Hz (fast, often local, harder to synchronise broadly; linked in many studies to attention/high-order processing but can appear in sensory/motor too)

  • High-frequency oscillations (HFOs) ~80–250 and 250–600 Hz (less established in general cognitive work; often discussed in epilepsy, e.g., near seizure onset)

Key caveat your lecturer stressed: these ranges are guidelines. Frequencies shift with age (children often have slower “alpha”), disease can slow rhythms (e.g., dementia), and specific rhythms can span bands (mu can overlap alpha/beta). Any region can, in principle, show many frequencies—it’s a communication “alphabet,” not a single-function label.


Spectrograms: what that colourful block is telling you

A spectrogram (time–frequency plot) takes the messy waveform and decomposes it into power at each frequency over time, using small bins (e.g., ~1 Hz by ~50 ms, depending on settings). Each pixel is essentially: “how much power is here, at this frequency, at this moment?”

That’s why you can see task-related increases or decreases in specific bands as patches of colour, instead of trying to spot them in the raw squiggle.


Why analysis feels like a jungle: time, frequency, sensors, sources

MEG/EEG data are “rich,” meaning you can analyse them in multiple spaces:

  • Time domain: evoked responses (waveforms locked to events).

  • Frequency domain: average power over time (useful for rest or long epochs).

  • Time–frequency domain: spectrograms to capture induced changes.

  • Sensor space: analyse at the sensors (easier, but comparing people is messy because head size/position differ—especially in kids).

  • Source space: estimate where in the brain the signal came from (more anatomically interpretable).

There isn’t one agreed analysis pipeline. The “analysis tree” slide is basically a warning label: there are many valid methods, and your choice should be driven by your research question and by the assumptions you’re willing to make.


Beamforming (one major analysis branch in MEG)

Beamforming is a source localisation method used to estimate where brain activity originates from using MEG sensor data. It works by creating a spatial filter that enhances signals from one brain location while suppressing activity from elsewhere.

The brain is modelled as a 3D grid of voxels, with each voxel treated as a potential neural source. For each voxel, the beamformer computes a set of weights that describe the pattern of sensor activity expected if that voxel were active. These weights depend on the voxel’s location, the position and orientation of the sensors, head geometry, and a physical model of magnetic field propagation.

The beamformer applies these weights to the recorded sensor signals to estimate the activity originating from that voxel. This process is repeated across all voxels, producing a spatial map of estimated neural activity across the brain.


Beamforming and the inverse problem

Beamforming provides a solution to the inverse problem, which involves inferring brain sources from measurements made outside the head. This problem has no unique solution and no ground truth in MEG alone. As a result, all beamforming results are model-based estimates.

Different modelling assumptions, constraints, and algorithms can produce different solutions. It is therefore essential to understand the assumptions underlying a given beamformer, such as those related to noise estimation, source independence, and spatial correlations. Beamforming results should always be interpreted as the most likely sources of activity rather than definitive locations.


Related computational methods in MEG analysis

Beamforming is one of several approaches used to analyse MEG data. Dynamic Imaging of Coherent Sources (DICS) is a frequency-domain beamformer commonly used to study coherent or synchronised activity between brain regions, particularly in connectivity analyses. Machine learning methods, such as Multivariate Pattern Analysis (MVPA), analyse patterns across sensors or source estimates to classify brain states or task conditions, focusing on information content rather than precise localisation.


Beamforming in practice

In practice, a beamformer combines signals from multiple sensors using voxel-specific weights to emphasise activity from a target location while reducing interference from other brain regions and environmental noise. The output is typically a spatial map of neural activity or oscillatory power across the brain.


Why beamforming matters

Beamforming enables MEG data to be interpreted in anatomical space, linking millisecond-level neural dynamics to specific brain regions. This makes it essential for studying functional organisation, development, disease-related changes, and for clinical applications such as presurgical mapping.


Advantages and weaknesses

Beamforming offers good spatial specificity while preserving MEG’s excellent temporal resolution and is well suited to analysing oscillatory and task-related activity. However, it relies on modelling assumptions, struggles with strongly correlated or simultaneous sources, and is less sensitive to deep or weak sources. Different beamforming implementations can therefore yield different results.

Use Cases of MEG

MEG has been a major research tool since the 1990s because it gives whole-brain, millisecond-by-millisecond measures of neural activity. In research, it is used to study sensory and motor function, cognition, and resting-state activity, and to compare typical development/ageing with disorders. It is also non-invasive and relatively quick to run: if you can get a task that produces a reliable repeated response, you can often get usable signal in ~10 minutes.

Clinically, MEG is already used most in epilepsy (to help localise epileptic activity) and in presurgical mapping. In tumour surgery or epilepsy surgery, MEG can map “must-not-cut” functional cortex (motor/language etc.) and show how close that is to the lesion, helping plan resection margins and reduce the risk of post-op deficits.


Task-based MEG: how the experiment is structured

A trial is one stimulus presentation (or one movement cue, one sound, one shock, etc.) with a defined window that includes a bit of baseline before the stimulus and a response period after it. A run is a collection of many trials presented repeatedly.

Two key timing terms show up in task design. The inter-stimulus interval (ISI) is the time between the onset of one stimulus and the onset of the next stimulus. The trial duration is the full self-contained chunk you analyse around each stimulus (baseline → stimulus → response/recovery), before the next trial begins. You usually want enough spacing for the signal to evolve and (often) return toward baseline, especially for motor tasks.


Block design vs event-related design

A block design groups lots of similar activity into longer chunks (task block, then rest block). It’s common in fMRI because fMRI is slow and benefits from sustained periods to boost signal. In block designs you may not have (or need) a precise time marker for every single stimulus—what matters is “during this whole block, they were doing X.”

An event-related design is more natural for MEG because MEG has millisecond resolution. You present many discrete, time-locked events and mark exactly when each stimulus occurred. This lets you average evoked responses and/or analyse induced oscillatory changes aligned to each event, and it allows interleaving different conditions across trials. The core idea is: if you can trigger precisely to each event and repeat it many times, you can pull out small brain responses from noise.


What MEG is especially good at measuring

MEG is strong for sensory, motor, and many “bottom-up” responses because you can time-lock precisely to stimulus onset or movement onset, then see how the response unfolds across milliseconds and frequency bands. Motor mapping is a standard example: cue a finger movement and you can localise activity near the motor “hand knob,” often with quite fine spatial precision depending on registration quality.

Auditory cortex can be trickier than other primary sensory areas because it is bilateral and close to the midline, which can make the “best” model solution harder to resolve cleanly into left vs right sources in some setups. But overall, sensory/motor and language/cognitive responses are very accessible with good task timing.


Cognition: why MEG’s timing matters

For higher-order cognition, the selling point is subprocess timing. Instead of one blob of “working memory activity,” MEG can separate when encoding happens, when maintenance happens, and when retrieval happens, because these unfold over different time windows and often in different frequency bands. That fine-grained timing is useful for studying development (what matures earlier vs later), ageing, and disease-related changes in processing stages.

If a cognitive construct can be operationalised as a task with repeated trials (task switching, attention, verbal reasoning, lexical/semantic processing), then MEG can usually study it—provided you can get enough repeats for signal-to-noise.


Resting-state MEG: useful but conceptually messy

Rest is measurable, but defining “rest” is oddly slippery. Some studies have participants sit quietly, some show a video, some give a mental prompt—so the “rest condition” varies. Despite that, there are robust principles about typical resting patterns, like strong alpha in occipital cortex (especially eyes closed) and prominent beta in motor systems.

Resting analyses often summarise power across frequency bands and map where different bands dominate. A common pattern is that alpha dominates posterior/occipital regions, beta is strong over motor regions, and gamma can appear in frontal/control areas but tends to be much lower in power.


Example interpretation your lecturer hinted at (motor task)

After a right-hand finger movement, you expect a stronger change in the contralateral (left) motor cortex. In some disorders (e.g., Parkinson’s), people may show more bilateral recruitment, which can look like a more bilateral response because more neural resources are needed to achieve the same movement.

MEG from a lifespan perspective

MEG allows you to study how brain function changes across the entire lifespan, from infancy through older adulthood. Because it is non-invasive and increasingly child-friendly, it can be used repeatedly in the same individual or across age groups to track developmental and ageing-related changes in neural dynamics.

In development, MEG can capture how functional responses emerge and specialise over time. As techniques have improved, studies have even used MEG in infants to examine early language acquisition, showing that core language-related neural dynamics are present surprisingly early in life.

In older adulthood, MEG can reveal dedifferentiation, where neural responses become less specialised and more broadly distributed. This pattern is often seen in healthy ageing and more strongly in neurodegenerative conditions such as dementia. These changes may appear in oscillatory power, timing, or spatial organisation of responses.

Because the same measurement principles apply at all ages, MEG is well suited to comparing children, young adults, and older adults—provided there is enough statistical power in each group.


Clinical populations in research (early and subtle effects)

MEG is especially useful in research on clinical populations because it can detect subtle functional changes that may not yet be visible on structural MRI or standard neuropsychological tests.

For example, in metabolic or systemic conditions such as diabetes, MEG has shown that individuals can recruit additional or more bilateral neural activity (for instance, increased bilateral beta-band responses) to maintain normal behavioural performance. Reaction times may appear normal, but the brain is working harder to achieve the same outcome. This reflects a compensatory mechanism, not yet a behavioural deficit.

Crucially, these neural changes can sometimes predict future cognitive decline before it is clinically obvious, highlighting MEG’s sensitivity to early functional alterations.

MEG has also been used to study language disorders, hearing impairment, and conditions affecting sensory processing in noisy environments. Because it has millisecond temporal resolution, it can separate early sensory processing from later cognitive or linguistic stages, revealing where and when processing diverges from typical patterns.

Even conditions that primarily affect the body rather than the brain (e.g. HIV) can show measurable changes in brain dynamics, demonstrating how peripheral disease can influence central neural function.


Clinical applications: epilepsy and presurgical mapping

Clinically, the most established use of MEG is in epilepsy. MEG can detect and localise epileptic activity, helping identify the epileptic focus. This information is particularly valuable when MRI findings are ambiguous or when seizures originate near eloquent cortex.

MEG is also used extensively in presurgical functional mapping, especially for tumour resection and epilepsy surgery. Task-based MEG can localise critical functions such as language, motor, auditory, and visual processing. Surgeons use this information to determine how close a lesion is to essential functional tissue and how much tissue can be safely resected.

Multiple studies show that incorporating MEG into surgical planning is associated with better surgical outcomes, including a higher likelihood of seizure freedom after epilepsy surgery and reduced risk of post-operative functional deficits.


Big-picture takeaway

MEG provides a powerful way to study brain function across the lifespan, from early development to ageing. In research, it can reveal compensatory and preclinical changes in neural processing that precede behavioural symptoms. Clinically, it plays a key role in epilepsy and presurgical mapping, improving surgical precision and patient outcomes. Its combination of high temporal resolution, reasonable spatial localisation, and non-invasiveness makes it uniquely suited to tracking how brain function changes over time and disease.