No longer active

Comments have been turned off because of spam. Questions/comments: I'm at dantasse.com

Wednesday, April 13, 2011

Sleep ideas from Quantified Self Boston

are here. In general, it's all cool. In specific:

- Eric Smith tried wearing a Zeo while awake. It basically gave him nonsense data (said he was asleep a lot). This makes sense; it's trained on sleeping people. Still, too bad we can't just give people a Zeo and use that to test their wakefulness.

- Sanjiv Shah got a big result from wearing yellow glasses at night. Kind of like f.lux for the whole world. Interesting, especially given the fact that our circadian rhythms are generally 24.18 hours but electric lights stretch them to 25.

- "[Sleep doctor Matt Bianchi's] talk brought up a discussion around the relative value of exploring small effects. The thought is that we should look for simple changes that have big results, i.e., the low hanging fruit. A heuristic suggested was if, after 5-10 days, you’re not seeing a result, then move on to something else."
Fair enough. Especially when real-world things will give you big margins of error anyway. Say that there was a chemical in bananas that made me sleep 1% longer. There's no way I'll do an experiment that has enough power to find that effect in a way that I know it's not just chance; I'd have to collect data for years. Nor is it really that important.

(the weird part is: how did they pick 5-10 days? I've settled on 2 weeks as a pretty good test period for most life changes, but why 2 weeks then? It's like collecting data: getting "about 10 people" for simple experiments seems to be "pretty good." I guess you have to start somewhere.)

EDIT: while I'm on "cool things", here's an idea about dreams from Scientific American: dreams feel more profound to us than they do to other people because serotonin release is inhibited during dreams. (similarly, you get less serotonin while you're on LSD.)

I had another neat idea about dreams the other day (and now we've moved on to straight-up-guesses). So dreams might be caused by random firings in your brain. It's one of the hypotheses out there. If so, it might explain why dreams make so little sense: they're incompressible. If you generate a random string of characters, and pick a random compression scheme, odds are that you can't compress it much at all. So if you take a series of regular daily firings (say, a bunch of yellow lights in a circle) you might say "that's the sun" and compose a bunch of visual inputs into one quick phrase. But if you take random dream firings, it's really tough to compress them (and therefore remember them) at all.

Thursday, April 7, 2011

Is skin conductivity/GSR a marker for sleepiness?

Galvanic skin response (GSR), AKA skin conductance/conductivity (and a lot of other names), might be a useful signal. It's cheap and easy to measure and widely known. It generally increases with arousal, and therefore is used in lie detectors. And E-Meters. Okay, maybe those are not great examples.

Davies and Krkovic (1964) found that EEG, skin conductance, and performance in a vigilance task all correlated for 10 college students. Skip forward 30 years, and Lim et al (1996) found out more details about the EEG-skin conductance (SCL) relationship. They found a correlation between each brain wave band/position pair and SCL, but then after searching for possible covariates (I might be botching this concept entirely) they came up with a model that only correlated Beta 3 (18-25Hz), Alpha 1 (8-10Hz), and SCL. I mean, the model was:
SCL = -0.685*EEG_Beta3 - 0.045*EEG_Alpha1 + 9.556
(both waves measured at Fz, which is the center of the frontal lobe). Generally, EEG and SCL both correlate with physiological arousal decline. Is that the same as sleepiness?

Bundele and Banerjee (2009) found that they can pretty well distinguish between pre-driving and post-driving skin conductance readings from drivers. They say that the difference is fatigue, so skin conductivity is a signal for fatigue. I say, could be fatigue, or could be stress or any number of other things that rise when you drive. Still, it's something.

Daniel Kramer (2007) studied performance on a video game and found that it correlated with skin conductivity. And Shimomura et al (2008) found that some analysis of skin conductivity correlated with task difficulty. These seem not really relevant here. But now I'm thinking, performance is linked to high arousal, and high arousal is linked to conductivity. If we just say "conductivity is about equal to arousal" and measure your arousal all day, maybe that would be higher on days where you're less sleepy.

So... what? Does GSR measure sleepiness? Probably not in any one case; if you measure your GSR right now, it's unlikely to say "GSR = 0.93, therefore you're sleepy." But maybe over time it'd be worth it.

EDIT: a couple other papers that I only have abstracts of:
Yamamoto and Isshiki (1992): well this looks promising. "We selected the GSR as a physiological index that indicates the awake level."
McDonald, Johnson, and Hord (1964): "Results showed that there were no differences between groups in GSR; however, the drowsy group showed consistently fewer spontaneous GSRs". (I guess GSRs happen in spikes, not just as a value; so maybe more awake people get more spikes in GSR)
Scholander (1961): response amplitudes of electrodermal activity was influenced by sleep deprivation.

Wednesday, April 6, 2011

Does Heart Rate Variability correlate with sleepiness?

Heart rate variability (HRV) is, well, how variable your heart rate is. If your heart beats slow, then fast, then slow, then fast, your HRV is high. If your heart rate is absolutely constant, your HRV is zero. Okay.

It seems to be a sort-of hand-wavey term; when you say "HRV", you might be talking about SDNN (standard deviation of intervals between heartbeats), rMSSD (square root of the mean squared difference of times between successive beats) or any number of other measurements. But these tend to correlate strongly, so it's not unreasonable to just talk about HRV.

In a study by Fang, Huang, Yang, and Tsai (2008), HRV didn't differ between normal patients and insomniacs. Peng, Lin, Sun, and Landis (2007) found that HRV helped their sleep-stage classifier, but they don't say anything about waking HRV. Back in 1973, Volow and Erwin found that HRV had a "marginally significant but unreliable" relationship to drowsiness onset. Furthermore, it's related to many things, but Wikipedia at least says nothing about sleep.

So why do I think that HRV might have something to do with sleepiness? Well, Kaida et al (2007) found that SDNN predicted worse performance on a vigilance task. However, they do note that this goes against some other results, like Hansen et al (2003) and Kohler et al (2006), which showed improved performance with increased HRV. Then there's Tsuchida, Bhuiyan, and Oguri (2009), who threw HRV and facial features into a classifier, finding a correlation with drowsiness of subjects in a driving simulator. ... which doesn't mean that HRV alone is a useful feature.

That's about all I've got for now. So far, HRV does not seem to correlate with sleepiness. It's a complicated measure, and there's just too much going on.

EDIT: it does help determine sleep stage, as Suzuki, Ouchi, Kameyama, and Takahashi (2009) found while combining it with an actigraph-ish watch. Also cool: the fact that they put HRV in a watch.

Thursday, March 31, 2011

Markers of Sleepiness (or Wakefulness)

Argh, I could read things forever! Focus. What am I looking for? A marker of wakefulness, an easily-measurable signal that tells you how awake you are.

Lengthy side note: Aeschbach et al (1997) talk about the two process model of sleep regulation in relation to EEG. Delta, theta, and low alpha waves are all controlled by a homeostatic "Process S" and a circadian "Process C". Process S makes theta and low alpha increase as you stay awake longer, then when you sleep, they decrease as delta increases. The circadian process, on the other hand, deals with aligning you to time of day. So while it's true that sleep is not a one-component construct, it may be (largely approximable by) a two-component construct, and those two components are S and C. (Therefore, surprisingly enough, I haven't developed or furthered any brilliant revolutionary new theories yet.)

So I've convinced myself that "a marker of wakefulness" and "a marker of sleepiness" are at least pretty similar, so I'm looking for a marker of sleepiness. There was apparently a whole conference about this at Harvard. Media summary here. What's the marker, and how can I help bring it to you? Particularly, how can I bring it to you in a way that lets you run all-day kind of studies?

Option 1: EEG. Put an EEG headset on someone, measure eyes-open alpha vs eyes-closed alpha for 12 minutes (Alpha Attenuation Test) or maybe just measure theta, or TLFA (theta/low-frequency alpha) for a couple minutes. Output a number, that's how sleepy you are.

Pros:
- It's objective (unless you get into subjective scoring of it, but let's try not to).
- It might be quick. The AAT takes 12 minutes, the KDT takes 7. But I got the actual original AAT paper, and it turns out that they (arbitrarily?) pick 12 minutes (2 open, 2 closed, repeat 3x) but looking at their data it seems that 4 minutes would have worked well too. Maybe 2 minutes would. Who knows.
- I mean, I want this to work. EEGs are interesting.

Cons:
- It might not work. James Krueger argued that EEG delta power alone is not always a satisfactory marker for sleepiness. (he then generalized to "it seems unlikely that a single EEG measure will be reliable as a marker of sleepiness for all conditions", which the media generalized to "Brainwaves? They don't correlate well to sleepiness." okay, the media can be frustrating, etc etc) I'm not convinced. There may be other ways to measure sleepiness besides just delta power.
- Existing EEG headsets are still kind of bulky. Picture big audiophile headphones. Now, unless someone's going to carry that around and whip it out every couple hours, they're not going to do this study.

Option 2: Subjective Tests. Give someone the SSS or KSS or VAS or something on their phone every couple hours.
Pros:
- It's easy to implement.
- It's quick to do. (quicker than a text, and people do those all the time.)
- It uses existing phones. Or perhaps watches.
- It could be part of a bigger study.

Cons:
- It's, well, subjective.
- People can forget to do it or decide not to. (even if you send them an alarm.)

Option 3: Behavioral Tests. Make someone take the PVT or something on their phone every couple hours.
Pros:
- Could still be quick. Again, traditional PVT takes 5-10 minutes but maybe we could make a faster test.
- It's been used for quite a while and pretty well validated.
- It's easy to implement (I think).
- It's on that phone that you already carry around.

Cons:
- Might not be quick. Maybe if you go below say 5 minutes, validity drops off.
- People can still forget to do it or decide not to.

Option 4: Biological Markers. For example, heart rate variability. As you get sleepier, your heart rate becomes more irregular.
Pros:
- Instant. Takes no time or effort. Just constantly measure heart rate. Compute now or later, whatever.
- Objective.

Cons:
- Can a heart rate monitor be unintrusive?
- Maybe this signal won't be as strong. I haven't read more than this paper about it.

Conclusion:
Why not put a few of these together? You could imagine doing a subjective 1-7 scale "how awake are you?", playing the PVT game for a couple minutes, and having your heart rate recorded all at once. Then we could see if any of the ratings correlated well with sleepiness, or even if it's some combination of them.

So that's what I'm going to try to implement. This ends the "immediately relevant" part of the post; now I'll try to throw down some more thoughts about some more papers so I can find them later, and also because they're kind of cool:

Aeschbach et al (2001) offer evidence that short sleepers feel just as tired as long sleepers, they just deal with the lack of sleep better.
Harrison and Horne (1996) describe people who aren't sleep deprived or suffering from any disorders, but who can fall asleep at the drop of a proverbial hat. This seems like not news, if you imagine sleepability on a normal curve: some people just have high sleepability.
Rector, Schei, Van Dongen, Belenky, and Krueger (2009) argue that sleep is local and use-dependent. The more you use an area in waking, the more slow-wave sleep you'll get when sleeping. When some systems get tired out, they send inputs to the VLPO, which I guess shuts down when a bunch of systems shut down? And nearby systems tend to be in synch, which is why you generally don't have one arm, or just your visual cortex, falling asleep. That is... neat! And not immediately relevant to me. Sounds like if you had better spatial resolution, say on an EEG or something, you could, say, stimulate one ear a lot and then notice that the part of the brain that processes it getting more slow-wave sleep.
- Maclean, Fekken, Saskin, and Knowles (1991) did some analysis of the SSS and sleep in general. Their analysis of the SSS I am not too concerned about. Their analysis of sleepiness (that there are two components to it) is more interesting. But I'm not convinced; the second component could just be a counteracting component, or maybe it's the circadian rhythm in the two-process model.

Metablog: here's a cool new view of this blog. Thanks, Blogger!
Metablog 2: I am going to link to Readability links of articles all the damn time now. It's so good. Compare the original with the readable one. (not to mention, Boston.com will redirect you to a paywall if you have the gall to read more than a couple articles.) No thanks, Boston.com! Thanks, Readability!

Tuesday, March 22, 2011

EEG and sleepiness in awake people

I guess when you're sleeping, EEG readings would go along with your sleep stages. What about when you're awake, though?

Kaida et al (2007) say: increased EEG alpha activity predicts when you'll nod off. (as do self-reported sleepiness and heart rate variability)
Cajochen et al (1995) say: activity in the 6.25-9.0 Hz range (theta/low-alpha) increases as you stay up longer.
Finelli et al (2000) agree; theta activity increases as you stay awake longer, as does delta (slow-wave) in your next sleep. Delta drops off exponentially as you sleep.


So that's if you can measure your alpha activity over time. What if you only have a few minutes? The Alpha Attenuation Task looks to be the trick: measure your EEG alpha with eyes open vs. eyes closed. It looks like EEG alpha with eyes open decreases as you get sleepier, while EEG with eyes closed increases. So if your eyes open / eyes closed ratio is high, you're not very sleepy, and vice versa. The task was developed by Stampi, Stone and Michimori in 1993 (which I can't find) and studied again in 1995. They found it to correlate well with the MSLT. Alloway, Ogilvie, and Shapiro in 1997 found that it distinguishes narcoleptics from "normals". It seems to be another useful measure of "sleepiness" (as possibly distinct from wakefulness).


Ã…kerstedt and Gillberg (1990) give a pretty good analysis of what happens in the alpha (8-12hz) and theta (4-8hz) bands as you get subjectively sleepier: they increase, but particularly this high-theta-low-alpha range (5-9 hz). More if you're you're sitting still with your eyes open (as opposed to walking around and doing whatever). If you close your eyes while you're sitting, theta shoots way up, and 10-11hz goes down. This jives with the AAT findings: alpha jumps when you close your eyes, but only if you're not sleepy. (their 5-min eyes-closed, 2-min eyes-open EEG task has become known as the Karolinska Drowsiness Test or KDT.)

In validating the Karolinska Sleepiness Scale, Kaida et al (2006) compared it with a bunch of other measures and found it valid. Interestingly, these all showed correlations: the KSS, the VAS (another subjective sleepiness scale), the KDT and AAT (tests of alpha power with eyes open/closed), and the PVT (response-time test). Which means that the AAT/KDT correlate with both subjective scales (KSS/VAS) and response-time tests (PVT).

In summary: as you stay awake longer (and therefore get sleepier), your theta increases, alpha gets less sensitive to you closing your eyes, subjective sleepiness increases, and task performance goes down.
Other side notes:
- you can run a KDT in 7 minutes, and an AAT in 8 (I think I saw that somewhere). Can you maybe run it in 1 minute? 2 minutes? Or maybe you could just test their theta output for 1 minute?
- Or maybe it'd be possible nowadays to have an office worker or someone just keep an EEG by their desk and test themselves (for 8 minutes) every so often.
- I keep trying to integrate all this with my brewing 2-drive idea, where there's one drive that makes you sleepier and one that makes you more awake, and everyone just keeps talking about the sleep drive when the wake drive needs some research too. It's hard to do.

Friday, March 18, 2011

EEG 101

I've got this EEG. It tells me gamma/beta/alpha/theta/delta readings. I think learning more about EEGs and the corresponding greek lettered names would be useful.

First of all, what are these? My understanding: your brain gives off electrical impulses in regular wavey patterns. We classify these waves based on their frequency. (I think EEG folks don't talk much about "where" the wave occurs because you don't get much spatial resolution. You just know "there's 20hz going on in your brain as a whole." Seems weird! Wouldn't a 20hz wave in lobe A be potentially way different than in lobe B? Dealing without spatial resolution seems like trying to decide what to wear tomorrow when you only have a national weather report. "There's rain somewhere!" But that's all we get.)
Gamma waves (30-100hz) are really quite interesting! There's evidence that they point to the origination of consciousness itself (whatever that means) or the Binding Problem (whatever that means) or at least transcendental states in expert Tibetan meditators (whatever that means). Well! Okay, so this is super interesting but not as well understood; let's move on to waves that we know more about:
Beta waves (12-30hz) are common when you're awake, particularly when you're alert, jumpy, anxious.
Alpha waves (8-12hz) are common when you're awake and relaxed, calm, peaceful, and creative, or when you're REM sleeping.
Theta waves (4-7hz) happen when you're drowsy, sleeping (not super deep), or meditative.
Delta waves (0-4hz) are deep sleep waves.

People sometimes call the deeper, slower states "synchronized" and the shallower, faster states "desynchronized".

For a discussion of what parts of the brain cause different brain wave frequencies in sleep, this Scholarpedia article on the neurobiology of sleep and wakefulness has been pretty helpful (though also pretty dense). I don't think I'll rehash this here; it seems not super critical to me now.

I think I'll follow up with another post talking about EEGs and sleep, because that alone could fill a bookshelf.

A couple other notes/thoughts I want to jot down here so I don't forget:
- According to Wikipedia, Zen meditators produce more alpha waves. A little googling reveals a page about a study. The study is... just a citation? I don't know where the full text is. There seem to be a few papers about meditation and EEGs, like this and this, which I haven't read yet.
Ole Jensen says: alpha waves in an area indicate inhibition, gamma waves indicate engagement. (this hypothesis is also right on his group's front page.) Their group uses MEG, which offers more spatial localization. (MEG is also more expensive and large.)
- What could this mean? There seem to be all kinds of parallels here. Zen meditation -> concentration -> alpha waves, Tibetan meditation -> mindfulness -> gamma waves? I think it is important not to get too carried away jumping to conclusions. But it's interesting!

Measuring my own focus and productivity

(Not quite inspired by xkcd today, but it's topical.)

The freedom of the researchey life is a blessing and a curse, and the difference between success and failure is likely the ability to stay on target.

How can I keep myself on target? How can I even know if I'm on target?

I was inspired by Robin Barooah, who found out that he concentrated no less (and probably more) after he stopped drinking coffee. More interestingly, he quantified concentration: every 25 minutes, if he had concentrated for 25 minutes, he marks an X. Then he was able to improve it by trying something and seeing that it correlated with more concentration. (actually, by looking through his history to see that it correlated with more concentration.)

So what will I try? A few options:
1. The very rigidly scheduled day I was trying. I think this will not work; it was hard to squeeze into my day. And it was prescriptive; it made me feel guilty about chunks I missed.
2. Forget it! Just work! I think this will not work either, because my research is on a computer, so the distracting internet is always around the corner. Also, I'm unfocused enough right now that I could just read things forever and not converge.
3. Something in between: Pomodoro. I've tried this at Google with mixed success, ultimately abandoning it. But maybe it's worth another try. It's nice that it's descriptive and works in 25-minute chunks, instead of 90-minute. It's hard to find 90 unbroken minutes, and it's nice that, if something comes up and interrupts me, I could just skip this chunk, lose 25 minutes, and keep trucking.

Tuesday, March 15, 2011

Sleep debt?

The idea of Sleep Debt is that each person has a "sleep quota" (an amount that he/she is supposed to sleep). If you sleep less than your sleep quota, you'll feel crummy until you sleep more to pay it back. I guess there are a few variants of Sleep Debt theory:
1. It's a straight balance. If your quota is 8 hours, and you sleep 7 hours for 10 days, you'll have 10 hours to pay back, and you won't feel good until you sleep 9 hours for 10 days (or 10 hours for 5 days, or whatever).
2. Sleep debt exists, but it's not a straight balance; a couple days of sleep-as-long-as-you-want will cure you.
3. There is no sleep debt, only REM sleep debt.
4. It's a myth. (tiredness might be caused by too little sleep, but it might equally be caused by boredom or whatever.)

There seem to be variations of Sleep Quota theory too:
1. We all have about the same sleep quota, and it's always been the same.
2. We all have about the same sleep quota, and it's changed in modern times.
3. We all have different sleep quotas.

I'm skimming abstracts here, because I'd like to externalize some thoughts and move on.
Klerman and Dijk, 2005, argue that sleep debt exists, that it persists at least over 3 days, and that our sleep quotas are about the same.
Sallinen et al, 2008, found that one night isn't enough to recover back to normal from sleep deprivation.
Wehr et al, 1993, found that long nights led to longer sleep, over a long duration of time. They did have a short bump to 10 or 11 hours before evening out to about 8, which does support the "sleep debt that fixes quickly". (see fig. 10 here, if you can)
Carskadon and Dement, 1981, agree. One night's rest returns you to baseline. (Dement gave a tech talk at Google a couple years ago; long and not worth watching.
Dinges et al, 1997, show that sleep debt does accumulate, without reaching an asymptote.
Randy Gardner stayed awake for 11 days, slept 14 hours, stayed awake 24 hours, and slept 8 hours and was fine. (okay, sample size of 1. whatever.)

Hmm. The more I read, the more it looks like sleep debt accumulates until you get a chance to sleep it off, and a few days' worth of long sleep cures you. And it's frustratingly unknown what exactly the equation looks like. As for whether we all need the same amount of sleep or not, who knows?

Well, this has been pretty frustrating. Back to your regularly scheduled "actually learning actually useful things" another day, I guess.

Friday, March 11, 2011

This research: now on Twitter.

I think this is not a terrible idea. Follow me on twitter at @dantasse, and you'll get... links to this blog's posts.

Why? So that if someone wants to know what I'm researching without reading long blogs, they can get a title blast in three seconds. And if someone wants to find me and say "I'm researching that too" or "I already did that", they'll have an easy no-pressure way to contact me.

And in the perfect future, when I become a creature of pure idea slinging, I'll be already jacked in to this twitter web. When my colleagues and I are just full of such brilliance that we can only speak in 140 characters because otherwise we'll get too many new ideas to write them all down, we'll have an outlet.

Thursday, March 10, 2011

Biphasic/Segmented sleep

I was rather intrigued/distracted by this the other day.

The hypothesis is: back in the day (up to the industrial revolution), humans used to sleep in two phases. Assuming the sun sets at 8pm and rises at 6am, cavemen would sleep 8pm-midnight, wake up midnight-2am, and sleep 2am-6am. This midnight awake time could be used for reading, praying, sex, or just sitting around.

The Ted talk by Jessa Gamble started this whole thing after a coworker (co-researcher? colleague? these terms all sound so 1800's) sent it to me. (4 min; probably worth watching, for her descriptions of extreme wakefulness in people who tried biphasic sleep)

I went on to read this paper by AR Ekirch in which he gives a lot of evidence for biphasic sleep in premodern times. It's all a bit circumstantial, because they weren't exactly running controlled studies back then. But then a guy named Thomas Wehr ran a study where people were in darkened rooms for 14 hours/day and they started sleeping 8 hours in 2 phases. It got picked up by the NY Times in 1995 and then... forgotten? It's cited (only) 23 times in Google scholar.

Today a search for "biphasic sleep" reveals that it's hit a lot of internet lifestyle-design or primal something or pop-sci blogs, but that they all eventually just cite Wehr and Ekirch. Mary Carskadon doesn't dismiss it, but she hasn't researched it herself. (oh, if you're googling: another term is "segmented sleep.")

Otherwise, it seems to have been lost in history! Mollicone et al 2008 found that split sleep schedules don't positively or negatively affect PVT or subjective sleep scores, but that's about it. Hmm. Gamble is publishing a book about this, but I'm not sure when it's coming out.

My thoughts about this are:
1. I want to study this more!
2. Well, studying the health phenomenon (what happens if you segmented sleep?) is more suited to sleep researchers doing big medical studies. Ugh.
3. However, it'd be sweet if some technology we make could let everyone experiment on themselves.

Thursday, March 3, 2011

Reading machine. Especially about PVT studies.

Been reading a lot of papers. Here is a thing I'd be interested to know: academic folks, when reading academic papers, how fast do you read them? I've done 4 so far today, total of about 55 pages, but there are days I've knocked out 8. I guess it all depends on the paper: some of these are easy reading because they're grounded in reality and not mathy. Probably also depends on how well you need to know it: some papers I skim because I think I won't be able to use it for much, but I just want to get the general idea.

Anyway! What am I reading about? Mostly still "how to tell how awake or sleepy you are." The PVT (Psychomotor Vigilance Test) has caught my attention. It's pretty simple: when you see a signal, press a button. The signal happens randomly every 2-10 seconds for 20 minutes. This tells some measure of "how sleepy" you are.

Here's a long book chapter about it. In short:

- it's easy to learn (after 1-3 trials, you're as good at it as you'll ever be, so no need to worry about learning effects) and easy to do
- it gets a lot of data
- it's reliable within each person
- it reflects some real brain function loss

Why it's interesting to me:
- nowadays, with smart phones, it could potentially be used by an average person to test his/her wakefulness at any time. Indeed, it has been implemented on Palm devices in 2005, and is being implemented at Intel on Android (I'm assuming. Search for "PVT" in that doc. Those look like Nexuses One, no?)
- it measures attention. (for some value of "attention"... hope I'm not totally squashing together meanings of "attention" here.) This sounds like a link between sleep and attention. Because (as I like to say) your attention is your life, that means more sleep = more attention = more life.

Other things:
- self-reported sleepiness has 2 or 3 parts: how tired you feel, and how likely you are to fall asleep. (kinda interesting correlations there: women and young people feel more tired, men and old people are more likely to fall asleep.)
- instead of the SSS, you could try this 13-item "VAS-F" visual self-reported sleepiness test. They showed that it correlates with the SSS and parts of the POMS (mood test), but I didn't see any reason to use it over the SSS, besides hand-wavey "one-item tests are unreliable" arguments. Interestingly, though, they too split this into two parts: fatigue and vigor.

A conclusion that's brewing in my head:
There are roughly 2 things to measure: let's call them the "sleep drive" and the "wake drive". They're different. When I say "how tired are you?" that's a measure of your wake drive. (It's pretty easy to manipulate that one: drink coffee or get surprised. Or get bored.) Your sleep drive is homeostatic and circadian: sleepdrive = time you've been awake * N + sin(time of day). When you try to fall asleep, that's a measure of your sleep drive minus your wake drive. And your wake drive becomes more erratic: now it's on, now it's off.

Just conjecture for now, but it fits pretty nicely with all of these studies. If it's true at all, though, where does that leave us? Can we measure sleep drive AND wake drive quickly on your cell phone? OR: can we assume sleep drive grows according to time of day (and how long you've been awake) and just measure wake drive? Hmm...

EDIT: check it out shut up, here is the coolest PVT paper! Meditation improves your PVT times. Whoa. Not expecting that. Also, experienced meditators in India can sleep a lot less.

Saturday, February 26, 2011

What is enlightenment?

So obviously this blog will alternate real world work with wild speculating. As they say, "Keep my feet on the ground / Keep my head in the clouds."

And speaking of wild speculating, how about we go with "what is enlightenment?" because kind of like "happy" and "good", it's sort of a vague term that we all want.

Okay, so an enlightened guy is some monk who is entirely cool with everything. Fine. He's a guy with a sharply tuned mind who is expertly adept at dealing with the world as it is. How does he get that way?

I propose (and this is not by any means an original proposition) that there are 3 parts: concentration, mindfulness, and compassion. I propose this because in reading about "these sorts of topics", these 3 words keep coming up. (you could also include "attention" and "empathy"; I feel like they're pretty close to, although not the same as, "concentration" and "compassion.") Also, I've heard of people meditating for those 3 things, and I haven't heard of people meditating for anything else.

At any rate, it seems as good a place to start as any. If you are awesome at concentration, mindfulness, and compassion, you're probably pretty enlightened, or (not to put a binary distinction on these things unnecessarily) you probably have a good life. And increasing any one of these factors, even, is a big help.

Well, that cuts down the problem by a factor of about three. I'd say my work's done for the day.

Continuing to be that violent force of light / guaranteed to turn it out bad as dolemite,
Dan

Thursday, February 24, 2011

Measuring how awake you are

It'd be nice if you could have an instant thermometer for "awakeness". Then you could just "take your temperature" a few times a day, average them out, and say "I was 83 awake today" or "I've been only 34 awake for the past week; I ought to sleep more."

One measure we can use is self-report: how awake do you feel? This is nice for people who want to feel more awake. It's not necessarily awesome if you're trying to gauge whether a truck driver should be driving. I'd like to get an objective, as well as a subjective, component to awakeness measurement. So let's see what other people have used to measure awakeness.

First, we should define awakeness. This is surprisingly difficult. It looks like there's subjective feeling of tiredness, sleep propensity (how likely you are to fall asleep), and reaction time, and these three measures are not the same. One paper hypothesizes that there's a "sleep drive" and a "wake drive", and how sleepy you feel is some function of the two. For example, if you haven't slept in a while, but you are excited about something, your sleep drive and wake drive might both be very high. You could be very tired and very awake. (I like this hypothesis; it's kind of like how happy and sad moods are not opposites; you could feel both.)

So I guess I will wave hands a little bit and just point out some things other people have used to measure sleepiness:

Things you can do in a lab:

Multiple Sleep Latency Test (MSLT). You go to a lab and try to nap every 2 hours. They measure how long it takes for you to fall asleep. Normally takes about 7 hours. Here's a big paper (Carskadon and Dement, 1987) about how the MSLT has been used in many studies. I... think it might be a bit impractical for anything I want to do. (I'd add a smiley but this is a serious research blog)
Maintenance of Wakefulness Test (MWT). Same as the MSLT except you have to stay awake instead of fall asleep. Also not really relevant to me.


OSLER test- like a shorter, easier MWT, with less human intervention; you have to hit a button every time a light flashes; when you miss for 21 seconds, it knows you're asleep. Apparently it works pretty well.


Questionnaires:
- Sleep-Wake Activity Inventory (SWAI). Questionnaire, 59 items, takes about 15 minutes, provides 6 subscores: Excessive Daytime Sleepiness, Nocturnal Sleep, Ability to Relax, Energy Level, Social Desirability, and Psychic Distress.
- Epworth Sleepiness Scale (ESS). Questionnaire, 8 items, only a few minutes, asks you to rate how likely you are to fall asleep in a few situations. Probably good for a pre-screening to tell if people have sleep disorders, as shown by this study; it accurately differentiates normal people from people with narcolepsy, sleep apnea, hypersomnia, or PLMD, and almost idiopathic insomnia. (not snoring, though.) They draw a distinction between sleep propensity (how likely you are to fall asleep) and how tired you feel.
- Stanford Sleepiness Scale (SSS). One question, 7 options. Now this is more like it! (here's the paper if I want it later.)
- Karolinska Sleepiness Scale (KSS). One question, 10 options. These are both basically "how awake are you?" and yet, they correlate well with EEG data.

Other:
- Psychomotor Vigilance Task (PVT)- give people an electronic reaction time test. Here's a study that tried to use PVT to replace driving simulators to tell when you're too tired to drive. They found that they measured fatigue pretty well, but they didn't correlate well enough with the driving simulators to replace them. I am interested in this. Perhaps it could be pretty quick.

TODO still: investigate the Optalert device, pupillometry (although not investigate too hard because it involves measuring pupils, so probably not an at-home task)

Journal pay walls: why why oh why?

I think this is a common complaint. But maybe I'm missing something, and someone can fill me in, either on a workaround or a reason behind the problem.

When you're looking for an article in a journal or a conference, like, say, "Measuring Alertness" by Michael I. Posner, you can't freely get the full pdf. You often run into sites like this. If you belong to a university, they often have a subscription to the journal, and you can log in and get your article. If the author was kind enough to post the file elsewhere on the internet, you can find it via Google scholar or something, and then download it directly. Otherwise, you're left with three choices: pay something absurd like $20 for a pdf, subscribe to the journal (in this case, the ever-thrilling "Annals of the New York Academy of Sciences) for an even more outrageous fee, or do without.

I believe, and tell me if I'm wrong, that no human in the history of the earth has ever chosen choices 1 or 2. So the net result is that top-level academic research is limited to those lucky few who have access to a university.

But sending a pdf costs nothing, and because nobody pays, journals aren't making money off of these walls anyway. Journal owners could easily enable all 6 billion of us (or at least the 2 billion who have internet access) to do any kind of research, anytime, anywhere. Wouldn't that be at least a bit of a net positive to the world?

Counterpoint: if they didn't have paywalls, universities wouldn't pay for huge memberships, and journals would go out of business.
Counter-counterpoint: well this is fine too. (what are journals for? so peer-review can happen? why not just let this self-organize?)

Tuesday, February 22, 2011

Some of my personal sleep data

Data from about a month and a half of using WakeMate and How Are You Right Now (with occasional gaps where WakeMate ran out of batteries or had some other problem)


Linear regression between Minutes of sleep last night and Energy today
Energy today = -0.001 * Minutes of sleep last night + 3.320
r=-0.114, p=0.514, stderr=0.001


Linear regression between WakeMate score last night and Energy today
WakeMate score last night = 0.016 * Energy today + 1.693
r=0.235, p=0.175, stderr=0.011



Linear regression between User score and Energy
Energy = 0.019 * User score + 1.978
r=0.652, p=5.300e-05, stderr=0.004


Linear regression between Min to sleep and Energy
Energy = -0.007 * Min to sleep + 2.944
r=-0.153, p=0.379, stderr=0.008


Linear regression between Awakenings and Energy
Energy = -0.021 * Awakenings + 2.950
r=-0.093, p=0.594, stderr=0.039

EDIT: When I just ran the first 2 graphs, I felt pretty crummy, like none of this mattered, and I didn't know why. Then I ran the third (user score vs. energy) and it showed a nice correlation. Hmm.

The 4th and 5th graph show me that I don't have to worry if it's taking me forever to fall asleep, or if I keep getting up; I'm not totally hosed for the next day.

The graph of user score vs. energy, though, is interesting. Some explanation: user score is a value you put into the WakeMate when you wake up; it asks you to rate how you feel, on a slider bar from groggy to refreshed. So I guess it's no surprise that it correlates well with self-reported energy; it's just another data point of self-reported energy. In fact, I probably have often entered that value, then opened up How Are You Right Now and entered another value there, so that'll bias the data a little bit. Let's assume I did that every day, throw out the first value, and see what we get:



Linear regression between User score and Energy
Energy = 0.017 * User score + 2.127
r=0.569, p=0.0007, stderr=0.004

Okay, it's a little weaker (the r value shows how strong the correlation is), but it's still something. So days that I report feeling refreshed when I wake up correlate with days where I report feeling more energetic in general. Well! I wonder what I can do with that. 

Sunday, February 20, 2011

More meta-research, or, Dan's plan for optimal productivity and happiness, take one.

On my research days, I have pretty much complete freedom with my time. (I think it's not quite so complete for real students.) As everyone knows, this is a blessing and a curse.

So I'm trying the following plan:
90 minutes on, 30 minutes off. Call them "cycles" or "work chunks" or whatever. During each cycle, I am only working. And no email. I'm using Workflowy to track my to-do list, and if I need to know what to do, I check my to-do list. During each cycle, there's one 5-minute break if needed; I will usually need it.
Start whenever I wake up and am ready for work.
90 minutes: first cycle, at home
30 minutes: bike to the lab at UW
90 minutes: another cycle; I'll handle email at the last 30 minutes of this cycle.
30 minutes: lunch
90 minutes: another cycle
30 minutes: nap if needed, or slack
90 minutes: last cycle, checking email once more before I go home.

Important points:
- hard focus. No email!
- any work outside of this time is purely "if I feel like it." I want to avoid feeling like I should work all the time. Although if I am inspired to work all the time and I'm having fun, I won't stop.
- I wonder if this is enough. I've heard you shouldn't expect grad school to fit into 9-5. However, 6 hours of hard focus is pretty good; if I can fit those 6 hours in 8 hours instead of 12, maybe I just get more free time. I am emboldened by this post.

A few things about sleep that I've been reading

(I think I'll try to post overviews like this every time I read a bunch of stuff. 3 purposes: help me organize my thoughts and cement them in my brain, help me remember what I was thinking about in the future, and let others know what I'm thinking about. Realize that these overviews will be out of date as soon as I post them. Consider this a snapshot of my Workflowy/mindmap/whatever. And incidentally, I apologize for linking to so many abstracts and paywalls! I wish these things were available freely. Journals and conference proceedings: what a mess.)

Sleep. A few of us at UW are going to work on sleep. We're in the Ubicomp lab, so it'll involve computers. Somehow. Probably.

Our goal is ultimately to help you sleep better. Why? Well, what can you do to be healthier? Eat better, exercise better, and sleep better. Eat and exercise have a lot of research, even in computer science; sleep, not so much.

Okay, but that's about as vague as "we want to cure headaches" or "look, we'll figure out math" or "let's, um, build a boat or something?" Where do we start?

I've started from this wonderful overview by Eun Kyoung Choe (a member of our group) et al, "Opportunities for Computing to Support Healthy Sleep Behavior." Another paper with the same title is due to appear in CHI 2011.

How could we help you sleep better? What does "sleep better" even mean? What's the problem? I think I'll wave my hands a little bit at this point and say "y'know, sleep better!"


One thing you could do is sleep sensing. How do you know if you have sleep apnea or something? It'd be nice to know exactly when you're asleep and awake during the night, and when you're asleep, what stage of sleep you're in.
- The gold standard is called Polysomnography, in which you sleep in a clinic overnight and get EEG (brain), EOG (eye), EMG (muscle), ECG (heart), and other readings. You have to get pretty wired up, you have to sleep in a foreign place, and it's expensive.
- An alternative is the Actigraph, a little wristband that measures your movement during the night; looks like the most official clinical one that's available is still order of $300. Nowadays devices like the WakeMate and FitBit are making this technology cheaper and easier (down to $60).
- There's also the Zeo, which reads... brain waves? They seem a little cagey about what exactly they read, but they've done some research to show that their device compares well to polysomnography.
- The downside with all of the above is that the user has to wear something. People forget, they run out of charge, they lose them, etc. Another approach, which uses load cells (big sensors you put under the bedposts), has been tried by Adami, Pavel, Hayes, and Singer at Oregon Health and Science University. They've met with good success telling when you're in bed, and even whether you're on your back, on your side, or sitting on the edge, but they haven't been focusing on detecting sleep states.
- Another group at UW, Peng, Ling, Sun, and Landis, has used a passive infrared sensor, a heart rate sensor, a video camera, and a microphone to determine sleep states less intrusively. Seems like it works about as well as actigraphy. This is pretty neat from a computer-science point of view, or maybe electrical engineering, because you're dealing with multiple sensors- how do you combine the data to say "you are or are not sleeping now"? That's cool. However, I guess I wonder "if you have to wear a heart rate sensor, why not just wear an actigraph?"
- You could also just ask people how they're sleeping. The Pittsburgh Sleep Quality Index (1988) does just that. Or you could have them fill out the Pittsburgh Sleep Diary. Perhaps the Sleep-Wake Activity Inventory? Naturally, these have the upside that they're easy and cheap to administer, and the downside that they're less accurate.

Ultimately, sleep sensing doesn't interest me as much, because actigraphy seems pretty good. What about, when we know how you're sleeping, how can we help you sleep better? Well, we could prescribe how you should sleep. Or we could let you prescribe it, and help you stick to your goals. The latter sounds better to me, because the former is a lot of work! Let's leave that to the doctors for now.

So it looks to me like there are two main challenges left for us. 1. Help you stick to your goals, and 2. Help you figure out if they're working. I guess solving #2 will help with #1. (If you can tell that your goals are helping you, you're more likely to stick with them. Probably. People are strange creatures.)

As far as #1, helping you stick to your sleep goals, Landry, Pierce, and Isbell have come up with a smart alarm clock that helps you make simple everyday decisions, like "when to wake up"; that could help. I guess that's one of many nifty new alarm clocks out there. I should look into this to see what other persuasive sleep technology exists. Luckily, there's a lot of persuasive technology work being done right at UW; for example, this theoretical paper by Sunny Consolvo, David McDonald, and James Landay. A quick google scholaring for "persuasive sleep technology" is not super fruitful.

And #2, helping you figure out if your sleep changes are working. This goes a step above "sleep sensing"; we have a vague idea of what your ideal sleep night might look like: a few cycles of REM, light, and deep sleep. But ultimately, we don't want someone whose actigraph reading looks nice; we want someone who is full of energy and healthy! How do we know if it's working?

I'm going to propose experience sampling: ask people every couple hours "how energetic do you feel, on a scale of 1-5?" If they constantly report high values, well, that's good enough, right?

This paper gives a little background on experience sampling; most of the downsides are not so relevant anymore, now that we live in the future. This paper too. Basically, it's a pretty well-established methodology, and suffers only from three things: self-report bias, reactivity (by making you think about something a lot, maybe we're changing your perception while we're asking you to report it), and participant attrition (these tend to be pretty long-term studies). Running an experience sampling study to evaluate effectiveness of sleep habit changes seems not completely crazy.

Saturday, February 12, 2011

Meta-research

When I'm still kind of an outsider in academia, I'd like to record things I think about the research world. Mostly so that I can look back later and see what I think now, but also in case there's something I could work to change, or some way I should act to avoid getting caught up in a big groupthink.

I'm spurred by posts like this one. Daniel Lemire says that the following problems exist:
1. People write irrelevant papers because of incentives to publish.
2. Important papers have errors.
3. Nobody ever fixes those papers.
To solve these, he proposes maintaining papers like we maintain open-source projects.

Sounds good. Particularly because the structure of information is moving from static chunks (books, magazine articles) to streams (blogs, podcasts, twitters), and I'm not sure if the research world can change to accommodate this shift.

In the ideal world, there'd be no incentive to publish; you could publish if you want, and if you have something worth publishing. Otherwise (and also), you could keep a blog, and talk about ongoing projects instead of 8-page chunks.

I'd like to stay in this mode. I'd like to keep blogging here as I research, keep a wiki page up to date, and not worry about whether I can publish a particular paper or not. I'll keep you posted (hah!).

Thursday, February 10, 2011

Idea: Only needs and habits cause long-term behavior

Here's an idea I'm kicking around.

What makes you do things every day? (as opposed to one-time things)
- Needs: if something is not right in your life, you will have an incentive to change things.
- Habits: it's what you always do.
- Nothing else.

Habits are obvious. I don't have citations handy, but I'm pretty sure we live most of our lives habitually.

Needs are sort of rare and have to be pretty severe. If I practiced two languages, drawing, working-memory, strength/coordination training, and another bit of meditation for 10 minutes each day, I'd probably be a superhero, for only the cost of an hour each day. But I don't, because there's no need. I've only been able to start doing a couple things, really, and meditation is the biggest, and it took a relatively large crisis of "what is my mind and what am I doing with my life."

Tim Ferriss (and Malcolm Gladwell?) talks about this as "the Harajuku moment" (he knew a guy who, while sitting in fashionable Harajuku, Tokyo, realized "no matter what clothes I buy, I'll always look like hell", and then immediately started to get into shape intensely and successfully). BJ Fogg's behavior model talks about motivation, ability, and triggers. We're talking about things you have the ability to do (sleep more, eat this and not that) so motivation is the biggest issue. But I think I'm disagreeing with him on the types of motivation: I think senses and social issues aren't part of it.

Maybe this is going in circles. I'm pretty sure it's not saying something new; needs more polish. But the point is, I think there are not many reasons to make a behavior change.

Tuesday, February 8, 2011

Today is the first day of the next part of my life.

or, equivalently, "I've been replaced by another me who does research AND work, not just work."

Today I started as a Visiting Researcher with the Ubicomp Lab at the University of Washington.  As I arrived, Prof. Shwetak Patel was explaining to some students how to use this flying styrofoam hovercraft (powered by 4 big fans).  Neat.

If you browse the lab's site, you'll notice that they do a lot of incredible magic.  I'm going to be working on the "help you sleep better" magic.  I will probably play with some EEGs to help you sleep, and if that doesn't work, resort to more prosaic means.

My ultimate goal is "help you live a better life."  I think the best way to do this is to increase your ability to pay attention, be mindful, and concentrate.  However, there are a lot of other things that go into it, and sleeping well is one of them.  Furthermore, I'm not going to solve mindfulness in the 6 months I have to work with these guys, but maybe together we can make some headway on the sleep question.  So hey, seems good as any.  Also, maybe dreams will work their way into this.

At any rate, I'm excited.  The group seems really cool, both brilliant and fun.  And my job half the time is becoming "read about, and do, cool things." I ordered a NeuroSky MindSet today; can't wait till it comes in.