Posts RSS Comments RSS 63 Posts and 41 Comments till now

Archive for the 'Uncategorized' Category

Travel Journal: ELMI meeting, Davos, May 2008

27 May 2008, Davos

I left EPFL at 11AM this morning. The beautiful train trip to Zurich seems routine, so I read a math book. The beautiful train trip from Zurich to Landquart I spent half the time reading a math book. On the unbelievably gorgeous train trip from Landquart to Davos I just gawked.

From Zurich, the trains were full of other people going to the ELMI conference. At the station in Davos, most stood around looking at bus schedules or being lost. But not me, no! I seized a map from the tourist information desk, and set forth on foot to find my hotel, the Arabella Sheraton Hotel Waldhuus (that’s Waldhaus, but with a quaint, Swiss misspelling).

Davos, the hotel, and the conference center are succinctly described “out of my price range.” The town sprawls over a long valley, with luxury hotels every block. My room is a two room suite, with a two section bathroom, a marble shower, and two balconies looking out on the alps. I am admiring the clouds racing over the snow-capped peaks in the last light of day as I write. I must add: there is a Gideon Bible on one nightstand, and “The Teaching of Buddha” on the other.

The conference center specializes in events like the World Economic Forum. Our conference has the feel of the gardeners who have convinced the household servants to serve them high tea in the parlor while the master’s away.

Axelrod from Michigan gave a talk on TIRF, including a couple of fun new ideas about measuring membrane orientation next to coverslips, then we all gorged ourselves on hors d’oeuvres. I was sociable and met four people, then took a long walk west along the valley through Davos.

28 May 2008, Davos

The Waldhuus has a splendid breakfast buffet, at which I fortified myself for two and a half hours of talks, followed by a coffee break with croissants, followed by more talks, followed by lunch. This morning’s talks were on thick specimen imaging and fluorescent labeling methods.

What should a talk for this conference be? Enough detail of optics, label chemistry, or application area to be more than a waste of time is impossible since the most of the audience lacks the necessary background for any of the three. Of course, most of the speakers haven’t even thought about this, and are giving the same talk they always give.

I went to one workshop, where a man soberly told me and a few others what a point-spread function is. I skipped the rest and took a hike up one of the mountains. A poster session — which is approximately the worst environment to discuss science possible — and dinner filled the rest of the day.

And after dinner, two men started playing alpenhorns, those long, straight things everyone sees in Swiss stereotypes. And then one of them played bugle calls on it while standing on his head. After this, I retreated to reading a paper on Galois connections, then headed back to the hotel.

29 May 2008, Davos

This morning’s talks focused on assorted new microscopy techniques, and were very good, particularly the final one by Tony Wilson from Oxford. He has figured out an extremely clever way to focus microscopes really, really fast. It turns out that you can only achieve 1.5x magnification and still optically image a volume perfectly.

So he takes the output of a microscope objective, images it backwards through another microscope and onto a mirror, then from the mirror back through the objective and onto a detector. The mirror is about the same size as the specimen — a few microns — so it can be moved extremely quickly and accurately. Viola: high speed focusing.

After lunch I attended a workshop by Definiens, who have turned image analysis around. Classically, you massage your image until you can segment it perfectly in one fell swoop. Instead, they oversegment horribly, and then merge regions until they achieve good segmentation. This turns out to be a much better way to do things.

I wasn’t interested in the other workshops in the afternoon, so I went hiking again. Davos lies in Grunewald, the easternmest, newest, largest, and least developed of Switzerland’s cantons. The canton consists of mountains striated with rich valleys. The woods are remnants from glaciation, which means they greatly resemble those of the high Appalachains.

Davos, in keeping with the Swiss obsession with outdoor sports, is laced with hiking trails. They stay in the woods up on the slopes in the main valley, but come down into the pastures in the side valleys, and wind past stone barns banked with dirt and sod uphill against the winter snow.

At junctures as I climbed towards the ridge I stopped and looked across the valley at fingers of white creeping down the mountains. Some were streams; others were still snow. Even in May, the landscape is dotted with snow packs several feet thick. In winter, this place must be impassible without snowshoes.

A gala dinner at a sanatorium-turned-ski hotel on one of the peaks filled the evening. We rode up by cablecar, and stood around on the terrace overlooking the valley sipping glasses of wine (or water in my case) until the black flies started bothering people. Then we trooped in for dinner.

From the Tiffany-esque stained glass, I think that the building has been maintained in its grand state of the 1920s. The walls are muralled. The fireplace is lined with sculpted ceramic tiles. We filled the grand dining room with its enormous mirrors, and I pontificated at my neighbors over a dinner of perfectly normal roast chicken masquerading under some pretentious and singularly unappetizing name. After dinner I skipped the disco and caught the first cable car down to the city.

30 May 2008, Davos

Those who made it to the first talk this morning coincided exactly with those to take the first tram home with me last night. The highlight of the morning was a talk by a lady from McGill which showed that fluorescence recovery after photobleaching measurements require an additional set of controls: in the range that causes bleaching, the photons can also reversibly dissociate protein complexes.

The only workshop of any interest after lunch was an open session about the Open Microscopy Environment project by Jason Swedlow, but I wasn’t feeling sadistic enough to go ask mean questions about a project I’m already acquainted with. I took the bagged lunch the conference center provided, tossed in a couple extra croissant which I hoarded from the coffee break, and caught the train home.

An observation on accumulation points

Everyone is familiar with the derivative of a function f in terms of limits: for a sequence k converging to x, D.f.x = \lim_{i\rightarrow \infty} (f.k.i – f.x)/(k.i – x). I spent a couple days playing with sequences which accumulate but do not converge, seeing if I could do calculus without limits. I came to my senses and realized I’m a biologist, but not before I stumbled across this:

Treat values of a sequence k as values of a random variable with uniform probability density. Then if k has an accumulation point at x, D.f.x = \textrm{E}[(f.k.i - f.x) / (k.i - x) ]. To see this, when you’re close to x, you get enormous denominators. Since you get arbitrarily close to x arbitrarily often, you have infinitely many denominators as large as you like. These completely swamp any contribution of points of the sequence away from x.

I suspect that there is a “fundamental theorem of analysis” which says that a statement about a space is true is equivalent to the statement being true at the accumulation points of all accumulating sequences in that space. But I don’t know how to define the above expectation except as a limit of finite sequences, so this doesn’t advance the program at all.

(Before people misunderstand, I like limits. I use them constantly. Some of my best friends are limits. This is a mathematical diversion.)

Fonts in LaTeX

First off, happy birthday to Don Knuth. If you don’t know who that is, just crawl back under your rock.

Among the things that came to light while reading people’s response to this occasion was the font Euler. Add the following code to your LaTeX preamble, and suddenly your mathematics goes from slick, standard, LaTeX, to a gorgeous idealization of the best mathematical handwriting:

\usepackage{ccfonts,eulervm}
\usepackage[T1]{fontenc}

A little more digging found this wonderful post discussing the font, and its sibling Alcuin Light. Alcuin Light is not included in TeX distributions, and must be bought separately and converted by hand, unfortunately. Knuth paired Euler with Concrete Roman. In isolation I prefer the default Computer Modern, but Concrete Roman does fit better with Euler.

But I admit I’m tempted to drop the $20 for Alcuin.

A programming language metric

Most metrics to compare programming languages — lines of code, number of symbols, compressed lines of code — hover between useless and harmful. Most of these metrics have one fundamental problem: they compare apples and oranges. Here’s a way to get past that hurdle. The resulting metric still seems broken and unjustified, but it’s an improvement.

A data model is a set of data structures plus all the operators on them. I don’t mean the implementation of these, I mean the abstract mathematical definition. Relational databases are a mathematical definition distinct from any given implementation, and include both the underlying structure (the relation and a set of projectors on the tuples which constitute the relation), and all the operations to manipulate relations.

Given a particular data model, how much code is required to ensure that an implementation of that particular data model is sufficiently close to the mathematical ideal that the programmer can treat it as such in all further work? The only difficulty is saying when an implementation is sufficiently iron-clad to be so treated. This can be done experimentally.

We are comparing languages A and B. We take a group of subjects who all know both languages. Each produces an implementation of the same data model in both languages.

Different programmers may have different tolerances for abstraction leakage. To fix this, take each implementation and mark all the testing code (unit tests, run-time checks, etc.). Partition it randomly into equal subsets. Sequentially remove subsets of testing code. This gives a sequence of monotonically less assured mutilations of the original implementation.

Give each programmer who submitted an implementation a randomly chosen mutilation of each implementation he didn’t write. He marks each of them as iron-clad or leaky.

When we have all the marks, we find the level of mutilations for each implementation which gives some fixed fraction marking it as iron-clad, say 95%. This gives us a distribution of amount of code for each language, controlled for how faithfully it implements a data model, and we turn to standard statistical techniques to ask if they are different, and how different.

This presupposes that a shorter program that truly does the same thing than a longer one is better.

Faith in Science

There’s been a hullabaloo about a New York Times op-ed by one Paul Davies which claims that rational ordering of the universe is an article of faith. Blog posts followed.

Some gems: “The most refined expression of the rational intelligibility of the cosmos is found in the laws of physics.” (Paul Davies) No, the most refined expression of rational intelligibility is a properly randomized experiment. Theoretical physics is not king of the sciences, and most of science won’t change one whit if the entire forefront of theoretical physics reaches a dead end.

“Over the years I have often asked my physicist colleagues why the laws of physics are what they are.” (Paul Davies again) He gives various naive answers. The proper answer is, “I don’t know, and I can’t think of a good way to answer such a question, so I’m going to keep it in the back of my mind in case I do, and get on with questions I can answer.”

“The only problem is that inductive reasoning is not sound.” (first comment on the first blog post I linked to above) Here is someone with little exposure to logic, who doesn’t realize that deductive reasoning isn’t sound either. You can choose any of an infinite number of rules for manipulating sets of well defined strings of symbols. The applicability of any of them is an empirical question. Classical deduction occupies no privileged place. It’s just old.

Then Davies rambles about how the emergence of life is sensitive to the details of the universe. We don’t know this, and no one has thought of any way of finding this out, hallucinations of a few experimentally-challenged string theorists aside, and they have no idea how to construct a science from the ground up. I might even use the word parasite.

Aside from all this, everyone seems to agree that they’re arguing over the proposition “The universe behaves in an orderly and rational manner.” I have no idea what that actually means, and I think there’s a better statement of the required proposition: “There exists some finite level of detail which guarantees the outcome of a protocol/algorithm/recipe.” (I don’t think we have a word for what I have offered three to convey.)

That statement is much weaker, and can be considered in an even weaker form: “For a GIVEN protocol/algorithm/recipe, there is a finite level of detail which guarantees the outcome.”

If we assume that tomorrow will be much like yesterday, then this statement’s converse is falsifiable, though it may not be finitely so. This isn’t perfect, but it’s a long way from a leap of faith.

If we don’t assume that tomorrow will be much like today, we can’t get anywhere. Christians don’t assume this (they expect a Judgement Day, when tomorrow will decidedly not be like yesterday), but fail to realize that you could just as strongly assert that tomorrow there just wouldn’t be a god anymore. So, although I don’t know how to demonstrate the axiom, I don’t have demonstrate it in an argument between science and faith. I would need to demonstrate it in an argument between science and skepticism.

Hidden costs in NIH grants

Everyone talks about how the NIH funding system is broken. I rarely see numbers besides falling success rates. No one ever talks about real numbers such as the cost of the current system. How much do grants actually cost?

I have tried for a conservative estimate. The real cost may be anywhere from a third again as large to twice as large.

I have left out airfares for professors to attend study sections, paychecks of the bureaucrats, panels to assign grants to institutes, heads of study sections, time spent in study sections, and a wealth of other costs. Some of these are absorbed in the total award cost NIH reports for grants, since half of most grants disappears into overhead, both for the NIH and the institution which receives it.

How long does writing and reviewing take? How much does it cost? I assume $150/h as the going rate. This is what my mother, a professional science writer, charges. MDs and PhDs on the same projects regularly bill $200-$300 an hour. She estimates producing a document takes 2.5h/page and costs $375/page. Reviewing or editing a document takes 0.2h/page and costs $30/page.

An NIH R01 grant — the backbone of the funding system — is 25 pages long. In 2006, the average success rate (counting all repeat submissions as a single grant) was 0.128 (weighting new and continued grants by the number of each). The average award size with the same weighting was $363,731.08.

Each grant gets four reviewers. 25 pages takes 5h and costs $750. Writing it takes 62.5h and costs $9,375. The total cost for a single grant is 4*$750 + $9375 = $12,375. The time for a single grant is 82.5h. We can assign the reviewing cost without worrying about where in detail it should be counted: the reviewers are grant-seeking scientists as well, and someone must review their grants, so this is a shared cost in the community.

A success rate of 0.128 means we need to submit 7.81 grants in order to get one funded. Each R01 gets three resubmissions (which are still counted as one submission in the NIH statistics). Anecdotally, nothing is getting funded right now on first submission, so we have to multiply the expected number of grants by three, or 23.44 grant equivalents.

The mean cost of a successful grant is $290,039.06. The mean time for a successful grant is 1,933.8h. A full time job of 40h a week, 52 weeks a year is 2080h. Getting a grant is 0.93 of a full time job. It is 0.8 of the first year of the average grant size mentioned above, and remember that most of that money doesn’t make it to the professor at all. A full professor can reasonably ask for $220,000 a year. The first year and a third of the grant is eaten by the costs of getting the grant.

The final summary:
Cost of a grant: $290,039.06
Annual award of a grant: $220,000
Time to get a grant: 1,933.8h
Full time job: 2080h/year

Before we wade in to fix this, let’s set a target for what constitutes “fixed.” I say reduce cost and time to a tenth of their current value. Then we should develop a set of possible systems, and run controlled, randomized experiments to compare them.

Shame, Nature Physics

BioCurious points to a Nature Physics editorial that increases my contempt for the vanity journals. All but one paragraph is hypocrisy — injunctions not to label your work as ‘ultrashort quantum nanobiology,’ when Nature accepts no work not so labeled — but that one is revealing:

‘Story’ is the concept that should underlie the structure of the entire paper. The clearer and simpler, the more engrossing it is. On that basis, think about relegating technical details — essential to the science but not the narrative — to a Methods section or to Supplementary Information (the latter published online). Similarly, figures should be designed to enhance the telling of the story and each accompanied by a caption that is as short as possible; to an expert reader, the information conveyed in a figure should be clear without needing to consult the main text.

Do exactly the opposite and you have begun well.

Shun captions. When layout was hard and expensive, pictures and graphs were excised from their surrounding text and typeset on their own pages. This time is behind us. Restore your figures to their natural environment. Dismiss the captions you set to watch over them.

Leave your scaffolding in place. When you have jailed your technical information in ‘Materials and Methods’ or exiled it entirely, what is left but verbiage, citations, and graphs taken on faith? The details of your analysis are shunted elsewhere. Even the measurement technique is banished from its point of use.

Supplemental information has one use: source code, analogous to plasmids and strains in genetics. We would attach our plasmids, too, if only we knew how.

Most damning of all, science isn’t stories. We reason about the world from hypotheses we have justified by stringent test. A mixing angle in quantum field theory is not a story, nor the Gibbs distribution, nor template directed synthesis of DNA. Their value is independent of any story around them. They have value as they provide traction for testing other hypotheses. Wrapping them in a story merely imposes on your reader to unwrap them.

Encapsulated experience

I spent a little time this morning looking into source control management systems. Today I watched Linus Torvalds’s talk at Google. I’m going to use Git, for the same reason that C is still a standby in programming.

C is a terrible language. Compared to its contemporaries (ALGOL 68, Lisp 1.5, Smalltalk) it’s primitive. Compared to today’s top languages (Haskell, ML, Scheme) it seems ludicrous. C has something these languages lack. It is the codification of how a couple of smart and experienced programmers liked to write assembly. It provides support where its designers wanted support, and nowhere else. Such a language can never be planned or designed, nor should it, but it provides something to fall back if you can’t find a clean language appropriate for your project.

Git represents Linus implementing a system to support how he wants to do source code control, based on years of a large and particularly chaotic development process. Developing software within a laboratory is chaotic and unstructured. I have trusted Linus for years on the kernel of my operating system. I’ll trust him on version control.

The only other thing of real interest out there is darcs, which is version control based on a theory of patches as noncommuting operations in analogy to Hermitian operators in quantum mechanics. Intellectually, it’s very exciting, but I have become jaded and bitter and I need to finish my PhD, not mess with beautiful computer science.

Conservation of Energy

Last night it occurred to me that, although I knew Landau’s derivation of conservation of energy in Lagrangian mechanics, I had never seen it done from Newton’s third law. A few minutes of scribbling produced a proof that might be of use to some poor physics student somewhere.

The overarching theme is Noether’s theorem. Consider some problem described by a differential equation (or an action principle, but for now let’s stay with differential equations), which has some continuous symmetry. The rotations that leave a square unchanged are a discrete symmetry. All displacements in time of a system which does not depend on any particular position in time are a continuous symmetry. Essentially, if we can construct a continuous function from the transformations to the real numbers, then it is a continuous symmetry.

Our program: change coordinates in the differential equation until the symmetry transformations we’re interested in are represented by a displacement in a single coordinate. For time displacement, this is simple. For spatial displacement, we use Cartesian coordinates with one axis along the direction of displacement. For rotation, we use polar coordinates.

Shift the coordinate infinitesimally, and Taylor expand to first order. For any solution of the differential equation, the zeroth order expansion cancels. Taylor’s remainder theorem makes the second and higher orders smaller than the first order, so to have invariance, the first order must vanish. The invariance must hold for different infinitesimal displacements, so the first order coefficient must vanish, and we may multiply this by something nonzero to get a cleaner form at the end. The integral of the first order coefficient with respect to the coordinate is a constant, then we integrate everything in sight by parts and occasionally use the original differential equation to substitute for things until we find a convenient form. The last part sounds vague, and it is. I don’t know if there is some algebraic structure that will yield an algorithm for getting clean, useable forms for conservation laws. How did I find this particular set of integrations and multipliers? I played around until it worked.

Conservation of energy comes from invariance under a displacement in time. Begin with Newton’s third law, F(x(t),t) = m D^2 x(t). I use D for the total time derivative. This is not the same as the partials, as DF(x(t),t) = \partial_0 F(x(t),t) \cdot Dx(t) + \partial_1 F(x(t), t) (where \partial_n is the partial derivative with respect to the n^{\textrm{th}} argument). Let t\rightarrow t + \delta t.

mD^2 x(t+\delta t) = F(x(t+\delta t), t+\delta t)
mD^2 x(t) + m\delta t D^3 x(t) = F(x(t), t) + \delta t DF(x(t), t)

The first terms on each side are equal by the original differential equation, and they cancel. Now we multiply by sides by x(t) and rearrange to get

\delta t [ m x(t) \cdot D^3 x(t) - x(t) \cdot DF(x(t), t) ] = 0

This must hold for different, nonzero values of \delta t, so the quantity in brackets must be zero.

Aside: There is a subtlety to note: it is also zero before we threw in the x(t), so it remains zero after we multiply by x(t), so long as the particle isn’t at infinity. If we were not already garunteed this, then we would have to set up the coordinates where x(t) was never zero. This requires symmetry under spatial displacement (which yields conservation of momentum), and the fact that in any finite time interval there are points which are not visited by the path. The whole of the path over infinite time may visit all the points in the space (this is called ergodicity), but we can break the whole of time into connected subsets, each of which have an unvisited point, prove it on each subset, and then stitch them together. Spaces where we can do this slicing and stitching are called manifolds, and we’ll use this trick later.

Now we integrate with respect to time. Integration by parts on the first term yields (everything is multiplied by m, but we’ll just put it back in later):

\int x(t) \cdot D^3 x(t) dt = \int D(x(t) \cdot D^2 x(t)) dt – \int Dx(t) \cdot D^2 x(t) dt
  = x(t) \cdot D^2 x(t) – \int D( \frac{1}{2}(Dx(t) \cdot Dx(t)) )
  = x(t)\cdot D^2 x(t) – \frac{1}{2} Dx(t) \cdot Dx(t)

There’s kinetic energy. The other term will cancel after we analyze the second integral.

\int x(t) \cdot DF(x(t), t) dt = \int D(x(t) \cdot F(x(t),t)) dt – \int Dx(t) \cdot F(x(t), t) dt
  = \int D(x(t) \cdot m D^2 x(t)) dt – \int Dx(t) \cdot F(x(t), t) dt
  = m x(t) \cdot D^2 x(t) – \int Dx(t) \cdot F(x(t), t) dt

where the next to last line follows by replacing the force with the mass times accelleration from Newton’s third law. Now we combine these, putting that m we neglected in the first part back in. The [Unparseable or potentially dangerous latex formula. Error 5 : 573x40]

There’s conservation of energy. Now a few remarks to tie things up:

Remark. The second term looks unfamiliar. Try changing variables so that position is independent and time depends on it. This must be done carefully! If the path x(t) intersects itself, we break the integration into a sum of integrals over intervals of time where the path does not self-intersect, and change variables separately in each one so that t(x) is well defined. On any such interval I, we get a term that looks like \int_I x \cdot F(x, t(x)) dx, which is more familiar.

Remark. If our force has the form F(x, t) = – \partial_0 \mathcal{U}(x,t), then the second integral takes the form -\mathcal{U}(x(t), t) + \int \partial_1 \mathcal{U}(x(t), t) dt. For potentials \mathcal{U} which are independent of time, this is particularly useful as the second integral vanishes. For many oscillating potentials, the integral takes on an average value over long times.

For extra credit, go learn the quantum calculus analog of Taylor expansion (John Baez has a nice description) and do the same thing for discrete symmetries.

James Watson

There’s been a lot of controversy around James Watson over the last couple of days, to the point where emails have been flying around the Rockefeller University talking about boycotting his receipt of the Lewis Thomas Prize for Writing. I haven’t read his book, I find his statements somewhat ridiculous, and worse, I don’t think he actually made that big a contribution, even aside from stealing data. I think two points are enough:

1. Schrodinger wrote What is life? in 1944, nine years before the Watson and Crick paper, and laid out what was necessary for a molecule that carried hereditary structure. With the discovery of DNA methylation and other modifications, it’s become more and more clear that the pure double helix isn’t the sole carrier of hereditary character. Yes, it was nice to actually know what the molecule was, but it wasn’t one of the most important discoveries of the 20th century. The evolutionary synthesis was. The new quantum mechanics was. The structure of this molecule was not. It was a technical tour de force at the time, but Watson and Crick didn’t even do that.

2. I see far too many descriptions of figuring out the rough structure of DNA as “cracking the secrets of life.” It did no such thing. Before Watson and Crick, we knew that it was a polymer (Levene, 1919); we knew that it carried heritable structure (Avery, 1943); we knew that heritable structure was laid out linearly along the polymer (Morgan, no later than 1915). Crick laid out the “central dogma” of molecular biology in 1957, and everyone dug in and figured out how the encodings worked. The structure of DNA was a pleasant thing to have in your head for doing this, but the classical geneticists had been doing very well without such structures for many years. Unfortunately, having such a structure immediately made lots of people confuse genes (heritable traits, alleles of which are selected in evolution) with ORFs (pieces of DNA transcribed into RNA).

Next »