Karma: Adaptive Video Streaming via Causal Sequence Modeling

Bowei Xu, Hao Chen, Zhan Ma

Abstract

Adaptive Bitrate (ABR) algorithms are critical for maintaining Quality of Experience (QoE) in video streaming by dynamically adjusting video quality based on network conditions. However, existing learning-based ABR methods often suffer from a "generalization gap," where performance degrades significantly in unseen network environments. This paper introduces Karma, a novel ABR framework that reformulates bitrate selection as a causal sequence modeling task. By utilizing a Decision Transformer architecture and a long-term "QoE-to-go" signal, Karma captures the causal relationships between past actions and future returns. Experimental results demonstrate that Karma outperforms state-of-the-art methods by up to 18.7% in standard environments and 19.2% in unseen network distributions.

Introduction

In modern HTTP-based video streaming, the ABR algorithm serves as the decision-making engine that balances competing objectives: maximizing video resolution while minimizing rebuffering events and quality fluctuations. While Reinforcement Learning (RL) and Imitation Learning (IL) have shown promise in optimizing these trade-offs, they typically rely on direct mappings from a window of past observations to a single action.

This approach often fails to generalize. When a model encounters a network trace outside its training distribution, a single sub-optimal bitrate choice can lead to a "chain of deviations." Because traditional models lack an understanding of how their past actions causally influence their current state and future returns, they struggle to self-correct, leading to a collapse in streaming performance. Karma addresses this by treating ABR as a sequence modeling problem, allowing the agent to reason over the entire history of observations, actions, and rewards.

The Karma Architecture

Karma shifts the ABR paradigm from simple state-action mapping to Causal Sequence Modeling. The architecture is built upon three primary innovations:

1. Multi-dimensional Input Sequences

Unlike standard agents that only observe network metrics (e.g., throughput and buffer level), Karma processes a history of tuples: $(Observation, Return, Action)$. By incorporating previous bitrate choices and their resulting returns into the input sequence, the model can identify the causal link between its decisions and the subsequent state of the playback buffer.

2. QoE-to-go (The Return Signal)

To avoid the "greedy" decision-making common in ABR algorithms—where a model selects a high bitrate that leads to immediate buffer depletion—Karma utilizes a "QoE-to-go" signal. This signal represents the maximum cumulative future QoE possible for the remainder of the session. Since future network conditions are unknown, the authors implemented a QoE-to-go Estimator, a two-layer neural network trained on synthetic traces to predict potential future returns based on current network features.

3. Causal Decision Transformer

At its core, Karma employs a GPT-style Transformer architecture. Using causal self-attention, the model weighs the relevance of specific past events to the current decision. Positional encoding provides the model with a sense of temporal flow. This architecture enables "action refinement": if the model detects that past actions have led to a sub-optimal state (e.g., a dangerously low buffer), it can adjust its strategy to return to an optimal path.

Experimental Methodology

Karma was evaluated against state-of-the-art ABR algorithms, including Pensieve and RobustMPC, using a comprehensive suite of datasets:

  • Standard Evaluation: The FCC broadband and Norway 3G/HSDPA datasets were used for training and baseline testing.
  • Generalization Testing: The Oboe dataset, featuring wired, WiFi, and cellular traces, served as an unseen environment to test the model's resilience to novel network distributions.
  • Real-world Field Tests: The authors conducted live tests across 4G/5G and public WiFi networks in dynamic scenarios, including walking, driving, and commuting via subway.

Results and Key Insights

Karma demonstrated significant performance gains across all testing environments:

  • Performance Gains: Karma achieved an average QoE improvement of 10.8% to 18.7% over existing baselines on standard datasets.
  • Robustness to Network Shock: On the unseen Oboe dataset, Karma outperformed the next-best model by 19.2%, highlighting its superior generalization capabilities.
  • Real-world Adaptability: In highly volatile "in the wild" tests, Karma maintained a performance lead of 7.1% to 11.7%, proving its ability to handle rapid signal fluctuations and network handovers.
  • Deployment Readiness: Despite the complexity of the Transformer architecture, the model remains lightweight (5.3 MB) with millisecond-level inference times, making it suitable for real-time deployment.

Discussion and Limitations

While Karma represents a significant step forward, it is not without limitations. The QoE-to-go estimator currently assumes a piecewise stationary network condition, which may lead to inaccuracies in extremely volatile environments. Furthermore, the training process relies on Dynamic Programming to generate expert trajectories, necessitating an offline phase with known traces.

Future work will focus on developing more sophisticated network characterization features and exploring end-to-end training methodologies that reduce dependency on separate estimators and offline expert labels. Nonetheless, Karma proves that causal sequence modeling is a powerful tool for overcoming the generalization challenges inherent in adaptive video streaming.

Summary updated

BibTeX
@inproceedings{xu2023karma,
  author = {Bowei Xu and Hao Chen and Zhan Ma},
  title = {{Karma: Adaptive Video Streaming via Causal Sequence Modeling}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3612177},
}
Figure