Next Article in Journal
Adaptive Feature Distillation-Based Continuous Authentication Against RF Fingerprint Drift for Power Equipment
Previous Article in Journal
REST Versus SOAP in Modern Enterprise Systems: A Structured Literature Review
Previous Article in Special Issue
Secure and Reliable Data Exchange in Sensor Networks Utilizing Different Communication Technologies
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

When Cost Objectives Delete Capability: Accuracy-Constrained Tool Selection for Multi-Component Intrusion Detection in IoT Networks

1
Department of Electrical and Computer Engineering, Florida International University, Miami, FL 33174, USA
2
Applied Research Center, Florida International University, Miami, FL 33174, USA
*
Authors to whom correspondence should be addressed.
Future Internet 2026, 18(9), 456; https://doi.org/10.3390/fi18090456
Submission received: 10 August 2026 / Revised: 25 August 2026 / Accepted: 26 August 2026 / Published: 27 August 2026
(This article belongs to the Special Issue Wireless Sensor Networks and Internet of Things—2nd Edition)

Abstract

Agentic systems built on large language models are increasingly being allowed to decide for themselves which diagnostic tools to run and the obvious way to keep the resulting expense under control is to train that decision against a cost objective. We evaluate this question in a routed multi-component detection pipeline in which evidence fusion is deterministic so that the results characterize the tool selection layer in place of a full language-model-mediated inference loop. We show that cost-only optimization is unsafe in a repeatable and specific way. When the informative tools in a registry are also the expensive ones then a cost-driven policy removes exactly the detectors which the system exists to use and multiclass attack attribution collapses on both the datasets we study, with most attack families never predicted at all. The loss is invisible to the summary metric most often reported in this field because attack vs. normal detection remains high on an attack-heavy evaluation split even when the underlying predictions carry no information. We propose a constrained formulation in which the tools that carry class discriminative signal form a mandatory core placed outside the policy’s reach, while the remaining choice minimizes the measured invocation cost, which is subjected to an explicit relative accuracy floor. Classifier capacity is offered at three tiers rather than being fixed, so the floor decides how much model to buy for each traffic group rather than only which auxiliary tools to drop. On both the corpora the constrained policy runs at a small fraction of the cost of calling every tool and is statistically equivalent to it under a pre-specified margin. On both it converged exactly to its mandatory core so the demonstrated benefit is the preservation of signal-bearing tools and the correct choice of classifier capacity rather than dynamic selection among many useful alternatives. Removing the core reproduces the original collapse. Sweeping the floor traces an explicit cost-accuracy frontier and exposes its practical limit. The rarest attack family, and not the average across families, determines how far the tolerance can safely be relaxed since macro-averaging distributes a severe loss on one class across all of them. Every invocation cost reported here is timed, and we report indirect prompt injection as a null result.

1. Introduction

Security teams responsible for Internet of Things (IoT) deployments face a workload problem with a different shape from the one most intrusion detection research addresses. Deciding whether a flow looks unusual is comparatively easy, and a classifier fitted to labelled traffic does it dependably. The expensive judgement comes afterwards: naming the family of attack under way, working out what it is likely to do to the devices involved, and settling on a proportionate response. That judgement still falls to human analysts, and the alert volume of even a moderately sized estate outruns what an analyst team can absorb [1,2].
Agents built on large language models look like promising candidates for the second task, since they can weigh evidence of different kinds and explain the reasoning behind a verdict [3,4]. The obstacle is economic rather than technical. An agent running every available diagnostic on every incident costs several times as much per incident as a single classifier, and at IoT flow rates the arithmetic stops working. The natural response is to let the agent learn when each tool is worth running, a form of cost-aware inference that has drawn attention in the tool-use literature [5,6].
This paper reports what we found when we built that mechanism and measured it carefully, on two corpora with every cost figure obtained by timing. The first result is a failure with a clean and transferable cause, and we regard it as the more valuable half of what we have to offer. A policy trained to minimize invocation cost, with nothing in its objective tying it to detection quality, worked out that the classifiers in its registry were also its most expensive tools and stopped calling them. Multiclass attack attribution collapsed on both corpora, and most attack families were never predicted at all.
What makes this collapse hard to see is that it barely registers in the metric that is most reported. Under an attack-heavy evaluation split, attack versus normal detection stayed high in every configuration including the broken one, because a detector that unconditionally answers “attack” already scores well on such a split. Several configurations reported binary scores agreeing to sixteen decimal places, which is the signature of an identical prediction vector rather than of several systems performing equally well. Once the split was rebalanced the broken configuration was exposed, its binary detection falling below what a constant prediction achieves. The number that appeared to certify the pipeline had been measuring nothing.
Both halves of this failure were anticipated in the methodological literature. It has been argued for more than a decade that the closed-world assumptions behind machine learning sit with operational intrusion detection and that published accuracies frequently do not survive contact with deployment [7]. A catalogue of recurring pitfalls in security machine learning names inappropriate baselines and metrics that flatter a system without measuring the capability anyone cares about [8]. What we encountered is a concrete instance of the baseline pitfall, and we surfaced it only because we eventually computed the majority-class score explicitly instead of assuming it was low.
This work makes five contributions. First, we document the failure and its cause in reproducible detail on two independent corpora, on the view that a negative result with an identified mechanism is more useful to practitioners than another incremental accuracy figure. Second, we propose a constrained formulation for tool invocation in which the tools carrying class-discriminative signal are removed from the policy’s reach entirely and the remaining choice minimizes cost subject to an explicit relative accuracy floor. Third, we offer classifier capacity at graduated tiers rather than fixing it, so that the floor decides how much model to buy for each traffic group rather than only which auxiliary tools to discard; this turns a degenerate selection problem into a real one. Fourth, we measure every invocation cost by timing the tools on real incidents, separating the calculations a tool actually performs from the fixed overhead paid on every class regardless of which tool is chosen. Fifth, we sweep the accuracy floor to trace the cost-accuracy frontier it defines and identify where that frontier stops being safe, like the rarest attack family, not the average across families, determines how far the tolerance can be relaxed.
The rest of the paper is organized as follows. Section 2 places the work against IoT intrusion-detection datasets and evaluation practice, agentic tool use, cost-aware inference, and research on indirect prompt injection. Section 3 describes both corpora, the preprocessing decisions that two separate defects forced upon us, the measured cost model, the pipeline and the constrained formulation. Section 4 reports the achievable ceilings, detection and cost results, the core-removal experiment, the accuracy-floor frontier and injection robustness. Section 5 draws out the general lessons and states the limits on our claims. The paper concludes with Section 6.

2. Related Work

2.1. IoT Intrusion-Detection Datasets and Evaluation Practice

The TON_IoT collection was assembled to supply heterogeneous and realistically generated telemetry, an operating system and network traffic for evaluating security applications [1,9]. Its network component provides Zeek-derived flow features covering nine attack categories alongside benign traffic [1]. A study of the collection’s internal heterogeneity argued that the absence of feature standardization across its constituent sources complicates comparison between papers [10], an observation our own results reinforce from an unexpected direction, since the two corpora we use differ so sharply in achievable accuracy that a result on one cannot be read as evidence about the other.
Bot-IoT was built at the same institution to concentrate on botnet activity within IoT networks and supplies a huge, labelled corpus whose extreme class imbalance has itself become a subject of study [11]. The other dataset remain in circulation. UNSW-NB15 introduced a hybrid of synthetic and captured traffic described by forty-nine features [12]. CICIDS2017 emphasized realistic background traffic and protocol diversity [13]. Edge-IIoTset extended coverage toward federated and edge deployment [14], and NBaIoT supplied device-level botnet traces captured from commercial hardware [15]. Multiclass evaluation of these corpora is itself an active problem, and recent work has examined how scalable frameworks behave when several attack families must be separated rather than just detected [16].
Survey work on this literature is extensive. Network-based intrusion-detection datasets have been catalogued alongside the properties that determine their suitability [17], and the field’s techniques, datasets and open challenges have been reviewed at length [18]. Learning-based detection under IoT constraints [19], machine learning across the IoT threat surface [20] and the broader landscape of machine and deep learning for IoT security [21] have all been surveyed within the last few years. A critical review of detection practice for IoT set out what a universal and resilient system would have to provide [22], and a later one combined a threat taxonomy with an assessment of how current datasets shape and sometimes distort the systems trained on them [23]. An older survey of data-mining methods for intrusion detection remains a useful reference point for how little the evaluation conventions have changed in the interval [24].
A theme recurs across the methodological contributions in this area: evaluation practice lags behind modelling practice. A comparison of deep learning approaches across datasets found that reported performance depends heavily on preprocessing choices that papers rarely describe in full [25]. An examination of whether models trained on public intrusion-detection corpora transfer at all found the transfer weak [26]. A case for a standard feature set was made precisely because incompatible feature definitions make cross-corpus claims unverifiable [27]. The gap between machine learning results reported in cybersecurity papers and the requirements of operational deployment has been surveyed directly [28], and supervised methods evaluated within a single corpus have been shown to generalize poorly once the corpus changes [29]. Our finding that a saturated binary metric can conceal a total collapse in multiclass attribution belongs to this tradition of results about measurement rather than about models.
The specific measurement issue we encountered has been treated formally. Receiver operating characteristic curves give an over-optimistic impression on imbalanced data where precision-recall analysis does not [30]. The distortions that imbalance introduces into learning and into reported metrics have been surveyed [31] and studied systematically across classifier families [32]. A systematic analysis of performance measures makes clear why a summary binary score and a macro-averaged multiclass score can diverge as far as ours did [33]. Synthetic resampling remains the standard response to imbalance [34], although we deliberately downsample rather than synthesize for reasons given in Section 3.3. How imbalance propagates into metrics derived from the confusion matrix has been analyzed directly [35], and predictive modelling under imbalanced distributions has been surveyed more broadly [36].

2.2. Large Language Model Agents and Tool Invocation

The pattern of interleaving reasoning traces with external actions has been adopted, in one variant or another, by most contemporary agent frameworks [3]. Later work showed that a model can learn where in a generation to insert an API call without task-specific supervision [5] and that structured planning improves completion of multi-step tasks [6]. The resulting design space has been surveyed from the perspective of agent capability [4], of agent architecture [37], and of the coordination problems that arise once several such agents operate together [38].
Applications to security followed quickly. The dual-use character of generative models in cybersecurity and privacy has been surveyed, noting both defensive applications and the offensive capability the same models confer [39]. Security and privacy considerations across the language model lifecycle have been reviewed [40] and the attack surface these systems introduce when embedded in larger pipelines has been catalogued [41]. Generative approaches to cyber threat detection have been surveyed specifically [42], and a systematic review spanning more than three hundred studies has since mapped how these models are being applied across cybersecurity tasks [43].
Multi-agent organization of this work draws on a longer tradition. Multi-agent system architectures and the coordination problems they raise have been surveyed [44], as have trust management mechanisms for settings in which individual agents may be unreliable or compromised [45]. The trust-weighted consensus we employ is a straightforward instance of that class. To our knowledge, however, the particular interaction we study here between a learned tool-invocation policy and the class-discriminative capability of the tools that policy is allowed to decline has not previously been isolated and measured.

2.3. Cost-Aware Inference and Model Capacity Selection

The idea that inference cost should be matched to the difficulty of the instance is not new to agentic systems. Cascade architectures route easy inputs to cheap models and hard ones to expensive models, an approach studied under several names across vision and language [46,47]. Anytime and budgeted prediction frameworks formalize the same tradeoff as an explicit optimization [48], and the adaptive setting in which a cheap model defers to an expensive one is the closest formal analogue to what our accuracy floor chooses between [49]. Our tiered classifier registry is a deliberately simple instance of this idea, and the contribution is not the tiering itself but the observation that any accuracy floor placed over it behaves as a tunable control on the cost–accuracy frontier with a measurable point beyond which further relaxation stops being safe.

2.4. Indirect Prompt Injection

Instructions embedded in model input can override directives supplied at the system level, and the indirect form of this attack, in which adversarial content arrives through a retrieval channel rather than from the user, means that any agent consuming external documents inherits the exposure [50]. Automated procedures now exist for generating such payloads at scale, which removes the assumption that an attacker must handcraft each attempt [51]. The resulting taxonomy of prompt injection attacks and the defenses proposed against them has been surveyed [52], and the problem has been examined specifically in the context of tool-using agents [53]. An agentic intrusion-detection system retrieving threat intelligence is precisely the configuration these works describe, which is why we designated the threat-intelligence agent as the attack surface and evaluated it against both the payload family the filter was written for and a different family containing none of the imperative markers it matches. We report the outcome as a null result in Section 4.6 and are explicit that a null result is not evidence of defensive efficacy.

2.5. Base Learners and Statistical Methodology

The tool registry uses random forests [54] and isolation forests [55] as supervised and unsupervised detectors respectively, since both are conventional choices in this setting. An extension of isolation forests addressing a bias in the original splitting rule has been proposed [56], and the anomaly-detection landscape has been surveyed more broadly [57]. Empirical evidence supports treating random forests as a strong default across tabular classification problems [58], which is the role they play here, and an analysis of which hyperparameters matter most for random forests informs our tier design [59].
For inference we use paired bootstrap resampling [60] together with the paired test appropriate for classifiers evaluated on a shared partition [61]. Because our TON_IoT test partition is large, differences are far too small to matter operationally or reach nominal statistical significance, so we report relative effect sizes beside every p-value rather than relying on significance thresholds alone. Concept drift is a further consideration for any deployed detector and has been surveyed from the adaptation perspective [62] and from the learning perspective [63].

2.6. Summary and Key Takeaways

Four gaps emerge from this survey and shape what follows. First, evaluation practice in IoT intrusion detection is known to be fragile, but the specific failure in which a summary binary metric conceals a complete collapse of multiclass attribution has not been documented with its cause identified and replicated. Second, the agentic tool-use literature treats tool selection largely as an efficient problem, and the possibility that a cost-driven policy might discard the very tools carrying the task-relevant signal has not been isolated experimentally. Third, cost figures in this literature are frequently asserted rather than measured, which makes efficiency claims unverifiable. Fourth, robustness evaluations for agentic security systems report defense efficacy without first establishing whether the attack had any effect to prevent. Table 1 places our contribution against the most closely related work.
The gap this work addresses can be stated in one sentence. Cost-aware inference has been studied extensively as an efficiency problem, and tool selection for agents has been widely studied as a capability problem, but the case in which the two conflict, where the informative tools are also the expensive ones so that the optimizing cost removes capability, to our knowledge has not been isolated, measured with time costs and replicated across corpora.

3. Materials and Methods

3.1. Corpora

We evaluate on two independent corpora so that every claim can be checked for replication. Both are public and they differ enough in difficulty that a result appearing on only one of them should be reported as specific to that corpus rather than general.
The first is the network component of TON_IoT, distributed as a single curated train-and-test file of 211,043 labelled flows [1,10]. After removing identifiers, timestamps, free-text fields and the label column, 29 usable features remain. Keeping source and destination addresses would let a classifier memorize the attack infrastructure of the capture rather than learn transferable behavior, a form of leakage that inflates reported accuracy without any operational capability [8].
The second is Bot-IoT, taken in its full release of 73,370,443 flows across 74 files [11]. After removing identifiers and two columns that never vary, 19 usable features remain. The corpus is extraordinarily imbalanced, with benign traffic accounting for 9543 flows. We exclude the theft category which contains 1587 records and would otherwise cap the per-family sample size for the entire study. We state this plainly because it is a judgement rather than a technicality, and a reader may reasonably prefer the alternative.

3.2. Traffic Grouping

Flows are grouped so that each group receives its own fitted detectors, which preserves the multi-domain routing structure of the agent architecture. TON_IoT is grouped by application layer service, and Bot-IoT by transport protocol, since it carries no service field. This is a genuine difference in what a group means between the two corpora, and we state it rather than glossing over it.
The group earns its own detectors only if it contains at least five thousand flows and at least four distinct classes on TON_IoT, or three on Bot-IoT. Both tests matter. A group with many flows but a single class scores a trivial macro-F1 of one and tells us nothing, and a group with several classes but fewer flows receives too few validation incidents for tier comparison to mean anything. Services failing either test are merged into a residual group, and if the residual group is itself too small it is folded into the large viable group since a group with no fitted detectors produces no evidence at all and every one of its incidents would default to benign.
This procedure yields three groups on TON_IoT and, after rebalancing, two on Bot-IoT, as summarized in Table 2. On TON_IoT, six services including FTP and SSL are merged into the residual group. FTP in particular carried 1065 flows of a single class. On Bot-IoT the ICMP group passes the test on the full corpus with 32,322 flows but falls to 101 flows after rebalancing and is folded into UDP at that point. Group viability must therefore be checked against the partition actually used and not against the source corpus.

3.3. Class Composition and Rebalancing

Two aspects of our original protocol needed correction, and we describe both because each on its own invalidated a headline number and each is easy to reproduce in any study of this kind.
The first concerns is class balance. Our initial TON_IoT partition contained 164 attack flows for every 25 benign fractions. On such a partition, a constant “attack” prediction achieves a binary F1 of 0.9292, which is indistinguishable from what our system was reporting. We therefore rebalance both corpora toward a target benign fraction of 0.35. Because benign flows are the limiting resource in both cases and overwhelmingly so in Bot-IoT, we downsample attack families rather than oversampling benign traffic. Synthetic oversampling [34] would place fabricated instances into a partition meant to measure behavior on real traffic, and we judged the resulting ambiguity worse than the loss of data.
Families are capped at the size the benign supply allows, except that a family smaller than the cap keeps its natural size rather than dragging every other family down to it. On TON_IoT this preserves man-in-the-middle at 1043 flows while other families are capped at 10,317; forcing uniformity would have discarded roughly nine tenths of the usable data to accommodate a single class. That decision turns out to matter for the results since the rare class is what determines how far the accuracy floor can be relaxed. Table 3 and Figure 1 give the resulting composition.

3.4. Measured Cost Model

The second correction concerns cost accounting, and it is the one we consider most important to state plainly. Our original cost function used hand-written constants, and a policy optimized against it reduced tool cost by a factor of nearly ten while increasing token consumption and end-to-end latency, so that the apparent saving was a transfer of expenditure into a category the objective could not see. Worse, the constants had never been checked against reality. An efficiency claim resting on assumed costs cannot be verified, and we now regard asserting costs as a methodological defect in its own right.
Every cost reported in this paper is therefore timed. Each tool is measured on real validation incidents, with warm-up passes discarded and the median of repeated timed passes taken, so that a single garbage-collection pause or scheduler interruption cannot define a published figure. The measurement separates two quantities that a naive approach runs together. The marginal compute is the work the tool actually performs, measured in batch and divided by batch size. The fixed overhead is the per-call cost of framework validation, array construction and dispatch, paid once on every invocation regardless of which tool is chosen.
That distinction is not academic. On our hardware the fixed overhead is 3.64 ms per call on TON_IoT and 3.56 ms on Bot-IoT, two orders of magnitude larger than the marginal compute of even the most expensive classifier. Timing single invocations therefore returns nearly identical figures for the cheapest and most expensive classifiers, which flattens exactly the distinction the tiered registry depends upon. Normalized cost units are based on marginal compute, since that is the term the policy’s decision depends on, and the overhead is reported alongside.
Costs are normalized so that the cheapest measured tool equals one unit, and tool compute and language model tokens share the unit so that the policy cannot reduce one by inflating the other. Measurements were taken on an Apple Silicon workstation running macOS 15.5 and Python 3.14.6. Table 4 gives the measured registry.

3.5. Tiered Tool Registry

Each group receives three classifiers at graduated feature budgets rather than one. The lite tier uses the five features ranked highest by mutual information, with sixty trees at depth eight; the mid tier uses twelve features with one hundred and fifty trees at depth sixteen; the full tier uses every live feature with three hundred unrestricted trees. Feature ranking is computed once per group and reused across tiers, so the tiers are nested rather than independently selected.
This design decision is not cosmetic. Our earlier registry contained one classifier per group at a single capacity, plus auxiliary detectors that measured at or below zero marginal value. Selection was therefore degenerate: calling the classifiers was trivially optimal, and the learned policy converged on that subset every time, which made the constrained formulation impossible to evaluate because there was nothing to choose between. With graduated capacity the policy faces a real accuracy-per-unit-cost tradeoff, and the accuracy floor becomes a control parameter rather than a formality.
Because the tiers are the same model at different capacities, they are alternatives rather than complements. Calling several tiers of the same group’s classifier lets two weaker tiers outvote the strongest, which is dilution rather than corroboration, so the pipeline keeps only the widest tier present per group at invocation time. Auxiliary detectors, comprising an isolation forest, a quantile rule check and a distributional drift check, are retained because a registry containing only classifiers would beg the question the policy is meant to answer.

3.6. Pipeline Architecture

Before describing the pipeline, we state its scope precisely because the distinction matters for how the results should be read. The configuration evaluated in this paper routes each incident to a group of fitted detectors and fuses their output deterministically. No language model participates in the reported experiments, and token cost is therefore zero by construction rather than by measurement. What follows is an evaluation of the tool selection layer, not of a language-model-mediated interference loop, and we are careful throughout Section 4 and Section 5 to claim no more than that.
We use four terms precisely and distinguish them here. A tool is a fitted detector that consumes an incident and returns evidence. In this work, a classifier has one of three capacities: an isolation forest, a rule check or a drift check. A component is one of the five stages that routes, enriches, analyzes, validates and fuses that evidence together. The policy is the procedure that decides which tools a component may call. A language model would be an alternative implementation of the fusion component and is discussed as such among the limitations, but it does not play a role in the experiments reported here.
The pipeline comprises five agents together with a security layer that operates across all of them, shown in Figure 2. A monitoring agent performs initial triage and casts a preliminary vote from inexpensive detector output. A threat-intelligence agent retrieves external context, and this is the component we designate as the injection surface for the experiments in Section 4.6. An analysis agent determines the attack family and probable impact. A validation agent checks the accumulated votes for internal inconsistency. A supervisor agent fuses all votes through trust-weighted consensus into a final verdict.
Evidence entering the consensus is weighted by kind rather than counted uniformly, with fitted classifiers assigned four times the weight of anomaly scores. This is not a tuning convenience but a correction for a defect we observed directly. Under uniform averaging, three weak detectors agreeing on an incorrect label could outvote one confident classifier and the resulting verdicts were worse than those of the classifier alone.
A second and less obvious rule governs the fusion. Anomaly scores, rule checks and drift checks are binary. They answer whether an incident looks unusual, not which family it belongs to. They may therefore never name a final label. An earlier implementation allowed them to vote for a literal “attack” token, which is not one of the corpus classes. Binary evidence is now spread across the attack classes in proportion to whatever classifier evidence exists, and where no classifier was called it can support only the benign decision, which is the honest answer since binary evidence cannot perform attribution.
The security layer runs across all stages and comprises three mechanisms: a per-agent tool firewall restricting which detectors each agent may call, memory compartments that quarantine retrieved intelligence exhibiting instruction-like structure, and dynamic trust scoring that reduces the consensus weight of agents whose votes diverge persistently from the median.

3.7. Constrained Policy Formulation

Let T denote the tool registry and c(t) the timed normalized cost of tool t. The unconstrained formulation minimizes total invocation cost subject only to a budget, and it is this formulation that produces the collapse reported in Section 4.4. It is worth saying plainly that the policy behaves correctly with respect to the objective it is given. The objective is incomplete.
The constrained formulation instead solves
m i n c ( t )   s u b j e c t   t o   F 1 S 1 ε F 1 T , C S
where S is the selected subset, C a mandatory core placed outside the policy’s reach entirely, and ε a relative tolerance. Three properties matter. The accuracy floor is expressed relative to the performance of the full registry rather than as an absolute target, so it remains meaningful on corpora where the achievable ceiling is low. The mandatory core is enforced structurally, by removing those tools from the set the policy may act upon, rather than by penalizing their omission, because a penalty can always be outweighed by a large enough cost saving, and the largest savings available are precisely those from skipping the most expensive tool. And because the objective is a minimization, the policy stops once the floor is satisfied, rather than spending any budget that remains. An earlier implementation kept buying tools with positive marginal value and thereby re-added the expensive tier the floor had just replaced, which made the constrained policy cost more than its own core for slightly less accuracy.
Membership in C is decided by measurement rather than by assertion and the procedure has three stages. First, for each traffic group, every classifier tier is evaluated on its own against the group’s validation incidents and the cheapest tier scoring at least one minus the tolerance times the best tier’s score is admitted. Second, each admitted member is checked against the core rather than against the full registry where we ask what is lost if this tool goes and nothing replaces it and not what is lost if it goes while its siblings remain. That distinction is easy to get wrong and quietly empties the core, because leave-one-out testing over a registry containing redundant alternatives reports that every tier is dispensable. Third, the marginal value of each remaining candidate is estimated given the core, again within its own group since a group’s classifier fires only on that group’s traffic.
Restricting tier comparison to a group’s own incidents is equally necessary. A group’s classifier fires only on that group’s traffic, so scoring it against the whole validation set measures mostly rows it never saw, and the comparison degenerates into near-ties.

3.8. Evaluation Design and Experimental Conditions

We state the separation of partitions explicitly because the policy is itself fitted. Tier comparison, core membership, marginal values and decision thresholds are calculated on the validation partition alone. The test partition informs no policy decision and is used only to produce the results reported in Section 4. Decision thresholds are calibrated independently for each condition on the validation partition, hereby maximizing balanced accuracy. Different tool subsets produce different score distributions, so a threshold appropriate to one is not appropriate to another; in an earlier protocol, calibrating once under exhaustive invocation and reusing that threshold drove three conditions below the majority-class baseline on its own.
We report macro-averaged F1 over all classes as the primary metric, since it weights each attack family equally and therefore registers the disappearance of a rare family that an accuracy-based measure would not. Binary detection F1 is reported alongside, always with the majority-class baseline adjacent and binary balanced accuracy as a secondary check because F1 on an imbalanced partition remains hard to interpret even when the baseline is stated [33]. Confidence intervals come from bootstrap resampling with two thousand replicates and paired comparisons between conditions apply the same resampling to the paired difference. Because a non-significant difference is not evidence of equivalence, we assess equivalence directly using two one-sided tests with a margin of δ = 0.005 macro-F1. The margin was fixed in advance as the smallest difference we would regard as optionally meaningful on these corpora and equivalence is declared when the bootstrap interval for the paired difference lies entirely within the δ change. Fitting and fusion are deterministic, so the five random seeds vary only the bootstrap draw. Therefore we report a single figure per condition rather than a mean and standard deviation across seeds, since the latter would overstate what the repetition establishes.
Seven conditions are evaluated, summarized in Table 5. Exhaustive invocation calls every registered tool, taking the widest classifier tier per group, and establishes the cost upper bound. Domain-restricted invocation calls all tools associated with the incident’s group. Fixed selection uses one full-tier classifier per group and represents the configuration a careful engineer would reach without measurement. Random selection draws a subset uniformly and serves as a sanity check, since a policy that fails to beat random selection is not a policy. Core-only calls the mandatory core alone. The constrained policy is the method under evaluation. Finally, a core-removal condition reproduces the unconstrained formulation deliberately, under a budget below the cheapest classifier, so that real cost pressure applies. It is retained precisely because it demonstrates the cause rather than because it performs well.

4. Results

4.1. Achievable Ceilings

Before evaluating any agent configuration, we established what each corpus permits. Fitting classifiers directly to the labels, with no agent layer of any kind, yields a pooled macro-F1 of 0.9578 on TON_IoT and 0.999 on Bot-IoT. Every agent result below should be read as a fraction of these figures, rather than of unity, since no orchestration strategy can extract information that the detectors do not have access to.
We stress the word pooled. An earlier version of this analysis calculated a weighted mean of per-group macro-F1 scores and obtained 0.8755 on TON_IoT, which we initially took as the ceiling. That figure is not comparable to an agent result, because averaging macro-F1 across groups containing different class subsets is a different statistic from macro-F1 over pooled predictions where the HTTP group contains eight classes and the residual group ten, so per-group average implicitly reweights the classes. Reporting the incomparable figure would have made our agent appear to exceed the achievable maximum by eight points, an impossible result that should be read as a bug rather than a finding. Establishing a ceiling is only useful if the ceiling is calculated as the same statistic being compared against it.
The gap between the two corpora is itself informative and is shown in Figure 3. Bot-IoT is close to saturated with four classes and nineteen features, its ceiling is 0.999, and its binary ceiling is exactly 1.00. TON_IoT, with ten classes including one rare family, tops out at 0.9578. A method that appears strong on Bot-IoT alone has demonstrated very little, and we use it as a replication corpus rather than as a primary result throughout. Table 6 reports the achievable ceiling for both corpora under each fitting regime.

4.2. Detection Performance and Cost on TON_IoT

Table 7 reports all seven conditions on TON_IoT. The constrained policy attains a macro-F1 of 0.9542 at 1120 normalized cost units per incident against 0.9549 at 3451 units for exhaustive invocation. The accuracy difference is 0.0007, relative difference of 0.077 percent while the cost difference is a factor of 3.08. The bootstrap interval for this paired difference is [−0.0031, +0.0014] over 38,575 paired instances, which lies entirely within the pre-specified equivalence margin of 0.005, so the two conditions are statistically equivalent rather than merely indistinguishable. Figure 4 shows the resulting cost-accuracy frontier.
The paired difference between the constrained policy and exhaustive invocation is −0.0007 macro-F1, with a bootstrap interval of [−0.0031, +0.0014] over 38,575 paired instances. This interval lies entirely within the pre-specified equivalence margin of 0.005, so the two are statistically equivalent rather than merely indistinguishable. The corresponding p-value of 0.526 confirms that no difference is detected but it is the equivalence result and not the failure to reject that supports the claim. Table 8 reports the full set of paired comparisons with relative effect sizes beside every p-value, because with a partition this large a difference far too small to matter operationally can still reach nominal significance, and the fixed condition shows the converse being nominally better by 0.0006 with p = 0.278.
An honest reading of Table 7 requires acknowledging that the constrained policy and the core-only condition are identical on this corpus, agreeing exactly on every metric. This is not coincidence. The core is chosen so that it already satisfies the accuracy floor, and because the objective is minimization the policy correctly stops there rather than spending further budget. The contribution of the formulation is therefore not the discovery of an elaborate subset but the selection of the right capacity and the avoidance of a catastrophic subset, and the core-removal experiment in Section 4.4 is what makes the second half of the claim visible. Figure 5 shows the marginal-value estimates that produced the selection.

4.3. Replication on Bot-IoT

Table 9 reports the same seven conditions on Bot-IoT. The constrained policy attains 0.9997 at 294 normalized cost units against 0.9990 at 2051 for exhaustive invocation, a factor of 6.98 cheaper while scoring marginally higher, with a paired difference of +0.0007 and a bootstrap interval of [0.0000, 0.0015] that again falls within the equivalence margin. The direction of that difference is worth a sentence. Exhaustive invocation includes the auxiliary detectors, and on a corpus where the classifier is essentially perfect those detectors can only add noise to the consensus. Invoking fewer tools is better here, not merely cheaper.
Two findings replicate cleanly across the corpora and one does not. Detection collapses in both cases when the core is removed, and the cheapest classifier tier suffices in every group of both corpora. The accuracy-floor frontier, however, cannot be exercised on Bot-IoT at all since every tier scores exactly 1.0000 on validation, so the cheapest is selected at every tolerance and the sweep is flat. We report Bot-IoT as a replication of the underlying behavior rather than as a second demonstration of the frontier and treat any claim that requires headroom as TON_IoT-specific. Bot-IoT therefore carries the replication of the collapse and of the capacity finding, but it cannot exercise the accuracy cost frontier at all. With a ceiling of 0.999 and every tier scoring identically on validation, the cheapest tier satisfies any tolerance we might set and the sweep is flat by construction rather than by result. We draw no frontier conclusion from this corpus.

4.4. Removing the Core Reproduces the Failure

Removing the mandatory core while holding every other component fixed, under a budget below the cheapest classifier so that genuine cost pressure applies, reduces macro-F1 from 0.9542 to 0.0511 on TON_IoT, a relative loss of 94.65 percent, and from 0.9997 to 0.2422 on Bot-IoT, a relative loss of 75.75 percent. Both are significant at p < 0.001 by paired bootstrap. Figure 6 places the core-removal experiment beside every other condition.
The per-class breakdown in Figure 7 shows what the aggregate figure conceals. On TON_IoT the collapsed configuration scores exactly zero on nine of ten classes, retaining only partial performance on benign traffic at 0.5089. Its binary F1 of 0.0217 sits far below the 0.7876 that a constant “attack” prediction would achieve, which is the clearest possible signal that the configuration is not merely degraded but actively anti-correlated with the labels. On Bot-IoT the pattern is the same in kind: denial of service and reconnaissance fall to zero, distributed denial of service retains 0.2536, and binary F1 of 0.7266 again falls below the 0.7839 baseline.
Figure 8 reports binary detection against the majority-class baseline, which is the form in which we believe binary results in this literature should be presented. Presented this way, the collapse is unmistakable.

4.5. The Accuracy Floor as a Control Parameter

Sweeping the tolerance ε traces the frontier the constraint defines. Table 10 and Figure 9 report the result on TON_IoT, where four distinct operating points emerge, each corresponding to a different assignment of classifier capacity across the three traffic groups.
The second is the operational limit, shown in Figure 10. Relaxing the tolerance from 0.02 to 0.05 costs only 1.45 percent of macro-F1 in aggregate, which looks like an acceptable trade for a further 46-percent cost reduction. Inspecting the per-class effect tells a different story. At ε = 0.02 the rarest family, man-in-the-middle at 1043 training flows, is unharmed and in fact marginally improves, from 0.8120 under exhaustive invocation to 0.8139. At ε = 0.05 it falls to 0.7308, a relative loss of ten percent, while every other family loses under one percent. Because macro-F1 averages over ten classes, a ten-percent loss on one of them contributes roughly one percent to the aggregate and is easily mistaken for uniform mild degradation. The rarest class, not the average, is what determines how far the floor can be relaxed.

4.6. Indirect Prompt Injection: A Null Result and What It Implies for Evaluation Design

We evaluated indirect prompt injection across three arms on 300 incidents per corpus: a clean control, an injected arm with adversarial content planted in retrieved threat intelligence, and a defended arm with the security layer active. Two payload families were used, one comprising the imperative forms the defensive filter was written against and one comprising paraphrases containing no imperative markers.
On both corpora, in both payload families and in both arms, no verdict changed. The verdict-change fraction, the binary-flip fraction, the change in false-negative rate and the change in false-positive rate are all exactly zero, on TON_IoT and on Bot-IoT alike. Table 11 records the result.
We report this as a null result and decline to draw the conclusion it superficially invites. The attack did not move verdicts, so the defense therefore had no opportunity to demonstrate efficacy and nothing here should be read as evidence that it works. Why the attack failed is a separate question that these experiments cannot answer.
We note this partly as a methodological point. A robustness evaluation that reports only the defended arm on a system whose undefended arm was already unaffected will report perfect defensive efficacy while having measured nothing, which is structurally the same error as the saturated binary metric described in Section 1.

4.7. Key Findings

Two distinct mechanisms are at work in these results and it is worth separating them. The recovery from collapse is attributable to the mandatory core which the core-removal condition isolates directly; with the core enforced the pipeline reaches the achievable ceiling and without it detection falls below a constant prediction. The cost reduction is attributable to the capacity decision made by the accuracy floor which the tolerance sweep isolates. Relaxing the floor here buys progressively cheaper classifier tiers along a measured frontier. Adaptive selection among comparably useful tools is a third mechanism that these experiments do not exercise, because on both corpora the selected subset was the core itself. With that separation in place, five findings emerge. A cost-driven tool-invocation policy eliminates the tools carrying class-discriminative signal, losing 94.65 percent of macro-F1 on TON_IoT and 75.75 percent on Bot-IoT, with binary detection falling below a constant prediction in both cases. The constrained formulation recovers essentially all of the achievable accuracy at 3.08 times lower cost on TON_IoT and 6.98 times lower on Bot-IoT, with the difference from exhaustive invocation statistically equivalent under a pre-specified margin on both corpora. The saving arises from classifier capacity selection rather than auxiliary tool pruning, since auxiliary detectors are three orders of magnitude cheaper than classifiers and pruning them saves almost nothing. The accuracy floor behaves as a tunable control parameter tracing an explicit frontier, whose operational limit is set by the rarest class rather than by the aggregate metric. And indirect prompt injection produced no measurable effect on either corpus, which we report as a null result rather than as defensive success.

5. Discussion

5.1. Cost Objectives Require Explicit Accuracy Constraints

The central lesson generalizes well beyond our particular architecture. A policy optimizing an objective that references only cost will eliminate whichever components are most expensive, and in a diagnostic pipeline the most expensive components are frequently those carrying the most information. The policy in our unconstrained experiment behaved correctly with respect to the objective it was given, and the fault lay in an objective that omitted the very quantity the system exists to produce.
Any deployment granting an agent discretion over its own tool invocations should therefore encode an accuracy floor structurally rather than relying on the optimizer to preserve a capability it is not rewarded for preserving. The distinction between structural enforcement and penalty-based discouragement is not a detail. A penalty term can always be outweighed by a sufficiently large cost saving and the savings available from skipping the most expensive tool are precisely the largest on offer. Removing those tools from the action space entirely, as we do, makes the failure unreachable rather than merely unattractive.
We emphasize that the mandatory core must be determined by measurement. In earlier experiments on a different corpus, one group’s classifier exhibited a negative marginal contribution, so forcing it into the core on the intuition that classifiers are always valuable would have cost both accuracy and compute. The leave-one-out procedure of Section 3.7 is inexpensive relative to the cost of getting this wrong, provided it is applied correctly, validating each core member against the core rather than against the full registry and within its own group rather than across the whole validation set. Both errors are easy to make and both silently destroy the core.

5.2. The Accuracy Floor Is a Control Parameter with a Rare-Class Limit

Our most practically useful result is that the tolerance ε traces an explicit and measurable cost-accuracy frontier. At ε = 0.02 the system runs at 3.08 times lower cost than exhaustive invocation for a 0.077-percent accuracy difference. At ε = 0.20 it runs at 7.16 times lower cost for a 1.98-percent difference. An operator can select a point on this curve according to their alert volume and their tolerance for missed attributions, and the selection is defensible because the curve is measured rather than argued.
The limit on that relaxation is the finding we did not anticipate and consider the most transferable. Macro-averaging distributes a catastrophic loss on one rare class across all classes, so the aggregate metric understates the damage by roughly the number of classes. On our corpus, moving from ε = 0.02 to ε = 0.05 appears to cost 1.45 percent of macro-F1 while actually costing the man-in-the-middle family ten percent of its F1. In an operational setting a ten-percent degradation on the rarest attack family is likely to matter more than a one-percent degradation on the aggregate, because rare families are frequently the ones an analyst most needs correctly attributed. We therefore recommend that any capacity-reduction decision be validated against per-class scores for the rarest classes specifically and not against a macro-average alone.
The non-monotonicity between ε = 0.005 and ε = 0.02 makes a related point. The tighter tolerance buys the wider DNS classifier because it scored better on validation, and that model scored slightly worse on test. A relative accuracy floor with a non-trivial tolerance absorbs exactly this kind of estimation noise; a floor tight enough to chase every validation point does not and inherits the variance of the validation estimate along with its signal.

5.3. Cost Must Be Measured, Not Asserted

Our earlier cost table consisted of hand-written constants, and the ratio between them determined our headline efficiency claim. When we replaced those constants with measurements, three things changed. The ratio between the cheapest and most expensive tool grew by three orders of magnitude, because rule checks execute in tens of nanoseconds while classifiers execute in tens of microseconds. The identity of the saving changed, and pruning auxiliary tools, which the assumed costs had made appear worthwhile, turned out to save almost nothing; essentially all of the available saving came from choosing classifier capacity, and the headline ratio itself changed substantially.
The measurement procedure also required care that we did not initially apply. Timing single invocations conflates the marginal compute of the tool with the fixed per-call overhead of the surrounding framework, and on our hardware that overhead is roughly 3.6 ms, which is two orders of magnitude larger than the marginal compute of even the most expensive classifier. A single-call measurement therefore returns nearly identical figures for a sixty-tree and a three-hundred-tree model, which flattens exactly the distinction the tiered registry depends upon. Separating the two, reporting the overhead alongside and basing the cost unit on marginal compute resolves this. We consider the practice of asserting rather than measuring invocation costs a methodological defect in the same family as omitting a majority-class baseline where both make a reported quantity unverifiable.

5.4. Aggregate Metrics Can Conceal Total Capability Loss

In our original protocol, binary detection F1 remained near 0.93 while multiclass macro-F1 fell by a factor of eight. The binary figure was not merely uninformative but actively misleading, because it exceeded the score of a deliberately weakened baseline we had included as a sanity check. A system that appears to beat its own negative control should prompt investigation.
The diagnostic that resolved the question was elementary since computing the F1 of a constant “attack” prediction on the evaluation partition obtained 0.9292, with three conditions reporting that value to sixteen decimal places. Identical floating-point output across conditions that invoke different tools is not evidence of consistent performance but of identical prediction vectors, and in retrospect this was the clearest signal available. We recommend that the majority-class score be reported adjacent to every binary detection result in this literature, a recommendation consistent with the methodological arguments of [7,8] and with the metric analyses of [30,33]. The cost of this practice is one number per table.

5.5. Limitations

Six limitations bound our claims, stated in the order of how much they constrain the conclusions. First, the evidence fusion evaluated here is deterministic rather than language-model-mediated. Token cost is therefore zero by construction and our cost figures characterize the tool layer alone. We do not claim to have measured the efficiency of an agentic pipeline in the full sense, and a token-inclusive evaluation may alter the relative ordering of conditions, since configurations invoking fewer tools may require more reasoning to compensate. The cost accounting infrastructure is in place and the decomposition is reported precisely so that this evaluation can be conducted and compared directly.
Second, our injection result is null on both corpora and we have therefore established nothing about defensive efficacy. The explanation we find plausible, that strong and mutually corroborating classifier evidence renders a single compromised agent unable to move a trust-weighted consensus, requires a matched weak-evidence configuration to test. Constructing one, for instance from a feature-poor telemetry corpus, is the natural next experiment. Third, our injection payloads are static. An adaptive adversary with knowledge of the filter would very likely fare better, and our held-out paraphrase family, while a genuine step beyond evaluating only the payloads the filter was written for, is not an adaptive attack. Fourth, the accuracy-floor frontier is demonstrated on one corpus. A third corpus would strengthen the frontier result only if it has headroom. Bot-IoT does not: with a ceiling of 0.999, every capacity tier is adequate, so the floor has nothing to choose between and a further saturated corpus would extend the replication without advancing the frontier. What is needed is a corpus difficult enough that capacity matters with several classes of unequal frequency, since our results indicate that the rarest class rather than the average determines how far the tolerance can be relaxed. Cross-corpus transfer in this field is known to be poor [26,27], and we make no transfer claim. Fifth, the constrained policy converges to its own mandatory core on both corpora, so the selection mechanism beyond core determination is untested here. A registry containing several comparably informative and comparably priced tools would exercise it more genuinely than ours does. Sixth, we do not evaluate concept drift. A deployed detector faces traffic whose distribution shifts, and both the mandatory core and the tier assignment that defines it would require periodic computations [62,63]. The procedure is cheap enough to run on a schedule, but we have not measured how quickly the estimates go stale.

5.6. Deployment Considerations

Two practical questions follow from these results, and we can answer one of them from the measurements. On latency, the constrained policy’s 1120 normalized cost units corresponds to roughly 73 microseconds of marginal compute per incident, to which the fixed per-invocation overhead of 3.64 milliseconds must be added. The overhead dominates by a factor of about fifty, which means the practical gain from capacity selection in an online setting is throughput under batching rather than single incident latency. An operator processing incidents one at a time would see little benefit, and the one batching a few hundred would see most of it.
On drift, we can only frame the question. Both the mandatory core and the tier assignment are derived from validation data, so a distribution shift that is large enough to change which tools carry signal would require re-computation. The procedure is inexpensive, taking minutes rather than hours, so scheduling it is not an obstacle. What we cannot say from these data is how quickly the estimates go stale, because we evaluated no temporal split. That measurement on a corpus with reliable timestamps is the natural companion to the work reported here.

6. Conclusions and Future Work

We set out to build a cost-efficient agentic intrusion-detection system for IoT networks and found, first, a failure mode worth reporting on its own terms. A tool-invocation policy trained against cost alone learns to skip the only tools carrying class discriminative signal, losing 94.65 percent of macro F1 on TON_IOT and 75.75 percent on Bot-IoT, while binary detection falls below the score of a constant prediction in both cases. The failure is invisible to the aggregate metric most commonly reported in this literature, and we surfaced it only by computing the majority class baseline explicitly.
The constrained formulation we propose places signal bearing tools outside the policy’s action space and minimizes measured invocation cost subject to an explicit relative accuracy floor with classifier capacity tiered so that the floor selects how much model to buy for each traffic group. On TON_IoT it attains a macro-F1 of 0.9542 against a measured ceiling of 0.9578 at 1120 normalized cost units per incident versus 3451 for exhaustive invocation, a difference of 0.077 percent that is statistically equivalent under a pre-specified margin of 0.005 macro-F1. On Bot-IoT it is 6.98 times cheaper while scoring marginally higher than exhaustive invocation. A core-removal experiment reproduces the original collapse on both corpora, which shows that the constraint and not some other part of the redesign, is what makes the recovery possible.
Three secondary results appear to us to have wider application. The tolerance parameter traces an explicit cost–accuracy frontier from 2.25 to 7.16 times cost reduction, which lets an operator choose a defensible point rather than accept a designer’s default. That frontier has an operational limit set by the rarest class, which loses ten percent of its F1 at a tolerance where the macro-average loses one and a half percent, so capacity decisions must be validated per class rather than in aggregate. Furthermore, replacing assumed invocation costs with measured ones changed both the identity of the saving and its magnitude, which persuades us that asserted costs should be treated as a methodological defect rather than a convenience.
We close on what these results do not settle. The pipeline evaluated here fuses evidence deterministically, so the cost figures characterize the tool layer and not a language-model-mediated loop. The frontier rests on one corpus, since the second is saturated. The injection evaluation is null and establishes nothing about defense. And we have not measured how quickly the core or the tier assignment goes stale under drift, which is the question a deployment would ask first. What we do claim is narrower and, we think, durable. Where a policy is permitted to decline tools on cost grounds and the informative tools are the expensive ones, cost minimization will remove capability and an accuracy floor enforced structurally rather than by penalty is what prevents it.

Author Contributions

Conceptualization, A.E. and J.S.; methodology, A.E.; software, A.E.; validation, A.E., J.S. and H.U.; formal analysis, A.E.; investigation, A.E.; resources, J.S. and H.U.; data curation, A.E.; writing—original draft preparation, A.E.; writing—review and editing, A.E., J.S. and H.U.; visualization, A.E.; supervision, J.S. and H.U.; project administration, J.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Both corpora analyzed in this study are publicly available. The TON_IoT datasets are distributed by UNSW Canberra Cyber at https://research.unsw.edu.au/projects/toniot-datasets (accessed on 14 July 2026). This work uses train_test_network.csv from the Train_Test_datasets collection. The Bot-IoT dataset is available at https://research.unsw.edu.au/projects/bot-iot-dataset (accessed on 18 July 2026). This work uses the full-feature release. The experimental code, configuration files, cost-measurement harness and analysis scripts required to reproduce all reported results are available at https://github.com/etaraakarsh/aegis-IoT (accessed on 24 August 2026).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Moustafa, N. A new distributed architecture for evaluating AI-based security systems at the edge: Network TON_IoT datasets. Sustain. Cities Soc. 2021, 72, 102994. [Google Scholar] [CrossRef] [Scilit]
  2. Zarpelão, B.B.; Miani, R.S.; Kawakani, C.T.; de Alvarenga, S.C. A survey of intrusion detection in Internet of Things. J. Netw. Comput. Appl. 2017, 84, 25–37. [Google Scholar] [CrossRef] [Scilit]
  3. Wang, L.; Ma, C.; Feng, X.; Zhang, Z.; Yang, H.; Zhang, J.; Chen, Z.; Tang, J.; Chen, X.; Lin, Y.; et al. A survey on large language model based autonomous agents. Front. Comput. Sci. 2024, 18, 186345. [Google Scholar] [CrossRef] [Scilit]
  4. Xi, Z.; Chen, W.; Guo, X.; He, W.; Ding, Y.; Hong, B.; Zhang, M.; Wang, J.; Jin, S.; Zhou, E.; et al. The rise and potential of large language model based agents: A survey. Sci. China Inf. Sci. 2025, 68, 121101. [Google Scholar] [CrossRef] [Scilit]
  5. Qin, Y.; Hu, S.; Lin, Y.; Chen, W.; Ding, N.; Cui, G.; Zeng, Z.; Zhou, X.; Huang, Y.; Xiao, C.; et al. Tool learning with foundation models. ACM Comput. Surv. 2025, 57, 101. [Google Scholar] [CrossRef] [Scilit]
  6. Huang, X.; Liu, W.; Chen, X.; Wang, X.; Wang, H.; Lian, D.; Wang, Y.; Tang, R.; Chen, E. Understanding the planning of LLM agents: A survey. arXiv 2024, arXiv:2402.02716. [Google Scholar]
  7. Sommer, R.; Paxson, V. Outside the closed world: On using machine learning for network intrusion detection. In Proceedings of the 2010 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 16–19 May 2010; pp. 305–316. [Google Scholar]
  8. Arp, D.; Quiring, E.; Pendlebury, F.; Warnecke, A.; Pierazzi, F.; Wressnegger, C.; Cavallaro, L.; Rieck, K. Dos and don’ts of machine learning in computer security. In Proceedings of the 31st USENIX Security Symposium (USENIX Security 22), Boston, MA, USA, 10–12 August 2022; pp. 3971–3988. [Google Scholar]
  9. Alsaedi, A.; Moustafa, N.; Tari, Z.; Mahmood, A.; Anwar, A. TON_IoT telemetry dataset: A new generation dataset of IoT and IIoT for data-driven intrusion detection systems. IEEE Access 2020, 8, 165130–165150. [Google Scholar] [CrossRef] [Scilit]
  10. Booij, T.M.; Chiscop, I.; Meeuwissen, E.; Moustafa, N.; den Hartog, F.T.H. ToN_IoT: The role of heterogeneity and the need for standardization of features and attack types in IoT network intrusion data sets. IEEE Internet Things J. 2022, 9, 485–496. [Google Scholar] [CrossRef] [Scilit]
  11. Koroniotis, N.; Moustafa, N.; Sitnikova, E.; Turnbull, B. Towards the development of realistic botnet dataset in the Internet of Things networks for network forensic analytics: Bot-IoT dataset. Future Gener. Comput. Syst. 2019, 100, 779–796. [Google Scholar] [CrossRef] [Scilit]
  12. Moustafa, N.; Slay, J. The evaluation of network anomaly detection systems: Statistical analysis of the UNSW-NB15 data set and the comparison with the KDD99 data set. Inf. Secur. J. Glob. Perspect. 2016, 25, 18–31. [Google Scholar] [CrossRef] [Scilit]
  13. Panigrahi, R.; Borah, S. A detailed analysis of CICIDS2017 dataset for designing intrusion detection systems. Int. J. Eng. Technol. 2018, 7, 479–482. [Google Scholar]
  14. Ferrag, M.A.; Friha, O.; Hamouda, D.; Maglaras, L.; Janicke, H. Edge-IIoTset: A new comprehensive realistic cyber security dataset of IoT and IIoT applications for centralized and federated learning. IEEE Access 2022, 10, 40281–40306. [Google Scholar] [CrossRef] [Scilit]
  15. Meidan, Y.; Bohadana, M.; Mathov, Y.; Mirsky, Y.; Shabtai, A.; Breitenbacher, D.; Elovici, Y. N-BaIoT: Network-based detection of IoT botnet attacks using deep autoencoders. IEEE Pervasive Comput. 2018, 17, 12–22. [Google Scholar] [CrossRef] [Scilit]
  16. Sahu, S.K.; Mohapatra, D.P.; Rout, J.K.; Sahoo, K.S.; Pham, Q.-V.; Dao, N.-N. A LSTM-FCNN based multi-class intrusion detection using scalable framework. Comput. Electr. Eng. 2022, 99, 107720. [Google Scholar] [CrossRef] [Scilit]
  17. Ring, M.; Wunderlich, S.; Scheuring, D.; Landes, D.; Hotho, A. A survey of network-based intrusion detection data sets. Comput. Secur. 2019, 86, 147–167. [Google Scholar] [CrossRef] [Scilit]
  18. Khraisat, A.; Gondal, I.; Vamplew, P.; Kamruzzaman, J. Survey of intrusion detection systems: Techniques, datasets and challenges. Cybersecurity 2019, 2, 20. [Google Scholar] [CrossRef] [Scilit]
  19. Chaabouni, N.; Mosbah, M.; Zemmari, A.; Sauvignac, C.; Faruki, P. Network intrusion detection for IoT security based on learning techniques. IEEE Commun. Surv. Tutor. 2019, 21, 2671–2701. [Google Scholar] [CrossRef] [Scilit]
  20. da Costa, K.A.P.; Papa, J.P.; Lisboa, C.O.; Munoz, R.; de Albuquerque, V.H.C. Internet of Things: A survey on machine learning-based intrusion detection approaches. Comput. Netw. 2019, 151, 147–157. [Google Scholar] [CrossRef] [Scilit]
  21. Al-Garadi, M.A.; Mohamed, A.; Al-Ali, A.K.; Du, X.; Ali, I.; Guizani, M. A survey of machine and deep learning methods for Internet of Things (IoT) security. IEEE Commun. Surv. Tutor. 2020, 22, 1646–1685. [Google Scholar] [CrossRef] [Scilit]
  22. Benkhelifa, E.; Welsh, T.; Hamouda, W. A critical review of practices and challenges in intrusion detection systems for IoT: Toward universal and resilient systems. IEEE Commun. Surv. Tutor. 2018, 20, 3496–3509. [Google Scholar] [CrossRef] [Scilit]
  23. Hindy, H.; Brosset, D.; Bayne, E.; Seeam, A.K.; Tachtatzis, C.; Atkinson, R.; Bellekens, X. A taxonomy of network threats and the effect of current datasets on intrusion detection systems. IEEE Access 2020, 8, 104650–104675. [Google Scholar] [CrossRef] [Scilit]
  24. Buczak, A.L.; Guven, E. A survey of data mining and machine learning methods for cyber security intrusion detection. IEEE Commun. Surv. Tutor. 2016, 18, 1153–1176. [Google Scholar] [CrossRef] [Scilit]
  25. Ferrag, M.A.; Maglaras, L.; Moschoyiannis, S.; Janicke, H. Deep learning for cyber security intrusion detection: Approaches, datasets, and comparative study. J. Inf. Secur. Appl. 2020, 50, 102419. [Google Scholar] [CrossRef] [Scilit]
  26. Catillo, M.; Del Vecchio, A.; Pecchia, A.; Villano, U. Transferability of machine learning models learned from public intrusion detection datasets: The CICIDS2017 case study. Softw. Qual. J. 2022, 30, 955–981. [Google Scholar] [CrossRef] [Scilit]
  27. Sarhan, M.; Layeghy, S.; Portmann, M. Towards a standard feature set for network intrusion detection system datasets. Mob. Netw. Appl. 2022, 27, 357–370. [Google Scholar] [CrossRef] [Scilit]
  28. Apruzzese, G.; Laskov, P.; Montes de Oca, E.; Mallouli, W.; Brdalo Rapa, L.; Grammatopoulos, A.V.; Di Franco, F. The role of machine learning in cybersecurity. Digit. Threats Res. Pract. 2023, 4, 8. [Google Scholar] [CrossRef] [Scilit]
  29. Verkerken, M.; D’hooge, L.; Wauters, T.; Volckaert, B.; De Turck, F. Towards model generalization for intrusion detection: Unsupervised machine learning techniques. J. Netw. Syst. Manag. 2022, 30, 12. [Google Scholar] [CrossRef] [Scilit]
  30. Saito, T.; Rehmsmeier, M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS ONE 2015, 10, e0118432. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  31. He, H.; Garcia, E.A. Learning from imbalanced data. IEEE Trans. Knowl. Data Eng. 2009, 21, 1263–1284. [Google Scholar] [CrossRef] [Scilit]
  32. Japkowicz, N.; Stephen, S. The class imbalance problem: A systematic study. Intell. Data Anal. 2002, 6, 429–449. [Google Scholar] [CrossRef] [Scilit]
  33. Sokolova, M.; Lapalme, G. A systematic analysis of performance measures for classification tasks. Inf. Process. Manag. 2009, 45, 427–437. [Google Scholar] [CrossRef] [Scilit]
  34. Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef] [Scilit]
  35. Luque, A.; Carrasco, A.; Martín, A.; de las Heras, A. The impact of class imbalance in classification performance metrics based on the binary confusion matrix. Pattern Recognit. 2019, 91, 216–231. [Google Scholar] [CrossRef] [Scilit]
  36. Branco, P.; Torgo, L.; Ribeiro, R.P. A survey of predictive modeling on imbalanced domains. ACM Comput. Surv. 2016, 49, 31. [Google Scholar] [CrossRef] [Scilit]
  37. Guo, T.; Chen, X.; Wang, Y.; Chang, R.; Pei, S.; Chawla, N.V.; Wiest, O.; Zhang, X. Large language model based multi-agents: A survey of progress and challenges. arXiv 2024, arXiv:2402.01680. [Google Scholar]
  38. Luo, J.; Zhang, W.; Yuan, Y.; Zhao, Y.; Yang, J.; Gu, Y.; Wu, B.; Chen, B.; Qiao, Z.; Long, Q.; et al. Large language model agent: A survey on methodology, applications and challenges. arXiv 2025, arXiv:2503.21460. [Google Scholar]
  39. Gupta, M.; Akiri, C.; Aryal, K.; Parker, E.; Praharaj, L. From ChatGPT to ThreatGPT: Impact of generative AI in cybersecurity and privacy. IEEE Access 2023, 11, 80218–80245. [Google Scholar] [CrossRef] [Scilit]
  40. Yao, Y.; Duan, J.; Xu, K.; Cai, Y.; Sun, Z.; Zhang, Y. A survey on large language model (LLM) security and privacy: The Good, the Bad, and the Ugly. High-Confid. Comput. 2024, 4, 100211. [Google Scholar] [CrossRef] [Scilit]
  41. Das, B.C.; Amini, M.H.; Wu, Y. Security and privacy challenges of large language models: A survey. ACM Comput. Surv. 2025, 57, 152. [Google Scholar] [CrossRef] [Scilit]
  42. Ferrag, M.A.; Alwahedi, F.; Battah, A.; Cherif, B.; Mechri, A.; Tihanyi, N.; Bisztray, T.; Debbah, M. Generative AI in cybersecurity: A comprehensive review of LLM applications and vulnerabilities. Internet Things Cyber-Phys. Syst. 2025, 5, 1–46. [Google Scholar] [CrossRef] [Scilit]
  43. Zhang, J.; Bu, H.; Wen, H.; Liu, Y.; Fei, H.; Xi, R.; Li, L.; Yang, Y.; Zhu, H.; Meng, D. When LLMs meet cybersecurity: A systematic literature review. Cybersecurity 2025, 8, 55. [Google Scholar] [CrossRef] [Scilit]
  44. Dorri, A.; Kanhere, S.S.; Jurdak, R. Multi-agent systems: A survey. IEEE Access 2018, 6, 28573–28593. [Google Scholar] [CrossRef] [Scilit]
  45. Yu, H.; Shen, Z.; Leung, C.; Miao, C.; Lesser, V.R. A survey of multi-agent trust management systems. IEEE Access 2013, 1, 35–50. [Google Scholar] [CrossRef] [Scilit]
  46. Viola, P.; Jones, M.J. Robust real-time face detection. Int. J. Comput. Vis. 2004, 57, 137–154. [Google Scholar] [CrossRef] [Scilit]
  47. Wang, X.; Luo, Y.; Crankshaw, D.; Tumanov, A.; Yu, F.; Gonzalez, J.E. IDK cascades: Fast deep learning by learning not to overthink. arXiv 2018, arXiv:1706.00885. [Google Scholar]
  48. Grubb, A.; Bagnell, J.A. SpeedBoost: Anytime prediction with uniform near-optimality. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics; PMLR: Cambridge, MA, USA, 2012; pp. 458–466. [Google Scholar]
  49. Nan, F.; Saligrama, V. Adaptive classification for prediction under a budget. arXiv 2017, arXiv:1705.10194. [Google Scholar]
  50. Greshake, K.; Abdelnabi, S.; Mishra, S.; Endres, C.; Holz, T.; Fritz, M. Not what you’ve signed up for: Compromising real-world LLM-integrated applications with indirect prompt injection. In Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security, Copenhagen, Denmark, 30 November 2023; pp. 79–90. [Google Scholar]
  51. Liu, Y.; Deng, G.; Li, Y.; Wang, K.; Zhang, T.; Liu, Y.; Wang, H.; Zheng, Y.; Liu, Y. Prompt injection attack against LLM-integrated applications. arXiv 2025, arXiv:2306.05499. [Google Scholar]
  52. Rossi, S.; Michel, A.M.; Mukkamala, R.R.; Thatcher, J.B. An early categorization of prompt injection attacks on large language models. arXiv 2025, arXiv:2402.0089. [Google Scholar]
  53. Wu, F.; Zhang, N.; Jha, S.; McDaniel, P.; Xiao, C. A new era in LLM security: Exploring security concerns in real-world LLM-based systems. arXiv 2024, arXiv:2402.18649. [Google Scholar]
  54. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  55. Liu, F.T.; Ting, K.M.; Zhou, Z.-H. Isolation-based anomaly detection. ACM Trans. Knowl. Discov. Data 2012, 6, 3. [Google Scholar] [CrossRef] [Scilit]
  56. Hariri, S.; Kind, M.C.; Brunner, R.J. Extended isolation forest. IEEE Trans. Knowl. Data Eng. 2021, 33, 1479–1489. [Google Scholar] [CrossRef] [Scilit]
  57. Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. 2009, 41, 15. [Google Scholar] [CrossRef] [Scilit]
  58. Fernández-Delgado, M.; Cernadas, E.; Barro, S.; Amorim, D. Do we need hundreds of classifiers to solve real world classification problems? J. Mach. Learn. Res. 2014, 15, 3133–3181. [Google Scholar]
  59. Probst, P.; Wright, M.N.; Boulesteix, A.-L. Hyperparameters and tuning strategies for random forest. WIREs Data Min. Knowl. Discov. 2019, 9, e1301. [Google Scholar] [CrossRef] [Scilit]
  60. Efron, B. Bootstrap methods: Another look at the jackknife. In Breakthroughs in Statistics; Springer: New York, NY, USA, 1979; Volume 7, pp. 569–593. [Google Scholar]
  61. Dietterich, T.G. Approximate statistical tests for comparing supervised classification learning algorithms. Neural Comput. 1998, 10, 1895–1923. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  62. Gama, J.; Žliobaitė, I.; Bifet, A.; Pechenizkiy, M.; Bouchachia, A. A survey on concept drift adaptation. ACM Comput. Surv. 2014, 46, 44. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  63. Lu, J.; Liu, A.; Dong, F.; Gu, F.; Gama, J.; Zhang, G. Learning under concept drift: A review. IEEE Trans. Knowl. Data Eng. 2019, 31, 2346–2363. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Class composition of the TON_IoT network corpus before and after rebalancing. Attack families are downsampled to a common cap of 10,317 flows and man-in-the-middle keeps its natural size of 1043 because it falls below the cap.
Figure 1. Class composition of the TON_IoT network corpus before and after rebalancing. Attack families are downsampled to a common cap of 10,317 flows and man-in-the-middle keeps its natural size of 1043 because it falls below the cap.
Futureinternet 18 00456 g001
Figure 2. The multi-component detection pipeline. Five agents feed a trust-weighted consensus. The tool-invocation policy selects a subset of the registry subject to a mandatory core and an explicit accuracy floor; the marginal values d beside each candidate are those measured on the TON_IoT validation partition at a tolerance of 0.02. The threat-intelligence agent is the designated injection surface.
Figure 2. The multi-component detection pipeline. Five agents feed a trust-weighted consensus. The tool-invocation policy selects a subset of the registry subject to a mandatory core and an explicit accuracy floor; the marginal values d beside each candidate are those measured on the TON_IoT validation partition at a tolerance of 0.02. The threat-intelligence agent is the designated injection surface.
Futureinternet 18 00456 g002
Figure 3. Empirically achievable ceilings on both corpora, fitted directly to the labels with no agent layer. Bot-IoT is close to saturated and TON_IoT retains headroom since it carries ten classes including one rare family.
Figure 3. Empirically achievable ceilings on both corpora, fitted directly to the labels with no agent layer. Bot-IoT is close to saturated and TON_IoT retains headroom since it carries ten classes including one rare family.
Futureinternet 18 00456 g003
Figure 4. Cost-accuracy frontier on TON_IoT. The constrained policy and core-only occupy identical coordinates, marked with a single star, at 3.08 times lower cost than exhaustive invocation for a macro-F1 difference of 0.0007. The core-removal condition sits far below the frontier at negligible cost, which is the point of including it.
Figure 4. Cost-accuracy frontier on TON_IoT. The constrained policy and core-only occupy identical coordinates, marked with a single star, at 3.08 times lower cost than exhaustive invocation for a macro-F1 difference of 0.0007. The core-removal condition sits far below the frontier at negligible cost, which is the point of including it.
Futureinternet 18 00456 g004
Figure 5. Marginal contribution of each candidate tool to macro−F1, measured on top of the mandatory core within each group. Core members are excluded because they are never scored against the alternative of their own absence. Auxiliary detectors contribute at or near zero once a classifier is present.
Figure 5. Marginal contribution of each candidate tool to macro−F1, measured on top of the mandatory core within each group. Core members are excluded because they are never scored against the alternative of their own absence. Auxiliary detectors contribute at or near zero once a classifier is present.
Futureinternet 18 00456 g005
Figure 6. Macro-F1 by condition on TON_IoT with bootstrap 95% confidence intervals. Five conditions cluster within 0.007 of one another near the measured ceiling. Removing the mandatory core loses 94.65% relative at negligible cost, which shows that the constraint is what makes the recovery possible.
Figure 6. Macro-F1 by condition on TON_IoT with bootstrap 95% confidence intervals. Five conditions cluster within 0.007 of one another near the measured ceiling. Removing the mandatory core loses 94.65% relative at negligible cost, which shows that the constraint is what makes the recovery possible.
Futureinternet 18 00456 g006
Figure 7. Per-class F1 across all conditions on TON_IoT. Values below 0.10 are shown in bold. Removing the mandatory core eliminates nine of ten classes entirely; the five non-degenerate conditions are almost indistinguishable from one another.
Figure 7. Per-class F1 across all conditions on TON_IoT. Values below 0.10 are shown in bold. Removing the mandatory core eliminates nine of ten classes entirely; the five non-degenerate conditions are almost indistinguishable from one another.
Futureinternet 18 00456 g007
Figure 8. Binary attack-versus-normal F1 by condition on TON_IoT against the majority-class baseline of 0.7876. The core-removal experiment falls far below the baseline, the single clearest indication that its output carries no information.
Figure 8. Binary attack-versus-normal F1 by condition on TON_IoT against the majority-class baseline of 0.7876. The core-removal experiment falls far below the baseline, the single clearest indication that its output carries no information.
Futureinternet 18 00456 g008
Figure 9. Cost decomposition per incident on TON_IoT, separating tool compute from language model tokens. The configuration reported here fuses evidence deterministically, so token cost is zero by construction and the figures characterize the tool layer exclusively.
Figure 9. Cost decomposition per incident on TON_IoT, separating tool compute from language model tokens. The configuration reported here fuses evidence deterministically, so token cost is zero by construction and the figures characterize the tool layer exclusively.
Futureinternet 18 00456 g009
Figure 10. Relative F1 change from exhaustive invocation to the constrained policy at ε = 0.02 on TON_IoT, ordered by class frequency. At this tolerance no class is materially harmed. At ε = 0.05 the rarest class loses ten percent while common classes lose under one, which is the operational limit on relaxing the floor.
Figure 10. Relative F1 change from exhaustive invocation to the constrained policy at ε = 0.02 on TON_IoT, ordered by class frequency. At this tolerance no class is materially harmed. At ε = 0.05 the rarest class loses ten percent while common classes lose under one, which is the operational limit on relaxing the floor.
Futureinternet 18 00456 g010
Table 1. Position of this work relative to the most closely related studies. We are not aware of prior work that measures the interaction between the cost-driven tool-invocation policy and the class-discriminative capability of the tools it is allowed to decline with costs obtained by timing and results replicated across corpora.
Table 1. Position of this work relative to the most closely related studies. We are not aware of prior work that measures the interaction between the cost-driven tool-invocation policy and the class-discriminative capability of the tools it is allowed to decline with costs obtained by timing and results replicated across corpora.
StudyFocusTool PolicyCosts TimedCeiling
Reported
Majority
Baseline
[19]IoT IDS surveyN/Anonono
[25]deep learning for IDSN/Anonopartial
[26]cross-corpus transferN/Anonono
[27]standard feature setsN/Anonono
[29]generalizationN/AnoN/Ano
[49]adaptive costlearnedyesnono
[53]agent injectionN/AnoN/AN/A
This workagentic IoT IDSconstrainedyesyesyes
“N/A” means the dimension does not apply to that study’s design. “Partial” means the quantity is discussed but not reported alongside each result.
Table 2. Traffic groups after viability filtering and rebalancing. Each group receives independently fitted detectors at three capacity tiers.
Table 2. Traffic groups after viability filtering and rebalancing. Each group receives independently fitted detectors at three capacity tiers.
CorpusGroupTrainTestLive FeaturesClasses
TON_IoTUnclassified22,89523,1942010
TON_IoTDNS96109581179
TON_IoTHTTP57865800168
TON_IoTpooled64,29138,5752910
Bot-IoTUDP73134395194
Bot-IoTTCP63203786184
Bot-IoTPooled13,6338181194
A feature counts as live for a group when it varies within that group’s traffic. Protocol specific fields are necessarily absent elsewhere and including them as constants would present a column of zeros to detectors.
Table 3. Evaluation partitions for both corpora. The majority-class binary F1 is the score a constant prediction achieves and is quoted beside every binary result in Section 4.
Table 3. Evaluation partitions for both corpora. The majority-class binary F1 is the score a constant prediction achieves and is quoted beside every binary result in Section 4.
CorpusPoolTrainValidationTestBenign
Fraction
Majority
Binary F1
TON_IoT128,58364,29125,71738,5750.3500.7876
Bot-IoT27,26713,633545381810.3500.7839
Table 4. Timed invocation costs in normalized cost units, by corpus and group. Costs are marginal batched compute per incident, normalized so that the cheapest tool equals 1.0.
Table 4. Timed invocation costs in normalized cost units, by corpus and group. Costs are marginal batched compute per incident, normalized so that the cheapest tool equals 1.0.
CorpusGroupLiteMidFullIsoforestRules
TON_IoTunclassified31890517706101.1
TON_IoTDNS6781847354714042.0
TON_IoTHTTP8072095394117542.4
Bot-IoTUDP27969414035561.0
Bot-IoTTCP31076915466101.1
Classifier tiers scale roughly 1:2.4:4.9 across both corpora. Rule checks are three orders of magnitude cheaper than any classifier, which is why removing them saves almost nothing: the classifier is the cost. To make the unit concrete, one normalized cost unit corresponds to approximately 65 nanoseconds of marginal compute on the reference hardware. The constrained policy’s 1120 units are therefore about 73 microseconds of classifier compute per incident, against about 225 microseconds when every tool is called. Absolute figures are the properties of this machine, and the ratios between capacity tiers are the transferable quantity.
Table 5. Experimental conditions. The core-removal condition is exempt from the automated quality check, since its purpose is to reproduce a failure under controlled conditions.
Table 5. Experimental conditions. The core-removal condition is exempt from the automated quality check, since its purpose is to reproduce a failure under controlled conditions.
ConditionTools CalledCore EnforcedRole
ExhaustiveAll, widest tier per groupYesCost upper bound
Domain-allAll in groupYesRouting baseline
FixedOne full tier per groupYesUnmeasured engineer’s choice
RandomUniform random subsetNoSanity check
Core-onlyMandatory core aloneYesMinimal sufficient set
ConstrainedCore under accuracy floorYesMethod under evaluation
Core removedCost-minimal subsetNoReproduces the failure
Table 6. Achievable macro-F1 under different fitting regimes. The pooled figure is the comparator for all agent results; the averaged figure is a different statistic and is included only to document a comparison error we made and corrected.
Table 6. Achievable macro-F1 under different fitting regimes. The pooled figure is the comparator for all agent results; the averaged figure is a different statistic and is included only to document a comparison error we made and corrected.
CorpusPooledAveragedGlobalBinaryComparable to Agents
TON_IoT0.95520.87550.95780.9974pooled and global only
Bot-IoT0.99990.99900.99991.0000pooled and global only
Table 7. Detection performance and cost on the TON_IoT network corpus. Mean over five seeds, n = 38,575 test flows. Measured macro-F1 ceiling 0.9578; majority-class binary F1 0.7876.
Table 7. Detection performance and cost on the TON_IoT network corpus. Mean over five seeds, n = 38,575 test flows. Measured macro-F1 ceiling 0.9578; majority-class binary F1 0.7876.
ConditionMacro-F1% of CeilingBinary F1Cost (NCU)ToolsDead
Exhaustive0.954999.700.997634513.60
Domain-all0.954999.700.997634513.60
Fixed0.955599.760.997825421.00
Random0.888892.800.936623552.40
Core-only0.954299.620.997411201.00
Constrained0.954299.620.997411201.00
Core removed0.05115.330.02172.01.68/10
Table 8. Paired comparisons against exhaustive invocation on TON_IoT. Differences are in macro-F1, from 2000 paired bootstrap replicates over the shared test partition.
Table 8. Paired comparisons against exhaustive invocation on TON_IoT. Differences are in macro-F1, from 2000 paired bootstrap replicates over the shared test partition.
ConditionΔ Macro-F195% CIpRelative (%)Interpretation
Domain-all0.0000[0.0000, 0.0000]1.0000.00identical
Fixed+0.0006[−0.0002, +0.0018]0.278+0.06equivalent
Random−0.0650[−0.0716, −0.0585]<0.001−6.81moderate loss
Core-only−0.0007[−0.0031, +0.0014]0.526−0.08equivalent
Constrained−0.0007[−0.0031, +0.0014]0.526−0.08equivalent
Core removed−0.9039[−0.9100, −0.8968]<0.001−94.65catastrophic
Table 9. Detection performance and cost on Bot-IoT. Mean over five seeds, n = 8181 test flows. Measured macro-F1 ceiling 0.9999; majority-class binary F1 0.7839.
Table 9. Detection performance and cost on Bot-IoT. Mean over five seeds, n = 8181 test flows. Measured macro-F1 ceiling 0.9999; majority-class binary F1 0.7839.
ConditionMacro-F1% of CeilingBinary F1Cost (NCU)ToolsDead
Exhaustive0.999099.910.999120513.00
Domain-all0.999099.910.999120513.00
Fixed0.9999100.000.999914691.00
Random0.937693.770.972414042.10
Core-only0.999799.980.99972941.00
Constrained0.999799.980.99972941.00
Core removed0.242224.220.72661.01.02/4
Table 10. Accuracy-floor sweep on TON_IoT. Tier assignments are listed for the DNS, HTTP and residual groups respectively. Cost ratios are against exhaustive invocation at 3451 NCU.
Table 10. Accuracy-floor sweep on TON_IoT. Tier assignments are listed for the DNS, HTTP and residual groups respectively. Cost ratios are against exhaustive invocation at 3451 NCU.
εTier AssignmentMacro-F1Cost (NCU)Cost RatioRel. Loss (%)
0.005full + lite + mid0.953415362.25 times0.16
0.010full + lite + mid0.953415362.25 times0.16
0.020lite + mid + mid0.954211203.08 times0.07
0.050lite + lite + mid0.94117684.49 times1.45
0.100lite + lite + mid0.94117684.49 times1.45
0.200lite + lite + lite0.93604827.16 times1.98
Table 11. Indirect prompt injection results on both corpora, n = 300 incidents each. Both arms and both payload families returned no change from the clean control.
Table 11. Indirect prompt injection results on both corpora, n = 300 incidents each. Both arms and both payload families returned no change from the clean control.
CorpusPayload FamilyArmVerdicts Changed
TON_IoTin-distributioninjected0.00%
TON_IoTin-distributiondefended0.00%
TON_IoTheld-outinjected0.00%
TON_IoTheld-outdefended0.00%
Bot-IoTin-distributioninjected0.00%
Bot-IoTin-distributiondefended0.00%
Bot-IoTheld-outinjected0.00%
Bot-IoTheld-outdefended0.00%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Etar, A.; Soni, J.; Upadhyay, H. When Cost Objectives Delete Capability: Accuracy-Constrained Tool Selection for Multi-Component Intrusion Detection in IoT Networks. Future Internet 2026, 18, 456. https://doi.org/10.3390/fi18090456

AMA Style

Etar A, Soni J, Upadhyay H. When Cost Objectives Delete Capability: Accuracy-Constrained Tool Selection for Multi-Component Intrusion Detection in IoT Networks. Future Internet. 2026; 18(9):456. https://doi.org/10.3390/fi18090456

Chicago/Turabian Style

Etar, Aakarsh, Jayesh Soni, and Himanshu Upadhyay. 2026. "When Cost Objectives Delete Capability: Accuracy-Constrained Tool Selection for Multi-Component Intrusion Detection in IoT Networks" Future Internet 18, no. 9: 456. https://doi.org/10.3390/fi18090456

APA Style

Etar, A., Soni, J., & Upadhyay, H. (2026). When Cost Objectives Delete Capability: Accuracy-Constrained Tool Selection for Multi-Component Intrusion Detection in IoT Networks. Future Internet, 18(9), 456. https://doi.org/10.3390/fi18090456

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop