Hard childhoods seem to not only rob children of material joys, but also of brain power. Children who grow up poor tend to score worse on tests of memory, processing speed, language, and attention. And they are 40 percent more likely to have a learning disability than their better-off peers.

Busier and less-educated parents utter millions fewer words to their babies, creating a gap in verbal ability by the time the children are 3. Factors like hunger, unsafe housing, and parental instability all contribute to “toxic stress” that impairs brain development. As a result, poor children tend to have less gray matter in areas of the brain critical to learning and memory, which explains as much as 20 percent of the gap in test scores between poor and middle-class kids. In adulthood, this can manifest as trouble planning ahead: In many studies, lower-income people say they’d prefer a smaller financial reward today, rather than a larger one later.

But a new line of research complicates the idea that worse childhoods necessarily lead to worse thinking ability. Instead, the chaos of early adversity might prompt some kids’ brains to adapt—sometimes in ways that make them better at certain types of reasoning than people with more privileged upbringings.

In one study, published in 2015 in the Journal of Personality and Social Psychology, researchers asked several groups of participants how chaotic their childhoods were, based on measures like, “I had a hard time knowing what my parent(s) or other people in my house were going to say or do from day-to-day.” They then reminded participants about tough economic times by having them read a fake New York Times article about the recession. Next, they had them perform a task that measure their inhibition, or self control, by requiring them to not look at a flashing, yellow box. Finally, the researchers asked the participants to play a game that would measure their ability to shift quickly between tasks by categorizing shapes according to rapidly changing rules.

Across four experiments, the researchers found that when primed with economic uncertainty, people with unpredictable childhoods performed worse on the inhibition task than those from stable ones, but they did better at the attention-shifting task.

Chiraag Mittal, a professor at Texas A&M University and lead author of the study, explained that in uncertain environments, ignoring a potential threat can be deadly—thus, the subjects who had hard knocks earlier in life might have been skilled at keeping an eye on the periphery. “In an uncertain environment, where you don’t know where the next negative thing can happen, you want to be vigilant,” he said. “In a bad environment, you want to look at the light, because you want to know what it is.” And task-shifting might have behooved kids who had to, say, quickly adjust to new adults living in the house or to capitalize on fleeting and rare opportunities.

“We have been documenting deficits in children from high-stress backgrounds forever,” said Bruce Ellis, a psychology professor at the University of Utah, who was not involved with the study. “We fill libraries with all the things that are wrong with them. But this paper was the first systematic attempt to understand what was right with them.”

Switching between tasks isn’t the only cognitive enhancement that a difficult childhood can bring about. In a forthcoming paper in the Perspectives on Psychological Science, a team of researchers led by Ellis reviewed a number of studies that found boosts in various types of thinking among people from harsh or unstable backgrounds.

In one study, children of divorce remembered more early-childhood events; people whose parents were more verbally aggressive were better able to recognize emotions. “When you grow up in low-socioeconomic conditions,” Ellis explained, “there are other people around you who are more powerful than you and have more power than you, in ways that people from middle-class backgrounds don’t experience. In that context, being able to predict what they’re going to do could be very important.”

People who suffer trauma seem especially skilled at remembering it—perhaps a strategy aimed at avoiding trouble in the future. In one paper, kids who were abused could later remember the doctor who performed their Child-Protective-Services exam from a lineup, but they were worse than average at recognizing people they had interacted with positively. Poor adults performed worse on tasks that required working memory, but better on those that involved so-called “procedural learning”—more muscle-memory skills like driving a stick-shift.

“We’re not arguing that stress is good, or that it’s good for kids to grow up in poverty or under harsh conditions,” Ellis said. “What we’re arguing is that [the detrimental effects of stress] are real, and that’s half the story.”

It’s also important to note that this research is still in its infancy, and is far from conclusive. For example, Mittal’s study on shifting and inhibition found that childhood income—as opposed to stability—made no difference, and the study failed to produce an effect without the reminder about economic hardship. (Mittal said one possibility is that this task-switching skill is heightened when people are in a familiar, uncertain environment.) Still, it’s premature to suggest that all disadvantaged kids think a certain way.

But if these cognitive enhancements bear out in future research, it might be a reason for schools in low-income areas to consider tweaking their curricula to play to their students’ abilities. Traditional interventions, Ellis says, focus on making stressed kids more like their unstressed, middle-class peers. “They come in with an assumption that they’re broken and need to be fixed,” he said.

Instead, schools could try new approaches, like letting these kids move around and talk during class. That would put them in the type of chaotic environment they’re used to, with the goal of letting their hidden strengths shine through.