← Latest papers
💻 computer science

Neuro-symbolic Static Analysis with LLM-generated Vulnerability Patterns

This paper introduces MoCQ, a neuro-symbolic static analysis framework that leverages large language models to automatically generate and iteratively refine vulnerability patterns, achieving expert-level detection performance while discovering new vulnerabilities and significantly reducing manual effort across multiple programming languages.

Original authors: Penghui Li, Songchen Yao, Josef Sarfati Korich, Changhua Luo, Jianjia Yu, Yinzhi Cao, Junfeng Yang

Published 2026-04-15
📖 4 min read☕ Coffee break read

Original authors: Penghui Li, Songchen Yao, Josef Sarfati Korich, Changhua Luo, Jianjia Yu, Yinzhi Cao, Junfeng Yang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are the head of security for a massive, bustling city (the software code). Your job is to find hidden traps, like loose manhole covers or rigged bridges, before anyone gets hurt.

For years, the best way to do this was to hire a team of expert detectives (human security engineers). These detectives would spend weeks writing a specific "Wanted Poster" (a vulnerability pattern) for every new type of trap they knew about. They'd describe exactly what a "loose manhole cover" looks like so they could scan the city and flag it.

The Problem:
Writing these "Wanted Posters" is slow, expensive, and hard. By the time the detectives finish writing the poster for "Trap A," the bad guys have already invented "Trap B." The city keeps growing, and the detectives can't keep up with the manual work.

The New Solution: MoCQ
The researchers in this paper built a new system called MoCQ. Think of MoCQ as a super-smart, tireless apprentice who has read every book in the library (it's powered by a Large Language Model, or LLM).

Here is how MoCQ works, using simple analogies:

1. The Language Barrier (DSL Subsetting)

The city's security system speaks a very complex, technical language (like a secret code called DSL). If you just ask the apprentice to "write a wanted poster," they might try to speak in English, but the security system only understands the secret code. The apprentice often gets confused and writes gibberish.

MoCQ's Fix: Instead of giving the apprentice the entire, 10,000-page dictionary of the secret code, MoCQ gives them a cheat sheet. It selects only the most important, useful words and rules needed to describe the specific trap. This makes it much easier for the apprentice to write a valid poster without getting lost in the details.

2. The Trial-and-Error Loop (Iterative Refinement)

Even with the cheat sheet, the apprentice might still make mistakes. They might write a poster that says, "Look for a red car," when the trap is actually a "blue truck."

MoCQ's Fix: MoCQ doesn't just take the apprentice's first draft. It acts like a strict editor with a magic magnifying glass.

  • It runs the apprentice's "Wanted Poster" against the city.
  • If the poster crashes the system, the editor points out the typo.
  • If the poster misses the trap, the editor says, "You looked at the wrong street."
  • If the poster flags too many innocent people (false alarms), the editor says, "You're being too broad; be more specific."

The apprentice then rewrites the poster based on this feedback. They do this over and over until the poster is perfect. This happens in minutes, whereas a human detective might take weeks.

3. The Result: A Super-Scanner

Once the apprentice finishes, MoCQ takes that perfect "Wanted Poster" and runs it through the entire city instantly.

What did they find?

  • Speed: MoCQ did in hours what usually takes human experts weeks.
  • Accuracy: The posters MoCQ wrote were just as good as the ones written by the top human experts.
  • The Surprise: Because the apprentice had read so many books, it noticed subtle details the human experts missed. MoCQ found 46 new types of traps that the experts didn't even know existed.
  • Real-World Impact: Using these new posters, MoCQ found 25 brand-new, real-world vulnerabilities in actual software that had never been discovered before.

The Big Picture

MoCQ isn't trying to replace the human detectives. Instead, it's giving them a super-powered assistant.

  • Humans are great at big-picture thinking and understanding complex, weird scenarios.
  • The AI (MoCQ) is great at reading the rulebook, spotting tiny details, and doing the repetitive work of writing the "Wanted Posters."

When you combine the human's experience with the AI's speed and attention to detail, you get a security system that is faster, smarter, and catches more bad guys than ever before. It turns a process that used to take a month of heavy lifting into a few hours of automated work.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →