There is no single solution to stop “lone wolf” attacks. However, recent incidents in Texas and NYC and last year’s violence in Orlando and San Bernardino reveal important information about both the individual perpetrators and the paths that led to their rampage. Attackers are deranged individuals with deep-seated personal, political, or ideological grievances, who are driven towards violence and provide little or no warning before killing innocent people.

The majority of lone wolf attacks are committed by U.S. citizens or immigrants who purchase weapons legally. These perpetrators start out as ordinary citizens but along the way they are radicalized and become homegrown terrorists. In these cases, even the most restrictive immigration or gun control policies would fail to prevent them from carrying out their attacks.

Take for instance, Sayfullo Saipov, who arrived in the U.S. from Uzbekistan over seven years ago but was inspired by ISIS only recently. Even his wife appeared to be shocked and horrified by his recent transformation, from a father of three to a murderer of eight innocent civilians almost overnight.

“We’re in a world that’s even more difficult because not only can we not deter them… but there are no signs to help us deal with this.”

In the wake of these horrific attacks, politicians use the opportunity to advocate their own policies like extreme vetting, gun control legislation, bans on assault rifles, background checks, or better access to mental health resources. However, even if all of these options were in effect, they would still fail to deliver a solution for federal, state and local law enforcement agencies to prevent lone wolf attacks. Preventing these attacks requires online initiatives designed to find, engage, and assist vulnerable individuals.

While there are no clear solutions, authorities in Canada and the U.K. have recently embraced the role of the Internet to inspire radicalization of individuals. However, more novel approaches need to be implemented. Social media analysis is the key to understanding the identities of high-risk individuals, allowing officials to pinpoint, monitor and predict radicalization or changes in behavior.

Social media has made it incredibly easy for terrorist organizations to spread their insidious ideology and increase membership globally. Terrorists prey upon marginalized individuals by reinforcing radical views, and inspire online contacts to pursue violent actions. Their sites are “echo chambers” that allow vulnerable individuals like Sayfullo to vent their frustrations and find common ground with others – normalizing their radical beliefs.

As a short-term counter-measure, governments block websites, shut down accounts and use counter-messaging strategies to engage high-risk individuals the same way terrorist organizations do. But these activities are not enough. They need to be reinforced by cyber warfare efforts that deploy resources into the dark web, hacker networks, and hidden IPs to root out malicious terrorist networks that aim to entrap vulnerable individuals.

Increasing levels of Islamophobia and xenophobia, manifested in both pubic rhetoric and government policies, should be countered with targeted communications strategies that use real-time, crowd-sourced information from the affected public. As a society, our focus must be on improving relations between immigrant and non-immigrant groups and reducing the likelihood of vulnerable individuals turning to terrorism.

At the same time, improved relations between law enforcement and at-risk populations is crucial to stemming homegrown extremism. Individual citizens, online forums, and social groups, are likely to illuminate behavioral changes that provide indications and warning of a lone-wolf attack. Civilians must feel comfortable turning to the police for help. Again, social media provides the answer. It creates a direct line of communication for police to listen, understand, and act on important issues and activities.

Law enforcement should take care, however, that the focus remains on the protection of public safety, rather than on hard and fast anti-terrorist measures. These measures typically perpetuate negative perceptions and reinforce isolation and marginalization of social outcasts or immigrants, when what they need most is a sense of belonging.

Home grown terrorism, violent extremism, and lone-wolf attacks are growing in frequency and magnitude. Authorities are unable to understand the reason why these terrorists suddenly appear from nowhere, let alone have strategies to neutralize them. Home grown extremism and lone wolfs are becoming a national security issue, which requires a long-term, systematic, population-centric strategy to combat. Current countermeasures reflect weak guesswork and feeble attempts to play catch up. If the current Administration is going to spend trillions on physical and technical solutions for homeland security, it must direct a portion of funds towards strategies that actively monitor, predict, and mitigate terrorist threats from online forums.