There are many benefits to a good nap—improvements to your mood, performance, and memory among them. As a bonus, you could also wake up a bit less racist and sexist.

A paper just published in Science argues that people can be trained to replace negative social stereotypes with positive ones while they sleep—perhaps offering a way to attack prejudices at the hard-to-reach subconscious level.

While sleeping, the brain gets on with critical activities such as transferring memories to long-term deposits, clearing the waste produced by neurons, and generalizing the skills we learn.

It was the last of these activities that most interested Ken Paller, who leads a research group at Northwestern University that has been developing a technique to help you learn while you sleep. All it involves is playing a distinctive sound. (Quartz has reached out to Paller for comment and will update this post with any response.)

Because your consciousness is not meddling while sleeping, the brain is able to integrate information stored in different parts of the brain and turn them into more stable processes. And it does this by repeatedly reactivating those regions of the brain. Paller started looking into how to hack this process.

His hack involved using an auditory cue to reactivate certain memories during sleep. In past experiments, he has taught subjects to remember where objects were hidden and how to play back a quickly learned tune, both through sounds played while the subjects were sleeping.

A similar technique was used by researchers at University of Zurich in 2014 to show that Swiss German speakers could use sleep to remember more Dutch words. And sounds are not the only way to trigger learning: A 2011 study showed that using an odor as a cue can also improve learning.

Attacking prejudices

Now Paller has taken this technique a step further to help humans unlearn racial and gender biases. To do this, he recruited 40 white people from a “university community.”

First, he recorded these participants’ racial and gender biases using a standard test. This involves finding out how positive and negative words are unconsciously linked to particular racial or gender group.

Next, he set up a training program designed to reduce gender and racial bias, in which participants were expected to respond to certain image and word pairings. Only when the pairings ran counter to a prevalent sexual or racial stereotype—for example, “woman” and “science”; or “black” and “good”—Paller played distinctive sounds for each of those categories. The participants then took a 90-minute nap. During this they were randomly played one of the distinctive sounds.

P.Huey/Science

Paller’s results show that participants who heard the right sound were less biased towards black people or women. The effect was consistent both after the nap and a week later.

There are caveats. All of Paller’s research so far has involved a relatively small sample of participants. It’s unclear whether the results would be consistent if the trial were expanded. Also, the participants involved were all white and came from a university environment. Subjects with different backgrounds may not show the same effect. Finally, Paller only followed up with patients for a week, so the longevity of the effect is unclear.

Nevertheless, these results are worthy of attention. Social biases are very harmful to the society. They are also deeply held, often subconscious, and difficult to overcome. Any approach that attacks the root of the problem might help accelerate progress to a more egalitarian society.

Of course, the technique could in theory also be used to do the exact opposite: brainwash people into believing in things that actively harm society.