IMAGINE HAVING AN ELECTRICAL DEVICE the size of a grain of rice implanted in your body. The device connects to precisely selected nerves and reads and analyzes the electrical signals they send. If the device detects an aberrant signal—say, one that causes an overproduction of tumor necrosis factor (TNF), a chemical implicated in rheumatoid arthritis—the device kicks in, responding with a carefully calibrated electrical code of its own that puts the brakes on TNF. Voilà! Your arthritis—or perhaps your asthma, hypertension or one of many other conditions that may respond to electrical stimulation—is relieved or cured, automatically, without drugs.

That is the vision of what some people call bioelectronics and others describe as electroceuticals—a reference to the notion that it could take the place of some drug treatments. By whatever name, it may represent a great leap forward in a field of therapy known as neuromodulation.

The promise of this new field is that technology might succeed where biology fails—that it could be possible to override the body’s electrical communications when they malfunction. And though the kind of precision treatment described above is still some ways off, the underlying science is very real.

It’s not an entirely new idea. Implanted pacemakers, used in humans for more than four decades, monitor electrical signals from cardiac muscles, and when they detect an irregular heart rhythm, they use electrical stimulation to fix it. And for the past 20 years or so, deep-brain stimulation devices—akin to pacemakers for the brain—have been used to treat Parkinson’s disease, dystonia and obsessive-compulsive disorder, among other problems.

Also related are cochlear implants and retinal prosthetics that take electrical data collected by the devices’ sensors and translate it into sound and sight recognizable by a wearer’s nervous system. Next-generation neuromodulation devices to treat arthritis, incontinence, hypertension and diabetes are in clinical trials or have already been approved for sale in the U.S.

But now the pace of research is quickening. Breakthroughs in imaging technology and materials science along with a flurry of well-funded public and private initiatives, are spurring on researchers in a range of medical and nonmedical specialties—engineers, surgeons, biologists, materials scientists. Federal agencies, academic institutions and private companies including GE and Google are exploring the possibilities. Even GlaxoSmithKline—which as one of the world’s largest pharmaceutical companies has a vested interest in treating disease through more traditional pathways—is hedging its bets. The company has launched a $50 million bioelectronics venture capital fund, sponsored a $1 million bioelectronics challenge prize and earmarked up to $5 million for seed funding of promising technology.

Yet even amid this growing interest, the practical hurdles are imposing. Researchers need better, more detailed maps of neural networks throughout the body to help them know where to intercede, and they need to come up with the right electrical signaling patterns to correct problems. They’ll also have to perfect the hardware, creating ever smaller, multitasking devices that can read as well as deliver electrical stimulation. These areas tend to spill over into one another, with mapping, for example, proceeding in parallel with experiments in signaling. But progress on all of these fronts will be needed to thrust neuromodulation into the mainstream of medical therapies.

SOME OF THE MOST EXCITING WORK in neuromodulation today focuses on the vagus nerve, a kind of massive cable containing a tangle of some 100,000 nerve fibers that split off to connect with many organs. The vagus nerve plays a role in speech, sweating, maintaining the heart rate and controlling the peristalsis that moves food through the digestive system, among many other bodily functions. Because the nerve is also relatively accessible for the surgical procedures needed to implant devices—the nerve runs through the neck, just beneath the carotid artery—it has been involved in many early neuromodulation therapies.

The vagus nerve is part of the peripheral nervous system, which has many branches and sub-branches. It contains nerves that enable us to perform voluntary actions—like plucking a guitar string to produce a particular sound. It also includes a vast network of involuntary nerves that together act as a sort of autopilot for the body. This autonomic nervous system keeps organs functioning within an ideal range by transmitting real-time data on organ status to the brain, which sends back instructions via electrical signals. At the nerve endings, those messages trigger the release of chemical neurotransmitters, which change how an organ behaves—for example, by telling it to speed up metabolism. You don’t have to ask your heart to beat faster when you run or tell your stomach to start digesting your lunch—the autonomous nervous system takes care of that.

Except when it doesn’t. Much of the current research on neuromodulation attempts to pinpoint exactly where signals go awry.

In the case of the vagus nerve, the latest work continues what began in the 1970s in animal research, says Brian Litt, a professor of neurology, neurosurgery and bioengineering at the University of Pennsylvania. That led to human applications that have included treatment of epilepsy and depression. What’s new, Litt says, is the interest in going beyond treating nervous system disorders to addressing problems such as asthma and high blood pressure—and, most recently, immune system problems.

For example, Kevin Tracey, a neurosurgeon at the North Shore-LIJ Health System in Manhasset, N.Y., who discovered an anti-inflammatory pathway controlled through the vagus nerve, and Shaw Warren, a sepsis researcher at Massachusetts General Hospital in Boston, co-founded a company called SetPoint Medical to develop a vagus-nerve-stimulating device for treating inflammatory autoimmune diseases, including rheumatoid arthritis.

The device, now in human clinical trials, attaches to the vagus nerve and sends signals to the spleen, which manufactures tumor necrosis factor. “Broadly speaking, your body is controlled by balance and counterbalance,” says Warren. “Chemicals such as adrenaline speed things up; then there are pathways that act as brakes and may be affected by vagus nerve reactions.” Maybe the problem in rheumatoid arthritis is there’s too little braking. “We’re trying to bypass the brain and control that through deliberate electrical means,” Warren says.

While the goal in such therapies is to be as precise as possible, science is still far from being able to stimulate individual nerve fibers. “In the long run, we need to get more targeted,” says Kristoffer Famm, who heads GlaxoSmithKline’s bioelectronics program. “If we want to affect lung function, for example, we need to find the pulmonary branch of the vagus—and then identify nerves close to the action so we can address one function of the organ without affecting the rest of the system.”

IN ANOTHER EFFORT TO FIND and explore specific neural neighborhoods, Warren Grill, a professor of biomedical engineering at Duke University, is working on electrical stimulation to treat urinary incontinence. That starts with understanding the changes in neural signaling that take place during bladder filling and emptying, both in healthy and overactive bladders.

Grill records those signals, primarily in rats, using two basic methods to get a range of perspectives. The first is to place a cuff electrode around pelvic, hypogastric or pudendal nerves, all thought to be involved in bladder regulation. That electrode captures all of the activity in the nerve. “It’s like listening to the entire orchestra at once,” Grill says. To complement that aggregate signal, Grill also uses novel probes developed by Tim Gardner, an assistant professor of biology at Boston University, which let him record activity from single nerve fibers. “That’s like listening to just the first piccolo or the third trumpet,” Grill says. “We can record up to 16 channels simultaneously.” Ultimately, he hopes to translate this research into a closed-loop device that provides more effective, dynamic relief for patients than they get from current open-loop systems. (Closed-loop systems can both read and send electrical signals automatically.)

Meanwhile, research by Grill and others is helping create more comprehensive maps of the peripheral nervous system. Kip Ludwig, program director for neural engineering at the National Institute of Neurological Disorders and Stroke, is a bioengineer who led the development of and now advises the SPARC program—an acronym for “stimulating peripheral activity to relieve conditions.” This long-term project, launched in June 2014, aims to compile all the data from previous and ongoing research in mapping peripheral neural networks.

“As it is now, you may guess that if you stimulate a particular nerve you’ll cause something to happen that you want to happen,” says Ludwig. “But even if you get the effect you want, it’s hard to design better therapies without having more specificity about your targets.” His approach, Ludwig says, is to look at the body organ by organ, to see how electrical signals create changes in each one. That work, combined with research from other scientists, may eventually reveal the functional electrical inputs and outputs of all of the body’s organ systems—a potentially invaluable schematic showing where to connect neuromodulation devices to achieve particular effects.

BUT AS IMPORTANT as it is to know what’s happening in all of the organs, the brain is the body’s literal nerve center, home to some 100 billion neurons. Trying to understand not just what connects to what in the brain, but also when and why, is “about as complex an effort as you can imagine,” says Emad Eskandar, an attending neurosurgeon at MGH. His lab recently received a $30 million grant to develop a miniature closed-loop deep-brain stimulator to treat psychiatric disorders. “Connectivity has to do with understanding what connects to what—as in the connectome. With neuropsychiatric disorders, we also need to understand the dynamics of these connections and how they change over time.”

More than 100,000 people have had deep-brain stimulation devices implanted to treat Parkinson’s disorders. “That works because the circuitry of Parkinson’s is very well understood,” says Eskandar. Teasing out the interplay of different parts of the brain involved in more complex conditions—epilepsy, depression and post-traumatic stress disorder, among others—is much tougher. His lab uses noninvasive tools such as functional magnetic resonance imaging, or fMRI, which looks at blood flow in the brain, and magnetoencephalography, which records magnetic fields produced by the brain’s electrical currents. The lab also makes direct recordings of neural activity via implanted electrodes in humans and animals.

By comparing healthy control subjects with neuropsychiatric patients, Eskandar and other researchers have found parts of the brain that they know or suspect are related to such disorders as PTSD, depression and drug addiction. “The question is,” says Eskandar, “can we use signals from the brain to guide or optimize stimulation and restore normal function?” His goal is to take information from the brain, decode what underlies a particular psychiatric state, and then figure out a way to monitor and regulate that in a closed-loop system.

Litt and his colleagues at the University of Pennsylvania have spent years devising better ways to determine what happens, electrically, in epilepsy. More than a third of the 3 million people affected by the condition don’t respond to antiseizure medications. But attempts to design effective neuromodulation treatments have been hampered because researchers have had only an indistinct picture of the brain signals that precipitate seizures. “Our understanding was governed by the sensors we have used,” Litt says. Those included rudimentary scalp electrodes, which hadn’t changed much since the 1960s, and newer sensors, which give a more detailed, but still very limited, view.

Jonathan Viventi, now an assistant professor of biomedical engineering at Duke University and previously a graduate student in Litt’s lab, helped to develop that much needed tool: a super-flexible electrode array that gives a far more nuanced view of brain activity. “Existing devices used metal contacts connected by wires to external electronics some distance away,” says Viventi. “That design basically forces trade-offs. You can get dense sampling of a small area, or you can coarsely sample a larger area. But you can only have about 100 wires total coming out, which limits the number of sensors that can be used.”

Viventi utilized technology developed in 2003 by materials scientist John A. Rogers and his research group at the University of Illinois. Rogers’ group had come up with a way to print transistors on a sheet of silicon just a few hundred nanometers thick (a nanometer is one billionth of a meter). The sheet can fold to conform to the convoluted shapes of the brain, and it allows tens of thousands of sensors to be connected with the same number of wires that previously would have accommodated just 100. These highly flexible arrays have helped Litt and others create detailed maps of seizures, which appear as spiral patterns on the brain, that could aid in guiding future treatment.

And while the device now only records brain activity, Viventi and Rogers are working together to adapt it so that it can also stimulate neurons—to suppress seizures, not just to document them. In addition to improving epilepsy treatment, the new neural interface could speed the development of artificial limbs capable of translating subtle brain signals into precise movements or improve the resolution of sound and sight in people with cochlear and retinal implants.

For scientists on the cutting edge of neuromodulation, “the holy grail is to speak the language of the nerves,” says Kristoffer Famm of GlaxoSmithKline. To that end, Duke’s Warren Grill is working to fine-tune the messages transmitted to the brain to treat Parkinson’s disorders. “When you think about programming an electrical dose for deep-brain stimulation, you normally consider amplitude, duration and the pulse-repetition rate, or frequency,” Grill says. “Think of the clinician having three knobs to tune. We add a new knob—temporal patterns of stimulation. Not just delivering a standard 50 pulses per second and 20 milliseconds between each pulse, but being able to vary the timing between pulses, to create lots of combinations.”

Grill and his team tested various arrangements of “beats” or neural pulses in a virtual brain, a computer model of the basal ganglia, which is a part of the brain associated with voluntary movement. They optimized the patterns using an engineering technique called a genetic algorithm, a kind of machine learning that “evolved” successful stimulation patterns, Grill says. They then conducted tests in animals, and are now working with human subjects, using different patterns of stimulation to try to improve efficiency and effectiveness.

“The nervous system doesn’t sync with just fixed frequencies,” he says. “You can make an analogy to Morse code—the nervous system has its own dots, dashes and other kinds of signals.” Irregular patterns of stimulation might be a more natural way to communicate, not just in the brain but throughout the body, too, Grill says.

FOR NOW, most neurostimulation devices still follow the classic pacemaker style that has been around for decades—there’s a metal “can,” containing a power source and computer, that is often placed in the chest and has wire leads reaching out to a target nerve or brain region. Famm wants to get beyond that, perhaps with small, flexible devices that combine sensing, signal processing and stimulation and could be wrapped around the specific nerve bundle they’re meant to control.

Yet even aside from the challenge of creating such devices, there’s the matter of inserting them into parts of the body that are much less accessible than the vagus nerve. In one attempt to solve that problem, Litt’s lab is partnering with the University of Pennsylvania nanotechnology department to develop technology for implantable devices that can sense and affect a nerve without actually having to cut into it. Another technology, transcranial magnetic stimulation, or TCMS, could eventually make it possible to stimulate specific neural circuits deep in the brain remotely, without any surgical procedure.

In the more distant future, Ludwig says, it’s conceivable that single-purpose devices could evolve into watchdogs over broad sections of your body, automatically monitoring and modulating the functions of multiple organs. “As the technology develops, there are places in the body where you could have thousands of ultrasmall stimulating and coordinating electrodes, but that’s going to take a while,” he says.

Getting most people to accept the idea of being wired with electronics to manage, say, asthma or hypertension is also likely to be a gradual process. “People view swallowing a pill as somehow being a noninvasive option to treat disease,” says Grill says. “But I can’t imagine a more invasive treatment than a chemical that goes to influence every cell in your body. And while implanting an electrode on a single branch of a single nerve means cutting a hole in the body, the therapy itself is much less invasive.”

“It takes 15 years to get the full benefits of a drug discovery program,” says Famm. “We’re investing with that in mind. We believe that in 10 to 20 years, the nervous system as a mechanism for treating chronic disease will be opened up, and we want to be at the forefront of that.”