Many of us tend to look at personality traits as either black or white: good or bad, naughty or nice, sweet or sour. However, shades of grey exist when it comes to the origin of these traits. According to a study published in the journal PLOS Computational Biology, some of us are naturally generous and others are less so, due to not only our genetics but our social environment too.

Past research has produced the theory of kin selection, the evolutionary strategy by which animals give up their own reproductive success for the benefit of their community. Worker bees, for example, will give up their lives to promote the welfare of the queen bee — they’ll even commit suicidal attacks on intruders. These behaviors are influenced by genetic polymorphism, or gene variations that lead to different types of members within a population. So, in other words, it’s hard-wired within the bees to be altruistic toward their relatives. In the current study, researchers wanted to see how much of a role genetic polymorphism plays in social interactions. Is it the environment or our genes that make us naughty or nice?

Along with a team of international colleagues, Dr. Sasha Dall, a senior lecturer of mathematical ecology at the University of Exeter in England, sought to develop a mathematical framework that would help to examine social behavior in a range of different species to help explain the evolution of these habits. The research team looked at the genes and social interactions that occurred within colonies of microbes to explore why some of us are generous by nature while others aren’t. This microbial model of social evolution allowed them to gain a better understanding of how much kindness is influenced by genetics versus the people around us.

The findings revealed that our social behavior is often determined by a set of “inherited genetic tendencies” that can predict that trajectory of our relationships. Moreover, it was not just the environment and the experiences that arise from it that predicted how closely we relate to our communities, but also these genetic variations. This is a departure from common belief, which suggests that the knowledge we gain from world events influence our responses and how we act in the future.

In a statement, however, Dall suggested that DNA influences social behavior more than we think.

“[S]ome species rely on inherited instructions on what to do,” she said. “Individuals behave differently according to which specific genetic variants they are born with.” In other words, our ability to be kind despite facing off with someone who is rude is inherited — someone who is rude will most likely remain rude even if they are talking to someone who is kind.

In a similar 2011 study, researchers explored the possible links between genetics and so-called “prosocial” behavior — selfless acts that benefit others. In 46 people, they identified three inherited genetic makeups related to social behavior, GG, AG, and AA, to determine how they relate to social behavior. Those with a GG genotype were more likely to be prosocial, they found, while those with AG or AA were less likely to show compassion or parental sensitivity. They also experienced fewer positive emotions. These findings were confirmed after an experiment showed others perceived those with GG genotypes as more caring, trustworthy, and kind.

GG genotypes make a person more caring because they’re linked to the body’s oxytocin receptors, the 2011 study found. Also known as the “love hormone,” oxytocin promotes trust, love, and social behavior, thus partially explaining why people with these genes are more likely to be kind and interact well with others.

That said, the current study found genes only have some influence on how we act. If we’re born without the GG genotype, it doesn’t mean we’re destined to be apathetic and rude — our environment also plays a part.

Source: Leimar O, Dall S, Hammerstein P et al. Genes as Cues of Relatedness and Social Evolution in Heterogeneous Environments. PLOS Computational Biology. 2016.