If it sounds like something out of science fiction, that’s because it is. But the Defense Advanced Research Project Agency (DARPA) has in a mind a program that would suss out criminals before they do the deed. A few months ago, DARPA announced its interest in what it’s calling “Anomaly Detection at Multiple Scales,” or ADAMS, for short. Published in October, the document clearly had in mind people like the alleged Fort Hood shooter Nidal Malik Hasan or alleged Wiki-leaker Pfc. Bradley Manning; as DARPA put it: “Each time we see an incident like a soldier in good mental health becoming homicidal or suicidal or an innocent insider becoming malicious we wonder why we didn’t see it coming.”

In this age, we all leave considerable digital traces of our thoughts, actions, and motions. In the wake of a tragedy, often we are able to discern a pattern in the data, signs that someone who may have seemed harmless was actually about to do great harm. As DARPA writes, “When we look through the evidence after the fact, we often find a trail–sometimes even an ‘obvious’ one. The question is can we pick up the trail before the fact giving us time to intervene and prevent an incident? Why is that so hard? Because we generally need to look through an enormous amount of data and don’t know where to look or what to look for. In particular, we generally don’t have a good understanding of normal versus anomalous behaviors and how these manifest themselves in the data.”

In other words, hindsight is 20/20. But what if we could make foresight 20/20 as well?

NetCerto is one of the companies that is soliciting grant money from DARPA under the ADAMS program. Many companies will be applying to DARPA claiming they have the next algorithm or bit of software that will finally be able to suss out the dangerous needle in a haystack of data. But in order to ensure that software truly works, DARPA will also need software that simulates an environment in which anomalies occur.

NetCerto’s CEO David Kovar explains this in a neat metaphor: His company creates a simulated crime scene. “If you wanted to test the abilities of a crime scene forensics team,” he tells Fast Company, “you would go out in a parking lot somewhere, you would put bullet casings out, blood marks out, scuff marks in some places. We do the same thing in electronic environments. We will create the clues for people doing analysis to find. And since we created the evidence, we can score them”–i.e., the other applicants for DARPA money, those offering forensic software–“accurately on whether they found them all.”

The same principle could be put to work to catch the next Jared Lee Loughner, the alleged shooter in the Arizona killings. Reports in the wake of the shootings have shown that Loughner left many digital traces signaling anti-government paranoia.