Last fall, Emile Bruneau, a cognitive neuroscientist from M.I.T., was in Budapest running a series of behavioral experiments designed to measure anti-Roma bias in a cohort of Hungarian schoolteachers. Anti-Roma bias is rampant in schools throughout Central and Eastern Europe; in many countries, including Hungary, it takes the form of full-blown segregation. Bruneau wanted to see if he could not only quantify this bias, but also break it down into its constituent parts, and from there, figure out how to alleviate it.

Here’s how the experiment would work:

Each teacher would be made to sit in front a computer screen and communicate with a student whom they believed was in another room, completing a numbers and logic quiz as part of a study of online learning habits. The teachers would have the option of giving positive, neutral or negative feedback at various intervals throughout the quiz. The “students” were really actors—some of them Roma and some of them non-Roma—that Emile’s team had pre-recorded assuming different postures (attentive, bored, frustrated, pleased and so on). The hypothesis was that the teachers who tested as more overtly biased on psychological assessments, which Bruneau had administered on a previous visit, would be more inclined to give negative feedback and less inclined to praise or encourage the Roma students.

Bruneau wanted to keep the true intentions of the study hidden from the teachers so as not to trigger any feigned responses. “We want them to believe that these are real students that they’re interacting with, students who are sitting at a similar computer screen in a nearby building,” he told his research assistants. “So just think of things you would do if that were true. You’d maybe text the person in that other room, or wait to hear from them before hitting the start button.”

Because here’s the thing about racial prejudice: while most people would agree that it’s a root cause of racial inequality, few would cop to being guilty of it themselves. We live on a planet rife with ethnic tension; racial prejudice is both the loud and conspicuous engine driving that tension, and the elusive ghost inside the machine. It is everywhere and nowhere at once. And it’s not just the gap between what we think and what we say that trips us up. It’s the gap between what we think and what we think we think. Discrepancies between our conscious and subconscious impede our capacity for impartial judgment and our ability to recognize that impediment, even when it’s smacking us in the face.

Behavioral experiments like the one Bruneau was conducting are just one way to circumvent this paradox. As crude as they sometimes sound, they can be eerily prescient. For example, in one 2005 study, 50 police officers were presented with a photograph of a man holding either a gun or a cell phone, and forced to decide very quickly whether to shoot (in case of a gun) or withhold fire (in case of a cell phone). The officers were more likely to mistakenly shoot unarmed black suspects than unarmed white suspects (although the bias went away after extensive training).

Neuroimaging studies have also demonstrated clear differences in how our brains respond to people whose ethnicity differs from our own. For example, activity in the amygdala, a region associated with fear and threat detection, is routinely found to be higher in white subjects when they view black faces than it is when they view white ones. Likewise, in a 2009 study, when white participants watched a white hand being pierced by a needle, motor activity in the observer’s hand was suppressed as if they had been pricked themselves. This didn’t happen when watching black hands get pricked.

A third tool researchers can use to probe the subconscious is the IAT, or implicit association test (sometimes referred to as the “racist test”). It measures exactly what its name suggests: subconscious associations that people make between various images and concepts. It does this by comparing how long a person takes to match certain words and images to one another. A person might readily link the word “safe” with a white face, for example, but take longer to link it to a black face. That difference in time is seen as a reliable measure of unconscious bias because it takes more time to link words and images that the mind deems incompatible.

There are several permutations of the IAT, each one measuring a different strain of racial bias: the extent to which we subscribe to stereotypes, for example, or the extent to which we attribute (or fail to attribute) human-specific emotions to different racial groups. Bruneau administered several different tests like these to his teachers in Budapest before beginning the anti-Roma bias experiment. After the experiment, he would compare the results of both exams to see which aspects of racial bias—stereotyping, dehumanization, or affect (the amount of warmth we feel towards members of a given racial group)—were most predictive of the teachers’ treatment of Roma students, and of their support for school segregation in general.

“What we hope to have at the end is a validated anti-Roma bias battery,” he said. “And then we can use that to decide which aspects of bias we should target in the intervention phase.”

I observed Bruneau’s experiment first hand. It was quiet. A few research assistants milled about while a teacher—a young woman with short brown hair, in jeans and a soft blue shirt—sat in front of a computer console completing what she believed was a study of online learning habits. I wondered if she suspected the true aim of the study, and how she would react if it were suddenly revealed to her. She did not look racist. I guess nobody does. I guess that’s the point.

Afterwards, I grabbed coffee with Hannah Szekeres, Bruneau’s research assistant. Szekeres was a Hungarian Jew; she had grown up in Budapest and was now living in Tel Aviv and pursuing a Ph.D. in social psychology. She had returned to her native city to run the teacher study for Bruneau, and between that and the latest round of violence in Gaza, she had been thinking almost nonstop about inter-group conflict and racial prejudice.

We got to comparing the U.S. to Israel to Hungary. Ferguson, Missouri was tipping into chaos just then. It would be a few months before the grand jury issued its decision not to indict Darren Wilson, the white police officer responsible for the shooting death of Michael Brown, an unarmed black teenager, but riots had already broken out. As I told Szekeres, my Facebook feed had been flooded with reactions of every caliber: lots of outrage and solidarity with the black community, but also plenty of white people insisting that the shooting had nothing to do with race. He robbed a convenience store then ran from police, the argument went. He brought it on himself. I told her I was shocked that anyone could fail to see the role racial bias was playing in their own thinking.

“That’s nothing,” she said. “Here, even the liberals will compare the Roma to animals.” The way Szekeres sees it, there are three types of people: those who are openly prejudiced, those who insist that they hold all groups as equal, and those who understood that we all harbor biases—some conscious, some subconscious—and that what matters is how we deal with them. She hoped that the study would help pull more people into this third group, and that over time, that shift in thinking would lead to real change. “It’s really great and important for the Roma to have equal access to education,” she said. “But that doesn’t solve the whole problem because once they are educated, they still have to deal with the majority’s perception of them.”

It was too soon to guess at the results of the teacher experiment, but Szerkeres had had some interesting exchanges with the subjects. “We asked this one very nice girl if she thought the education profile was Roma,” she told me. “She said, ‘Oh, you mean because the score was so low? Yeah, I thought so.’ And then we asked her at the end if she thought she would have rated the student differently if the students were Roma vs. non-Roma, and she said no immediately.”

They all said no to that question, Szekeres told me. Without even thinking about it.

Reporting for this post was supported by the Pulitzer Center on Crisis Reporting.