arXiv

MINES: Explainable Anomaly Detection through Web API Invariant Inference

Title: MINES: Achieving Explainable Anomaly Detection via Web API Invariant Inference

Abstract

Ensuring the reliability of web services is paramount, as web applications serve as critical infrastructure for both modern enterprises and government bodies. Consequently, detecting anomalies within these systems is essential. Today’s web applications predominantly rely on web APIs—such as RESTful interfaces, SOAP, and WebSockets. While these APIs facilitate functionality, their exposure creates vulnerabilities to both targeted attacks and unauthorized access, leading to irregular system behaviors.

A significant challenge in this domain is that anomalous logs often bear a striking resemblance to normal logs, frequently lacking the crucial contextual data stored in databases that would aid in differentiation. Moreover, log instances are often noisy, a factor that can cause state-of-the-art log learning solutions to identify spurious correlations. This leads to the development of superficial detection rules and models that lack robustness.

To address these issues, we introduce MINES, a novel approach that infers explainable API invariants from the schema level rather than relying on detailed raw log instances. This methodology offers two primary advantages: (1) it effectively filters out noise to pinpoint precise normal behaviors, and (2) it identifies abnormal activities that may not be explicitly captured in instrumented logs.

Technically, MINES operates through a multi-step process. First, it transforms API signatures into table schemas, thereby augmenting the original database schema. Second, it deduces potential database constraints on this enhanced schema to uncover latent relationships between APIs and database tables. Large Language Models (LLMs) are employed to extract these potential relationships based on provided table structures. Subsequently, normal log instances are utilized to validate these LLM-generated invariants, accepting valid ones and rejecting invalid ones. Finally, MINES converts these inferred constraints into invariants, generating Python code to verify runtime logs.

We conducted extensive evaluations of MINES against baselines such as LogRobust, LogFormer, and WebNorm, focusing on web-tamper attacks across benchmarks including TrainTicket, NiceFish, Gitea, Mastodon, and NextCloud. The findings demonstrate that MINES delivers high recall for anomalies while maintaining virtually zero false positives, establishing a new state-of-the-art in anomaly detection.


Source: arXiv Generated at: 2026-06-02 00:00:00 UTC

Related Articles

Law’s Billable Hour Is Being Shredded by AI
Bloomberg

Law’s Billable Hour Is Being Shredded by AI

AI is dismantling the billable hour by automating routine legal tasks. This technological shift threatens the traditiona...

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026
Bloomberg

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026

SoftBank in Early Talks to Back $800 Million Agile Robots Round
Bloomberg

SoftBank in Early Talks to Back $800 Million Agile Robots Round

SoftBank is in early talks to back Agile Robots’ $800 million funding round. The Japanese tech giant is currently in pre...

Amundi Is Diversifying Risk Via Commodity Currencies, Gold
Bloomberg

Amundi Is Diversifying Risk Via Commodity Currencies, Gold

Amundi diversifies risk by investing in commodity-linked currencies and gold. This strategy hedges against market volati...

Reuters

Marvell Technology surges after Nvidia's Huang calls it 'next trillion-dollar company'

Marvell Technology shares surged after Nvidia CEO Jensen Huang labeled the firm the “next trillion-dollar company.”

Russia Says It Found Foreign Spyware on Top Officials’ Phones
Bloomberg

Russia Says It Found Foreign Spyware on Top Officials’ Phones

Russia’s FSB claims to have discovered foreign spyware on senior officials’ phones. Moscow attributes the intrusion to h...