← Latest papers
🤖 machine learning

MINES: Explainable Anomaly Detection through Web API Invariant Inference

The paper proposes MINES, an explainable anomaly detection system that infers API invariants from database schemas using LLMs and normal logs to generate runtime verification code, achieving state-of-the-art performance with high recall and near-zero false positives by overcoming the limitations of noisy log-based approaches.

Original authors: Wenjie Zhang, Yun Lin, Chun Fung Amos Kwok, Xiwen Teoh, Xiaofei Xie, Frank Liauw, Hongyu Zhang, Jin Song Dong

Published 2026-06-02
📖 4 min read☕ Coffee break read

Original authors: Wenjie Zhang, Yun Lin, Chun Fung Amos Kwok, Xiwen Teoh, Xiaofei Xie, Frank Liauw, Hongyu Zhang, Jin Song Dong

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 security guard for a massive, busy office building (a web application). Your job is to spot intruders or people doing things they shouldn't.

Most modern security guards (existing software) just watch the logbook. Every time someone walks through a door or uses an elevator, a line is written in the book. If the guard sees a pattern that looks weird compared to the past, they sound an alarm.

The Problem:
The paper explains that this "logbook only" approach has a fatal flaw.

  1. The "Look-Alike" Trick: A criminal can walk through the door and sign the logbook in a way that looks exactly like a normal employee. The log says, "John entered the lobby at 9:00 AM." But in reality, John might be holding a stolen keycard, or the door might have been forced open. The logbook doesn't show the force, it just shows the result.
  2. The Noise: Sometimes the logbook is messy. It might say, "John entered," but it doesn't tell you if John actually had a ticket to enter that specific room. The security guard gets confused by all the similar-looking entries and misses the real danger.

The Solution: MINES
The authors propose a new system called MINES. Instead of just staring at the logbook, MINES looks at the blueprints of the building and the rules of how the building is supposed to work.

Think of it like this:

  • Old Way (Log Learning): The guard learns that "John usually enters the lobby, then goes to the 3rd floor." If John enters the lobby and goes to the 3rd floor, the guard thinks, "All good."
  • MINES Way (Blueprint Inference): MINES looks at the blueprints and says, "Wait a minute. According to the building's design, you can only go to the 3rd floor if you have a 'Paid Ticket' in your pocket, and that ticket must be linked to a specific seat in the database."

MINES doesn't just read the log; it checks the log against the database (the building's master record of who owns what) and the environment (who is actually logged in).

How MINES Works (The 3-Step Process):

  1. Translate the Blueprint: MINES takes the technical "blueprints" (API signatures and database tables) and turns them into a giant, connected map. It treats every API call (like "Cancel Order") as a character in a story and every database table (like "Orders") as a location.
  2. Ask the AI Detective: It uses a smart AI (a Large Language Model) to look at this map and ask: "What must be true for this story to make sense?"
    • Example: The AI might infer: "For a 'Cancel Order' event to be real, there must be a matching 'Order' in the database, and that order must be in a 'Paid' status."
    • This is like the guard checking the blueprint to see if the rules make sense, rather than just guessing based on past logs.
  3. The Reality Check: The AI might guess wrong (hallucinate). So, MINES runs these new rules against a pile of known "good" logs. If a rule says "John can't enter the lobby" but John did enter the lobby normally, MINES throws that rule out. It keeps only the rules that are 100% accurate.

The Result:
When an attack happens (like someone trying to refund a ticket twice), the old guards (LogRobust, LogFormer) miss it because the log looks normal. But MINES checks the database and says, "Wait, this order was already refunded! The database says it's 'Cancelled', but the log says 'Refunded'. That violates the blueprint!"

Why This is a Big Deal:

  • It's Smarter: It catches attacks that look perfect on paper but are fake in reality.
  • It's Clean: It doesn't get confused by messy logs. It focuses on the rules of the system.
  • It's Fast: It can check millions of logs per second.
  • It's Explainable: If it catches a criminal, it can point to the exact rule that was broken (e.g., "The database status didn't match the request"), rather than just saying "This looks weird."

In short, MINES stops trying to guess what's normal by reading a messy diary. Instead, it learns the laws of physics for the application and catches anyone who breaks them, even if they try to hide it in the logs.

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 →