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,

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.

- 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.

- 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


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.