The United States has the largest incarcerated population in the world, and the costs of that system have quadrupled over 40 years. The imprisonment sprawl has become so unwieldy that many sociologists refer to incarceration as an epidemic. One group of computer scientists decided to put that theory to the test: Does prison time actually spread like contagion?

According to the model they built, the answer is yes. Like the time you spend sneezing on the people around you, researchers at Virginia Tech found that the length of prison sentences impact the likelihood that the friends and family of convicts would do time themselves. The more often a family member was imprisoned, the more likely you would be, too.

The model’s racial disparities closely reflected reality.

“The idea is that you go to jail, and the people who are close to you are profoundly affected, and likely also going to jail,” explains lead researcher Kristian Lum, now a data scientist at DataPad. “It’s not like a cold you caught from them; it’s a little bit of a different mechanism of transmission.”

Major racial disparities in the incarceration rate model (as in real life) also emerged when researchers plugged in the length of prison sentences typically ascribed to black inmates versus white inmates for the same crime. “The only differential cause is sentence length [in the model],” Lum said. “We’re not saying this is the only factor involved with incarceration rates–but it’s likely a large portion.”

The researchers, who were published in the Journal of the Royal Society Interface, don’t have a full answer to explain what the full transmission mechanism for incarceration is, but it could be a couple of things. First, the stress of having someone close to you imprisoned could lead to increased criminality, Lum says. Or, there’s also the very real possibility that once the police are clued in to your activities, they start targeting your friends and family.

In recent years, police departments and sociologists have begun working together to develop sophisticated social networking tools–algorithms that can identify people more vulnerable to crime based on common social relationships. All of this is intended to prevent crime, but if police departments abuse the tool, Lum’s model suggests that incarceration rates will only continue to expand in lopsided, disproportionate ways.

It’s still too early to make prescriptions, and Lum says far more research is needed on the subject. But the model does offer a few suggestions.