Monday, February 05, 2007

The buzz and the daze

It's been a busy week of work followed by a full weekend of sightseeing. Currently it's Sunday night and I'm tired, both from being on my feet for perhaps ten hours this weekend and from sleeping pretty badly for the last few nights. (Having written up details of the last few days the whole post has become a little unwieldy so I'm going to postpone the sightseeing bit for a day or so).

Thursday morning we woke up to an inch of snow, something rather uncommon in Kyoto but it made for a beautiful few hours until, by 11am there wasn't a trace of it left.

Home view snow
Oranges in the snow


So, I'm knackered, but I'm happy with the cause of the lack of sleep. It's related to an aspect of research which I haven't experienced for a little while. My last few projects have been enjoyable, medium concept and relatively high on computation. I've explored some interesting work with my collaborators which has been enlightening and fun. This means that once you've come up with the idea, carrying through the computation has tricky aspects but they can usually be worked through by staring at the screen for long enough or arguing over the meaning of the problem at a white board.

A few days ago a paper came out which sparked off a series of thought processes for me, linked to something I've been thinking about for a while. The ideas are now swimming around in my head, forming solid foundations as others fade and reform in new configurations. I'm afraid I'm not going to go into any details what the idea is but I wanted to talk a little about some of the enjoyable levels of thought process that go on as such an idea is forming.

What follows hasn't happened this way for quite a while, until now. In the hazy line between wake and sleep, as the shackles of normal consciousnes are lifted I find is the optimum time to make conceptual leaps which I couldn't make normally because life and conscious thought are just too noisy. Trying to imagine higher dimensional objects just doesn't work (at least for me) in a fully conscious setting, but somehow the faculty of conceptualising such things is in there, hidden deeply somewhere - or at least the illusion of it is.

As I've been drifting off to sleep over the last few days my thoughts have been swimming with pictures of the problem I'm tackling and the equations which govern it. I'm not trying to say that the ideas I'm coming up with are exceptional. For a start I wouldn't judge such things and on top of that I'm sure bits of what I'm coming up with are way off the mark. I'm also sure however that some of it is right and rather exciting. This is part of the buzz that drives us (or at least me) to do what I do - starting with a problem which looks like a tangle of creeping branches with a speck of light the other side, as you discover the way the branches really fit together in a beautiful pattern which you can slowly decode is a great intellectual rush.

Unfortunately, within an hour or so of this semi-dream-like state I may have solved some problem. The next stage is to go into the office the next day in a fully awake state to carry out the calculations in detail. Unfortunately it's very difficult to switch these thought processes off and the possibilities keep sweeping in and out to make real sleep very difficult.

I spent many weeks of my last year as an undergraduate in this state as I was spending a great deal of time on one particular problem - coding for selection methods for particle event searches in Babar data. This sounds low concept, high drudge work to a theoretical physicist perhaps, but I found that similar intellectual leaps were needed with parts of the computation as can be found in many problems in particle physics.

I would spend the day tackling a conceptual problem with the code and only in the twilight of semi-sleep would my subconscious be heard long enough to tell me what the answer was.

In fact this was a fun problem. It was necessary to take a set of data from a particle accelerator, including many parameters from each collision (number of electrons, missing energy, transverse momenta, total charge, etc.) and put cuts on the data to look for a particular set of events (in this case we were looking for lepton flavour violating tau to mu, gamma).

The basic procedure is to put constraints on the data - bounds on the total missing energy, a cut on the total charge etc. in order to include only certain events. This is done in order to cut out as many unwanted events (background) and keep as much of the particular event we were looking for, as possible.

This was all tested and tuned on 'toy' data, generated by Monte Carlo simulation, such that when the cuts were optimised and the accuracy known, it could be used on the real data in order to give a bound on these lepton flavour violating events. It turned out that there were three useful parameters which were uncorrelated and therefore were valuable to be used as variables to cut the data on (three momentum in centre of mass frame, missing mass squared and missing energy squared as far as I remember - it's been a long time). You could then plot the data, point by point, in this three dimensional space and place a box around it which you hope will include as much of the data you want and exclude as much background as possible.

However, instead of defining a box region with straight sides in parameter space, it seemed better to design a shape which cut the data more efficiently from the background. The question was what shape to choose. In the end it was possible to describe a relatively generic shape with six parameters.

Running through a large range of six free parameters on the data was going to take around 20,000 years if I remember rightly (10^12 iterations) and marks deducted for such late work would jeopardize my degree. A genetic algorithm on the other hand was just the job. The procedure is simple and I've used this on many occasions when I want to optimise something which has a large number of possibilities - it's not perfect for all such problems, but many.

Here's the general idea: Create ten randomly generated shapes with a random set of six numbers (in a sensibly chosen range). Apply this shape as a cut in the three dimensional parameter space and define a way to grade each one - (good data)/(bad data) would be about the simplest, but not necessarily most intelligent. Keep the best shapes, throw away the worst and breed the best shapes in some normalised fashion such that their offspring look something like each of their parents. Add in a little random mutation as well and throw in a few more completely random shapes. Do the same thing again, and again, and again until the system has settled to an ideal shape. This is a pretty general procedure for such problems.

Rather than 20,000 years this took around five hours. It all sounds rather easy now, but the actual design of the genetic algorithm, its tuning and weighting system gave me many sleepless nights floating about in the code and turning the possibilities around in my dazed head. Anyway, it was a fun project and we got some really nice results.

As I say, during these periods where the conscious and subconscious talk freely with each other (I still don't know whether this is pop-psych babble but it certainly feels right) the buzz of hitting on an idea that you absolutely know solves all your problems not only makes up for the zombie days following but is a motivation for what I do.

Sorry, I got a little carried away there, but I'm enjoying the possible prospects for the current ideas coming to fruition. Now comes the hard work of (in this case) coding up the ideas, reading many more papers to solidify some of the formalism and actually getting real results. Maybe it won't work out but I'm enjoying this current state of work very much. I'm sure that the tranquility of Kyoto is helping with this.

-------

I've written up accounts of this weekend but will post them over the next few days.

2 comments:

Anonymous said...

That moment between awake and asleep is a very strange time indeed. You might be interested to hear that I too come up with novel work-related thoughts during that state. However, my thoughts are sketches and gags. The strange thing is that if I note them down before I fall asleep, convinced they're comedy gold, then come the morning they become very unfunny. The cold light of day does something strange to them, which may point to some interesting ways your conscious and subconscious deal with humour. But then again maybe my jokes just aren't very good.

Unknown said...

Or perhaps you simply need to relay your jokes to an audience you is half asleep. It's a niche market perhaps but you want to get in there before someone else does.

J