Upon seeing a young man hoisting a Hitler salute in 2017, most people likely do not think, “there goes a Rhodes Scholar.” Racists stereotype other people, for the most part, but there are also stereotypes about racists. And the stereotype about racists is that, well, they’re kind of dumb.

But a new study complicates the narrative that only unintelligent people are prejudiced. The paper, published recently in the Journal of Experimental Psychology: General, suggests smart people are actually more at risk of stereotyping others.

The study consisted of a series of experiments, all of which suggested that people who performed better on a test of pattern detection—a measure of cognitive ability—were also quicker to form and apply stereotypes.

First, researchers from New York University showed 271 participants a series of pictures of red, blue, and yellow cartoon aliens with different facial features, paired with a statement of either a nice behavior (“gave another alien a bouquet of flowers”) or a rude one (“spat in another alien’s face”):

Examples of the aliens (Journal of Experimental Psychology: General)

Most of the pairings were random, but two were skewed so that keen observers might pick up on a pattern: 80 percent of the blue aliens were paired with unfriendly behaviors, and 80 percent of the yellow aliens were paired with nice ones. The subjects didn’t know if the statements about the aliens were true or false. In this way, the study tried to mimic how people actually form prejudices about certain groups, like through anecdotes in the media or through portrayals in TV shows.

Later, the subjects were asked to pick which alien had committed a given behavior from a lineup:

Example of an alien lineup (Journal of Experimental Psychology: General)

The participants then took a test called the Raven’s Advanced Progressive Matrices, a pattern-based exam that’s a common measure of human intelligence.

The participants who were better pattern detectors were more likely to make stereotypical errors: They tended to ascribe the friendly behaviors to the wrong yellow alien, and the unfriendly behaviors to the wrong blue alien. Meanwhile, they were less likely to ascribe the behavior to a different-colored alien.

A second study showed similar results, but for measures of implicit bias. That is, smarter participants were quicker to stereotype the aliens in the course of a word-sorting task, even if they didn’t realize they were doing it.

Next, the researchers tried it with human faces, showing a new set of participants a series of computer-generated pictures of men with either wide or narrow nose bridges:

Computer-generated faces (Journal of Experimental Psychology: General)

Here too, 80 percent of the narrow nose-bridge men were paired with friendly behaviors, while 80 percent of the wide nose-bridge men were supposedly unfriendly. The participants were then partnered with a new set of pictures of men for a trust game using fake money. Again, superior pattern detectors gave more money to the characters with narrow nose bridges, suggesting they had learned the stereotype about friendliness and employed it in judging the new men.

These depressing results suggest there’s a downside to being smart—it makes you risk reading too much into a situation and drawing inappropriate conclusions. But there’s hope. In the second part of the study, the researchers showed that while smart people learn and apply stereotypes more eagerly, they also unlearn those stereotypes quickly in the face of new information.

When the smart participants were given new, contradictory information about the nose-bridge men, for example, they stopped lowballing them in the trust game. The worse pattern-detectors, meanwhile, didn’t update their thinking in the same way. The same thing happened when the researchers tried to get the participants to un-learn some gender stereotypes.

Jeopardy champions and post-doctoral students might (reasonably) be a little offended by this study. After all, education is one of the best bulwarks against ignorance we have. Exposure to stories and information that are counter-stereotypical—often the kind of thing you get from schooling—are one of the best ways to beat back racial bias. Indeed, other studies have found just the opposite, that lower intelligence is linked to greater prejudice. In one 2012 study, for example, Americans who scored lower on a measure of abstract reasoning were also more prejudiced against gay people.

According to Geoffrey Wodtke, a sociology professor at the University of Toronto, it could be that, because this study focused on unrealistic stereotypes—about cartoon aliens or computer-drawn men, instead, of, say, real-life groups like gays or immigrants—smart people might have been less careful about suppressing their stereotypical thinking. “It's quite likely that high-ability individuals are ... able to efficiently learn and apply stereotypes in a vacuum but also that they are better attuned to social norms and concerns about not inflaming intergroup conflict,” he said.

When researchers ask “what do you think of African-Americans?” rather than “what do you think of this cartoon alien?” smarter participants might simply be more careful about what they say.

Indeed, Wodtke did one study in which white people with better verbal abilities were less likely to be prejudiced against blacks, more likely to acknowledge racial discrimination, and more likely to support racial equality in principle. But they didn’t put their money where their mouths were: Compared to the less verbally skilled white people, the more eloquent whites were less likely to support school-busing programs or affirmative action.

He also cautioned that “the real world is a lot more complicated than the psychology laboratory.” Historical and social contexts play a major role in most types of real-world stereotyping. Wodtke provided an example via email:

... We know that racist stereotypes about blacks having low intelligence or a poor work ethic, for example, did not come about simply from whites observing the behavior of different racial groups, noting a correlation between skin color and perceived intelligence, and then naively applying these generalizations in novel interactions with blacks. Rather, they emerged because whites colonized and enslaved black populations in pursuit of their economic interests, and in an effort to legitimize these actions both to themselves and the subordinated population, they developed and propagated complex ideologies about, among other things, the intellectual inferiority of blacks.

When I asked Jonathan Freeman, a psychology professor at New York University and a co-author of this current study, about these contradictory findings, he said there might be other factors that predict both higher intelligence and less prejudice overall, like socioeconomic status or exposure to diversity. In that 2012 study, for example, “Individuals who had a greater capacity for abstract reasoning experienced more contact with out-groups, and more contact predicted less prejudice.”

In other words, being smart might put you at a greater risk of prejudice, but you can still fight against those instincts by challenging your thinking and getting to know people who aren’t like you. As Freeman showed, that new information may very well undo the stereotypes you’re prone to forming in the first place.