It may be a survival mechanism that's come back to bite us on the bum, but human beings are born to love sweets. We love them even when we're in the womb. Some 15 to 16 weeks after conception, foetuses will show their sugar appreciation by swallowing more amniotic fluid when it's sweet, and less when bitter (pdf). Penchants for salt and umami tastes are also innate. Most of our food preferences, however, are learned, and a growing body of research shows that this learning also begins before birth.

It is reckoned that at 21 weeks, foetuses can discern full-on flavours using their senses of smell and taste (amazingly, a study recently found that humans can distinguish a trillion different smells, and smell is the dominant sense in flavour perception) and Julie Mennella of the Monell Chemical Senses Centre in Philadelphia says, "amniotic fluid is a complex 'first food' that contains chemicals that have both tastes and smells." Developing flavour awareness five months before most babies start ingesting their calories makes good sense, because when it comes to taste, familiarity breeds fondness. You can train yourself to enjoy most foods through repeated exposure – and the younger you are, the easier it is to mould neural pathways. So, the thinking goes, if a foetus gets used to tasting vegetables in the womb, then weaning the baby on to nutritious grownup foods will be a relative doddle.

The amniotic fluid sniffers

Pity the poor participants in this experiment carried out by Mennella. They had to sniff a bunch of amniotic fluid samples, and apparently had no trouble identifying the womb juice that had been extracted from women who had taken a garlic capsule 45 minutes before. All flavours tested so far, says Mennella, have been detectable in the fluid, including mint, aniseed, carrot and vanilla.

A love of veg

Another experiment by Mennella involved one group of mothers drinking 300ml of carrot juice four days a week for three weeks during the last trimester of pregnancy, a second group doing the same during the first two months of breastfeeding, and a control group giving carrot juice a wide berth altogether. The babies who tasted high concentrations of carrot in utero and in their mother's milk went on to happily eat more carrot during weaning. According to Peter Hepper, director of the Fetal Research Centre at Queen's University in Belfast: "foetuses exposed to garlic in the womb are more likely to prefer garlic in later life, indeed studies show up to the age of eight at least."

Junk-food guzzling

A depressing research paper published last year sought to understand the mechanics of why babies whose mothers ate a lot of junk food while pregnant went on to have an increased preference of junk food themselves. Junk food, in this study, is defined as highly palatable, energy-dense and nutrient-poor. It is likely that children will like the taste of this food even if it's unfamiliar because it appeals to our innate predilections. But what researchers at the University of Adelaide in Australia found was that after exposure to junk food in the womb, and through breast milk, brain reward pathways become desensitised to them – in the same way that drug addicts need increasing doses of drugs to get the desired hit, the theory goes that these children will need more Kit Kats or crisps. (Note: the study was looking at rats, not humans, so this line of inquiry is still a work in progress.)

Not all is lost

If you're now feeling bad that you could only hold down dry crackers and Pringles your entire pregnancy, don't. There are plenty of other factors that shape a child's appetite for different foods as they grow up, from peer pressure and advertising to individual taste sensitivity. Scientists may have looked into the effects of fetal flavour learning on infancy and early childhood, but as Alison Ventura, assistant professor in nutritional sciences at Drexel University in Philadelphia, points out "not into adolescence and adulthood. That's a good question: how strong is this effect. How long does it last? What are the other possible factors that might mediate the effect over time? You can imagine it's pretty complex – that having broccoli when you're a foetus doesn't mean you're going to love it when you're an adult."

Have you seen any correlation between what you ate while pregnant and your children's tastes? Or did yours disprove the rule?

Follow Amy Fleming on Twitter