ALERT: Machine Learning-Enhanced Risk Estimation for Databases Supporting Encrypted Queries
Longxiang Wang (City University of Hong Kong)
34th USENIX Security Symposium (USENIX Security '25) · Day 3 · Privacy 4: Privacy-Preserving Computation
Overview
The proliferation of cloud computing and outsourced data storage has led to an increased demand for secure data management solutions, even when data resides on untrusted third-party servers. Dynamic Searchable Symmetric Encryption (DSSE) schemes represent a critical advancement in this domain, enabling clients to perform search operations on their encrypted data stored remotely without first decrypting it. DSSE supports three fundamental operations: setup (encrypting and uploading data), query (retrieving specific encrypted files), and update (adding or deleting files), distinguishing it from static searchable encryption. While DSSE aims to provide confidentiality, a significant body of research has demonstrated its vulnerability to leakage attacks (LAs), where adversaries passively monitor query interactions to infer sensitive information.

Key moments
- 0:00 Introduction to DSSE and its leakage vulnerabilities
- 2:35 Problem: Existing leakage attacks lack real-time performance
- 4:00 Alert's core idea: Machine learning for real-time risk estimation
- 6:00 Overcoming data inconsistencies for accurate ML model training
- 8:00 Dynamic clustering for efficient risk assessment with many queries
- 9:59 Optimized co-occurrence matrix computation for reduced latency
- 10:59 Evaluation results: Alert's superior speed and recovery performance
ALERT: Machine Learning-Enhanced Risk Estimation for Databases Supporting Encrypted Queries
Speakers: Longxiang Wang
Conference: USENIX Security
YouTube: https://www.youtube.com/watch?v=Gjq_6xuqw4o
Overview
The proliferation of cloud computing and outsourced data storage has led to an increased demand for secure data management solutions, even when data resides on untrusted third-party servers. Dynamic Searchable Symmetric Encryption (DSSE) schemes represent a critical advancement in this domain, enabling clients to perform search operations on their encrypted data stored remotely without first decrypting it. DSSE supports three fundamental operations: setup (encrypting and uploading data), query (retrieving specific encrypted files), and update (adding or deleting files), distinguishing it from static searchable encryption. While DSSE aims to provide confidentiality, a significant body of research has demonstrated its vulnerability to leakage attacks (LAs), where adversaries passively monitor query interactions to infer sensitive information.
Leakage attacks exploit structural patterns inherent in encrypted query responses, allowing an attacker to reconstruct original queries or even parts of the underlying database. Existing defensive strategies, such as padding or the use of Oblivious RAM (ORAM), often introduce substantial performance overhead, making them impractical for real-time applications. This performance-security trade-off has been a persistent challenge in the field.
Presented by Longxiang Wang from City University of Hong Kong, the paper "ALERT: Machine Learning-Enhanced Risk Estimation for Databases Supporting Encrypted Queries" addresses this critical gap. ALERT proposes a novel approach that transforms the problem of leakage attack assessment into a real-time, computationally efficient risk estimation task using machine learning. By enabling systems to quickly evaluate the risk posed by a query before it is executed, ALERT aims to prevent leakage attacks without compromising system performance, thereby offering a practical and robust solution for securing DSSE-enabled databases.
Background
▶ Watch: Introduction to DSSE and its leakage vulnerabilities (0:00)
Searchable Symmetric Encryption (SSE) allows a client to encrypt a collection of documents and outsource them to an untrusted server, while retaining the ability to search over the encrypted data. DSSE extends this capability by allowing dynamic updates to the encrypted database, such as adding or deleting documents, making it highly suitable for evolving data environments. However, the very mechanisms that enable searching and updating encrypted data often leak structural information. This leakage—information about access patterns, search patterns, or data modification patterns—can be exploited by a passive adversary.
A typical leakage attack, often referred to as a leakage abuse attack (LA), involves an adversary observing the sequence of encrypted queries and their corresponding encrypted responses. By analyzing the structural equivalence of these interactions, even without direct access to cryptographic keys, the adversary can infer patterns. For instance, if two distinct queries result in identical encrypted responses or exhibit similar access patterns over time, an attacker might deduce that the underlying plaintext queries or accessed documents were related or identical. Over a sufficient number of queries, these observations can be aggregated to reconstruct the user's original queries, keywords, or even the content of the database.
Prior research on leakage attacks has primarily focused on identifying new vulnerability vectors and demonstrating the theoretical efficacy of these attacks. While crucial for understanding the attack surface, these analytical approaches often involve complex, iterative optimization problems that are computationally intensive. They typically require extensive computation to match auxiliary patterns (derived from known or estimated background data) with observed leakage patterns, aiming to minimize the distance between them. This iterative nature means that assessing the risk of a single query can be prohibitively slow, rendering such methods unsuitable for real-time deployment in live systems.
Defensive measures against leakage attacks, such as adding random padding to query responses or employing Oblivious RAM (ORAM), attempt to obfuscate or randomize access patterns. While effective at increasing security, these methods introduce significant computational and communication overhead. Padding can inflate data sizes and query response times, while ORAM schemes, designed to hide access patterns completely, often incur multiple orders of magnitude performance degradation. This creates a dilemma for practitioners: deploy a secure but slow system, or a fast but vulnerable one. The core problem ALERT seeks to address is the absence of a real-time, efficient mechanism for assessing and mitigating leakage risk without sacrificing system performance.
Key Findings
▶ Watch: Alert's core idea: Machine learning for real-time risk estimation (4:00)
The ALERT system introduces several key findings and contributions that significantly advance the state of the art in securing DSSE schemes against leakage attacks:
- Problem Reformulation for Real-time Assessment: ALERT's most fundamental finding is that the computationally expensive, iterative heuristic optimization problem traditionally used for leakage analysis can be effectively reformulated as a machine learning multiclassification task. This shift allows the time-consuming process of learning query patterns and assessing risk to be moved offline during model training. Consequently, the online risk assessment phase only requires rapid model inference on observed leakage patterns, achieving near real-time monitoring capabilities.
- Addressing Feature Misalignment: The authors identified and successfully tackled critical challenges related to data preparation for machine learning models, specifically feature misalignment. They devised methods to handle variations in the number of files collected over time by normalizing query vectors to a mean of zero and a standard deviation of one, eliminating the influence of absolute values. Furthermore, they addressed the dependency of query features on query order, which is not available in real-world targeted databases, by resorting vectors in the training data to remove order information, ensuring alignment with test data.
- Scalable Query Recovery with Dynamic Clustering: A major challenge in databases with thousands of queries is the suboptimal performance of a single machine learning model due to an excessive number of parameters. ALERT mitigates this by employing a dynamic programming algorithm to cluster queries based on their historical volume information. By training separate, specialized models for each cluster, ALERT significantly improves recovery performance and reduces latency, particularly in scenarios with a large "keyword universe."
- Optimized Co-occurrence Matrix Computation: For online risk assessment, the computation of co-occurrence matrices—which track how frequently keywords appear together—can become a bottleneck, especially with a large number of timestamps. ALERT introduces an optimized method that leverages previously computed co-occurrence states. This optimization reduces the time complexity for updating the matrix from O(KN²) to O(KN), where N is the number of files and K is the number of keywords, enabling faster real-time processing.
- Superior Performance and Robustness: Through extensive evaluation against state-of-the-art leakage analysis techniques (Jigsaw, IHOP, RSA), ALERT demonstrated remarkable improvements:
- It achieved a 14.5-fold speedup with only a 5.2% recovery loss compared to the second fastest approach (Jigsaw) in settings without time constraints.
- In low-latency, real-world scenarios, ALERT maintained a median query recovery rate of 86.3% with a runtime of 5.4 seconds, significantly outperforming competitors. Even under a strict 1.8-second time limit, it achieved 66.8% recovery.
- ALERT exhibited greater robustness against large keyword universes (e.g., 7,000 keywords) and various padding countermeasures, showing only a 4.5% drop in recovery rates against cluster-based padding, which was substantially less than other methods.
These findings collectively demonstrate that ALERT provides a practical, efficient, and robust solution for real-time leakage risk estimation in DSSE-enabled databases, offering a viable path to balancing security and performance.
Technical Deep Dive
▶ Watch: Overcoming data inconsistencies for accurate ML model training (6:00)
The core innovation of ALERT lies in its re-framing of the leakage attack assessment problem. Traditionally, leakage analysis involves an iterative, heuristic optimization process where an attacker attempts to match observed leakage patterns with auxiliary data patterns to minimize a distance metric. This approach requires repeated calculations for each new query, leading to significant latency. ALERT, instead, transforms this into a machine learning multiclassification problem.
The fundamental insight is that the time-intensive task of learning the intricate relationships between query patterns and their leaked structural information can be performed offline during the model training phase. Once the model is trained, online risk assessment simply involves performing a rapid inference on the leakage patterns associated with a new query. This architectural shift from iterative optimization to offline training and online inference is crucial for achieving real-time performance.
To construct this system, ALERT tackles several technical challenges:
1. Addressing Feature Misalignment
In DSSE, structural leakages are often query-dependent and span multiple queries, making it difficult to align leaked information with the data used for training. ALERT identifies two primary types of inconsistencies:
- Variation in File Count (Imbalanced Features): The number of files accessed or returned at different timestamps can vary significantly as the database evolves. This leads to features with vastly different scales, which can negatively impact machine learning model performance. To mitigate this, ALERT applies normalization to each query vector. Specifically, each feature vector is transformed to have a mean of zero and a standard deviation of one. This process eliminates the influence of absolute values, ensuring that the model focuses on the relative patterns rather than the magnitude of file counts.
- Query Order Dependency: The sequence in which queries are issued can introduce order-dependent features in the leakage patterns. However, in a real-world attack scenario, the adversary does not have access to the original query order. If the training data incorporates this order information, it will not align with the test data (real-time leakage observations). ALERT addresses this by resorting the vectors within the training data. This process effectively removes the explicit order information, ensuring that the features derived from the training data are structurally equivalent and comparable to the order-agnostic features observed during online inference.
2. Handling a Large Number of Classes
Databases often contain thousands of distinct queries, meaning the machine learning model would need to classify among a very large number of classes. Training a single model for such a high-cardinality classification task is suboptimal. It leads to an excessive number of model parameters, which increases both training time and inference latency, and often results in lower query recovery performance.
ALERT employs a dynamic programming algorithm to cluster queries based on their volume information. The idea is to group similar queries together, allowing for the training of multiple, smaller, and more specialized models, one for each cluster. This modular approach significantly reduces the complexity for each individual model. The clustering mechanism is guided by analyzing queries' historical volume rankings. By observing temporal variations in these rankings, ALERT identifies stability patterns across different queries. These stability patterns are then used to dynamically establish cluster boundaries, reflecting the variance and stability characteristics of different query groups. This dynamic clustering is particularly beneficial when the targeted database contains a "sheer quantity of classes," acting as an extension to ALERT's core functionality.
3. Optimized Co-occurrence Matrix Computation
A critical component of many leakage analysis techniques, including ALERT, is the computation of co-occurrence matrices. These matrices capture how frequently different keywords or data items are accessed together over a sequence of queries. In the online risk assessment phase, particularly when the number of timestamps (i.e., historical queries to consider) is large, recalculating the entire co-occurrence matrix for every new query can be computationally expensive. The original method typically involves matrix multiplications of size N*K and K*N, leading to a time complexity of O(KN²), where N is the number of files and K is the number of keywords.
ALERT proposes an optimized method that leverages the previous co-occurrence state. Instead of recomputing the entire matrix from scratch, when a new query is proposed, the system performs a much lighter vector-matrix multiplication and a simple vector multiplication. The results of these lighter operations are then combined with the previously computed co-occurrence matrix to form the updated matrix. This incremental update reduces the time complexity from O(KN²) to O(KN). This optimization is vital for achieving the "almost real-time monitoring" capability, as it significantly reduces the computational burden associated with updating critical structural leakage patterns.
By combining these technical innovations, ALERT provides a robust framework that transforms the theoretical understanding of leakage attacks into a practical, real-time defense mechanism.
Demo / Proof of Concept
▶ Watch: Optimized co-occurrence matrix computation for reduced latency (9:59)
While the talk did not feature a live, interactive demonstration of the ALERT system in action, the speakers presented a comprehensive evaluation and proof-of-concept through rigorous experimental comparisons. The effectiveness of ALERT was demonstrated by benchmarking it against three state-of-the-art leakage abuse attack (AOA) approaches: Jigsaw, IHOP, and RSA. These baselines were specifically chosen due to their established query recovery performance and system efficiency, and all have been published in USENIX Security, highlighting their credibility within the research community.
The experiments were conducted using publicly available datasets, notably the New York Times dataset, which provides a realistic corpus for evaluating search patterns. The evaluation focused on two key metrics: query recovery performance (the percentage of original queries successfully reconstructed) and system efficiency (runtime latency).
The results unequivocally demonstrated ALERT's superior performance:
- Speedup without Time Constraints: In scenarios where there were no strict time limitations, ALERT achieved a remarkable 14.5-fold speedup compared to Jigsaw, which was identified as the second fastest AOA approach. This significant speed improvement came with only a 5.2% recovery loss, indicating that ALERT can achieve much faster risk assessment without a substantial compromise in accuracy. Furthermore, ALERT exhibited greater stability, achieving an even higher average recovery rate than Jigsaw on the New York Times dataset, underscoring its consistency.
- Performance in Low-Latency Scenarios: Crucially, for real-world applications where low latency is paramount, ALERT significantly outperformed all other AOA approaches. With a runtime of just 5.4 seconds, ALERT achieved a median query recovery rate of 86.3%. It also maintained a lower interquartile range, indicating more consistent performance across different queries compared to its competitors. Even under a more stringent time limitation of 1.8 seconds, ALERT still managed to maintain a respectable recovery rate of 66.8%, further showcasing its efficiency under pressure.
- Robustness against Large Keyword Universes: ALERT also demonstrated superior robustness in more challenging scenarios, particularly when dealing with a very large keyword universe. For instance, with a keyword universe size of 7,000, ALERT maintained higher median recovery rates. Jigsaw, even when configured for its fastest operation mode, required over 20 seconds to recover all queries under these conditions, which prevented larger-scale comparative experiments with ALERT due to its prohibitive runtime.
- Resistance to Countermeasures: Finally, ALERT proved to be more resilient against various padding countermeasures designed to thwart leakage attacks. Notably, when confronted with cluster-based countermeasures, ALERT's recovery rates dropped by only 4.5%. This minimal reduction was substantially less than that observed for other AOA approaches, which experienced much more significant performance degradation. This resilience is attributed to ALERT's effective modeling of overall sequence features rather than being easily disrupted by localized padding.
The speakers emphasized that all experimental datasets and scripts are open-sourced, providing a verifiable and reproducible foundation for their findings. This transparency allows other researchers and practitioners to validate ALERT's claims and integrate its methodology into their own work.
Defensive Implications
▶ Watch: Evaluation results: Alert's superior speed and recovery performance (10:59)
ALERT offers profound defensive implications for organizations deploying DSSE-enabled databases, particularly those in sensitive sectors like healthcare, finance, or government, where data privacy and real-time operational efficiency are critical.
Firstly, ALERT provides a real-time risk assessment mechanism for encrypted queries. Instead of relying on post-facto analysis or computationally heavy preventative measures, a system integrated with ALERT can evaluate the potential leakage risk of a query before it is executed. If ALERT detects a query that poses a high risk of leaking sensitive information, the system can immediately freeze the query and wait for further instructions from the client or an administrator. This proactive approach effectively isolates potential attackers from being able to monitor risky queries in real time, thereby preventing the leakage attack from unfolding.
Secondly, this real-time risk feedback loop enables dynamic adaptation of security measures. Instead of applying a blanket, high-overhead defense (like ORAM or extensive padding) to all queries, which can cripple system performance, organizations can now implement a more nuanced strategy. Low-risk queries can proceed unimpeded, enjoying the full performance benefits of DSSE. High-risk queries, however, can be subjected to more stringent, albeit slower, countermeasures, or even blocked entirely. This intelligent resource allocation optimizes the trade-off between security and performance, ensuring that robust defenses are applied precisely when and where they are most needed.
Thirdly, ALERT's efficiency makes it a practical alternative to existing performance-heavy defenses. By shifting complex computations to an offline training phase and optimizing online inference, it bypasses the performance bottlenecks that have traditionally hindered the adoption of secure DSSE schemes. This means organizations no longer have to choose between strong security and operational speed; they can have both.
Finally, the open-sourced nature of ALERT's experiment data sets and scripts is a significant contribution to the defensive community. It provides a transparent foundation for further research and development. Security practitioners can leverage these resources to better understand leakage attack vectors, develop more robust DSSE implementations, or even integrate ALERT's core machine learning components into their existing security monitoring tools or DSSE client libraries. This facilitates a more informed and proactive stance against evolving threats in encrypted data management.
Key Takeaways
- DSSE Vulnerability: Dynamic Searchable Symmetric Encryption (DSSE) schemes, while enabling searches on encrypted data, are highly vulnerable to leakage attacks (LAs) that infer sensitive information from structural patterns.
- Performance-Security Trade-off: Traditional defenses against LAs, such as padding or Oblivious RAM (ORAM), impose significant performance overhead, making them impractical for real-time applications.
- ML-Enhanced Risk Assessment: ALERT reformulates the complex leakage analysis problem into a machine learning multiclassification task, allowing for efficient offline model training and real-time online risk inference.
- Technical Innovations: ALERT incorporates several key technical solutions, including normalization and reordering for feature alignment, a dynamic programming algorithm for query clustering to handle large class numbers, and an optimized co-occurrence matrix computation to reduce online latency from O(KN²) to O(KN).
- Superior Performance: ALERT achieves a 14.5-fold speedup with only a 5.2% recovery loss compared to the best existing AOA methods, demonstrating robust recovery rates (e.g., 86.3% at 5.4 seconds) even under strict time constraints.
- Enhanced Robustness: The system maintains high recovery rates against large keyword universes (e.g., 7,000 keywords) and exhibits significantly greater resilience (only 4.5% recovery drop) against various padding countermeasures than other approaches.
About the Speaker(s)
Longxiang Wang is affiliated with City University of Hong Kong. His research focuses on enhancing the security and efficiency of cryptographic schemes, particularly in the context of searchable encryption and database security. His work, as presented in "ALERT: Machine Learning-Enhanced Risk Estimation for Databases Supporting Encrypted Queries," highlights his expertise in applying machine learning techniques to address complex security challenges in real-world systems.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Solid applied crypto/ML paper that solves a real and underappreciated problem — leakage attacks on DSSE are genuinely dangerous and the performance-security tradeoff is a legitimate pain point practitioners hit. The reformulation from iterative optimization to offline ML inference is a clean contribution, the engineering details (co-occurrence matrix optimization, dynamic clustering) are concrete, and the benchmarks are honest. Not a landmark paper, but it's doing real work.
Heather Calloway (CISO) — PASS
Technically credible research on leakage attacks against DSSE schemes, but it sits entirely outside governance, executive decision-making, or defender operations. This is a cryptographic systems paper, not a security leadership talk.
→ Top-rated talks at 34th USENIX Security Symposium (USENIX Security '25)
All talks from 34th USENIX Security Symposium (USENIX Security '25)