Fighting AI with AI to keep the lights on

But those neural networks don’t have the ability to identify threat locations, and as Sidney adds, “Localizing a threat is key to shutting it down.”

“The energy grid is becoming more interconnected; more management commands are sent to devices that are tied to cloud connections. These connections create a larger attack surface and expose the devices to more potential attacks than ever before. With more cyberattacks we need better capabilities to detect when things are going wrong and understand where those attacks are happening,” Sidney said.

That’s where C2E2 comes in.

The project was proposed to, and funded by, DOE’s Office of Cybersecurity, Energy Security and Emergency Response, or CESER, in 2024 for this exact reason.

“Historically, we’ve focused on detection but not localization because that’s a much harder problem to solve,” Georgios said.

One of the things that makes it hard is the data engineering involved — collecting, cleaning and organizing raw data so that machine-learning models always have high-quality information to learn. This process takes time. A lot of time.

“This heavy lift is what we’re trying to simplify using LLMs,” Georgios said. “C2E2 will save time and money, improve threat detection and help us locate the exact spot of a threat.”

An Anomaly Problem
When the team started their work, they set out to create a machine-learning pipeline that could detect and locate threats by analyzing both cyber and physical data. But they kept running into the same problem.

“Traditional AI was having trouble detecting small anomalies that would pop up in the data because potential threats were sophisticated and continued to show up within normal ranges,” Georgios said. “I wanted to figure out how we could ensure these types of anomalies were still visible to the machine-learning model.”

The solution required data engineering, the above mentioned “heavy lift.”

“It literally took me two months of data engineering to make the AI models understand when something was normal or abnormal,” Georgios said. “After two months, we were able to achieve an 85% threat detection accuracy rate, and while that’s good, it’s not the best. So, we started thinking about how we could automate this, speed the process up and improve performance.

Pipeline A to B
“Right now, the pipeline requires machine-learning engineers to handle the data engineering after we gather the data. Once we have a clean dataset, we feed it into the machine-learning model — that’s the traditional AI part — and from there it can detect a threat and determine its location,” Georgios said. “From start to finish, this process takes about two months, and data engineering accounts for about 90% of that time.”

And as Georgios emphasizes, the data engineering has to be “really, really good,” because as they say in machine learning, “garbage in, garbage out.”

“Locating the threat is the hardest part because it requires us to process structural information,” he said. “We have to understand the topology and physics of the system, and traditional AI is not great with that.”

In this context, topology refers to how power equipment and cyber systems are connected and how they work together.

That heavy lift falls to machine-learning engineers and demands significant time and manpower.

Enter large language models.

“Large language models are really good with text, so we can describe something, write a text file, provide information on the components, where they’re located, what they connect with, and include physical measurements, cyber information and topology data,” Georgios said. “We’ve figured out a way to use LLMs and generative AI to automate the data engineering step, which takes up the bulk of our time.”

C2E2 creates a new pipeline that starts with feeding data into the model, which automates the data engineering, and outputs a clean dataset to a machine-learning model. That model then outputs whether there’s a threat and where it’s happening, vital information for security operators at utility companies. The training process takes a couple of hours and has a 95% accuracy rate.

The team is just a year and a half into their research, and they’re already getting external recognition. A paper on their findings won the Best Paper Award at the Institute of Electrical and Electronics Engineers International Workshop on Computer Aided Modeling and Design of Communication Links and Networks last October.

Understanding Hallucinations 
The next phase of the group’s research is adding an additional layer of understanding around hallucinations, or instances when a model produces data that is incorrect or fabricated. In this context, a hallucination could cause the system to flag a threat that doesn’t exist or miss an actual threat by misreading the data entirely. Georgios says the key to addressing hallucinations is making those mistakes visible and measurable, so researchers can work toward building a more reliable and trustworthy generative AI-powered solution.

“When the LLMs spit out data, we want to be able to explain what it produces so we can avoid hallucinations in the data — that’s still a big question mark,” he said.

From there, Georgios says he wants to take this research into the private sector and test it with a utility company.

AI vs AI
“We have found a way to keep the nation safer by making machine learning more robust,” Georgios said. “Having better accuracy in detecting threats is critical to national security and grid stability.

“Cyber-physical attacks are stealthy and a very real threat to all of us. In 2015, hackers triggered a power outage in Ukraine that left more than 200,000 customers without power for hours.”

As Alex mentioned earlier, a worst-case electric grid cyber-physical attack could have potentially devastating consequences for national security, public safety and the economy.

And to prevent that, sometimes you need to fight AI with, well, AI.

“Hackers are using AI in their attacks — they’re fast and they propagate quickly,” Georgios said. “If you have 10 different AI agents attacking your system, you need something that can look at all the data very, very fast. These attacks are becoming more sophisticated, and our tools need to match that. They need to look at data fast, with trust and high accuracy — and that’s exactly what we’re building.”

Magdalena Krajewski is a writer and Corporate Communications Specialist at Sandia National Laboratories. The article was originally posted to the website of Sandia National Laboratories.