5 Steps to Phasing Sleep

At last night's Quantified Self meet-up, Zeo user Esther Dyson presented our very own Personal Sleep Coach. Naturally, with the #QS audience, everyone was curious: "How does Zeo actually work?"

We heard you, and we want to share (and show) the 5 steps that Zeo takes to phase sleep...

Step 1 - Collect Signals

The Zeo headband uses 3 silverized, conductive, fabric sensors to collect the tiny electrical signals naturally produced by your brain, muscle tone and eye movement.

Step 2 - Amplify Signals

The electrical signals collected from Step 1 are very small - typically 5-100 microvolts (which is about 1/100,000 the voltage of a AAA 1.5 V battery). The next step is to amplify these signals using specialized circuitry.

Step 3 - Extract Features

From the "squiggly line" of Step 2, we need to extract specific "features" (e.g. low frequency, high amplitude delta waves that are indicative of deep sleep) using signal processing techniques like a Fast Fourier Transform (FFT). We end up with a bunch of individual "features" that are associated with different phases of sleep.

Step 4 - Add Artificial Intelligence (the secret ingredient)

By comparing the signal "features" from Step 3 to the desired output from our sleep expert, Walter K. (a.k.a. Wally) using a PSG, we end up with a Neural Network which accurately estimates the probability that you are in a certain phase of sleep.

Step 5 - Convert Into Sleep Phases

The Neural Network actually decides what phase of sleep you are in every second of the night, but we smooth out the sleep phases and report the results for every 30 second and 5 minute interval.

Questions?

Now that you know what we've spent the last 6 years developing, refining, then refining some more (along with a website and coaching program)...we'd love to hear your thoughts, questions and comments.  Share your thoughts about Zeo below!

Comments

does this detect sleep apnea?

Derek@Zeo's picture

Hi Carol -

Sleep apnea is most predominantly marked by pauses in breathing or shallow breaths - a visit to your doctor (and a sleep study) is most commonly required to determine whether or not someone has sleep apnea.

Zeo is not a medical device and is not intended for the diagnosis or treatment of sleep disorders (like apnea). If you suspect that you (or someone you know) may have a sleep disorder, consult your physician.

Thanks for posting.
-Derek

Derek@Zeo's picture

Hi David -

Thank you for posting the comment and opening the dialogue.

Let me first say that sleep is different for everyone - some people do best on 7 hours, while others feel like they need 9. The best way to figure out how much sleep you need is to focus on how you feel the next day (which you mention above).

For this reason, the focus should not necessarily be on getting a higher ZQ score. Higher is not always better. You want to optimize what works for you.

Also, it's important that I mention that light sleep is also an important phase of sleep for a restful night. There are certain brainwave patterns that occur during light sleep that scientists have suggested are important for healthy sleep (e.g. Sleep Spindles). Check out Healthy Sleep's page on Sleep Patterns for more information (http://healthysleep.med.harvard.edu/healthy/science/what/sleep-patterns-...).

Keep doing what works for you!

Thanks again for commenting.
-Derek

I find the data to be completely bogus. First of all I'm awake several times throughout the night, probalby 10 or more. and not for just a few seconds. I have chronic insomnia. My ZEO shows me in either REM sleep or Light sleep the entire night, with 0 awakenings and no fluctuactions anywhere. Even when I was awake for like 20 minutes, it showed me as dreaming. It reported only 6% deep sleep which i don't think is accurate either. Am I missing something?

Derek@Zeo's picture

Hi Levi -

I saw that you are a new Zeo user, and that you are currently working with Lauren from customer support to troubleshoot these issues. I am sorry for the trouble you have noticed to-date, and am here if you have any other questions.

Regards,
Derek

Hi Derek,

I have a suggestion for a Zeo improvement.

First let me give some background:

I work a late shift, and routinely go to bed for my "night" of sleep, during the early morning hours of the next day.

The first night I used Zeo, my "Start of Night" was 4:25 am on 5/22/2010. Zeo recorded this "Sleep Date" as 5/21/2010 (which was acurate)

On the second night I used Zeo, my "Start of Night" was 6:30 am on 5/23/2010. Zeo recorded this "Sleep Date" as 5/23/2010 (which was inconsistent with the previous night)

On the third night I used Zeo, my "Start of Night" was 2:30 am on 5/24/2010. Based on previous behavior, I am sure Zeo recorded this "Sleep Date" as 5/23/2010.

So now I cannot upload night 3 without overwriting the data from night 2.

I have only 1 main sleep period per 24 hours, and would like to track EVERY day of data on the website.

I feel that Zeo needs to be updated to be smarter about the "Sleep Date" determination. I would think that any sleep period that starts before noon, should be logged as the previous night's date.

Alternatively, the website could provide an option to correct the Sleep Date associated with a particular set of data, when uploading it.

At the very least, the customer support team should have the ability to change the date on a particular data entry (I tried contacting them already, and was told it is not possible to do).

Thanks,
Becky Smith

Derek@Zeo's picture

Hi Becky -

Thanks for reaching out, and sorry for the trouble with the date stamps on your nights. Customer support is correct that they aren't able to modify the date stamp on individual records, which I know will make it difficult for you to participate in the coaching program. I know that they will be getting in touch with you separately to discuss this issue.

I remember the date stamp debate when we were developing Zeo and, although this won't help, I wanted to give you a little bit of the back story...

The problem begins whenever you try to apply a date to any night of sleep (which is necessary for you to be able to review your data on the bedside display and on the website). In common use, if I say that I slept great on 'Monday night', I'm referring to the block of sleep that ends on Tuesday morning. If I go to sleep at 1am on Tuesday morning, it's technically already Tuesday, but I would still refer to that block of sleep as 'Monday night' and not 'Tuesday morning'.

So we made the decision to make the date cutoff at 6am of every day - that is, if I go to sleep after 6am on 'Monday night' (ie Tuesday morning), it will actually be date stamped as Tuesday. If I make it to bed before 6am (like you did on 2 of your nights), it will be stamped as the previous night's date.

Like I said, I know this doesn't help you out, but I hope it provides a little more color.

Thanks again for reaching out, and please let me know if you have any other questions about Zeo.

Best,
Derek

Thanks Derek,

For now, I will be sure to remove the headband from the dock prior to 6am each night (even if I'm not actually getting into bed until a bit later), in order to ensure that my nights all get date-stamped in a consistent fashion.

It did occur to me that there will likely be some Zeo users with this problem, regardless of what time you choose for the cutoff... However, I can think of a couple of possible solutions for this problem:

1) Allow users to enter their "typical bedtime" into the beside unit (similar to how they program the SmartWake window, or the Snooze period). Dynamically adjust the date-stamp cutoff to be 12 hours opposite of whatever bedtime is entered.

2) Allow users to correct the datestamp during the upload process to the website. While it seems like the date-stamp might be an easier field to correct than most, this could potentially be expanded to include corrections to other data. For example, I've noticed a large number of complaints from users for whom Zeo seems to have trouble differentiating between the REM and waking states. Allowing them to correct fields such as "Time in REM", "Time in Wake", and "Times Woken" might help to alleviate (though not eliminate) this issue for them.

On a side note, I am curious whether Zeo is currently hiring Software Engineers? I have 6 years experience in Embedded SW Development (mainly military applications). During that time, I have also struggled with a number of sleep-related issues (apnea, hypersomnia, insomnia, etc). So I would love the opportunity to work on and help improve a product that has such a huge potential to benefit myself and others like me!

Thanks,
Becky

What phase of sleep typically accompanies sleep apnea? Can Zeo help sleepers note apnea by way of sleep phases?

While I believe that deep sleep and Rem sleep are accurately depicted, light sleep is really not valid. Since Z score is highly dependent on duration of sleep and light sleep contributes greatly to this total this number (z score)becomes inflated and loses credibility. I find early onset of deep sleep to be the most critical factor in the feel of the day. The sum of deep sleep and Rem sleep when equal to or slightly greater than light sleep is the best indicator of quality alertness the next day. Duration of sleep past seven and a half hours then just hypes the z score.

Thanks for the reply. To see the gap you mention in the 30 second data because of artifacts, would it require a substantial portion (or all?) of the 30 seconds to be noisy or do you mask out a band around around artifacts so that a few moments of disturbing the headband, e.g., rolling over with a loose band, will likely lead to a 30 second gap?

I've done the stare at the clock thing... problem is, I start laughing every time my head disappears!

We try to phase sleep whenever we meaningfully can. For each 30 second phase we report on we are looking a bit forward and a bit back for enough information. SO a few seconds rolling around will not lead to gaps in data - but a few minutes likely will.

Ed,
Thanks for the comment - interesting ideas.

1. Artifact
Right now there are two ways to look at the level of artifact - and neither is as accurate as what you are looking for. The first is through gaps in the 5 minute or 30 second (.cvs download from the website) sleep graphs. Those gaps can indicate either artifact or wireless loss (or off the head completely). The second way is to look in real-time at the JEB icon on the Bedside Display. If the head disappears there is artifact. Kind of hard to do while sleeping... but it's interesting to play around with while awake.

2. Wireless
Gaps in the 30 second or 5 minute sleep graph would be the only way to see wireless dropouts over time. The Wireless icon on the Bedside Display would also show you - but you would have to be looking at it (in which case the wireless should work!). Wireless drops may not be an entirely reliable was of determining bathroom trips either - the wireless is often good enough to work through walls - but it wouldn't travel to the other side of the house. So it would depend on how far away your bathroom is...

Best, Ben

Is there a way to find out how frequently Zeo sees artifacts or is in range but not detecting, e.g., poor contact with head (don't know if you can determine that from the data), or number of times the sensor is out of range of the clock? These would be useful to me because it would help me know if I have the band too lose or for some reason am getting unusually high artifact rates. The number of times out-of-range would indicate trips to the bathroom.

Derek@Zeo's picture

Also - check out the Scientific Validations on our website for more information about Zeo's accuracy compared to PSG and Actigraphy.

This comment is in response to a very insightful Zeo user who commented on our Facebook wall (http://bit.ly/88jQDo) and asked: "If someone is awake for 1.5 minutes but then falls back asleep before the 2 minute threshold what state does zeo record for those three 30 second epochs?"

The answer is a bit complicated. As you probably know the brain transitions from state to state rather quickly. In a sleep lab they score little awakenings (micro-arousals) lasting only three seconds! That would be way too much information for Zeo users, as Zeo is designed to give you an overview of your whole night. In addition to these little transitions Zeo has to deal with the noisy bits of signal from its sensors due to movement and other things.

Here's how it works:

1. Zeo calculates a sleep phase every two seconds.

2. Those two second answers are averaged to create a more stable answer every thirty seconds. This interval still has a lot of phase transitions which are unhelpful to Zeo users.

3. So Zeo uses information from the surrounding minutes to make the call. These thirty second intervals were validated in our scientific studies.

4. Now Zeo has to decide what to tell you at the bedside, which displays five minute intervals. The thirty second intervals vote, winner take all.

5. There are exceptions to these rules, for example if one of the intervals was Wake, it trumps the rest.

To answer your question more specifically - what would a 1.5 minute awakening report on the 30 second resolution sleep graph? - It depends...

If we assume a perfect on/off signal for wake (which is not real life - but for this example) we would get something like this (each letter is a 30 second period):
Your Brain : SSSSSSSSWWWSSSSSSSSSS
Zeo Reports: SSSSSSSSSSWWWSSSSSSSS

But a 30 second wake period would get completely smoothed over.
Your Brain : SSSSSSSSWSSSSSSSSSSSS
Zeo Reports: SSSSSSSSSSSSSSSSSSSSS

Now lets consider a more real life situation. You wake up for 1.5 minutes, with some motion artifact mixed in, and some drowsiness falling asleep again, etc. etc.
Your Brain : SSSSSSSSWWWSSSSSSSSSS
Zeo Actually Sees: SSSSSSUUWSUWWSSSSSSSS (U is for unknown when there is too much artifact to report on that period)
Zeo Reports : SSSSSSSSSSSSSSSSSSSSS

So to be completely honest - depending on the exact situation a 1.5 minute awakening could be reported perfectly, strangely (a bit of W here and there in the 30 second sleep graph), or not at all.

The 'two minute rule' is not a rule at all, it's just a generality.

So that brings us back to our answer that Zeo algorithms aren't designed to measure and do not report awakenings under 2 minutes. In reality its more nuanced. The reason that it generally takes two minutes of Wake to be noticed lies in the way step 3 is computed, though we may sometimes report awakenings that are a bit shorter than 2 minutes. It was designed to optimize accuracy in our studies.

I'm teaching an introductory undergrad course on Sleep & Dreams and my students will be using the ZEO for some simple research projects. First, I'd like to confirm my understanding of how the ZEO works so I can discuss it with the class. Here's my understanding: The headband picks up EEG, EOG and EMG activity and sends it to the bedside unit, which then does a Fast Fourier transform to separate the three components of the signal. The output of the transform is then fed into a neural net which has been trained by an expert to identify the 4 stages (W, L, D, R) that you report. Is that generally correct?

A second question...I understand how to export data from your website to a .csv file, and now I'm wondering if I can access something closer to the raw output of either the Fourier Transform or the neural net. I assume something like that is in the .dat file on the memory card.

Any help you can give me on these questions will be greatly appreciated.

Thanks.

Bob F

Wonderful product! Amazing design!
Some suggestions:
I have woken from a dream and noticed that ZEO recorded light sleep at that moment. So obviously, ZEO missed that REM phase. Maybe there should be a calibration feature in zeo. The calibration feature individualizes the neural network of the zeo.
Adding an accelerometer will detect motion and throw out motion artifacts. It will provide the zeo neural network with more data.

I too am a night-shift worker. The fact that ZEO has not taken into consideration that people may have unusual sleep schedules makes me want to avoid purchasing a ZEO. On an unrelated topic, my CPAP also thinks that an end of day is at noon. I also use Outlook and it thinks an end of day is at midnight. I'm sure these issues and more frustrate anyone who works night shifts. Any relief of stress you can give us night shift works is greatly appreciated!

Thanks,
James

Ben@Zeo's picture

James,
We are definitely going to fix this - it's just a matter of time. We are have some crazy polyphasic sleepers use Zeo as well - http://blog.myzeo.com/sleeping-round-the-clock-a-polyphasic-experiment/ - they try to sleep in 4-5 naps across the day instead of once at night. They are yelling about our monophasic/sleep at night perspective too - and some of them have hacked ways to get at the data too. Thanks for your comments and Merry Christmas!

Hi! I was considering buying this product, but I'm concerned about the safety of it, especially because there's a sensor around the head. Is it completely safe? Is there any research that you can show that has tested the safety of this product? Is it at all possible for there to be a link between this product (or the technology that it uses) and brain cancer? Please let me know! Thank you!

Andi@Zeo's picture

No, Zeo does not detect sleep apnea nor can it be used as a substitute for a professional sleep study or professional diagnosis. 

For more on how Zeo differs from a full sleep study, check out this talk by our resident sleep scientist, Steve@Zeohttp://www.youtube.com/zeo#p/a/u/2/jMmCHXSKI9U