
Blazing-Fast Token-Efficient Intrusion Detection System (IDS) based on TypeSafe's Jev.
JevIDS detects zero-day attacks in a stream of network flows whose labels come back late. For each flow it shows TypeSafe's Jev labeled flows it has already seen, from 1 to 8 per category, asks whether the flow under test is an attack, and joins that answer with a nearest-neighbour vote.
An intrusion detection system (IDS) watches the traffic of a network and raises an alarm when it suspects an attack. JevIDS was tested on two public datasets, CIC-IDS2017 and TRUSTLab, with each label coming back 200 flows after its flow was judged. Its ROC-AUC on the zero-day flows was the highest of the detectors tested, 0.994 to 0.995 on CIC-IDS2017 and 0.930 to 0.933 on TRUSTLab. At an alarm cut calibrated before the test, its F1 on those flows was 0.937 to 0.946 on CIC-IDS2017, where a Random Forest reached 0.365, and 0.837 to 0.840 on TRUSTLab, where the Random Forest reached 0.833. Claude Sonnet 5.5 reached 0.932 to 0.939 and 0.706 to 0.726, at 62 and 39 to 40 times Jev's cost.
Design · Glossary · The loop · The fusion
A flow is the summary of one conversation between two computers, such as its packets, bytes, duration and port. Some attacks are new to the system, and the right answer arrives late, because an analyst confirms an attack only after someone investigates it. Here a zero-day flow is one whose attack name never appears in the starting memory, and it is at first contact when it is judged before any flow of its attack name has come back with its label. The results count these flows. The delay D is counted in flows, and D = 200 outlasts every zero-day burst in the CIC-IDS2017 test.
Jev is a System One Model from TypeSafe. It reads a block of text and answers typed questions with probabilities, so there is no generated text to parse. For each flow JevIDS writes the column names, a description of each category, k labeled examples per category and the flow itself, with each decimal cut to 4 significant digits, and Jev returns p_attack, the probability of an attack, and a category. The KController keeps one k per category, starting at 1, doubles it up to 8 when Jev names the wrong category and lowers it by 1/k when Jev is right. The Selector prefers examples close to the flow under test, recent ones and ones Jev doubted, and always adds the nearest benign flow. A matched kNN lets as many nearest flows vote as the Selector gives Jev at k = 4, at no cost. The full JevIDS turns each detector's p_attack into its percentile on a development stream and takes the mean, because the two catch different attacks, and falls back on the kNN when a call to Jev fails. The memory holds the pool flows that ended before the flow under test and every judged flow whose label has come back.
| Dataset | Captured | Test split | Benign | Zero-day at first contact, D = 200 | Zero-day attack names |
|---|---|---|---|---|---|
| CIC-IDS2017, relabelled by Liu et al. (IEEE CNS 2022) | July 2017 | paper, 2,000 flows | 1,046 | 309 | SSH-Patator, DoS Slowhttptest, Infiltration - Portscan |
| TRUSTLab, Villafranca, Tasic and Cano (Frontiers in Computer Science, 2026) | May and June 2025 | paper, 2,000 flows | 798 | 338 | C2Beaconing, DDoS, DoS, MITM, WebBased |
Each attack name's flows of each day were cut in half in time, the earlier half feeding the pool and the later half the test. CIC-IDS2017's zero-day names leave the pool while their categories keep other names, and TRUSTLab's five zero-day families leave it whole. The baselines are a Random Forest, an Isolation Forest trained on benign flows, a kNN with K = 4 and the matched kNN, each refitted at every step on the memory JevIDS sees, and Claude Sonnet 5.5 with the same Selector and KController. Every metric counts the zero-day flows at first contact as positives and the benign test flows as negatives. The ROC-AUC, the primary metric, is the chance that a detector scores a random zero-day flow above a random benign one, 0.5 for a random score. The PR-AUC, the secondary one, weighs each false alarm by how much it dilutes the share of alarms that are real attacks. Neither needs a cut. The alarm cut, 0.2608 on CIC-IDS2017 and 0.377 on TRUSTLab, was calibrated before the test on a development stream, and every detector is read at it, where the F1 weighs the zero-day flows caught against the false alarms. A block bootstrap gives the 95 % intervals and McNemar's exact test compares the catches, as D9 details. Jev alone, the full JevIDS and Sonnet ran with seeds 0, 1 and 2, the deterministic baselines once.
Zero-day flows at first contact at D = 200, each detector read at its dataset's cut. Three numbers are seeds 0 / 1 / 2.