MPs are facing increasing levels of abuse from trolls using social media such as Facebook and Twitter to attack them, recent research has shown.

Examination of more than one million tweets between 2015 and 2017 shows abuse of MPs has rocketed.

READ MORE: Ex-drug dealer waged abusive online campaign against MP

Twitter insults aimed at politicians rose from about 10,000 during the 2015 general election to just under 25,000 during the snap 2017 general election, although the number of total tweets also rose in the same period.

The abuse seemed unaffected by party or gender, according to project leader Professor Kalina Bontcheva from the University of Sheffield department of computer science.

She said: "The increase in abuse towards public figures is a shocking development and one that the UK Government is right to take seriously.

"If people are dissuaded from standing for election, then our representation on a democratic level is under threat."

READ MORE: Threats made Bolton South East MP Yasmin Qureshi fear for her safety

A separate study by Dr Sofia Collignon from the University of London, revealed that one in 12 candidates in the 2017 general election had suffered physical attacks more than once and three per cent suffered sexual harassment.

Her survey showed that 60 per cent of those questioned said they had felt afraid, with women and Conservatives facing the most threats.

MPs have been critical of the social media platforms, arguing that they at they are not doing enough to tackle abuse

Labour MP for Cardiff South and Penarth, Stephen Doughty tweeted an example of abuse directed at him alongside Twitter's response that it did not violate policies.

He said: "If you wonder why Facebook, Twitter etc are increasingly becoming difficult places, here's another example of abuse we get and the response of the social media companies — who think we deserve a different threshold of abuse "to allow discourse"."

Professor Bontcheva's study shows for the first time that both the proportion and volume of Twitter abuse increased between 2015 and 2017.

Prominent politicians tended to receive a lot of tweets and also a lot of abuse, but lesser-known MPs received proportionally higher levels of abuse.

In 2015, users who tweeted abusive replies were more concerned with the economy, but in 2017 these were concerned with national security in the wake of terror attacks on UK soil.

Prof Bontcheva added: "Whilst there was a clear increase in abuse on Twitter sent to politicians in the 2017 general election compared to 2015, it was interesting to see the differences in the topics they responded to.

"This clearly shows the different issues that rose to prominence in the two separate elections."

Cabinet Office minister Chloe Smith, responding to the research, said: "It is vital that we prevent the rising intimidation of people in public office and those who want to stand for election.

"That is why this government is consulting on new measures that will protect candidates and campaigners standing for public service.

"We can't let intimidation of people in public life continue unchecked."

Following murder of West Yorkshire MP Jo Cox moves have been made to improve security for members of parliament.

Earlier this year it was decided to give female MPs a dedicated security officer as part of attempts to protect them from threats, abuse and intimidation.

The "personal security advisor" will visit homes and constituency offices to advise on the safety of MPs and their staff when away from Parliament.