Image copyright Thinkstock

Ever heard of the BSU (behavioural science unit)? No, neither had I, until recently. But it turns out that this secretive, specialised unit, embedded within the UK security service, MI5, is absolutely integral to every single terrorist investigation.

These are not spooks with a smattering of science, it's the other way round.

Every BSU member is a qualified scientist, trained up to master's-degree level or beyond, sometimes with a PhD.

Their job is to search for signs of behaviour in an individual that indicates they may be considering or preparing a terrorist attack.

Their field, not surprisingly, centres around the social sciences, with specialisations in areas such as psychology and criminology.

How many of them work at MI5 is not disclosed, but the BSU is either at the centre of an investigation or is being called on for expertise by desk officers.

They are a pre-arrest unit, with access to court records.

Lone actors

The past few years have seen the emergence of a particularly tough target to detect: the lone actor, more commonly referred to as "the lone wolf".

Behavioural scientists assess this term as meaning "someone who undertakes an attack without being part of a network".

So would that apply say, to the Tunisian mass murderer Mohamed Lahouaiej-Bouhlel, who crushed 84 people to death with his lorry in Nice in July?

Image copyright Kapitalis via Associated Press Image caption Mohamed Lahouaiej Bouhlel killed 84 people in Nice on 14 July 2016

Yes, it probably would, even though so-called Islamic State later claimed he was one of their "soldiers of the caliphate".

In its online magazines and internet forums, IS has gone out of its way to encourage attacks by lone individuals.

Fewer communications between plotters inevitably makes it harder to find pointers to an imminent attack.

Analysts find that no one size fits all when it comes to trying to identify lone actors.

Mental health

The attacks in continental Europe during the summer of 2016 suggested to some people at the time that there may be a crossover between mental health disorders and acts of terrorism.

It is estimated that approximately 30% per cent of lone actors have mental health issues.

However, from the limited research available so far, there is no evidence to suggest that organisations such as IS are actively focusing on recruiting those with such issues.

In fact, if anything, organised networks tend to screen out those with personality disorders or other mental health issues.

The dyad

There is also a new term that has crept into the lexicon of counter-terrorism: the dyad.

This refers to a pair of individuals working together on a plot, such as the men who murdered Fusilier Lee Rigby in Woolwich in 2013: Michael Adebolajo and Michael Adebowale.

Image copyright Metropolitan Police Image caption Lee Rigby's killers, Michael Adebolajo and Michael Adebowale, were a "dyad"

Dyads are thought to be of great concern because their ideas feed off each other, reinforcing their beliefs and lending confidence to their plans.

That makes them harder for MI5 and the police to detect as they don't "leak" clues to observers so readily.

"Protective risk factors"are the inhibitors, the things that stop a person from actually going through with an attack. People's protective risk factors can differ widely.

Analysts believe that a lone actor has an average of five individuals in his or her life who could possess what is known as "diagnostic information" - something that could help identify someone at risk of carrying out an attack.

These "people in the know" can be broken down into three categories:

Friends and peers: they know the most, but they are the least likely to tell

Family: some worry what will happen to their relative if they report them

Random strangers: an example would be a shopkeeper who reports a suspicious purchase

Terrorists and extremists have a track record of "leaking intent".

Often they just cannot resist telling others what they are planning.

Examples of this would be the Nice lorry driver who exchanged hundreds of text messages with an associate, and the Brussels bombers who boasted about their attack plans yet nobody took them seriously enough to believe they would go through with them.

Panorama: The Changing Face of Terror, presented by Peter Taylor, is on BBC One at 19:30 GMT on Monday 12 December and will be available later via BBC iPlayer.