Security and safety monitoring is increasingly outsourced. A client streams network logs, power readings, or sensor telemetry to a provider whose detector is proprietary. Each side has something to hide: the client its raw data, the provider its detector. Homomorphic encryption, a way of computing directly on encrypted data so the server never sees the inputs, already handles the first half. Existing encrypted monitors, however, return only a yes/no alarm. Operators do not act on unexplained alarms. Yet the obvious fix, attaching a feature attribution or a counterfactual ("this window would be normal if byte count were below X"), is exactly what model-extraction attacks feed on. Encryption does nothing here, because whatever the client decrypts, it reads in the clear.
This note proposes a different kind of explanation for streaming detectors: temporal localization. The alert says which time span and which coarse group of features fired, at a fixed time resolution. It does not give feature weights or distances to the decision boundary. Temporal localization is the information incident responders most need to triage a short attack burst. It is a small discrete object whose leakage can be counted in bits. It is also the cheapest thing to compute and release under encryption, because it is a handful of encrypted comparison bits rather than a decrypted real number. The project builds such a monitor, measures how much faster an attacker can clone or evade the detector under each explanation interface, and tests whether "when, not why" keeps most of the operator's diagnostic value.
Core Claim
Our claim is that a localized-span alert sits at a much better point on the transparency–security curve than standard attributions or counterfactuals, especially for sliding-window detectors. Two lines of work motivate it. From Counterfactuals to Trees shows that each optimal counterfactual from a tree model leaks an exact split threshold, allowing 100%-fidelity extraction in few queries. XAudit shows that a single counterfactual reveals a linear model's weight ratios. Both studies use static tabular data.
In streaming detection the problem gets worse, because consecutive windows overlap. Per-window explanations then hand the attacker correlated, tightly constrained measurements of the same boundary. The literature in the file has not studied this; it is Gap 2 of the research file.
A span alert caps leakage by construction. With $S$ candidate spans at time resolution $r$ and $G$ coarse feature groups, one alert carries at most
$$ I_{\text{alert}} \le \log_2(1 + S \cdot G) \text{ bits}, $$
where the $+1$ accounts for "no alert". This bound follows simply from counting the possible outputs. A counterfactual, by contrast, releases a real-valued boundary coordinate whose precision the attacker effectively controls.
The bound alone says nothing about query complexity, because an attacker who injects its own traffic can still binary-search a threshold using alerts. The empirical question is how many injected bursts that takes compared with the other interfaces. We predict a gap of at least an order of magnitude against counterfactual and attribution interfaces, with only modest loss in triage utility.
Research Program
The detector. The detector is chosen to be expressible under encryption and to address the window-width problem in temporal localization: short bursts get diluted by wide windows and fragmented by narrow ones. The client encrypts per-tick aggregate features. The server computes rolling sums over several window widths at once using only additions, which are cheap in additive and lattice schemes. It then evaluates a shallow tree ensemble over these multi-scale window features.
The comparisons inside the trees are the expensive part. We handle them the way Oblivious Monitoring for Discrete-Time STL via Fully Homomorphic Encryption handles its predicates. That work computes arithmetic predicates over encrypted signals in CKKS, a scheme for approximate real-valued arithmetic, and then switches to TFHE, a scheme for fast bit-level logic, to run temporal automata. We reuse its scheme-switching pipeline but replace its fixed logic formulas with a learned detector.
Tree evaluation follows Non-Interactive Private Decision Tree Evaluation, which evaluates trees in one round with logarithmic multiplicative depth and hides the path taken. We keep that path-hiding property. The client never learns which nodes fired, only the final span bits.
The released output. Per scale and per feature group, the server computes one encrypted alarm bit for each window. A small encrypted circuit merges adjacent fired windows into a span at resolution $r$ and returns only the span endpoints and group index as TFHE bits.
Because nothing approximate is ever decrypted, the release sidesteps the attack in Securing Approximate Homomorphic Encryption Using Differential Privacy. That paper shows decrypted CKKS outputs can leak the secret key and must be noised. Our interface decrypts only exact bits, so no such noise is needed.
The leakage study. This is the scientific core, and it can be run in cleartext because the decrypted outputs are identical. We implement attackers against five interfaces on the same detector:
- binary alarm only;
- span alert (ours);
- per-feature anomaly scores in the style of MStream;
- nearest-normal counterfactuals, attacked with a temporal adaptation of the Tree Reconstruction Attack;
- XRand-randomized top-$k$ attributions.
The attacker controls a subset of hosts and injects crafted bursts into an otherwise real stream. For each interface we measure query complexity to a target clone fidelity and the success rate of evasive bursts. We repeat each experiment with overlapping versus non-overlapping windows to test whether window overlap amplifies leakage.
Baselines
Do nothing: binary-only alarm. The no-explanation reference is the binary alarm returned by the oblivious STL monitor and by path-hiding tree evaluation. It is the security ceiling and the utility floor. We run it on the identical encrypted detector, so the only difference from our method is the released output.
Most transparent: cleartext rule extraction. The strongest existing interpretability method is Interpreting Unsupervised Anomaly Detection in Security via Rule Extraction. It grows a clustering tree over normal traffic and pushes rule boundaries outward with gradient steps. The result is if-then firewall rules with greater than 99% fidelity to the black-box detector on CIC-IDS2017 and CSE-CIC-IDS2018. It is the strongest competitor on utility, because operators get exact rules. We extract rules from our detector with its procedure on the same data, then measure both triage utility and how quickly the released rules let an attacker craft evasive bursts. Beating it means matching most of its triage utility while requiring at least ten times more attacker queries for equal evasion success.
Strongest privacy defense: XRand. The strongest existing defense for explanations is XRand, which randomizes top-$k$ feature rankings with local differential privacy. On EMBER malware at $\epsilon = 1.0$ it reduced explanation-guided backdoor attack success from 77.8% to 10.2%. We run it with the same $\epsilon$ grid on our streaming features, with equal attacker query budgets. Beating it means lower clone fidelity and evasion success at equal or better triage utility, plus lower per-alert latency, since XRand solves an optimization per query.
Detection quality. For detection quality the reference is MStream, which reports ROC-AUC of 0.92–0.95 on CICIDS-DoS. Our encrypted-friendly detector should come within a few points of that on the same split. If it falls far below, the interface results are moot.
Ablations. Three ablations isolate the key ingredients:
- Resolution sweep: vary $r$ from one tick to whole-window. This traces the leakage–utility curve and tests whether coarseness, rather than mere discreteness, drives the security gain.
- Feature groups: release the span with versus without the feature group, to see how much the group index adds.
- Encryption parity: run the encrypted and cleartext pipelines side by side to confirm identical outputs and isolate the cost of encryption.
Why not just…?
Why not just release the span from a cleartext detector, without encryption? This is a real threat, and we concede part of it. The leakage result is about what the client sees, so it holds identically in cleartext. Encryption adds nothing to protection against extraction. Encryption matters only when the client's telemetry must stay hidden from the monitoring provider, the setting the STL monitoring work targets for vehicle and glucose signals.
The proposal therefore makes two separable claims. The first is that span alerts are safer than richer explanations, tested in cleartext. The second is that span alerts are also the explanation that fits cheaply inside an encrypted, one-round monitor, tested by latency against the STL monitor's reported under 550 ms per signal valuation on RSS. If the second claim fails, the first still stands as a cleartext interface result.
Why not just add differential privacy noise to the explanations? XRand shows this works on static malware features. However, noise on temporal features fights the dilution problem directly. Short bursts already have low signal-to-noise, as the energy-footprint ransomware work Detecting crypto-ransomware in IoT networks based on energy consumption footprint shows when it needs narrow overlapping windows just to see encryption spikes. The XRand baseline above settles the question: if it reaches our security level at comparable span IoU and latency, our method offers no advantage.
Why not just rate-limit explanation queries? The attacks in question already need very few queries. Tree Reconstruction extracts a depth-9 tree on COMPAS in an average of 153 queries at 100% fidelity. XAudit verifies a sensitivity property of a 4,000-node tree in about 2 queries. Budgets that small blend into normal traffic. Our query-complexity curves report the full attacker budget needed under each interface, so a reader can judge directly whether any realistic rate limit would bind.
Why not use interactive secure multi-party computation instead of homomorphic encryption? The non-interactive tree evaluation paper notes that interactive protocols need 4 to 9 communication rounds. That is costly for intermittently connected edge clients streaming continuously. We do not test this alternative ourselves. The output interface we propose is independent of the cryptographic backend.
Proposed Experiments
Data. We use CIC-IDS2017, TON-IoT, UNSW-NB15 and CICIDS-DoS. These datasets carry timestamped attack episodes, which give ground-truth spans. We also use the RSS and blood-glucose signals from the STL monitoring work to compare against encrypted monitors.
Localization quality. We measure span intersection-over-union against ground-truth attack episodes, plus event-level detection delay.
Operator utility. As a proxy for operator utility, we train a classifier that sees only the explanation and predicts attack category and onset. We compare its accuracy across interfaces.
Security. We measure:
- attacker queries needed to reach 95% clone agreement;
- evasion success of bursts crafted by the attacker under a fixed query budget;
- the overlap-amplification ratio, meaning the query complexity with non-overlapping windows divided by that with overlapping windows.
Encrypted cost. We measure per-window latency, ciphertext size, and memory on a Raspberry Pi 4-class client, compared with the STL monitor's reported under 400 MB.
Decisive checks. Two results would decide the project.
- Does window overlap amplify leakage? Overlapping windows must measurably speed up extraction under counterfactual and attribution interfaces but not under span alerts. If they do not, the streaming-specific motivation collapses.
- Does "when, not why" win? At the resolution where span alerts reach at least 80% of rule-extraction triage accuracy, attacker query complexity must exceed the counterfactual interface by at least ten times. If the curves cross, so that any resolution useful to operators is also easy to clone, then "when, not why" is not a better trade, and we will report it as a negative result.
References
- From Counterfactuals to Trees: Competitive Analysis of Model Extraction Attacks
- XAudit : A Learning-Theoretic Look at Auditing with Explanations
- Oblivious Monitoring for Discrete-Time STL via Fully Homomorphic Encryption
- Non-interactive Private Decision Tree Evaluation
- Securing Approximate Homomorphic Encryption Using Differential Privacy
- Interpreting Unsupervised Anomaly Detection in Security via Rule Extraction
- XRand: Differentially Private Defense against Explanation-Guided Attacks
- MStream: Fast Anomaly Detection in Multi-Aspect Streams
- Detecting crypto-ransomware in IoT networks based on energy consumption footprint