When you’re shopping for a new pair of headphones one of the best features to have is noise-canceling technology. Drowning out the random noises around you lets you really sink into the music, or whatever else you’re listening to, but a new study suggests that the brain actually has some pretty fancy noise-canceling power of its own.

The research, which was published in Nature, was conducted by researchers at Duke University. Using a number of different experiments, the team was able to demonstrate that even the tiny brains of mice have incredible noise-canceling capabilities tied to a system that predicts auditory feedback before it even happens.

“What’s special about this cancellation process is that the brain learns to turn off responses to predictable self-generated sounds,” Richard Mooney, a professor of neurobiology at Duke, said in a statement. “You can watch as these responses disappear as a function of time and experience.”

To test how this build-in noise management system works, the team built a “virtual reality” system for their tiny test subjects. First, they trained the mice to expect a specific sound to play whenever they walked. The brains of the mice began to expect that sound to occur each time a step was taken, and when the researchers monitored the communication between the areas of the brain managing movement and auditory feedback, they spotted the specific signals being sent to cancel out this noise.

The mouse was hearing the noise — the sound was entering its ears — but it was being ignored by the brain due to the signals canceling each other out. It was canceling out the noise ahead of time so that the mouse could listen for more important sounds.

While the experiments were conducted with mice, the same kind of noise-canceling ability is present in other animals as well, including humans. We know this because we can easily differentiate the sound of our own footsteps from other sounds nearby. The sounds that we make are typically canceled out so that we can hear more important sounds, such as those that might signal danger.

““We would have a hard time operating in the natural world, if we couldn’t predict the sensory consequences of moving around in it,” Mooney notes.