Ksurf-Drone: Attention Kalman Filter for Contextual Bandit Optimization in Cloud Resource Allocation

Michael Dang’ana, Yuqiu Zhang, Hans‐Arno Jacobsen

TL;DR

Managing cloud resources during unpredictable traffic spikes is a balancing act between performance and cost. This paper introduces Ksurf-Drone, a system that replaces traditional Gaussian Process models with an attention-enhanced Kalman Filter to make resource orchestration faster, cheaper, and significantly more stable under high-volatility conditions like "flash crowds."

What Problem Does This Paper Address?

In modern cloud environments, containers are the gold standard for deploying applications. However, deciding exactly how much CPU or RAM to allocate to these containers is difficult because cloud workloads are messy. They are plagued by "flash crowds" (sudden surges of users) and "flash-dot effects," which introduce massive noise and non-linearity into performance metrics.

Existing state-of-the-art orchestrators like Drone use Contextual Multi-Armed Bandits (MAB) to find the best configurations. While effective, Drone relies on Gaussian Process (GP) regression to model uncertainty. GPs have two major flaws in this context:

  1. Computational Heaviness: Their complexity grows cubically ($O(n^3)$) with data size, making them slow for real-time decisions.
  2. Rigidity: They struggle to adapt to abrupt, non-stationary shifts in data (like a sudden DDoS attack or a viral marketing surge).

Methods

The authors propose Ksurf-Drone, which integrates the Ksurf estimator into the Drone framework. Key components include:

  • Ksurf (Attention Kalman Filter): Unlike a standard Extended Kalman Filter (EKF), Ksurf uses a Transformer-style attention mechanism to model temporal relationships in data. This allows it to filter out noise and focus on the most relevant historical signals.
  • KsurfNet: A novel addition that uses a Long Short-Term Memory (LSTM) network to automatically learn the initial noise parameters (the $Q$ and $R$ matrices) for the Kalman Filter. This removes the need for manual, "black magic" tuning of filter parameters.
  • Contextual Bandit Integration: By providing a "cleaner," filtered state variable to the bandit algorithm, the system reduces "regret" (the cost of making sub-optimal decisions), leading to faster convergence on the ideal resource settings.

Datasets

The researchers evaluated Ksurf-Drone using several industry-standard benchmarks:

  • Google Charlie Trace: A massive real-world dataset of cluster usage.
  • VarBench: A Kubernetes benchmark specifically designed for real-time message queue processing (using Apache Kafka).
  • $\mu$Bench: A microservice benchmark that simulates stochastic, real-world application workloads.
  • Compute Canada & Google Cloud: Experiments were run across both private and public cloud infrastructures to ensure generalizability.

Key Insights and Ideas

  • Variance is the Enemy: The "aha moment" here is that reducing the variance of the estimator directly improves the efficiency of the bandit algorithm. By using Ksurf to provide a more stable prediction of latency, the orchestrator makes fewer "panic" scaling decisions.
  • Online vs. Batch: While GPs are typically batch-processed, the Kalman Filter approach is recursive and "online." This makes it inherently better suited for the streaming nature of cloud telemetry.
  • Complexity Gains: The authors highlight that while Ksurf has a higher initial setup cost due to the attention layers, its execution complexity is significantly lower than GPs as the dataset grows, enabling more frequent and responsive orchestration.

Key Results

Ksurf-Drone outperformed the standard Drone (GP-based) and other baseline auto-scalers across several metrics:

  • Stability: Achieved 41% lower latency variance at p95 and 47% lower at p99, meaning application performance was much more predictable.
  • Efficiency: Demonstrated a 4% reduction in CPU usage and a significant reduction in memory footprint on the Kubernetes master node.
  • Cost: Resulted in a 7% cost saving in average worker pod counts on the VarBench benchmark.
  • Responsiveness: Better mitigated "flash crowd" scenarios where traditional models would either over-provision (wasting money) or under-provision (causing crashes).

Limitations and Future Work

The authors acknowledge that KsurfNet (the LSTM-based tuner) introduces its own overhead in terms of runtime and memory during the training phase. Additionally, while it handles non-linearity well, the offline tuning phase can still be susceptible to extreme non-stationarity if the cloud environment changes fundamentally after the model is trained.

Future Work includes:

  • Expanding KsurfNet to use Graph Neural Networks (GNNs) to better model the complex, web-like dependencies between different microservices.
  • Integrating reinforcement learning to further automate the "exploration vs. exploitation" trade-offs in resource management.

Summary updated

Abstract

Resource orchestration and configuration parameter search are key concerns for container-based infrastructure in cloud data centers. Large configuration search space and cloud uncertainties are often mitigated using contextual bandit techniques for resource orchestration including the state-of-the-art Drone orchestrator. Complexity in the cloud provider environment due to varying numbers of virtual machines introduces variability in workloads and resource metrics, making orchestration decisions less accurate due to increased nonlinearity and noise. Ksurf, a state-of-the-art variance-minimizing estimator method ideal for highly variable cloud data, enables optimal resource estimation under conditions of high cloud variability. This work evaluates the performance of Ksurf on estimation-based resource orchestration tasks involving highly variable workloads when employed as a contextual multi-armed bandit objective function model for cloud scenarios using Drone. Ksurf enables significantly lower latency variance of over <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$40\%$</tex-math></inline-formula> at p95 and p99, demonstrates significant reduction in CPU and master node memory usage on Kubernetes, resulting in a <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$7\%$</tex-math></inline-formula> cost savings in average worker pod count on <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$VarBench$</tex-math></inline-formula> Kubernetes benchmark.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
VarBench Kubernetes Kafka benchmarkDrone (DR)Mean worker-pod CPU usage65.26 millipodVarBench worker-pod metric summary; the comparison tested DR and DRKF at CPU thresholds…
Source quote
L256: Mean │ 65.26 │ 62.93 │ 827.2 │ 830.3
VarBench Kubernetes Kafka benchmarkKsurf-Drone (DRKF)Mean worker-pod CPU usage62.93 millipodVarBench worker-pod metric summary; the comparison tested DR and DRKF at CPU thresholds…
Source quote
L256: Mean │ 65.26 │ 62.93 │ 827.2 │ 830.3
BibTeX
@article{dangana2026ksurf,
  author = {Michael Dang’ana and Yuqiu Zhang and Hans‐Arno Jacobsen},
  title = {{Ksurf-Drone: Attention Kalman Filter for Contextual Bandit Optimization in Cloud Resource Allocation}},
  journal = {IEEE Transactions on Cloud Computing},
  year = {2026},
  doi = {10.1109/tcc.2026.3653558},
}
Figure