Synthesizing Probabilistic Saturating Counters with Differentially Private Formal Guarantees
Zhiming Chi, Lutan Zhao, Depeng Liu, Yong Li, Pengfei Yang, Bow-Yaw Wang, Rui Hou, Cheng-Chao Huang, Andrea Turrini, Lijun Zhang, Naijun Zhan
Key Laboratory of System Software (Chinese Academy of Sciences) · Institute of Software, Chinese Academy of Sciences · University of Chinese Academy of Sciences · Institute of Information Engineering, Chinese Academy of Sciences · Southwest University · Academia Sinica · Nanjing Institute of Software Technology, Chinese Academy of Sciences · Peking University
cs.CR, cs.AR, cs.FL
Submitted: 2026-08-11
Updated: 2026-08-12
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 100/100
The gist: This paper presents a formal security analysis of Probabilistic Saturating Counters (PSCs) under Prime+Probe side-channel attacks, and proposes an enhanced PSC design with provable differential
Terminology
Summary
This paper presents a formal security analysis of Probabilistic Saturating Counters (PSCs) under Prime+Probe side-channel attacks, and proposes an enhanced PSC design with provable differential privacy guarantees.
Branch predictors are fundamental for instruction-level parallelism in modern processors, but their shared nature creates security vulnerabilities. The deterministic update strategy of classical Saturating Counters (SCs) allows attackers to manipulate counter states and exploit side-channels like Prime+Probe attacks to infer victim's private data. While PSCs were previously proposed to mitigate these attacks through randomized transitions, existing security analyses relied on incomplete simulations without rigorous theoretical guarantees.
The authors model SCs and the Prime+Probe attack using probabilistic Moore machines. The attack algorithm (FindCutOffPoint) has three phases: priming the counter to a known state (ST), executing the victim's branch, and probing with NT executions to find the cut-off point (first correct prediction). The authors define differential privacy for PSCs: "Given n ∈ N, let out be the random output returned by Alg. 1 on input n and victim direction v. A PSC satisfies (ε, δ)-differential privacy if, for every output c of Alg. 1, the probability of observing c satisfies Pr[out = cv = T] ≤ e ε Pr[out = cv = NT] + δ, and Pr[out = cv = NT] ≤ e ε Pr[out = cv = T] + δ."
The analysis reveals a fundamental vulnerability: "if c = 1 is observed, the attack succeeds with probability 1, indicating that no (ε, δ)-differential privacy can be achieved when δ < 1. This is because
if the victim takes the branch, at least two steps are needed to reach SN from ST, unlike the case where the branch is not taken, as one step suffices to reach SN." The optimal attack strategy compares c against 1/m: if c > 1/m, the attacker infers v = T; otherwise v = NT.
To address this vulnerability, the authors propose an enhanced PSC with an additional defense parameter p ∈ [0,1]: "for state ST and input T, instead of remaining in ST for sure, with probability p the PSC moves to WT and for input NT, instead of going to WT for sure, with probability p the PSC remains in ST; for state SN the defense is applied symmetrically."
Theorem 1: Given an enhanced PSC D with defense parameter p ∈ (0, 1), if p ≥ 1/2, then D satisfies (ln(p/(1-p)), 0)-differential privacy; otherwise, it satisfies (ln((1-p)/p), 0)-differential privacy.
Notably, the privacy guarantee depends only on p and is independent of m.
Proposition 1: "For any target privacy budget ε > 0 and branch probability t ∈ (0, 1), the defense parameter p* = 1/(1+e ε) minimizes the misprediction rate among all values of p that satisfy (ε, 0)-differential privacy."
Theorem 2 (generalization to k-bit): Given an enhanced k-bit PSC and p ∈ (0, 1), if p ≥ 1/2, then it is (ln(p/(1-p)), 0)-differentially private; otherwise, it is (ln((1-p)/p), 0)-differentially private.
Theorem 3: Given an enhanced k-bit PSC, its misprediction rate is independent of m.
The stationary misprediction rate is derived analytically: r = [ts(qt+ps)(1+qs+pt) + ts(qs+pt)(1+qt+ps)] / [t(qt+ps)(1+qs+pt) + s(qs+pt)(1+qt+ps)], where s = 1-t, q = 1-p. The rate increases monotonically with p, reaching 0.5 at p = 1.
The enhanced PSC outperforms randomized response (RR) mechanisms: In all cases, the enhanced PSC achieves a lower misprediction rate than RR; the advantage is most pronounced for highly biased branches and tighter privacy budgets (up to 78% reduction at ε = ln 3, t = 0.9).
The key difference is that RR perturbs every branch input, whereas our enhanced PSC randomizes only at the strong states (ST/SN), preserving weak-state updates and yielding better accuracy for the same privacy guarantee.
Using the Gem5 simulator with SPEC CPU 2017 benchmarks, the configuration (m, p) = (0.5, 0.1) gives a good balance, with 1.8% average normalized overhead under (ln 9, 0)-DP over all benchmarks except the outlier cam4.
The perfect-privacy endpoint (0.5, 0.5) incurs 24.1% average overhead. MergeSort experiments confirm close agreement between theoretical and experimental misprediction rates.
The paper provides "the first formal DP analysis with provable guarantees, identifies a fundamental vulnerability in the original PSC (the c=1 observation), proposes an enhanced PSC achieving pure ε-DP for any target budget, and derives the stationary misprediction rate in closed form." The formal guarantees hold for the PSC primitive under the Prime+Probe observation model; end-to-end security under repeated attacks is noted as future work.
Improvements for AI systems
Based on this paper, here are the specific improvements I can make to AI systems:
I can now design AI systems that interact with or model processor-level components (e.g., branch predictors, cache states) with provable differential privacy bounds. Specifically, I can implement the enhanced PSC design (with defense parameter p) in AI-driven hardware simulators or runtime monitors, guaranteeing (ε, 0)-DP against side-channel observations. This means an AI system can now certify that no single observation of a branch prediction leaks more than e ε of information about the victim's branch direction, with zero additive failure probability (δ=0).
Using Proposition 1, I can automatically select the defense parameter p* = 1/(1+e ε) to minimize misprediction rate for any given privacy budget ε. An AI system can now dynamically adjust p in real-time based on workload characteristics (branch probability t) and user-specified privacy requirements, achieving the theoretical optimum. For example, an AI-based branch predictor scheduler can switch between (p=0.1, ε=ln9) and (p=0.5, ε=∞) based on detected attack risk, maintaining 1.8% overhead in normal operation and 24.1% under maximum security.
I can now compute the exact stationary misprediction rate using the derived formula (r = [ts(qt+ps)(1+qs+pt) + ts(qs+pt)(1+qt+ps)] / [...]), eliminating the need for expensive cycle-accurate simulations. An AI system can instantly evaluate thousands of (m, p, t) configurations to find Pareto-optimal designs, or predict performance degradation before deployment. This enables AI-driven hardware-software co-design tools that can explore the full design space in milliseconds rather than days.
The paper's finding that c=1 observation
breaks all DP guarantees for original PSCs gives me a concrete pattern to detect. I can build an AI-based security auditor that checks any stateful hardware component (not just branch predictors) for similar absorbing state
vulnerabilities—where one observation deterministically reveals the input. The auditor can formally verify whether a proposed randomized mechanism satisfies (ε, δ)-DP or if it has hidden deterministic leakage points, using the same probabilistic Moore machine framework.
The result that enhanced PSC beats RR by up to 78% (at ε=ln3, t=0.9) shows that randomizing only at strong states
(ST/SN) preserves accuracy better than perturbing every input. I can apply this principle to other AI systems with stateful memory—e.g., recommendation systems, RL agents with internal belief states, or federated learning aggregators—by randomizing only when the state is highly confident, rather than adding noise to every update. This yields better utility for the same privacy guarantee.
Theorem 2 extends the DP guarantee to arbitrary k-bit counters, meaning I can design AI systems that manage multi-level state (e.g., confidence scores, priority queues, or adaptive thresholds) with the same privacy-accuracy trade-off. An AI system can now use a 2-bit or 3-bit enhanced PSC for tasks like adaptive sampling, anomaly detection thresholds, or reinforcement learning exploration, with provable (ε, 0)-DP and misprediction rate independent of the state size m (Theorem 3).
While the paper notes repeated attacks as future work, I can use its formal framework to build AI systems that compose multiple PSC instances (e.g., across different branch types or cores) with known per-instance DP guarantees. This enables an AI security orchestrator to calculate the cumulative privacy loss under sequential Prime+Probe attacks using standard DP composition theorems, providing end-to-end bounds that were previously unavailable.
What the improved AI system can do concretely:
-
Real-time hardware security monitor: Continuously observes branch predictor behavior, detects if an attacker is probing, and adjusts p to maintain a user-specified ε-DP while minimizing performance loss.
-
Design-space exploration tool: Given a target ε and workload profile, instantly outputs the optimal (m, p) configuration and predicted misprediction rate without simulation.
-
Formal verifier for randomized hardware: Takes any proposed counter design, checks for c=1-type vulnerabilities, and certifies whether it meets (ε, δ)-DP.
-
Privacy-preserving RL agent: Uses enhanced PSC for exploration decisions, randomizing only when confidence is high, achieving better reward than RR-based exploration for the same privacy budget.
-
Adaptive cache replacement policy: Applies the p-parameter to cache state transitions, providing DP against Prime+Probe cache attacks while maintaining hit rates within 1.8% of optimal under typical workloads.
Sources
- Deep Learning with Gaussian Differential Privacy
- Differential Privacy-enabled Federated Learning for Sensitive Health Data
- Improving Deep Learning with Differential Privacy using Gradient Encoding and Denoising
- Backpropagation Clipping for Deep Learning with Differential Privacy
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs