← Lab /Software

Unsupervised model detects API anomalies with 87% F1 even without documentation

HRAL can detect malicious API activity with high recall and F1 scores despite limited OpenAPI documentation

Software arXiv 2 Jul 2026 Method Prototype evidence

Published as “HTTP REST API Structure Learning”

Why it matters

HRAL enables effective anomaly detection for APIs that lack up-to-date documentation, offering a practical security layer for many real-world deployments.

Summary

HRAL, an unsupervised method that learns REST API endpoint structure from traffic, achieves 82.07% recall and 87.24% F1-score, second only to full OpenAPI documentation (93.57% recall) while requiring no documentation. When combined with signature-based rules it reaches 100% detection in a controlled setting. The evidence comes from experiments on the ATRDF dataset and shows strong but not perfect performance, especially on body-based attacks like Log4j.

What they found 1

  1. HRAL achieves 82.07% recall and 87.24% F1-score across all attack types

    “HRAL shows robust detection performance across all attack types, achieving an average recall of 82.07% and an F1score of 87.24%.”

Caveats 6

  • Even with full OpenAPI documentation, Log4j attacks are detected at only 40.09% recall, showing a gap in endpoint-only detection.
  • HRAL’s recall on Log4j attacks is 37.17%, lower than many other attack types, indicating limited effectiveness for body-based attacks.
  • Clustering algorithms, especially those applied to high-dimensional representations of API calls, are computationally intensive and may not scale efficiently in real-time or large-scale environments.
  • HRAL is less adaptable to evolving APIs.
  • HRAL lacks interpretability and explainability.
  • HRAL does not inherently support anomaly explainability, making it challenging to communicate or visualize how and where anomalies deviate from normal behavior within the API structure.

What’s new here 4

  • Documentation-free learning of API endpoint structure from observed traffic
  • Algorithm to enrich or reconstruct OpenAPI specs when documentation is missing
  • Comparable detection performance to full OpenAPI documentation without needing specs
  • Hybrid approach adding signature-based rules to achieve full coverage