AI Watches You Sleep; Knows When You Dream

If you’ve never been a patient at a sleep laboratory, monitoring a person as they sleep is an involved process of wires, sensors, and discomfort. Seeking a better method, MIT researchers — led by [Dina Katabi] and in collaboration with Massachusetts General Hospital — have developed a device that can non-invasively identify the stages of sleep in a patient.

Approximately the size of a laptop and mounted on a wall near the patient, the device measures the minuscule changes in reflected low-power RF signals. The wireless signals are analyzed by a deep neural-network AI and predicts the various sleep stages — light, deep, and REM sleep — of the patient, negating the task of manually combing through the data. Despite the sensitivity of the device, it is able to filter out irrelevant motions and interference, focusing on the breathing and pulse of the patient.

What’s novel here isn’t so much the hardware as it is the processing methodology. The researchers use both convolutional and recurrent neural networks along with what they call an adversarial training regime:

Our training regime involves 3 players: the feature encoder (CNN-RNN), the sleep stage predictor, and the source discriminator. The encoder plays a cooperative game with the predictor to predict sleep stages, and a minimax game against the source discriminator. Our source discriminator deviates from the standard domain-adversarial discriminator in that it takes as input also the predicted distribution of sleep stages in addition to the encoded features. This dependence facilitates accounting for inherent correlations between stages and individuals, which cannot be removed without degrading the performance of the predictive task.

Anyone out there want to give this one a try at home? We’d love to see a HackRF and GNU Radio used to record RF data. The researchers compare the RF to WiFi so repurposing a 2.4 GHz radio to send out repeating uniformed transmissions is a good place to start. Dump it into TensorFlow and report back.

Continue reading “AI Watches You Sleep; Knows When You Dream”

REM Detection Lets You Boss Around Your Dreams

[Michael] has been working on projects involving lucid dreaming for a long time. The recurring problem with most projects of this nature, though, is that they often rely on some sort of headgear or other wearable which can be cumbersome to actually sleep with. He seems to have made some headway on that problem by replacing some of the offending equipment with a small camera that can detect eye movements just as well as other methods.

The idea behind projects like this is that a piece of hardware detects when the user is in REM sleep, and activates some cue which alerts the sleeper to the fact that they’re dreaming (without waking them up). Then, the sleeper can take control of the dream. The new device uses a small camera that dangles in front of an eye, which is close enough to monitor the eye’s movement. It measures the amount of change between each frame, logs the movements throughout the night and plays audio tracks or triggers other hardware when eye movements are detected.

[Michael]’s goal is to eventually communicate from inside of a dream, and has gone a long way to achieving that goal. Now that this device is more comfortable and more reliable, the dream is closer to reality. [Michael] is looking for volunteers to provide sleep logs and run tests, so if you’re interested then check out the project!

Controlling real world objects from your lucid dream for $15

[Kyle Fredericks] tipped us about his first electronics project, a cheap and smart sleep mask that uses a vibration sensor to detect rapid eye movements.

As some of you may know, REM sleep is the part where you dream the most vividly and actively. If some external stimulation (sound, movement) is sent to you at this moment, it may help you take control of your dream by becoming aware of it. If not, your brain will create dream scenarios that incorporate this stimulus.

The interesting part of the concept is that the vibration sensor calibrates itself at the stage 2 sleep, when no eye movement occurs. This later allows a very accurate detection of the REM sleep stage, triggering a shelf stereo. Secondary buttons are even included in the mask sides.

[Kyle Fredericks] went to great lengths to document every step of the project, making it a perfect first step to learn electronics for beginners out there.