What goes through the mind of a gun-toting teenager when he pulls the trigger? Does he make a conscious decision to kill? Or is he acting on instinct? The debate over why teens turn violent usually focuses on family breakdown, drug and alcohol abuse, poverty, unemployment, even diet.

However, in recent years science has started to shed a fascinating light on the underlying causes of youth crime by asking whether violence is a symptom of a sick or underdeveloped brain.

This question is at the heart of a new project launched by Camila Batmanghelidjh, the founder of Kids Company. She takes an imaginative approach to improving the lives of neglected and abused children.

Her organisation, which works in 33 schools across London and is one of The Daily Telegraph's chosen charities for this year's Christmas appeal, started a pilot scheme this month to examine the brains and behaviour of young offenders, in order to help understand how they think.

"Neglected and traumatised children do not appraise a situation objectively," Camila says. "They don't come to the point of a moral decision with a neutral frame of mind."

Over the course of the project, which is being carried out with the help of Professor Faraneh Vargha-Khadem, of Great Ormond Street Hospital for Children and the University College London Institute of Child Health, 10 boys aged between 11 and 14 will be evaluated for their predisposition towards anti-social behaviour, along with their intelligence, cognition, academic attainments and emotional status.

Then they will lie down in a scanner so that doctors can examine key brain areas, such as the prefrontal cortex, for abnormalities. "This is the first time this kind of study will be done," says Dr Humam Maki, who does research for Kids Co.

The brain scans will offer a new way of revealing the effects of exposure to chronic stress in violent and emotionally disturbed children. In the long term, this kind of work should help doctors and social workers to tell when a troubled teenager is ready to return to the community.

Some feel uneasy about such studies, arguing that explaining anti-social behaviour through neurology or genetics absolves people of responsibility for their crimes. But recent research has shown how a loveless, abusive or chaotic upbringing can do long-term damage to the brain.

One project, carried out in a Romanian orphanage by Prof Mary Carlson, of Harvard Medical School, suggested that lack of physical affection could cause an abnormal release of cortisol, the stress hormone that stunts physical stature and mental abilities.

Many diseases of the mind are also associated with changes in levels of this hormone, and in those of its controller, the messenger chemical serotonin.

Genetics also plays a role because there is plenty of inherited variation in levels of cortisol and serotonin. However, the effects of DNA are difficult to disentangle from those of upbringing. Prof Terrie Moffitt, of the Institute of Psychiatry in London, carried out a study of 442 men.

This found that 85 per cent of those who had been maltreated as children, and had a gene associated with low activity of an enzyme called MAOA, were much more likely to have demonstrated anti-social behaviour, such as convictions for violent crime.

But children with a gene corresponding to high MAOA activity were less likely to be anti-social, even if they had been maltreated.

In parallel, there has been a revolution in understanding what goes on in the minds of murderers and psychopaths. There is strong evidence that they have poorer functioning in the prefrontal cortex - that part of the brain involved in regulating and controlling emotion and behaviour.

According to Prof Adrian Raine, a British "neuro-criminologist" at the University of Pennsylvania, they lack the emergency brakes to curb their violent behaviour. Indeed, the brains of criminals are physically different from those of non-criminals, showing an 11 per cent reduction in the volume of grey matter (the neurons) in the prefrontal cortex.

Over the past decade, says Dr Maki, of Kids Company, evidence has emerged that the prefrontal cortex counterbalances the more instinctive and primitive brain areas, enabling us to handle perceived stress, worry and threat.

At the heart of this process are the amygdalae, two almond-shaped structures on either side of the brain that help us handle our emotional memories. Through connections to other regions, they influence the production of stress hormones that help us evaluate threats, and also play a role in aggression, impulsive behaviour and violence.

These visceral feelings can be calmed by signals from the prefrontal cortex, which gradually matures from early childhood. But the way this region matures can be impaired in a child who has seen violence and neglect.

Brain scans, Dr Maki reveals, have shown "dramatic differences" between disturbed and normal children. If the prefrontal cortex is relatively underdeveloped, it is thought that the more primitive brain regions will predispose these children to a pattern of violence.

These emotionally disturbed children are more on edge and aggressive. Doctors speculate that their hyperactive amygdalae will predominate over their higher neural responses, so they misread everyday events, gestures and events as life-threatening.

A friendly touch could be interpreted as an antecedent to seduction and rape; many traumatised children interpret neutral facial expressions as a sign of imminent attack.

Even staring into someone's eyes can be a danger signal: research has shown that seeing the whites, or sclera, of another person's eyes triggers an automatic fear response just 12,000ths of a second before we are conscious of it, probably because there is a direct connection between the retina and the amygdalae.

Doctors hope that the dominance of inner, primitive centres over the more thoughtful cortical circuits can be altered with use: Dr Maki likens the brain to a muscle, in that regions can be trained and improved.

Provide a loving, caring, sympathetic and consistently low-stress environment, and - he hopes - you can build up the prefrontal cortex to make a persistent offender less impulsive and more thoughtful.

Kids Company, which helps about 12,000 inner-city children and others ranging in age from three to 23, already has many successes in this respect. Dr Maki says this help ranges from psychiatry to providing a caring environment, "to show them what is wrong and what is right".

But the field still cries out for more systematic study to determine the best approach. This is where the pilot project to reveal brain anatomy and structural abnormalities comes in. By investigating serious anti-social behaviour in 10 children and adolescents, the research team hopes that markers of the disorder can be identified in the brain to guide future diagnosis and management.

Within a few years, this pioneering project could have laid the foundation for new ways to turn children away from violence.