Thursday, February 28, 2013

musical optimization

i never write about music, although i listen to and think about and play it a lot. i hereby inaugurate a new journal tag: music. i'll start with a simple observation: Hindemith is the Nelder-Meade algorithm of music. he starts in what seems like a random place, with chaos and dissonance, and gradually winds inward to a tight, crystalline, consonant solution. supposedly he had a System, an algorithm for generating this kind of music, so i think the optimization problem analogy is apt.

Wednesday, February 27, 2013

now god dammit

i should be working on that blur adaptation paper. i could finish it if i would just put 4-6 hours into it. why am i not doing it? let's ask me.

HAZ, why are you not working on that revision? what is wrong with you? you know what you have to do, so do it. jesus christ. stop procrastinating. you're embarrassing yourself. do it.

do it. do it now. no excuses. there are no excuses. there's nothing more important. do it now.


Wednesday, February 20, 2013

pernicious advice?

"Better is the enemy of good enough."

Supposedly this was the motto of the Soviet Admiral Gorshkov. Voltaire had something similar to say, which Gorshkov was probably paraphrasing, and which translates to something more like "The perfect is the enemy of the good".

My mentor in graduate school often repeated this advice, and now with a few years hindsight, I've decided that this is, for a scientist, an especially bad mantra. It lends itself to 'significance seeking', where you collect results until you observe the effect you're looking for, and then stop collecting. If you've got what you want, why keep looking?

Anyways, I just was thinking about this phrase last night, as so many times before I was looking over a developing set of data with some disappointment at an unexpected turnaround in the meaning of the results; I thought to myself, "better is the enemy of good enough", and then I thought, "what? you haven't even finished the experiment yet!".

Point is, avoid mantras and mottos. If you have a hypothesis to test, do it. Choose your stopping point far in advance, and determine that whatever happens, this will be the test of this hypothesis; if you still aren't convinced one way or another after the test, do another one, but don't go thinking that the first one is invalidated somehow. There is no such thing as "good enough".

Friday, February 15, 2013

how to build a psychophysics experiment

You wouldn't know it from my CV (unless you look at the conference presentations), but I've built dozens of psychophysics experiments in my nearly 10 years in the field. I've developed a routine:

1. First, design the planned trial algorithm; how will the stimulus vary from trial to trial? What kind of responses will be collected, and how will they drive the stimulus variation? Staircases and step sizes, interleaved and latticed. In my mind, I always imagine the algorithm as a gear train driving the stimulus presentation, like the mechanism behind the turning hands on a clock. Here, a model observer is usually set up, if I can figure out what one should look like, to help test the algorithm.

2. With the first step still in progress, set up the actual trial loop and use it to test the basics of the stimulus presentation and internal trial structure, with a dummy response. Usually this part is already there, in a previous experiment, so this step usually consists of taking an old experiment and stripping most of the parts out. The trial loop and its internal structure constitute another gear train, really the interface of the experiment: the stimulus and other intervals and features (sounds, fixation points, ISIs), response intervals and valid buttons, and proper timing etc.

3. The trial algorithm should be settling by now. I start to plug it into the trial loop like this: port over the algorithm, but don't connect it to the stimulus train just yet. Instead, start to work out the finer details of the stimulus presentation with the algorithm in mind. That is, if the algorithm is like a set of gears to transmit variation through the stimulus, we have to make sure that the teeth on the stimulus gear mesh with the teeth on the output gear of the algorithm. And, the input gear to the algorithm has to mesh with the response gear. It's easiest to do this, for me, if I first design the algorithm and set it in place so that I can look at it while I finish the design of the interface.

As the algorithm is being set in place, I'll usually simultaneously start setting up the method for writing the data down. This really constitutes a third little mechanism, an output mechanism outside the big algorithm-trial loop, which records everything about the completed trial up to the response, but before the response moves the algorithm train.

4. Finally, the algorithm and the trial structure get linked together, not without a few mistakes, and the whole machine can be tested. Usually it takes a few debugging runs to find all the gears that have been put on backwards, or connected in the wrong place, or left out completely.

I think that these stages, in this order, are what I have been following for at least five years now, and it seems to work pretty well. There are parts of the skeletons of most of my experiments over the past 3 years that are nearly identical; I think that the for V = 1:Trials statement, and the closeout statements at the end of that loop, have survived through a dozen completely different experiments. The other 99% changes, though some parts are common over many different scripts.

Another thing that's constant is the way I feel when I build these things: I really feel like I'm building a machine. It's the same feeling as when I was a kid and I'd take apart a clock or a motor or a fishing reel and try to put it back together, usually failing because I didn't understand at the beginning, when I took it apart, how it actually worked (I became a scientist, not an engineer). But now, since I'm designing it, I can see where the big wheels contain the little wheels, where there are little clusters of gears connected to other clusters, transmitting motion through the whole thing. I can see how exactly the same thing, the same device underlying the experiment, could be built with gear trains and springs and chains and switches and punched tape (for the random trial order). I should make an illustration one of these days...

Anyways, that's how you do it!

Monday, February 11, 2013

random report

random thoughts after a trip home:

politics:I had the idea that you can view different political philosophies by how they respond to (or acknowledge) a certain axiom, that the state is effectively the ultimate master of all people, that any individual is subject in all ways to the power of the government. Fascists acknowledge the axiom and embrace it, they treat the state as a parent and the people as children, and they endeavor to make the state worthy of this status and authority. Anarchists, while they also acknowledge the axiom, view it as the reason that there can be no state, why the state has to be overthrown and dismantled and prevented from recurring. Anarchists will say that people should be their own masters (or not even that), and that no one should ever make himself master of any other. Socialists are the third group that acknowledge the axiom, but they seek to make the state somehow equivalent with the people - through democratic means - so that while it is still true, it becomes unconcerning, since now the people are their own masters, through the mechanism of the state. American libertarians - and the model American political philosophy that is given lip service but not much actual credit - believe that the state has the potential, which has usually been fulfilled, to take on the role of master of all its subjects, but that it can be contained and controlled like a pack animal. I think that Americans in fact, in their popular political system, actually take on aspects simultaneously of socialism and fascism, believing that the state is a function of democracy at the same time that it is - and I think this is a contradiction with the first property - a benevolent external force that requires respect and adoration. The American left and right both take this attitude, but toward different aspects, although in my systematization they are mostly deluded into thinking that they are model Americans, i.e. libertarians. I guess I am closer to a libertarian than anything else, though if there is some label that applies to a half social anarchist half american libertarian, it would mostly cover me (I like NASA and public healthcare and the NIH).

headache: A really irritating headache on Friday, which I think was partly provoked by jumping jacks in the afternoon and magnified by beer in the evening. Two aspirin either did nothing to help or kept it from getting much worse. Not sure this was a migraine, but I think it was. I could feel it mostly above my right eye, and could actually touch it at the supraorbital foramen. By this I mean that by pressing on this spot, I could modulate the main locus of pain; this is a common sort of property of my headaches. This is just one specific branch of the trigeminal nerve, and except for some slight twinge of pain in my right maxilla, I couldn't find any other specific locus. So, I don't know if this qualifies as 'migraine', or if it's actually some sort of ophthalmic nerve neuritis, but just by scanning a google search of 'migraine and trigeminal nerve', you can see that there is thought to be a strong link between migraine pain and over-excitatory dysfunction of neurons in the trigeminal nucleus, so...

Also, had a nice conversation with my aunt about migraine. So along with my mother and her, she says that my grandmother also had headaches, but not my grandfather, so that must be where it comes from.

work/writing: I realized that the project I'm currently working on would be good to divide into two papers: one on the broader aspects of blur adaptation and the connection to contrast adaptation (which I hope to have data on by the end of this week), and the other on the absence of phase-blur adaptation. The latter might make a good PLoS-1 paper.

Wednesday, February 06, 2013

The Headache Machine


The idea that the brain is a kind of quantum machine, that a neuron’s smallest scale involves more than just inconsequential random fluctuations, was initially met with skepticism, which gradually mutated into derision and ridicule around the turn of the 21st century. So, when one of the main components of the hypothesis was finally, unexpectedly confirmed, it was with a general sense of reluctant surprise; not one member of the DaMaFi theoretical team that put the last pieces together had ever been anything but an opponent of anything smacking of ‘quantum consciousness’. While it is still debated whether or not the quantum nature of the human brain has any meaningful computational implications, the fact that it is capable of interacting, at the quantum level, with the dark matter field is no longer disputed.

The discovery resolved two problems at once, problems that up to that time had never been seriously considered to have any relationship at all. The dark matter field permeates and passes through everything, an invisible and, mostly, actionless scaffold with a complex structure that is still poorly understood on a very local scale, but the real problem in those days was that it was largely just a theoretical consequence, impossible to measure except in the most extreme and expensive artificial conditions. Meanwhile, two centuries of continuous advances in neuroscience had failed to determine conclusively the base cause of migraine, beyond the neurophysiological level – although this had been considered a sufficient level of understanding as it enabled an effective cure for the disease. But what could headaches ever have to do with dark matter?

There was an idly noticed correlation amongst the hundreds working in the DaMaFi installation: it seemed that activating the collider, anchoring to the Higgs, grabbing the field and pulling it into the action space was guaranteed to provoke stumbles, or distracted complaints about an unexpected aura, or a conversation derailed by gibberish, or gasps at sudden nauseating pain - all of this, despite the total absence of any measurable effects of the experiments in the control spaces. Every workgroup had at least one sufferer, and it took six sessions, over eight months, before what was essentially cafeteria gossip sparked a serious discussion: how can grabbing the dark matter field be causing headaches in migraineurs?

A symposium was set up, and a few of the best neurophysicists even came moonside to attend in person. The new connections made there were earth shattering. Two weeks after DaMaFi-Neuro, a detailed theoretical proposal was put forward: that the physical characteristics of the human neocortex enable it, in some specific entanglement conditions, to interact weakly with the dark matter field. The interaction, depending on how sustained it is, sets off a complex neurovascular cascade - the migraine - which then resets the entanglement state, allowing the process to start over again. In essence, some parts of some brains have a tendency to brush up against, catch on, and sometimes to bang into and bounce off of, the otherwise non-interacting substrate of the universe. One science popularizer made an enduring analogy between the entanglement state of a migraine-prone neocortex and a head of well-combed hair with a stubborn cowlick.

There were immediate consequences. The mechanism had to be elucidated precisely, and unprecedented collaborations were initiated between theoretical physics and neuroscience departments all over the globe; some physicists rushed out to have sections of their neocortices genetically modified so that they, too, could make physical contact with the object of their fascination; the quantum consciousness people – more than anyone would ever have guessed existed – streamed out of the woodwork; new theories – most of them wild and unfounded – began to develop that attempted to explain a wide range of human phenomena as being caused by interaction with the dark matter field; unmodified migraineurs all over Earth began to be tracked as part of a massive new project to map out the large-scale structure of the field; hobbyist brain modders got together with dark matter theorists to create new neural structures to enhance the interaction, just because they could; ‘cured’ migraineurs had their cortices reverted to their original states so that they could experience their misery in a new light of quantum birthright – although, most of them opted for a less intense interactability than they had previously had.

In an ironic twist, public funding for DaMaFi dwindled rapidly in direct proportion to the growth of the new paradigm, and the facility was eventually abandoned to lunar desolation. New facilities were set up Earthside, mini-colliders surrounded by rings of modified human brains stacked in tubes, connected to external recording equipment in a massive network of dark matter detecting migraine: DMDMs, in the lingo of the new neurocosmologists. The public, and some of the scientists too, just called them ‘headache machines’. Arrays of DMDMs would eventually be launched into space, mapping out the invisible architecture of the solar system in scintillating points of nausea, latent photophobia, and pain.