Friday, January 24, 2014

How to Avoid Common Cluster-Extent Thresholding Pitfalls in FMRI Analyses

Just when FMRI researchers were feeling good and secure about the methods they were using, yet another paper has come out in the journal Neuroimage about how everything you are doing is, to put it mildly, totally wrong.

The article, by Woo, Krishnan, and Wager, points out that one of the most popular correction methods for FMRI data - namely, cluster-correction, or cluster-extent thresholding - is routinely mishandled. This is not to say that you, a typical FMRI researcher, has no idea what he is doing. It is just that, when it comes to cluster-correction thresholding, you are about as competent as a bean burrito.

Cluster-correction is based on the assumption that in an FMRI dataset composed of several tens of thousands of voxels all abutting each other, there is likely to be some correlation in the observed signal between adjacent voxels. That is, one voxel immediately surrounded by several other voxels is not completely independent of its neighbors; the signal in each will be somewhat similar to the others, and this similarity is roughly related to how close the voxels are to each other. Smoothing, another common preprocessing practice, also introduces more spatial interpolations by averaging the signal over several voxels of a specified range, or kernel. Cluster-correction then uses an algorithm, such as Gaussian Random Field (GRF) Theory or Monte Carlo simulations, to determine what number of contiguous voxels at an individual, voxel-wise p-threshold (here in the paper referred to as a primary p-thresholds) would be found due to chance alone; if a cluster of a certain size is exceedingly rare, then most researcher reject the null hypothesis and state that there is a significant effect in that cluster.

However, the authors point out that this can lead to erroneous interpretations about where, exactly, the significant effect is. All that you can say about a significant cluster is that the cluster itself is significant; cluster-correction makes no claims about which particular voxels are significant. This can be a problem when clusters span multiple anatomical areas, such as a cluster in the insula spreading into the basal ganglia; it is not necessarily true that both the insula and basal ganglia are active, just that the cluster is. Large cluster sizes and lax primary p-thresholds, at the extremes, can lead to cluster sizes that are, relative to the rest of the brain, the size of a Goodyear Blimp.






Figure 1 from Woo et al (2014). A: Demonstration of how all of the different correction techniques, when plotted together, looks like a doughnut. Also, cluster-correction is the most popular technique. B and C: Clusters can span several areas, leading to erroneous interpretations about the spatial specificity of activation.

Another issue is that large primary p-thresholds are correlated with larger cluster sizes passing correction. That is, only cluster sizes that are huge will be deemed significant. Obviously, this loss of spatial specificity can be a problem when attempting to study small areas, such as the periaqueductal gray, which is about the size of a strip of Stride gum, as shown in the following figure:

From left to right: Periaqueductal gray, Stride gum, Tom Cruise (all images shown to size)





Lastly, the authors ran simulations to show that, even in a simulated brain with clearly demarcated "true signal" regions, liberal primary p-thresholds led to excessively high false discovery rates, a measurement of the number of false positives within a given dataset. (False discovery rate, or FDR, can be used as an alternative significance measurement, in which one is willing to tolerate a given percentage of false positives within a dataset - such as 5% or less - but is agnostic about which voxels are false positives.) This also led to a high amount of clusters smearing across the true signal regions and into areas which did not contain signal:


Figure 3 from Woo et al, 2014

Problems like these can be ameliorated by choosing more stringent primary p-thresholds, such as a voxelwise p less than 0.001, and in cases where power is sufficiently high or in cases where you might suspect that the intrinsic smoothness of your dataset is highly irregular, you may want to eschew cluster correction altogether and use a voxel-wise correction method such as family-wise error (FWE) or FDR. If you do use cluster correction, however, and you still get blobs that look like messy fingerpaintings, it can help the reader to clearly demarcate the boundaries of the clusters with different colors, thereby helping visualize the size and extent of the clusters, and fulfilling some of your artistic needs.


Now go eat your bean burrito.



Wednesday, January 22, 2014

The Beethoven Piano Sonatas

Warning: Classical music nerditry ahead.  (And some domestic violence.)

One evening while discussing the music of Beethoven with a friend (as is my wont), my conversation companion mentioned that, although Beethoven's music was very beautiful, she didn't see what, exactly, all the fuss was about. "He seems to have figured it out early on in the game, and then didn't change very much," she said. "He just knew what worked, and - OW!!!"

Although I felt bad about strongly pinching her thigh before she could complete her sentence, obviously I could not allow her to continue spewing such mendacity. However, even though our friendship was terminated shortly thereafter, I continued to be needled by her remarks, as her thoughts on the matter are not, it seems to me, an isolated incident. Beethoven seems to be not so much listened to as he is admired, not so much admired as merely accepted. Although plenty of his more popular melodies have permeated our collective ear, several of them have become diluted through overexposure of limited fragments. (How many are aware, for example, that there is more than one musical section in his "Für Elise" bagatelle?) The acquaintance that many have with Beethoven's work is, at best, incomplete; indeed, a recent survey showed that eighty percent of Americans believe Beethoven to be a limited edition line of Old Spice deodorant. To be surrounded by the music of today without a sense of where it has come from, without a proper perspective of Beethoven's role, is to be partially blind.

Beethoven's life and work are of one piece: Suffering, redemption, and extravagances of conduct mark both. Like the music he composed,  Beethoven was a force of nature. However, Beethoven was also by nature a developer - unsatisfied with the limitations of the musical forms of his day, Beethoven paved the way from the classical traditions of Haydn and Mozart to the new era of Romanticism, influencing virtually every major Western composer that came after him. And, while he innovated in nearly every major musical genre - a remarkable collection of violin and cello sonatas, piano trios, sixteen string quartets, and the monumental nine symphonies - it is the piano sonatas that most closely follow the trajectory of his compositional evolution. And they are perfection.

One of the most outstanding examples of his genius is the final movement of his piano sonata No. 17 in d minor, which begins with a four-note gesture starting on the dominant and circling from above to come down to the tonic. Problem: How to spin seven minutes of music out of a four-note motive? Through a series of transpositions, imitations, inversions, and unexpected shifts in register and dynamic, Beethoven manages to observe the motive through every possible angle, introducing subtle variations that heighten the drama and increase the tension. His suprametrical increases of the final note of the motive, for example, outlines larger-scale harmonic changes taking place over several measures, still foregrounding the swirling melody while driving the harmony through a longer musical architecture. When listening to it, note how the motive sometimes lands on accidentals (so-called because they actually are "accidents," where the composer screwed up but was too proud to admit their mistake) in order to segue into a new section. The result is an organic whole, linked by an obsessive, haunted idée fixe four-note gesture.


Beethoven's compositional vision was on a larger scale as well. Beginning with the trio of piano sonatas of Op. 2, Beethoven shows an adherence to the classical sonata form while hinting at future developments finally culminating in his sonata No. 21, Op. 53, the "Waldstein" sonata. While Beethoven wrote several piano sonatas in the "grand" style - most notably, the Waldstein, "Appassionata" (Op. 57) and "Hammerklavier" (Op. 106) sonatas - it is really the Waldstein that announces its themes and methods. Everything about the sonata's first movement, from the exposition to the development to the coda and the following rondo, is colossal in scope, and stretches the sonata-allegro form to extremes that could only have been thought of by Beethoven. Certainly it is the most trailblazing in technique, and one of the most important milestones in the art of writing orchestrally for the piano. The Hammerklavier sonata - containing a finale which, in the words of one of my former composition teachers, is a "fugue on acid" - would later outline all of the aspects and characteristics of the grand sonata form, and then exhaust all of their possibilities.



At the same time it is astounding that this notoriously difficult man, containing such volcanic, baffled passions, should have also been capable of musical ideas of such profound beauty, lyricism, and, sometimes, humor. (Several times I have observed that when Beethoven writes for the lowest registers of the piano, it is either to express emotions of titanic, epic proportions - or to make a musical joke.) The melody of his piano sonata in A major, Op. 101, for example, is one of the most tender outpourings ever conceived, occasionally pausing to breathe and collect itself, dissolving barlines but never stopping. It is the harbinger of his last decade of composition, during which Beethoven, increasingly ill and in pain, totally deaf and increasingly withdrawn into his own enigmatic inner world, managed to call forth his most spiritual and exalted music. A man who begins a sonata with the instructions Etwas lebhaft und mit der innigsten Empfindung is imitating no one. He is not writing exercises. It is escapism, but of a very different order. Escapism, in the everyday sense of the term, is contemptible; here, it is an escape, but - like all great works of art - into a deeper, greater reality. Ideally, one where nobody can pinch you.



I think that I now have an answer for my former friend. Once she recovers and lifts the restraining order, that is.


======================

The pianist in a couple of the videos I just posted - András Schiff - has also made a lecture series covering the entire cycle of Beethoven sonatas. The lectures are rewarding experiences for both veteran and novice listener alike; and while one can profitably listen to any of them in isolation, there are a few particularly noteworthy lectures that I recommend to your attention: Sonata No. 7, Op. 10, No. 3; Sonata No. 21, Op. 53 ("Waldstein"); and the three last sonatas, Opp. 109, 110, and 111.

Tuesday, January 21, 2014

Anterior Cingulate Neurons and Postdecisional Variables in a Foraging Task (Or: How to Get Laid Just by Staring at Somebody!)

A couple of my colleagues at the University of Rochester, Tommy Blanchard and Ben Hayden, recently published a single-cell recording study in the prestigious Journal of Neuroscience. Publishing in that journal is a big deal which everyone in my area aspires to, since it contains cutting-edge science that is read by several leading authorities in the field. (I, on the other hand, having neither the talent nor the motivation to do anything nearly that impressive but still craving attention, recently posted a video where I stuffed fourteen marshmallows into my mouth - and was still able to say "Chubby Bunny". Not that I'm bragging or anything.)

Blanchard and Hayden pin their colors to the mast at once. While some theories posit that the dorsal anterior cingulate cortex (dACC) represents the value of a choice - in other words, that the dACC encodes information about options before a decision is made - the authors argue in the present study that the dACC monitors specific variables about the chosen option and about its outcome, in effect encoding information after a decision is made. In addition, this implies that the observed dACC signals will be affected by not only the type of choice made, but also by variables about the foregone (not chosen) option.

To test this, the researchers tested  rhesus macaque monkeys used a paradigm known as a "diet selection task." In this task, the monkeys looked at a bar descending across a screen. The length of the bar determined how long the monkeys needed to fixate on the bar to receive a reward, while the color of the bar represented the size of the reward. If the monkeys fixated on the bar long enough, after a certain amount of time they would get the reward. The paradigm, I presume, was based off of the observation that young men at nightclubs and bars apparently believe that if they stare long enough at a female across the room, eventually she will become so overwhelmed with passion that she will tear off all of her clothes, even if the male who is staring happens to possess the sex appeal of a deceased gerbil. The fact that this rarely occurs, they think, is probably because they are not given enough time to stare; with a sufficiently long period of ogling, success would be virtually guaranteed.

Figure 1 reproduced from Blanchard & Hayden (2014). A: Monkey either does not fixate and does not get a reward (i.e., does not choose the option), or fixates on the bar, which progressively shrinks until reward is obtained. B: Reward sizes and fixation times for bar lengths. C: Recording site in dACC.


The recordings from single cells within the dACC showed a pattern of increased firing rate when an option was presented, along with a period of ramping-up in activity right before the reward was expected to appear (as shown in panel A of figure 3). Within this same cortical region, relatively high percentages of the neurons showed high correlations between their neural firing and reward, between the neural firing and the delay when they would receive the reward, or between the neural firing and both the size of the reward and the time it would take to receive the reward (panel B of figure 3).


Figure 3 of Blanchard & Hayden (2014)

A crucial test between the competing hypotheses, therefore, would be to examine whether the firing patterns of the dACC were qualitatively different depending on whether the option was accepted or not, and furthermore whether certain properties of the option (such as its reward size and the delay time) would be preferentially encoded depending on whether the option was accepted or not. It was found that on accept trials, more neurons tended to signal the delay of the reward rather than the size of the reward, while during reject trials, more neurons tended to signal the size of the reward than the delay time for the reward (Figure 4, panels C and D). Encoding the reward of the option that was not chosen is also known as a foregone option, since it was not selected but still apparently exerted an effect on neuronal firing.


Figure 4 of Blanchard & Hayden (2014)

Finally, the researchers observed that profitability - the ratio of reward size to delay - was significantly different depending on whether the monkeys decided to accept or reject the given option. Both this and the previous observations can all be described as postdecisional; the variables studied here show significant differences based on whether an option is chosen or rejected, and only specific aspects of that option are preferentially encoded by neurons in the dACC once the decision is made. This is in contrast to a predecisional framework of the dACC, which should encode aspects about the presented option, such as reward size and delay, regardless of whether the option is selected or not.



Link to paper: http://www.jneurosci.org/cgi/content/abstract/34/2/646

Sunday, January 19, 2014

How I Feel When Writing My Dissertation

I've undergone quite a change in the past couple of months - my voice has deepened, my hips have widened, and those once-nascent dark patches of hair sprouting under my armpits and within my nostrils have now become so thick that they require maintenance at least twice a week with a weed-whipper.

I am referring, of course, to starting my dissertation.

Starting one's dissertation is accompanied not only by physical developments, however, but by drastic psychological changes as well. Such monomaniacal devotion of mental energy to such a specialized area of research studied by literally tens of persons around the world can lead to bizarre alterations in one's perceptions and behavior, including paranoia, cerebral hemorrhaging, grand mal seizures, clubbed fingers, piles, scrofula, scrapie, delusions of persecution, listening to Nickelback, demonic possession, and Nutella-induced comas. All of these symptoms have been declared normal and well within the safety margins of the International Dissertation Committee Panel (or IDCP, pronounced "eye-dick-pee").

In addition, dissertation writers are notorious for their trademark reclusive lifestyle and cantankerous mood. Someone who used to be social and outgoing will now refuse to go out with their friends or interact with anybody, claiming that they have to work on their dissertation. What this really means is that they used to hate everybody anyway, and now they just have a valid excuse for refusing to attend any event that doesn't offer free food.

However, probably the most distinguishing characteristic of a dissertation writer is his inability to talk about anything other than his dissertation; somehow, the conversation keeps coming back to the 200-pound - I mean, 200-page! - gorilla in the room:


BRAD: I'm having a really difficult time right now; my hemorrhoids are acting up again, my hairplugs aren't taking, and last week my parents were brutally murdered.

TOM: I know how you feel; right now I'm writing my dissertation.

BRAD: I'm so sorry.


Even if they don't directly reference their dissertation, you can bet your gorilla that they are worrying about it, constantly. To help you out, here are translations of some oblique dissertation references that you might otherwise miss:

WHAT THEY SAY: I'm going to work for eighteen hours straight today, no distractions whatsoever, unplugging my Internet and turning off my phone and euthanizing my pets, operating only on coffee strong enough to melt through several layers of reinforced steel similar to that one scene with the facehugger blood in the movie Alien.
WHAT THEY MEAN: I'm going to sit around for eighteen hours straight marathoning seasons of Breaking Bad, and probably will spend a grand total of about two hours on my dissertation. And by that, I mean thinking about my dissertation.

WHAT THEY SAY: My life is hard.
WHAT THEY MEAN: I have, quite possibly, the most arduous life in existence. I mean, for example, those people fighting in World War II, yeah, they had it rough, with D-Day and the siege of Stalingrad and everything, but did they have to write their dissertation? No.

WHAT THEY SAY: I'm going to work from home today.
WHAT THEY MEAN: I'm going to do some drugs today.


As we can see, writing a dissertation is a trying experience for any individual, no matter how hurly-burly a soul he or she may be. However, even after the months and years of dissertation writing, even after the numerous and hard-fought battles with one's committee about what studies to run, even after the premature aging leading to whitened hair, strained eyes, and hardened arteries - even after all that, it's worth that moment when half of your four-person committee reads at least a few pages of your dissertation on the day of your defense, looks at you with quizzical expressions usually reserved for grotesque carnival exhibits, and asks you questions that are so unrelated to anything you ever wrote and anything you ever experienced that if you weren't in academia you would swear you were surrounded by certified space loons.

If that still doesn't do it for you, you will still have the ecstatic experience of paying upwards of $2,000 for binding and printing your dissertation (based on your number of dependents and whether you select optional dissertation rhinestone gilding), after which a copy of your thesis will be stored in a remote warehouse in Zimbabwe, along with some extra weed-whippers.


To help you better understand the whole dissertation experience - and keep in mind, I am VERY aware of my audience - I've included the following scene from Metal Gear Solid 4: Guns of the Patriots. In what I believe is a thinly veiled metaphor for dissertation writing, I've broken down what everything means:

Solid Snake: You
Microwave hallway: Dissertation
Crawling through the microwave hallway: Writing your dissertation
Wait, hold on a second here - microwave hallway? That's how the bad guys defend the most valuable part of their fortress? With microwaves?: Yes
Why not machine guns or mines or something?: The game was made in Japan.
Otacon: Your adviser
Extremely awkward camera placement behind Snake's derriere: The extraordinary sense of humility you feel taking part in such a noble enterprise, making an original contribution to the body of knowledge and maybe, just maybe, making the world a better place. Or something. I really had to make a stretch for this one.
Other people: The friends and family in your life who, while you were writing your dissertation, were busy fighting genetically-modified supersoldiers and terrifying biped war machines. Which is what they do anyway.



Wednesday, January 1, 2014

FIR Models Redux

As promised, here is a tutorial video on how to set up Finite Impulse Response (FIR) models in AFNI. The previous post contained the code for using FIR basis functions instead of traditional Gamma basis functions, which then spews estimates for activity at each time point you specify, which can be in as long or as short of a time window that you like. You can then extract these using a command like 3dbucket, e.g.

3dbucket -prefix VisCoeffs cstats.FT+orig'[12..22]'

You can then extract these timecourses by loading up a statistical dataset and overlaying blobs at certain thresholds, or just overlaying an ROI that you created and highlighting it through the "Rpt" button in the AFNI interface. Choose "Aux Dataset", load up the coefficients you extracted, and make a neat line, like this:

 Keep in mind that this was a block design, and that these were coefficients extracted from a visual ROI from a visual condition; so naturally the hemodynamic response will increase and plateau for the duration of the block. Often you will get much more complex shapes, which contains information about how timepoints along the hemodynamic response can differ across conditions, as well as hierophanies, if you look closely enough. In any case, don't get too carried away.