Showing posts with label models. Show all posts
Showing posts with label models. Show all posts

Thursday, April 11, 2013

physics and psychophysics

reading papers on "information integration theory" lately. up to this most recent one - barrett and seth, PLoS-CB 2011 - i had an okay grasp on the math, but now i'm considering skimming. the first author of this paper is a theoretical physicist by training, so i don't feel too bad that i can't quite take it. feeling a little bad led me to this train of thought:

in my field of psychophysics we use mathematics to describe human behaviors, with those behaviors driven by simple physical stimuli. some psychophysical models can be rather complicated, but the more complicated they get, the less realistic they get, because so to speak they inevitably start biting off more than they can chew. for example, channel theory is a bunch of mathematical objects, but they have to be fit to particular contexts. even a simple psychophysical rule or law involves constants that vary from person to person, from apparatus to apparatus.

no one in psychophysics should fool themselves into thinking that they can someday come down to a simultaneously correct and meaningful mathematical theory of whatever phenomenon they are studying, because every phenomenon is an artificially isolated part of a much more complicated whole, and the ways that the circumstances of the phenomenon can be varied are nearly infinite. but thankfully, no one in psychophysics does, i think, fool themselves this far; we recognize that mathematics is a good tool for getting a handle on what we are studying, at the same time that what we are studying is clearly variable in ways that we can only hope not to approximate too poorly. for us, mathematics is an operational description of what we're studying.

in physics, on the other hand, they have things down to the level where you will hear physicists talk about mathematical objects and physical phenomena as more-or-less the same thing. quarks and bosons, gravity and magnetic fields, are things that are only really understood through mathematics. my knowledge of physics mostly comes from reading feynman and hawking, and watching random lectures (and once having been a physics undergrad, briefly), so it's not like i have anything like an up-close viewpoint of the physicist's perspective, but i think this viewpoint is plainly very popular. john wheeler talked about the root of all reality being information, which is only a mathematical construction as far as the human mind is concerned - obviously he felt the isomorphism was close enough to make this sort of claim.

apparently, for physicists to achieve this nearly perfect mathematical description of physical reality, the mathematics had to get pretty complicated. so, when you read a paper by a physicist on a topic that you feel like you should have a good handle on - you're a psychologist, the topic is consciousness - you have quite a bit of difficulty in parsing his descriptions, even though you realize that he's not talking about anything approaching the sophistication of string theory or QED.

so.. i'll go back and give it another 20 minutes, maybe make it another half-page. also, tomorrow night i'm having an MRI of my neck, to check for dissections in my carotid arteries. fun fun fun.

(only now did i realize that this topic would have been perfect for a new dialogue.. maybe i will recast it?)

Thursday, March 28, 2013

boiling

1. Standing by the stove the other night, waiting for a kettle of water to boil - as it does, starting from the near-silent rattle through the increasing racket, and the whistle starting, and all the other noises that accompany that moment, I had the distinct feeling that I was hearing the big chromatic crescendo at the end of Prokofiev's great D-minor Toccata, one of my favorite piano pieces. It's not that I was fooled - this was not an auditory deja trompé, but something similar - but I've never felt a piece of familiar music so strongly evoked by some random physical event. It was definitely primed by having listened to that piece something like 10 times in the past week. Now whenever I hear that piece, when it gets to the silence at the end before the crescendo, I will think of a boiling kettle.

2. Horrible problems with the paper I've been working on and hoping to have submitted in a matter of days. A big part of the paper - the way that I interpret the data, basically - is a set of relatively simple contrast perception models which I run through the experiment as tests of different hypotheses. I had calibrated these to a set of human thresholds, which I was never quite comfortable with for various reasons, but that's the way I had done it; as a final touch to a figure, I decide to go and generate thresholds estimates for the 'best' model, to plot against the human data, just to show how similar they are, and when I go to do this, the model starts giving me imaginary numbers, which is bad.

By the time I figured out what was wrong - it wasn't really a problem, I was just not using my code properly - I had decided that calibrating the model to the thresholds for my humans was probably a bad idea, because the way I measured the human thresholds was kind of weird, and I could be sure of simulating these properly, so I should just use some standard thresholds. Why not? Nobody is going to argue with a standard CSF. So I plug a standard in and - and I'm going to note here that every time I do something with this model, I have to go and recompute the simulations, which takes hours - and it all goes haywire. The model that 'works', and that's consistent with all these nice facts that I've lined up and made a nice case out of, still works, but depending on how I implement the change in sensitivity, the alternatives either perform horribly - which you'd think is okay, but really doesn't look plausible, just makes it look like I haven't given them a fair chance - or they come out reasonably similar to the favored model.

So, I have to be fair, at the same time that I don't want everything to fall apart. I am certain that things work the way I think they do, and I'm prepared to be wrong, but if I'm wrong then I don't understand how I'm wrong. And building evidence either way progresses in these multi-hour steps in between which I'm sitting here with a stomach ache because I'm afraid that I'm going to wind up with evidence that my experiment isn't actually that good at discriminating these different models.

The problem seems to be in the low-frequency filters; the lowest frequency filter is basically four points in the Fourier domain, and it happens to take up a disproportionately huge amount of image contrast, so the 'not working' models tend to be uniformly low-pass in the simulation, which I know is not fair, because it's all because of that low frequency channel. So I figured that, since these are 'sustained' stimuli, I would be justified in just taking out the lowest few channels and leaving the top 5 or 6 band-pass channels - one thing here being that I'm not willing to go back and redesign everything to the point where we have low-frequency DC-sensitive channels. But then when I just have the mid-to-high frequency channels, the three models are too similar, which I don't like either, and which I know is just because I'm now allowing the low s.f. to get through. And I also know that this version, even though it has the 'standard' CSF, doesn't really because the lowest channels are shut off. So I turned them back on and changed the gain to the CSF, which I realized I had wrong the first time because....

Anyways, you see what I'm doing - changing more than one thing at a time, and making mistakes because I'm rushing it. This just prolongs everything, because every change, or every attempt to figure out what the effects of a change are, and every mistake, takes many hours to evaluate.

Anyways, high irritation and anxiety.

Friday, September 21, 2012

grant, presentation, paper, model

Been trying to skip between several jobs: grant proposal with a looming deadline, modeling experiments for a paper revision with a looming deadline, looming conference presentation... well, the conference is over, and the grant is coming along, though I still do not believe I will make it.

The paper..  okay, another paper: poked an editor yesterday, and he came back with a 'minor revision' request, which I fulfilled by late afternoon today. So, finally, we have a journal article - in a 1.0 impact factor journal - to show for a 3 year postdoc. Sigh. Another in revision, in a better journal, but that's the big problem: I'm doing all these model tests, but I can't get any real momentum because I keep flipping back to the grant. Sigh. I keep complaining about the same thing. Need to set a deadline - 3 more years? - after which if I'm still making the same complaint, something needs to change.

Let's talk about the model stuff. I've talked about it already in the past few posts: in the original paper, I proposed a modification to an existing model, a minor modification, which was able to closely fit our data, but which was a bit complexified, and difficult to explain exactly why it worked as well as it did, and also unable to show how varying its parameters explained the variance in our data, etc. So, it "worked", but that's about all it did. It didn't explain much.

The existing model we call the "simple model". The simple model is indeed simple. It's so simple that it's almost meaningless, which is what frustrates me. Of course it's not that simple; you can interpret its components in very simplified, but real, visual system terms. And, it basically can describe our data, even when I complexify it just a bit to handle the extra complexity of our stimuli. And this complexification is fine, because it works best if I remove an odd hand-waving component that the original author had found it necessary to include to explain his data. Only... it doesn't quite work. The matching functions that make up the main set of data have slopes that are different in a pattern that is replicated by the simple model, but overall the model slopes are too shallow. I spent last week trying to find a dimension of the model that I could vary in order to shift the slopes up and down without destroying other aspects of its performance..  no dice.. fail fail fail.

So, I'm thinking that I can present a 'near miss': the model gets a lot of things right, and it fails to get everything right for reasons that I haven't thought hard enough about just yet. I really need to sit some afternoon and really think it out. Why, for the normal adaptor, is the matching function slope steeper than the identity line, but never steep enough? What is missing? Is it really the curvature of the CSF? How do I prove it?

Now, out of some horrible masochistic urge, I'm running the big image-based version of the "simple model". This version doesn't collapse the input and adaptation terms into single vectors until the 'blur decoding' stage. It seems like, really, some version of this has to work, but it hasn't come close yet. Looking at it now, though, I see that I did some strange things that are kind of hard to explain... Gonna give it another chance overnight.

Wednesday, September 12, 2012

adaptomatic

Trying to figure out how to proceed with this adaptation paper, and I retreat here.

Minor problem is the rewrite: this will get done, not too worried about it. May be the last thing that gets done, since the major problem needs to be solved materially first.

Major problem is the modeling. The original paper details a complexified version of the model proposed by the authors of a paper that our paper basically replicates, accidentally. We were scooped, and so I thought that to novelify our paper, I would take their model and try to push it a little further, and do some extra analysis of it.

What I didn't do was what I should have done, which was to also test the simple model and show that it is somehow inadequate, and that complexification is therefore justified or necessary. I am actually ambivalent about this. My main idea was that we should take a model which has generalizable features and use it to explain the data; but, it's true that the more sophisticated version can't really be credited with achieving anything unless the simple one can also be shown to fail.

So the problem is that I have to do a lot of testing of the simple model. So, I decided that I would scrap the section that was already in the paper and replace it with an evaluation of the simple model, but make up for the lack of 'advance' by employing the simple model in a more realistic simulation of the actual experiments. This is what I've been trying to do, and basically failing at, for several weeks now.

The first idea was to use the simplest form of the model, but the most complete form of the stimuli: videos, played frame by frame and decomposed into the relevant stimulus bands, adaptation developing according to a simple differential equation with the same dimensions as the stimulus. This didn't work. Or, it almost worked. The problem is that adaptation just won't build up in the high frequency channels, unless it's way overpowered, which is against any bit of evidence I can think about. If high frequency adaptation were so strong, everything would be blurry all the time. I think it should be the weakest, or the slipperiest.

Soon after that, I gave up and retreated to the 'global sum' model, where instead of using 2d inputs, I use 0d inputs - i.e. the stimulus is treated as a scalar. I get the scalars from the real stimuli, and the same dynamic simulation is run. It's tons faster, of course, which makes it easier to play around with. I figured I would have found a solution by now.

See, it's so close. It's easy to get a solution, by adjusting the time constants, how they vary with frequency, and the masking strength, and get a set of simulated matching functions that look a lot like the human data. But I figure this is uninteresting. I have a set of data for 10 subjects, and they seem to vary in particular ways - but I can't get the simulated data to vary in the same way. If I can't do that, what is the point of the variability data?

Also, last night I spent some time looking closely at the statistics of the original test videos. There's something suspicious about them. Not wrong - I don't doubt that the slope change that was imposed was imposed correctly. But the way contrast changes with frequency and slope is not linear - it flattens out, at different frequencies, at the extreme slope changes. In the middle range, around zero, all contrasts change. Suspiciously like the gain peak, which I'm wondering isn't somehow an artifact of this sort of image manipulation.

I don't expect to figure that last bit out before the revision is done. But, I'm thinking it might be a good idea to play down the gain peak business, since I might wind up figuring out that e.g. adaptation is much more linear than it appears, and that the apparent flattening out is really an artifact of the procedure. I don't think I'll find that, but - did I mention I'm going to write a model-only paper after this one? - seems a good idea not to go too far out on a limb when there are doubts.

I have a nagging feeling that I gave up too soon on the image-based model...

Friday, September 07, 2012

talk: 97%


did a dry run today for my FVM talk. i think it went well, but there was a good amount of feedback. (incidentally, earlier this week i came to the lab, and passed my preceptor e* talking with a familiar old guy in the hall; a few minutes later, e* brings the guy to my office and asks me to show him my work. the old guy was l.s., one of the elder statesmen of european psychophysics. turns out he had been a postdoc at the instutute more than 40 years ago, and was in town, and had just dropped in to see old friends.. i took him through my presentation at quarter speed, and he was very enthusiastic. made some suggestions about controlling for the 'knowledge' aspect of my stimuli and experiment design. took notes. had a good talk with him, he seems to know my grad school mentor well, knows all his students. so i didn't go to ECVP this week, but i got to spend a morning with one of its founders...)

anyways, the dry run: p* was the only one, as i guess i expected, to make real comments on the substance of the talk. he had two points/questions:

1. what happens if the two images are different, i.e. if they have different phase spectra? i have not tried to do this experiment, or to predict the result. i guess that technically, the model that i am evaluating would make clear predictions in such an experiment, and the perceptual process i am claiming to occur would be equally applicable. but, really, i am tacitly assuming that the similarity of the two images is tamping down noise that would otherwise be there, somehow in the spatial summation, that isn't actually reflected in the model but that would be there for the humans. but, it might work just fine. i should really try it out, just to see what happens... (*edit: i tested it in the afternoon, and the result is exactly the same. experiment is harder, and the normalization is wacky, but seems clear it works...)

2. don't the weighting functions look just like CSFs? isn't this what would happen if perceived contrasts were just CSF-weighted image contrasts? yeah, sure, but there's no reason to believe that this is how perceived contrast is computed. the flat-GC model is close to this. i wonder if i shouldn't just show a family of flat-GC models instead of a single one, with one of them having 0-weighted GC...

the other main criticism was of the slide with all the equations. this is the main thing i think i need to address. i need to remake that slide so it more naturally presents the system of processes that the equations represent. some sort of flow or wiring diagram, showing how the equations are nested...

also need to modify the explanation of the contrast randomization; not add information, but make clearer that the two contrast weighting vectors are indeed random and (basically) independent.

Monday, September 03, 2012

two out of three ain't enough

okay, so, really, i spent the labor day weekend watching youtube videos, looking at funny gifs, reading the news, and other random things, while running half-baked model simulations for the blur adaptation revision.

first thing i did was to run the video-based model through the experiment on the same three adaptation levels used in the original experiment. it worked at an operational level, i.e. it matched sharper things with sharper things and blurrier things with blurrier things, and the effects of the adaptors were correctly ordered - it didn't do anything crazy. on an empirical level, though, it was wrong.

for the original subjects, and most of the replication subjects, the perceived normal after blank adaptation should be matched to a slightly sharpened normal-video-adapted test; the simulation did the opposite. not a huge problem, but like i said, against the trend.

bigger problem is that the simulation failed to get the 'gain' peak for the normal adaptation condition; instead, gain just increased with sharpness of the adaptor. now i'm rerunning the simulation with some basic changes (adding white noise to the spatial inputs, which i don't think will work - might make it worse by increasing the effective sharpness of all inputs - but might have something of a CSF effect; and windowing the edges, which i should have done from the start).

one funny thing: even though the gain for the sharp adaptor is too high (being higher than for the normal adaptor), the gains for the normal and blurred adaptors are *exactly* the same as the means for the original three subjects: enough to make me think i was doing something horribly weirdly wrong in the spreadsheet, but there it is:



weird, but too good to be true. undoubtedly, every change to the model will change all of the simulation measurements, and the sim is definitely as noisy as the humans - even the same one run again would not get the same values.

Wednesday, July 04, 2012

scintillating scotoma 3.b




I just can't let this go. Maybe this is as far as I can get with it for the time being. I wasn't satisfied with the straight-line model of the CSD wave that I had been playing with, because there was just no straightforward way of figuring out direction, origin, speed, etc. But I had a great idea: say the wave is like a surface wave, with a point origin, spreading out in every direction at a the same speed. Maybe this isn't true; it may be that the phenomenon is limited to V1; it may be that the origin is, e.g., the interface between cortical areas; it may be that the speed or direction varies. The first isn't a problem, but if we assume the second two (point origin, constant velocity) are true, or close to true, then we can come up with the simple model you see in the gif above: according to my June 24 data (fit with a lazy grid search), the CSD is a surface wave, traveling at (exactly!) 3mm/min, arising within about 3mm of the V1/V2 border, near the foveal confluence.

I'm not going to go into detail here about the spatial properties of the wave. It's simple, that's enough for you.

Anyways, nothing crazy here; this is all consistent so far with what I understand of the published research so far. It's a lot of fun figuring out how to create and convert all these maps, and it's amazing just how solid those parameter estimates are given the data. Sometime soon I'll look deeper into it, hopefully I can put it off for a while.

Monday, June 18, 2012

gain

why would a process vary with the square root of wavelength?

with constant bandwidth, e.g. receptive field area will vary with the square of frequency (of wavelength). the linear size (radius) of the r.f. will vary directly with wavelength. a process in volume would vary with the cube of wavelength. how do you go backwards from here?

okay, so the inhibitory inputs are all squared. i want the weights on these inputs to be proportional to the square root of filter wavelength. i could get a step closer by making the linear inputs proportional to wavelength before the squaring, which changes the question to:

why would a process vary with the inverse of spatial frequency? in my mind, the weights are still tied to the size of the r.f., so that the bigger it is, the more inhibitory connections it has. strictly speaking, this would make inhibition vary with the square of wavelength.

a bigger r.f. would have more inhibition, then. i am just making this up. so, an r.f. that's twice as big would have four times the inhibition. fine, but then why wouldn't it have four times the excitation? they would balance out. but maybe the excitation isn't balanced. maybe excitatory inputs are sparser and sparser for larger r.f.s. is that true?

if it's true, then effectively the gain for different wavelength r.f.s should increase with frequency, because the density of excitatory inputs should increase with frequency.


i feel like this is getting somewhere... atick and redlich, brady and field... somewhere in there...

Wednesday, June 13, 2012

monitor MTF? sure!

Okay, so I need to know the spatial frequency transfer function of the monitor I've used to do most of my experiments over the past couple of years. I've never done this before, so I go around asking if anyone else has done it. I expected that at least B** would have measured a monitor MTF before, but he hadn't. I was surprised.

Still, B**'s lab has lots of nice tools, so I go in there to look around, and lo, T** is working on something using exactly what I need, a high speed photometer with a slit aperture. So today I borrowed it and set to work doing something I had never done and didn't know how to do. It was great fun.

D** helped me get the photometer head fixed in position. We strapped it with rubber bands to an adjustable headrest. I've started by just measuring along the raster. The slit is (T** says) 1mm, which is about 2.67 pixels on my display. I drifted (slowly) squarewave gratings with different wavelengths past the aperture - this was more complicated than it sounds. The monitor is run at 100Hz, and CRTs flash frames very rapidly, just a millisecond, so getting the photometer settings just right (it runs at 18Khz) took a bit of adjustment, and figuring out good settings for the gratings, slow-enough speed to drift them at (I'm limited by the 10 second block limit imposed by the photometer)..

Anyways, I got back temporal waveforms which I treat as identical to the spatial waveforms. As expected, the power of these waveforms drops off as the gratings get finer. But, I know that it drops off too fast, because of the aperture. If the aperture were exactly 1 pixel across, and if it were aligned precisely with the raster, and if a bunch of other things were true, then I could know that each epoch recorded by the photometer reflected the luminance of a pixel, and my measurements would reflect the monitor MTF. But, like I said, the aperture is 1mm, so each 10ms epoch is an aliased average over >2 pixels. I'm not even thinking about the reflections from the photometer head (there's a metal rim to the aperture T** had taped on there).

My solution: code an ideal monitor, record from it with the same sized aperture, and divide it out of the measurements. I can then guess a blur function - Gaussian - and fit that to my (4) data points. That's what I did: here is my first estimate of the vertical MTF of my Dell p1130 Trinitron:

The Nyquist limit for this display, at the distance modeled here, is about 23cpd, so I guess this Gaussian is in about the right place. It's hard to believe, though, because horizontal 1-pixel gratings look so sharp on this display. I feel like these must be underestimates of the transfer. I am nervous about how awful the vertical will be...

*edit*
It wasn't too bad, just a bit blurrier than the horizontal. Still makes me suspicious that I'm underestimating the horizontal. Not going to bother putting up plots, but here's my estimate of the pixel spread function (you can just see that it's a little broader left-right, that's the vertical blur):
 

Sunday, June 03, 2012

sum.. sum.. summm... summation?



ok, so i'm working on this classification image paper, and it's going really well, and i'm pretty happy about it. i feel like i've got a good handle on it, i'm writing it in one big shot, the analyses are all good, the data are fine, it's all under control. i'm pretty happy about this one. i keep telling myself that, and then noticing that i keep telling myself that. i guess it's in contrast to the blur adaptation paper, which was such an ordeal (took 2 years, basically), and then the magnification paper, which just isn't much fun. i feel myself moving down that priority list - hey, i should do a post on the priority spreadsheet! i made some nice plots in there!

anyways, the CI paper, it's going well, but i'm constantly on the lookout for problems. so tonight, i finally thought of one. not a crucial, deep problem, but a problem with how i've calculated some of the modeling stuff, a serious enough problem that i'll probably have to redesign a bit of it before doing the final runthroughs. i'm writing this entry so i can just sort of kick off thinking of how to solve the problem. here it is, right plain as day in this little cluster of plots from last year's poster, which has become this fine little paper:

the problem is spatial summation - or, the problem is that you don't see anything about spatial summation in those plots. for the main models, i have a CSF that was measured using test-field-sized images. the thresholds measured must reflect a sort of spatial summation, then. the problem is, i've been using those thresholds to set the baseline thresholds for the models, and then summing over the spatial responses. i had kind of had an inkling that i was being lazy there, but had overlooked how obviously stupid that is. i haven't tested the models on the threshold tasks, but i think that they would necessarily get much lower thresholds than the humans; spatial summation should give you a lower overall threshold than you would get for any single location. i need to think of a quick way to solve this, because i don't want to wind up estimating the model CSF through simulations...

and the simulations then raise the problem of noise, and how many samples should there actually be, etc etc... i guess there are benefits to doing things the simple way first, but i think i've run myself into a weird little corner here. gonna need to talk to somebody about this, probably..

Thursday, April 19, 2012

Memes and Pharmacies

That rivalry proposal went in last Monday with no problems, along with a long-festering manuscript, so it seems I took a week off from writing. Now I have progress reports to do, presentations to prepare, other manuscripts to complete, on and on.. I need to make sure I keep up with this journal, which seems to be helping in keeping my writing pace up.

Vacation is over!

About 12 years ago, I read the Meme Machine by Susan Blackmore. It was around the time that I decided to major in psychology, and I was reading all this Dan Dennett Douglas Hofstadter stuff, but it was her popular science book that really had a big effect on me - I would say that it changed my worldview completely, to the extent that I would identify myself as a memeticist when discussions of religion or that sort of thing came up (it was still college, see) - I really felt like it was a great idea, that human culture and human psychology could be explained as essentially a type of evolutionary biology. I still believe it, and so I suppose this book still really sits near the base of my philosophical side, even though I don't think about these things so much anymore.

I bring this up because the other night Jingping and I were talking about being tricked, since this was the topic of a Chinese textbook lesson I had just read, and I recounted the story of being completely conned by a thief once when I was a clerk working at CVS. I wound up going on more generally about working there, and I remembered that I had worked out a memetics-inspired 'model' of that store, which I hadn't thought about in a long time. One of the things about the memetics idea that had really gotten to me was that you could see social organizations as living creatures with their own biological processes - not that this is an idea original to Blackmore, and I'm sure that's not the first place I had heard it (like I said, I was also reading Dennett and Hofstadter at the time), but she did work it into a larger sort of scientistic system which seemed to simplify and unify a lot of questions.

Now I realize that the criticisms of memetics that I heard from professors in college (when I questioned them about it) were mostly right, in that it mostly consists of making analogies between systems; only in the last few years, with the whole online social networking advent, has a real science of something like memetics actually gotten off the ground (this is a neat example from a few weeks ago), and it's very different from what had been imagined when the idea was first getting around.

Anyways, I thought I'd detail here my biology-inspired model of a CVS store, ca. 2001. I have a notebook somewhere where I had detailed a whole system, with functional syntax and everything, for describing social organizations in terms of cellular, metabolic systems. This might have been the first time that I had tried to put together a comprehensive model of a system, now that I think of it. The store, I thought, was itself a cell in a larger CVS system dispersed across the city, which itself was a system dispersed across the country. I was mainly interested in the store level, where you could see different components acting as reagents. It was a strongly analogical system, but not completely analogical, to plant metabolism: a plants needs carbon, so it uses sunlight to break down carbon dioxide, releasing the unneeded oxygen back into the world. A store needs money, so it uses salable products to break down a money-human bond, releasing the human back into the world.

Of course, with plants the sunlight comes free from heaven - all the plant can do is spread out and try to catch it - while salable products must be delivered from another part of the CVS system: the distribution center. The distribution center emits reagents to the stores, where the money-human bond is broken down. The CVS system also emits catalytic agents into the world - advertisements - to facilitate the crucial reaction. The money absorbed by the system is energy which is used to drive the system through a reaction not unlike oxidation - the money-human bond is reformed systematically, with employees as the human component. This reformation is what really drives the system. Those new human-money bonds then go out into the world and fulfill the same function, breaking apart, as they interact with other businesses.

Looking at a business in this way totally changed the way I understood the world. Businesses, churches, governments, political parties, armies - all of them can be thought of as living creatures, or as organs of larger creatures, rather than as some sort of human means-to-an-end. By changing perspective between levels, we can see ourselves as means to the ends of these larger systems, just as our cells and organs are means to ours. Now I'm finally getting around to reading straight through Hofstadter's GEB, and so I can see that this general idea of shifting perspective across levels is an old one that has been astonishing people for a long time. But for me, coming to see human culture as as being alive was a fundamental shift in my intellectual development, one that hasn't really been superseded since. I haven't become a real memeticist yet, but it's all still there, underneath... these tiny tendrils of memetics live yet...

Monday, April 02, 2012

model update

I'm working on other things lately, but I did finally get that multi-channel rivalry model working - main problem was that I had written the convolution equations out wrong. I had to do the convolution there in the code because the filter array is irregular - there's no function to call for 2d irregular-array convolution, much less for switching the convolution between different layers.

Here's what I had done:

Z´(x) = Z´(x) + F(x)·Z(x), where x is a vector of spatial indices, Z is the differential equation describing the change in excitation or adaptation over time, F is basically just a 2-d Gaussian representing spatial spread of activation for the inhibitory or excitatory unit, and Z´ is (supposed to be) the differential convolved with the spread function.

Now that doesn't make any sense at all. I don't know what that is. In the actual code that equation was actually 3 lines long, with lots and lots of indices going on because the system has something like five dimensions to it; so, I couldn't see what nonsense it was.

This is how it is now:

Z´(x) = Z´(x) + sum(F(x)·Z(x))*F(x)

THAT is convolution. I discovered what was going on by looking at the filter values as images rather than as time plots; Z and Z´ didn't look different at all! Z´ should look like a blurred version of Z. Such a waste of time...

Anyways, it kind of works now. Different problems. Not working on it until later in April. The 'simple' single resolution model was used to generate some images for my NRSA application. Here's a sample simulation of strabismus (with eye movements):


Sunday, March 18, 2012

oscillate, explode, or stabilize

must learn about runge-kutta methods,
must learn about runge-kutta methods,
must learn about runge-kutta methods.

clearly this too-complicated model is suffering because of the temporal resolution. i've spent nights now trying to figure out why the thing wasn't working right - and did find a few errors along the way, which i don't think would have made or brake the thing anyways - and finally i conclude that the response time constant was too small. this is strange, because the same model works great with a 2d network, and perfect with a single unit; apparently there's something about this network, which is essentially 3d, which effectively makes the time constants faster... it must be that compounding the differential during the convolution, over multiple filter layers, effectively speeds everything up.

it's not like i wasn't aware of this problem at first. i thought i had solved that by doing the global normalization, where the convolution stage would basically be treated as a single layer. last night, i decided that collapsing that stage to one layer was a mistake, because it resulted in the pools everywhere being overwhelmed by the finer-grain channels, since those filters are more numerous. that may actually be correct, with some sort of leveling factor, but at any rate i took out the collapse. it didn't change performance much, but that's when i was using a too-complex test case (two faces), instead of the current test case of two gratings. now i realize that the pooling was accelerating the responses, resulting in useless behavior by the network - turning up the interocular inhibition to any level that did anything tended to result in ms-to-ms oscillations.

so, the compounding of responses was doing it, i guess, and would be doing it even if i had the pooling collapse still worked in. but now i can't understand why i didn't get the same problem, apparently ever, with the fft-based version of the model. now i'm suspicious that maybe i *did* get it, and just never perceived it because i wasn't doing the same sorts of tests with that thing.

not quite back to the drawing board. i wish i could get away from the drawing board, for just a few nights, so i could work on this goddam proposal like i should have been doing for the past 2 months.

Monday, March 12, 2012

multi-channel M-scaled discrete filter convolution

Okay, so, I built this really neat discrete filter-based visual field model, planning to use it to measure binocular image statistics and to generate more realistic rivalry simulations. I hoped that doing the simulations would actually be quicker using the filters, since there would be far fewer filters than pixel images (I was using image-filter convolution to do the simulations I showed 2 posts ago), and the filters only needed to be represented by their scalar responses. Hoped but did not believe..

So now, I just spent the weekend (wrote that first paragraph a week ago) staring at the code, trying to figure out how to do, essentially, convolution of a function with an irregular array. It is complicated! I wrote a function to get local neighborhood vectors for each filter within its own channel, and then stared at that for a couple of days, and then realized that I should have written it to get the neighborhood without regard to channel. It's a pretty gangly operation, but it does have a good structural resemblance to stuff I've been thinking about for years. Ed and Bruce's relatively abstract idea about the broadband gain control pools, well, I've built it. Not for the intended purposes, since there's not going to be any gain control here - the only suppression that will be involved is like an 'exit gate', the permission for information in the channel array to be moved out to the later stages ("consciousness", we'll call it).

And, I say again, it's complicated. It's definitely not going to be faster than the rectangular filter convolution; in fact, it's likely to be 3 or 4 times slower, and it's going to produce rougher looking images on top of that. All this just to incorporate stupid M-scaling into these stupid rivalry waves. I swear, I can't think of a better way to do it. And the thing still isn't going to know anything about surfaces or faces or houses or any of that stuff, and it's going to take forever to debug and proof since it's going to be so slow...

But it's going to be cool.

Tuesday, December 21, 2010

Publication Report 2010

My internet research has dwindled to nothing!

Meanwhile, this year's publication history:

Published manuscripts: 2
Submitted manuscripts: 0
In-preparation manuscripts: 1
Abstracts submitted: 2
Conference papers written: 2
Conference presentations: 1
Invited lectures: 1

SUBMITTED MANUSCRIPTS = 0.0, this isn't so good. I have a waiting list of whatever comes right before "in-preparation", though.

Okay, what did I learn today:
Well, I built a model of adapted image quality (blur/normal/sharp) matching yesterday, and fixed it up today. It does just what it should: it "normalizes" when adapted to one or another type of input, though for now its starting point is "blank adapted" which isn't quite right. It also displays the loss of blur/sharp gain that I found in the matching experiment (which accounts for 4 of the above objects: paper in preparation, abstract accepted, presentation and lecture given).

The model is your basic contrast transducer array, a set of Foley functions (Stromeyer-Foley, Naka-Rushton, etc.) with thresholds set by a standard function. I've built it several times before, but this is the first time I came up with a good way of implementing the adaptation part. This is the transducer function, with w in the denominator standing in for some added (only added, yes) gain control function:

The idea is that the system wants R to be kept relatively constant, at a particular level above threshold but not terribly near saturation - but C keeps changing, so how to keep R in that ideal range? Yes, we adapt, and here adaptation basically means setting the value of w. That's easy to do, just solve for w. This introduces probably the most important free parameter in the model, R, because I don't know what it should be, though I have a good idea of the range, and luckily the thing only really behaves if I put it in that range. So okay, it works!

So what I learned is that the third time you build something, it might actually work. From now on I need to make sure to build everything at least three times.

Thursday, April 08, 2010

well..

oh man. i haven't learned anything today, except that there's only so far you can take a visual simulation before it breaks. so, i've been measuring thresholds for a simulated observer at different spatial frequencies, for content within photographs which has been thresholded depending on a trial-to-trial staircase. it works pretty well for the images themselves. the original image gets compared with the image containing a thresholded band, and the observer is able to converge at a measure of the threshold over several hundred trials, similar to a human observer.

what i do is this: the original image gets filtered at the frequency in question, and the filtered image (the output of the filter) is thresholded and added back into the original image minus the filtered image. so, we actually have the original image minus the subthreshold content within the filter. if the threshold is zero, these two images are identical, i.e. they are whole, unfiltered photographs. this is the experiment as i originally ran it on myself, trying to find the just-detectable threshold (the threshold-threshold). to do the experiment simulation, the thresholded image then gets filtered again, meaning that the filter picks up the thresholded content along with residual off-frequency content. this is the only reasonable way to get the test content, since 1) that off-frequency content is there in the image and would be seen by the filter, and thus can't be ignored, and 2) the filtered band contains harmonics which wouldn't be seen by the filter.

naturally, i eventually decided to do the same experiment without the complete image; i.e., just measure threshold-thresholds for the content within the filter. i thought this would be straightforward - i just use the filtered image as the 'original', and the thresholded filtered image as the 'test'. but then, i thought, ah, almost screwed up there: the thresholded filtered image should be filtered again, just like in the original experiment. so, you can see the problem. the original content is lifted straight out of the source image, while the thresholded content gets lifted out of the source image and again out of the thresholded image, which means it will be multiplied twice by the filter. so, even if the threshold is zero, the test and original images will be different.

this is a problem. in fact, it must also be a problem in the original experiment. but, the test and original images in the original experiment are the same when the threshold is zero - i assume this is because the off-frequency content amounts to the difference between the filtered and double-filtered content, and adding the filtered content back into the image basically restores the lost content.

i need to think about this.