Coding-Day (C-Day) minus 5
My motivation for joining Google Summer of Code (GSoC) comes
from the idea that we can use our brains to write code that will allow us to better
understand neural coding within the brain. Towards this goal, my project is
about developing code for recording and analyzing signals from the active human
brain. There exists a wide range of ways to peer into the brain, and one method
of parsing the different recording strategies is by judging their
“invasiveness” (essentially how much trauma you cause in order to get a
particular brain signal). In humans, we typically record brain activity completely
non-invasively using techniques called magnetoencephalography (MEG; roughly translated as
magnetic brain graph) or its electric counterpart, electroencephalograpy (EEG; roughly
translated as electric brain graph). These passive recording methods are
completely safe as they don’t require surgery, but the measurements tend to be
more contaminated with noise and have relatively worse resolution in space when
compared to invasive techniques.
Removing noise from brain recordings is, therefore, one of
the biggest challenges faced by MEG (and EEG) researchers. In
magnetoencephalography, anything from the heart beating, to a nearby moving elevator
or train, or to the Earth’s magnetic field can cause interference that’s much
stronger than the brain’s incredibly feeble magnetic signals. In terms of
signal-to-noise ratio, the challenge is akin to hearing a pin drop next to a
jet engine; even so, MEG research still provides meaningful results with the
right strategy. Artifact rejection, aimed at removing noise, is a major
research endeavor within neuroscience and engineering. Artifact rejection can
be as basic as using a threshold to throw out experimental trials when a signal
was too strong to have come from the brain. On the other hand, it can be as convoluted
as determining vector subspaces occupied mainly by spurious noise sources and
projecting them out with matrix multiplication. Past researchers have made
quite a bit of progress in artifact rejection, but it’s important to note that
many of the methods were hard to generalize and only appropriate for a specific
type of noise and dataset, so you almost need to tape, tack, and glue a medley
of filters together to address all sources of contamination.
In 2005, a refreshing dose of physics was injected into the
MEG and artifact rejection literature. Using only Maxwell’s equations and the geometry of the
magnetic sensors, a new method called “Signal Space Separation” (SSS) allowed
signals from inside an imaginary sphere enveloping the MEG sensors to be
separated from the interference originating outside this sensor sphere. If you
find this terribly esoteric, here’s an analogy: Imagine this “MEG sensor
sphere” is one of those upside-downhead steamer bowls you find in a salon – only this steamer can record
your brain activity 1000 times per second down to femto-Tesla resolution. You need to know if the magnetic measurements being made by your (soon-to-be-patented) steamer bowl are coming from inside the bowl (i.e., your head) or from the electrical engineering class next door learning how to make a frog levitate with a dangerously overpowered MRI device (see below). Just by knowing the exact shape of this steamer bowl, and one of the most important sets of physics equations from the 19th century, this becomes possible with SSS. This method is not specific for a single noise type (e.g., the heart, implanted metal, or other environmental sources of noise). Instead, it uses spherical harmonics to separate signals by their spatial complexity (as characterized by the spherical harmonic degree and order). In normal speak, there are certain patterns of recorded activity that are too complex to be produced by something inside your salon steamer (i.e., your brain) and must come from some external noise source; by splitting up the signal into a new way of representing the data (i.e., projecting it onto a different “basis”), you can separate signal from noise and obtain nice clean MEG recordings.
My task is to take this beautiful finding and apply it to
the MNE-Python library in two ways. First, I will implement the Maxwell
filtering method into our open-source library, making the algorithm more
transparent and easily applicable for those without the proprietary methods.
This permits all the fancy noise rejection I’ve been describing up to this
point. Second, I’m planning to include the code to allow all processing and source imaging
calculations to be accomplished in SSS space. The reasoning behind this
approach is vague unless you have digested the (mathematically harrowing)
literature on this subject. Fortunately, the outcomes are not; storing and
analyzing data in SSS space should theoretically use only 1/3 the memory
storage of the current sensor-based method. It will also reduce noise from subjects
moving their heads in the scanner (making source localization more accurate;
especially in infant MEG studies) and permit specific investigations of noise.
Oh – and filtering signals post-hoc with software means you don’t need to drop
(quite as many) hundreds of thousands of dollars on a triple-shielded high mu
MEG shielding room every time you want to set up an MEG scanner.
No comments:
Post a Comment