SCALED: Surrogate-gradient for Codec-Aware Learning of Downsampling in ABR Streaming

Published in Picture Coding Symposium (PCS) 2025, 2025

INRIA MediaKind
📍 PCS 2025  ·  Aachen, Germany  ·  December 2025
SCALED: Surrogate-gradient for Codec-Aware
Learning of Downsampling in ABR Streaming
Esteban Pesnel*†, Julien Le Tanou*, Michael Ropert*, Thomas Maugey, Aline Roumy
*MediaKind, Rennes, France    INRIA, Rennes, France - team COMPACT
Video Compression Surrogate Gradients ABR Streaming Deep Learning H.264 / x264 Rate-Distortion
Abstract
The rapid growth in video consumption has introduced significant challenges to modern streaming architectures. OTT video delivery now predominantly relies on Adaptive Bitrate (ABR) streaming, which dynamically adjusts bitrate and resolution based on client-side constraints such as display capabilities and network bandwidth. This pipeline typically involves downsampling the original high-resolution content, encoding and transmitting it, followed by decoding and upsampling on the client side. Traditionally, these processing stages have been optimized in isolation, leading to suboptimal end-to-end rate-distortion (R-D) performance. The advent of deep learning has spurred interest in jointly optimizing the ABR pipeline using learned resampling methods. However, training such systems end-to-end remains challenging due to the non-differentiable nature of standard video codecs, which obstructs gradient-based optimization. Recent works have addressed this issue using differentiable proxy models, based either on deep neural networks or hybrid coding schemes with differentiable components such as soft quantization, to approximate the codec behavior. While differentiable proxy codecs have enabled progress in compression-aware learning, they remain approximations that may not fully capture the behavior of standard, non-differentiable codecs. In this work, we introduce a novel framework that enables end-to-end training with real, non-differentiable codecs by leveraging data-driven surrogate gradients derived from actual compression errors. It facilitates the alignment between training objectives and deployment performance. Experimental results show a 5.19% improvement in BD-BR (PSNR) compared to codec-agnostic training approaches, consistently across the entire rate-distortion convex hull spanning multiple downsampling ratios.
Overview

In ABR streaming, high-resolution video is downscaled server-side, encoded with a standard codec (e.g. H.264), transmitted, decoded, and upscaled client-side - typically with a fixed bicubic filter. SCALED optimizes the learned downscaler \(f\) so that the full chain - downscale → encode → decode → bicubic upscale - produces the best possible reconstruction at a given bitrate. The key difficulty is that the codec \(\phi\) is non-differentiable: gradients cannot flow through it during training. SCALED solves this by injecting surrogate gradients derived from the actual compression error statistics, enabling true end-to-end optimization without any proxy codec.

SCALED pipeline overview
Contributions
🎯 True-codec training Real H.264/x264 in the forward pass. No learned or handcrafted proxy required.
∂ Surrogate Jacobian Reparameterization of the codec gradient via the std. deviation of true compression noise.
⚡ Two training variants SCALEDD (distortion only) and SCALEDRD (rate-distortion with differentiable rate proxy).
Method

The core challenge: applying Straight-Through Estimation (STE) to codecs causes divergence - the compression error fully disconnects from gradient flow, leading to \(|\,f(x;\theta_f)\,|_1 \to \infty\). SCALED reparameterizes the codec output as:

$$\hat{y} = y + \mathrm{sg}(\epsilon)\,\frac{\sigma(\epsilon)}{\mathrm{sg}(\sigma(\epsilon))}, \qquad \epsilon = \phi(y) - y$$
Eq. (7) - SCALED forward pass

Gradient flows exclusively through \(\sigma(\epsilon)\), yielding a dynamically scaled surrogate Jacobian that encodes true codec statistics:

$$\frac{\partial \hat{y}}{\partial y}\bigg|_{\text{surrogate}} = \mathbf{I} - \frac{\boldsymbol{\epsilon}\,(\boldsymbol{\epsilon} - \bar{\boldsymbol{\epsilon}})^T}{N\,\sigma^2(\boldsymbol{\epsilon})}$$
Eq. (8) - Surrogate Jacobian

Unlike STE or proxy-based methods, the gradient adapts dynamically to the current compression error distribution.

Results
−6.11%
BD-BR PSNR · XIPH
SCALEDRD vs Lanczos
−5.07%
BD-BR PSNR · UVG
SCALEDRD vs Lanczos
+5.19%
BD-BR gain
vs codec-agnostic
×6
scale ratios
2/3 → 1/5
MethodStrategyCodec-awarePSNRSSIMVMAFVMAF-NEG
XIPH dataset - BD-BR vs Lanczos (↓ is better)
ProgDownLiteYUVD-only, no codec-0.85%-1.19%-4.71%-3.60%
ProgDownLiteYUVSTE+68.57%+48.34%+11.22%+20.69%
ProgDownLiteYUVProxy [Guleryuz et al.]-1.47%-1.87%-2.58%-1.67%
SCALEDDD + true codec-4.67%-5.21%-9.80%-7.78%
SCALEDRDR-D + true codec-6.11%-4.29%-8.80%-7.59%
Citation
@INPROCEEDINGS{11417641,
  author    = {Pesnel, Esteban and Le Tanou, Julien and Ropert, Michael
               and Maugey, Thomas and Roumy, Aline},
  booktitle = {2025 Picture Coding Symposium (PCS)},
  title     = {SCALED: Surrogate-gradient for Codec-Aware Learning
               of Downsampling in ABR Streaming},
  year      = {2025},
  pages     = {1--5},
  doi       = {10.1109/PCS65673.2025.11417641}
}
Published by IEEE Signal Processing Society