 A new algorithm has successfully mapped out part of the brain's circuitry during shock therapy. For those suffering from severe depression, the approach could make for safer and more effective treatment. For brain research at large, it could lead to better ways of untangling noisy neural data to reveal real connections between different focal regions of the brain. Despite the gruesome picture painted by pop culture, modern shock therapy is a mild treatment option. In fact, over two million treatments are administered worldwide every year. Under general anesthesia, patients receive a small amount of current to the brain, triggering a brief seizure. The resulting changes in brain chemistry have been shown to reverse symptoms of mental health conditions like severe depression or bipolar disorder. But the procedure isn't perfect. One of the most troubling side effects is memory loss, a result of poor targeting. To be effective and safe, induced seizures should be restricted to the prefrontal cortex. But because the brain is an impossibly complex system of hard-wired organic matter, it isn't always clear what areas are affected as seizures spread. The research team tackled this problem using an algorithm known as the Kalman filter. This algorithm anticipates where a system in one state will be in another, future state under a mess of uncertain conditions. It's how engineers teach robots how to navigate unknown terrain using imperfect information like GPS data. Here, the goal was to predict the trajectory of neural activity during shock therapy using only EEG readings. For an electrode design recently developed for therapy, the algorithm predicted a pathway directed from the front to the center of the brain, a clinically expected outcome that until now has not been verified directly. This result is important for two reasons. First, for shock therapy, it appears to confirm that seizures induced by the recent design spread through the brain as intended. That means the algorithm could one day be used to study how even more targeted seizures are induced with newer electrode designs. And second, for brain research, the result demonstrates how EEG recordings can be used to predict the flow of neural activity within focal areas. This is remarkable because although EEG depicts ongoing activity in real time, it accesses only a small swath of the brain areas involved in a seizure and therefore paints an incomplete picture. It's like sketching the plot of a ballet by watching only the key dancers through a peephole. The developed algorithm, appropriately dubbed blind identification for brain modules, can, under mild assumptions, fill in the gaps and construct a detailed mathematical model of the neural-electrical activity from focal EEG recordings. For many neuroscience applications, this gap filling can help researchers understand emerging electrical activity in focal brain areas or subnetworks and forgo the virtually impossible task of recording activity from all connected areas. Further testing under different clinical conditions and for larger swaths of the brain is needed to refine the picture of neural activity this method provides. But the findings are promising. For the millions of patients who undergo therapy each year, they could lead to much needed relief for depression symptoms that defy normal treatment. For researchers, the novel tool could help explain activity under a wide range of brain conditions, such as sleep and anesthesia, using the tiny window that EEG provides into real-time brain dynamics.