Work

LANTERN: A Cost-Aware Pipeline for Web Attack Detection with LLM Verification and Semantic Caching

Year: 2026
Type: conference-paper
Abstract: High-volume HTTP traffic makes web attack detection a challenging trade-off between detection quality, computational cost, and analyst usability. While rule-based and machine learning detectors provide efficient first-line filtering, they may miss sophisticated attacks or generate difficult-to-interpret alerts. Large Language Models (LLMs) can improve verification and produce natural-language explanations, but their computational cost prevents their deployment on every request. This paper presents LANTERN, a cost-aware architecture for scalable HTTP attack detection. Rather than replacing conventional detectors, LANTERN reserves LLM reasoning for requests requiring deeper analysis, reusing decisions for semantically similar inputs. We formulate threshold selection as a cost optimisation problem that jointly controls alert escalation and cache reuse. We evaluate LANTERN on the public WebAttack-CVSSMetrics and CSIC 2010 datasets under both in-distribution and distribution-shift settings. The results show that LANTERN maintains high detection performance while substantially reducing the number of LLM inferences through semantic caching, providing an effective trade-off between detection quality, explanation capability, and operational cost.
Source: HAL
Language: English
Open Access status: green
OpenAlex ID: W7213575472
FWCI:
Cites:
Cited by:
Related to: 10