When Learned IDS Model Selection Collapses to a Static Choice: A Measurement Study at the Edge
Organizations: College of Science and Engineering, Division of Research, James Cook University, Bebegu Yumba Campus, Building 17, Douglas, Townsville, QLD, Australia · Faculty of Data Science, City University of Macau, Macau, China · School of Computer, Data and Mathematical Sciences, Western Sydney University, Penrith (Kingswood) Campus, Kingswood, NSW, Australia · College of Business and Law, RMIT University, Melbourne, VIC 3000, Australia ·
Abstract
Runtime model selection trades detection quality against energy and latency. However, comparing a selector only with a more costly static detector conflates detector choice with the benefit of adaptation. We present a framework for analysis and physical measurement that combines a pairwise reward criterion, matched static controls, paired blocks, a fixed load-prevalence factorial design, and reporting of actions outside training support. On one Raspberry Pi 4B with four frozen TON-IoT detectors, tabular Q-learning and a deep Q-network (DQN) both select LightLR throughout. A retrospective audit using validation data only rules out preference reversals for MedRF versus LightLR and HeavyMLP versus LightLR. However, TinyDT has a higher reward than LightLR in seven of the 2,500 windows, so the audit does not establish global LightLR optimality. We also evaluate a causal DeadlineGuard rule under a fixed factorial design with three arrival rates (50, 100, and 4,000 rows/s) and three attack prevalences (0.10, 0.50, and 0.90). Compared with Static-MedRF, DeadlineGuard saves 43.7 J per 500-s run (2.98%; 95% paired CI 41.4--46.0 J) and eliminates all 512 deadline misses among 5,000 windows, at a cost of 1.373 percentage points in F1. Outside training support, Tabular-Q's deterministic tie-breaking rule selects TinyDT, resulting in a false-positive rate of 67.76%. These single-board results motivate joint audits of reward attainability, realized actions, attribution against matched static controls, service feasibility, and default actions outside training support.
Figures & tables
| Model | F1 | Recall | BA | FPR (%) |
|---|---|---|---|---|
| TinyDT | 0.4792 | 0.9976 | 0.6599 | 67.78 |
| LightLR | 0.9620 | 0.9668 | 0.9766 | 1.35 |
| MedRF | 0.9746 | 0.9965 | 0.9906 | 1.52 |
| HeavyMLP | 0.9736 | 0.9903 | 0.9883 | 1.38 |
| Outcome | Mean | 95% CI | |
| Tabular-Q Static-LightLR | |||
| Energy (J) | 0.664 | ||
| Power (mW) | 0.668 | ||
| DQN Static-LightLR | |||
| Energy (J) | 0.00195 | ||
| Power (mW) | 0.00195 | ||
| Method | Energy (J) | Power (W) | Adjusted (mW) | F1 | Recall (%) | FPR (%) | Escalation (%) |
|---|---|---|---|---|---|---|---|
| Static-LightLR | 1360.4 | 2.721 | 37.0 | 0.9704 | 96.71 | 1.36 | – |
| Cascade | 1368.3 | 2.737 | 50.6 | 0.9839 | 99.39 | 1.38 | 1.34 |
| Tabular-Q | 1362.0 | 2.724 | 39.7 | 0.9704 | 96.71 | 1.36 | – |
| Static-MedRF | 1368.6 | 2.737 | 56.5 | 0.9839 | 99.66 | 1.54 | – |
| Method | Energy (J) | Power (W) | F1 | Recall (%) | FPR (%) | Miss (%) | Completion p95 (s) |
|---|---|---|---|---|---|---|---|
| Static-LightLR | 1416.8 3.7 | 2.834 | 0.9763 | 96.68 | 1.35 | 0.00 | 0.070 |
| Cascade | 1448.1 46.4 | 2.896 | 0.9902 | 99.41 | 1.36 | 0.42 | 0.665 |
| DeadlineGuard | 1424.4 5.2 | 2.849 | 0.9769 | 96.80 | 1.36 | 0.00 | 0.069 |
| Tabular-Q | 1400.9 48.0 | 2.802 | 0.7434 | 99.76 | 67.76 | 0.00 | 0.063 |
| DQN | 1461.1 123.9 | 2.922 | 0.9763 | 96.68 | 1.35 | 0.00 | 0.072 |
| Static-MedRF | 1468.1 4.8 | 2.936 | 0.9906 | 99.65 | 1.52 | 10.24 | 1.013 |
| DeadlineGuard | DQN | |
| Endpoint | Static-MedRF | Static-LightLR |
| (J) | ||
| 95% CI | ||
| F1 (pp) | ||
| Miss (pp) | ||
| Sign-flip (energy) | 0.00195 | 0.00195 |
| Quantity | Primary (fixed) | Validation-selected |
|---|---|---|
| Threshold | 0.500 | 0.646751 |
| TN / FP | 5,519 / 11,610 | 16,817 / 312 |
| FN / TP | 13 / 5,348 | 21 / 5,340 |
| F1 | 0.4792 | 0.9698 |
| Recall (%) | 99.76 | 99.61 |
| FPR (%) | 67.78 | 1.82 |
| Test labels | Training-only attack labels |
|---|---|
| Benign_Final | Backdoor_Malware |
| DDoS-ACK_Fragmentation | BrowserHijacking |
| DDoS-ICMP_Flood | CommandInjection |
| DDoS-ICMP_Fragmentation | DDoS-HTTP_Flood |
| DDoS-PSHACK_FLOOD | DDoS-SlowLoris |
| DDoS-RSTFINFLOOD | DNS_Spoofing |
| Partition | Dataset device identifier |
|---|---|
| Train | Ecobee_Thermostat |
| Train | Ennio_Doorbell |
| Train | Philips_B120N10_Baby_Monitor |
| Train | Provision_PT_737E_Security_Camera |
| Train | SimpleHome_XCS7_1003_WHT_Security_Camera |
| Validation | Danmini_Doorbell |
| Dataset | Model | Retained | Primary F1 | Diagnostic F1 | BA | FPR (%) |
|---|---|---|---|---|---|---|
| TON-IoT | TinyDT | 22,490 | 0.479233 | 0.479233 | 0.659889 | 67.780 |
| LightLR | 22,490 | 0.961952 | 0.961952 | 0.976626 | 1.354 | |
| MedRF | 22,490 | 0.974551 | 0.974551 | 0.990638 | 1.518 | |
| HeavyMLP | 22,490 | 0.973593 | 0.973593 | 0.988261 | 1.378 | |
| CICIoT2023 | TinyDT | 71,132 | 0.990371 | 0.990369 | 0.829023 | 34.195 |
| LightLR | 71,132 | 0.987987 | 0.987985 | 0.786304 | 42.738 |
| Dataset | Replay | Model | Mean F1 | SD | Student- 95% CI |
|---|---|---|---|---|---|
| CICIoT2023 | Prevalence-shift | HeavyMLP | 0.8090 | 0.0019 | [0.8077, 0.8104] |
| CICIoT2023 | Prevalence-shift | LightLR | 0.7104 | 0.0018 | [0.7091, 0.7117] |
| CICIoT2023 | Prevalence-shift | MedRF | 0.7778 | 0.0010 | [0.7770, 0.7785] |
| CICIoT2023 | Prevalence-shift | TinyDT | 0.7542 | 0.0010 | [0.7535, 0.7549] |
| CICIoT2023 | Stationary | HeavyMLP | 0.9931 | 0.0004 | [0.9928, 0.9934] |
| CICIoT2023 | Stationary | LightLR | 0.9881 | 0.0007 | [0.9876, 0.9887] |
| Dataset | Replay | Model | Mean BA | SD | Student- 95% CI |
|---|---|---|---|---|---|
| CICIoT2023 | Prevalence-shift | HeavyMLP | 0.8762 | 0.0015 | [0.8752, 0.8773] |
| CICIoT2023 | Prevalence-shift | LightLR | 0.7862 | 0.0019 | [0.7849, 0.7875] |
| CICIoT2023 | Prevalence-shift | MedRF | 0.8502 | 0.0009 | [0.8495, 0.8508] |
| CICIoT2023 | Prevalence-shift | TinyDT | 0.8291 | 0.0009 | [0.8284, 0.8297] |
| CICIoT2023 | Stationary | HeavyMLP | 0.8773 | 0.0048 | [0.8739, 0.8807] |
| CICIoT2023 | Stationary | LightLR | 0.7870 | 0.0069 | [0.7820, 0.7920] |
| Dataset | Model | Timing batches | Median (ms) | p95 (ms) | Label differences |
|---|---|---|---|---|---|
| TON-IoT | TinyDT | 1000 | 0.2448 | 0.3042 | 0 |
| LightLR | 1000 | 0.3306 | 0.3977 | 0 | |
| MedRF | 1000 | 26.2880 | 27.4078 | 0 | |
| HeavyMLP | 1000 | 1.5923 | 1.6725 | 0 | |
| CICIoT2023 | TinyDT | 1000 | 0.2323 | 0.2889 | 0 |
| LightLR | 1000 | 0.2999 | 0.3578 | 0 |
| Repeat | Profile | Version | Duration (s) | Energy (J) | Mean (W) | Max. ( ∘ C) |
|---|---|---|---|---|---|---|
| 1 | idle | v1 | 1800.001 | 4220.601 | 2.344777 | 33.102 |
| 1 | TinyDT | v1 | 1799.997 | 4228.854 | 2.349367 | 33.102 |
| 1 | HeavyMLP | v1 | 1800.004 | 4257.806 | 2.365442 | 34.076 |
| 1 | LightLR | v1 | 1799.995 | 4224.380 | 2.346884 | 33.102 |
| 1 | MedRF | v1 | 1800.002 | 4306.796 | 2.392662 | 33.589 |
| 2 | idle | v1 | 1799.994 | 4194.960 | 2.330542 | 33.589 |
| Block | Order | Method | Energy (J) | F1 | TN | FP | FN | TP | Batch (ms) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | Tabular-Q | 1192.491 | 0.969568 | 32342 | 458 | 585 | 16615 | 1.500 |
| 1 | 2 | DQN | 1200.351 | 0.969568 | 32342 | 458 | 585 | 16615 | 1.450 |
| 1 | 3 | Static-MedRF | 1210.268 | 0.983185 | 32282 | 518 | 68 | 17132 | 32.234 |
| 1 | 4 | CFSM | 1193.732 | 0.636830 | 13435 | 19365 | 118 | 17082 | 2.345 |
| 2 | 1 | DQN | 1197.694 | 0.971259 | 32336 | 464 | 523 | 16677 | 1.537 |
| 2 | 2 | Static-MedRF | 1207.126 | 0.983275 | 32280 | 520 | 63 | 17137 | 32.637 |
| Method | Outcome | Mean difference | 95% CI |
|---|---|---|---|
| CFSM | Energy (J) | -9.9450 | [-12.7729, -7.1171] |
| CFSM | F1 (pp) | -34.7424 | [-34.8585, -34.6262] |
| CFSM | Recall (pp) | -0.3291 | [-0.3766, -0.2816] |
| CFSM | FPR (pp) | 57.6262 | [57.3297, 57.9227] |
| CFSM | BA (pp) | -28.9776 | [-29.1344, -28.8209] |
| CFSM | Mean batch (ms) | -30.2577 | [-30.6798, -29.8356] |
| Method | Adjusted difference | 95% CI |
|---|---|---|
| CFSM | -9.542 | [-13.795, -5.289] |
| Tabular-Q | -12.523 | [-16.906, -8.139] |
| DQN | -6.243 | [-11.940, -0.547] |
| Method | TinyDT | LightLR | MedRF | HeavyMLP | Runtime | Initial |
|---|---|---|---|---|---|---|
| Static-MedRF | 0.00 | 0.00 | 100.00 | 0.00 | 0.0 | 1.0 |
| CFSM | 74.20 | 2.28 | 1.26 | 22.26 | 9.8 | 0.0 |
| Tabular-Q | 0.00 | 100.00 | 0.00 | 0.00 | 0.0 | 1.0 |
| DQN | 0.00 | 100.00 | 0.00 | 0.00 | 0.0 | 1.0 |
| TinyDT | LightLR | MedRF | HeavyMLP | |
|---|---|---|---|---|
| TinyDT | – | |||
| LightLR | – | |||
| MedRF | – | |||
| HeavyMLP | – |
| Contrast | Metric | Mean difference | 95% CI |
|---|---|---|---|
| Tabular-Q DQN | Energy (J) | -6.841 | [-9.717, -3.965] |
| Tabular-Q DQN | F1 | 0.000000 | [0.000000, 0.000000] |
| Tabular-Q DQN | Recall | 0.000000 | [0.000000, 0.000000] |
| Tabular-Q DQN | FPR | 0.000000 | [0.000000, 0.000000] |
| Tabular-Q CFSM | Energy (J) | -3.123 | [-5.461, -0.785] |
| Tabular-Q CFSM | F1 | 0.333998 | [0.332680, 0.335317] |
| Method | All states | Observed | All TinyDT | All LightLR | Obs. TinyDT | Obs. LightLR |
|---|---|---|---|---|---|---|
| Tabular-Q | 324 | 4 | 314 | 10 | 0 | 4 |
| DQN | 324 | 4 | 0 | 324 | 0 | 4 |
| Contrast | Outcome | Mean | 95% CI | Sign-flip |
|---|---|---|---|---|
| Tabular–Q – Static–LightLR | Energy (J) | 0.4555 | [-1.8609,2.7719] | 0.6641 |
| Tabular–Q – Static–LightLR | Power (mW) | 0.9096 | [-3.7224,5.5416] | 0.6680 |
| Tabular–Q – Static–LightLR | F1 (pp) | 0.0000 | [0.0000,0.0000] | 1.0000 |
| Tabular–Q – Static–LightLR | Recall (pp) | 0.0000 | [0.0000,0.0000] | 1.0000 |
| Tabular–Q – Static–LightLR | FPR (pp) | 0.0000 | [0.0000,0.0000] | 1.0000 |
| DQN – Static–LightLR | Energy (J) | 4.5251 | [2.6933,6.3569] | 0.0020 |
| Stream | Method | Mean ( s) | 95% CI | p95 ( s) | p99 ( s) |
|---|---|---|---|---|---|
| exhaustive_324 | CFSM | 6.245 | 6.228–6.263 | 6.614 | 6.726 |
| exhaustive_324 | DQN | 1559.645 | 1552.929–1566.362 | 1622.594 | 1651.166 |
| exhaustive_324 | Static-LightLR | 0.634 | 0.626–0.641 | 0.689 | 0.842 |
| exhaustive_324 | Tabular-Q | 10.443 | 10.420–10.466 | 10.643 | 10.947 |
| observed_support | CFSM | 6.582 | 6.566–6.598 | 6.942 | 7.172 |
| observed_support | DQN | 1566.897 | 1560.904–1572.890 | 1629.629 | 1668.873 |
| Algorithm | Seed | TinyDT | LightLR | MedRF | HeavyMLP | Held-out LR (%) |
|---|---|---|---|---|---|---|
| DQN | 1009 | 0 | 324 | 0 | 0 | 100.0 |
| DQN | 1013 | 205 | 119 | 0 | 0 | 100.0 |
| DQN | 1019 | 0 | 324 | 0 | 0 | 100.0 |
| DQN | 1021 | 0 | 324 | 0 | 0 | 100.0 |
| DQN | 1031 | 85 | 239 | 0 | 0 | 100.0 |
| DQN | 1033 | 192 | 10 | 0 | 122 | 100.0 |
| Family | Algorithm | Variant | LR | Single | Mean F1 | |
|---|---|---|---|---|---|---|
| Reward | DQN | default | 5 | 5/5 | 5/5 | 0.970439 |
| Reward | DQN | detection_heavy | 5 | 5/5 | 5/5 | 0.970439 |
| Reward | DQN | energy_heavy | 5 | 5/5 | 5/5 | 0.970439 |
| Reward | DQN | equal | 5 | 5/5 | 5/5 | 0.970439 |
| Reward | Tabular-Q | default | 5 | 5/5 | 5/5 | 0.970439 |
| Reward | Tabular-Q | detection_heavy | 5 | 5/5 | 5/5 | 0.970439 |
| Variant | LR | Single | Mean F1 | |
|---|---|---|---|---|
| alpha_0.05 | 5 | 5/5 | 5/5 | 0.970439 |
| alpha_0.10 | 5 | 5/5 | 5/5 | 0.970439 |
| alpha_0.20 | 5 | 5/5 | 5/5 | 0.970439 |
| gamma_0.00 | 5 | 5/5 | 5/5 | 0.970439 |
| gamma_0.50 | 5 | 5/5 | 5/5 | 0.970439 |
| gamma_0.90 | 5 | 5/5 | 5/5 | 0.970439 |
| Method | Energy | Power | Adjust. | F1 | Recall | FPR | Esc. |
|---|---|---|---|---|---|---|---|
| (J) | (W) | (mW) | (%) | (%) | (%) | ||
| Static-LightLR | 1360.4 | 2.721 | 37.0 | 0.9704 | 96.71 | 1.36 | – |
| Cascade | 1368.3 | 2.737 | 50.6 | 0.9839 | 99.39 | 1.38 | 1.34 |
| Tabular-Q | 1362.0 | 2.724 | 39.7 | 0.9704 | 96.71 | 1.36 | – |
| Static-MedRF | 1368.6 | 2.737 | 56.5 | 0.9839 | 99.66 | 1.54 | – |
| Quantity | Value |
|---|---|
| Escalated rows / all rows | 6,694 / 500,000 (1.3388%) |
| Windows with escalated row | 3,338 / 5,000 (66.76%) |
| Mean escalated rows per active window | 2.01 |
| No-escalation window inference | 1.636 ms |
| Escalation-active window inference | 31.884 ms |
| All cascade windows, mean inference | 21.830 ms |
| Method | Energy | Power | F1 | Recall | FPR | Miss | p95 |
|---|---|---|---|---|---|---|---|
| (J) | (W) | (%) | (%) | (%) | (s) | ||
| Static-LightLR | 1416.8 3.7 | 2.834 | 0.9763 | 96.68 | 1.35 | 0.00 | 0.070 |
| Cascade | 1448.1 46.4 | 2.896 | 0.9902 | 99.41 | 1.36 | 0.42 | 0.665 |
| DeadlineGuard | 1424.4 5.2 | 2.849 | 0.9769 | 96.80 | 1.36 | 0.00 | 0.069 |
| Tabular-Q | 1400.9 48.0 | 2.802 | 0.7434 | 99.76 | 67.76 | 0.00 | 0.063 |
| DQN | 1461.1 123.9 | 2.922 | 0.9763 | 96.68 | 1.35 | 0.00 | 0.072 |
| Method | (J), 95% CI | (mW), 95% CI | F1 | |
|---|---|---|---|---|
| Cascade | +31.3 [-1.4,+63.9] | +98.8 [+77.9,+119.8] | +1.38 | 0.0762 |
| DeadlineGuard | +7.6 [+5.0,+10.1] | +14.2 [+0.4,+27.9] | +0.06 | 0.0020 |
| Tabular-Q | -15.9 [-49.9,+18.1] | -13.8 [-32.7,+5.1] | -23.29 | 0.2637 |
| DQN | +44.2 [-43.2,+131.7] | -30.8 [-128.1,+66.5] | +0.00 | 0.0020 |
| Static-MedRF | +51.3 [+49.5,+53.0] | +98.6 [+79.3,+117.9] | +1.43 | 0.0020 |
| Method | States | Action occupancy | Switches | Fallback | Misses | Backlog |
|---|---|---|---|---|---|---|
| Static-LightLR | 15.4 | LightLR:5000 | 1.0 | 0 | 0 | 0 |
| Cascade | 15.4 | ConfidenceCascade_0p3_0p7:5000 | 1.0 | 0 | 21 | 0 |
| DeadlineGuard | 15.4 | LightLR:1500, MedRF:3500 | 5.3 | 0 | 0 | 0 |
| Tabular-Q | 10.7 | TinyDT:5000 | 0.0 | 5000 | 0 | 0 |
| DQN | 15.6 | LightLR:5000 | 1.0 | 0 | 0 | 0 |
| Static-MedRF | 15.2 | MedRF:5000 | 1.0 | 0 | 512 | 0 |
| Result | TN | FP | FN | TP | F1 | Rec. | FPR | BA | |
|---|---|---|---|---|---|---|---|---|---|
| Primary fixed | 0.500 | 5519 | 11610 | 13 | 5348 | 0.4792 | 99.76 | 67.78 | 0.6599 |
| Validation-selected diagnostic | 0.646751 | 16817 | 312 | 21 | 5340 | 0.9698 | 99.61 | 1.82 | 0.9889 |
Model Selection
Model selection chooses models, features, or configurations that balance predictive fit, generalization, complexity, and deployment constraints.
See all 111 papers