IP Library Granted Patent US 12,666,040
Granted Patent B2
US 12,666,040 · App. 18/565,008 · Granted Jun 23, 2026

Training rate control neural networks through reinforcement learning

Inventors: Anton Zhernov (London, GB); Chenjie Gu (Sunnyvale, CA); Daniel J. Mankowitz (St. Albans, GB); Julian Schrittwieser (London, GB); Amol Balkishan Mandhane (London, GB); Mary Elizabeth Rauh (London, GB); Miaosen Wang (Sunnyvale, CA); Thomas Keisuke Hubert (London, GB)
Assignee: GDM Holding LLC
H04N19/149H04N19/172
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,666,040
App. No.
18/565,008
Filed
Nov 28, 2023
Granted
Jun 23, 2026
Kind
B2
Art Unit
2425
USPC
375/240.02
Abstract

Systems and methods for training rate control neural networks through reinforcement learning. During training, reward values for training examples are generated from the current performance of the rate control neural network in encoding the video in the training example and the historical performance of the rate control neural network in encoding the video in the training example.

Claims (70)

1 . A method of training a rate control neural network for use in encoding sequences of video frames, wherein the rate control neural network is configured to, during encoding of an input sequence of video frames and for each video frame in the sequence, receive input features for the video frame and process the input features to generate a respective score for each of a plurality of possible quantization parameter values, the method comprising, at an iteration which is one of a sequence of iterations of training the rate control neural network:

obtaining a training example comprising a training sequence of video frames and a target data measure for the training sequence;

obtaining a historical performance for the training example, wherein the historical performance is a historical performance of training the rate control neural network on the training example at preceding iterations of the sequence of iterations;

generating an encoded representation of the training sequence that comprises a sequence of encoded video frames, comprising, for each video frame in the training sequence:

generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values;

selecting, using the policy output, a quantization parameter value from the plurality of possible quantization parameter values; and

encoding the video frame using a video codec in accordance with the selected quantization parameter value;

determining a current performance for the training example, comprising determining (i) a quality measure that measures a quality of the encoded representation and (ii) a data measure that measures an amount of data required to represent the encoded representation;

generating a reward value from the current performance and the historical performance; and

training the rate control neural network using the reward value through reinforcement learning.

2 . The method of claim 1 , wherein generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values, comprises:

processing input features for the video frame using the rate control neural network to generate a respective score for each of the plurality of possible quantization parameter values; and

using the respective scores as the respective policy scores.

3 . The method of claim 1 , wherein generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values, comprises:

performing a look-ahead search of possible future states of the encoding guided by the rate control neural network.

4 . The method of claim 1 , wherein the historical performance for the training example is generated from (i) an exponential moving average of previous quality measures computed for the training example during the training of the rate control neural network and (ii) an exponential moving average of previous overshoots determined from the target data measure and previous data measures computed for the training example during the training of the rate control neural network.

5 . The method of claim 4 , further comprising:

updating the historical performance using (i) the quality measure that measures a quality of the encoded representation and (ii) an overshoot for the data measure that measures a difference between an amount of data required to represent the encoded representation and the target data measure.

6 . The method of claim 4 , wherein generating a reward value from the current performance and the historical performance comprises:

determining whether either a current overshoot or the exponential moving average of previous overshoots are greater than zero;

when either a current overshoot or the exponential moving average of previous overshoots are greater than zero:

setting the reward value to a positive value if the current overshoot is less than or equal to the exponential moving average of previous overshoots, and

setting the reward value to a negative value if the current overshoot is greater than the exponential moving average of previous overshoots.

7 . The method of claim 6 , wherein generating a reward value from the current performance and the historical performance comprises:

when neither the current overshoot nor exponential moving average of previous overshoots are greater than zero:

setting the reward equal to the positive value if the quality measure that measures a quality of the encoded representation is the same as or better than the exponential moving average of previous quality measures, and

setting the reward value to the negative value if the quality measure that measures a quality of the encoded representation is worse than the exponential moving average of previous quality measures.

8 . The method of claim 1 , wherein generating a reward value from the current performance and the historical performance comprises:

setting the reward value to a positive value when a current performance measure is greater than a historical performance measure by more than a first threshold amount.

9 . The method of claim 8 , wherein generating a reward value from the current performance and the historical performance comprises:

setting the reward value to a negative value when the current performance measure is less than the historical performance measure by more than the first threshold amount.

10 . The method of claim 1 , wherein the rate control neural network comprises:

a representation neural network that is configured to process the input features to generate a feature representation for the video frame; and

a policy neural network head that is configured to process the feature representation to generate the respective score for each of the plurality of possible quantization parameter values.

11 . The method of claim 10 , further comprising, for each of one or more auxiliary tasks:

processing the feature representation for the video frame using a corresponding auxiliary neural network head to generate a predicted output for the auxiliary task; and

determining a respective error between the predicted output and a corresponding ground truth output for the auxiliary task;

wherein training the rate control neural network using the reward value through reinforcement learning comprises training the rate control neural network using the respective errors for the one or more auxiliary tasks.

12 . A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to perform operations for training a rate control neural network for use in encoding sequences of video frames, wherein the rate control neural network is configured to, during encoding of an input sequence of video frames and for each video frame in the sequence, receive input features for the video frame and process the input features to generate a respective score for each of a plurality of possible quantization parameter values, the operations comprising, at an iteration which is one of a sequence of iterations of training the rate control neural network:

obtaining a training example comprising a training sequence of video frames and a target data measure for the training sequence;

obtaining a historical performance for the training example, wherein the historical performance is a historical performance of training the rate control neural network on the training example at preceding iterations of the sequence of iterations;

generating an encoded representation of the training sequence that comprises a sequence of encoded video frames, comprising, for each video frame in the training sequence:

generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values;

selecting, using the policy output, a quantization parameter value from the plurality of possible quantization parameter values; and

encoding the video frame using a video codec in accordance with the selected quantization parameter value;

determining a current performance for the training example, comprising determining (i) a quality measure that measures a quality of the encoded representation and (ii) a data measure that measures an amount of data required to represent the encoded representation;

generating a reward value from the current performance and the historical performance; and

training the rate control neural network using the reward value through reinforcement learning.

13 . The system of claim 12 , wherein generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values, comprises:

processing input features for the video frame using the rate control neural network to generate a respective score for each of the plurality of possible quantization parameter values; and

using the respective scores as the respective policy scores.

14 . The system of claim 12 , wherein generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values, comprises:

performing a look-ahead search of possible future states of the encoding guided by the rate control neural network.

15 . The system of claim 12 , wherein the historical performance for the training example is generated from (i) an exponential moving average of previous quality measures computed for the training example during the training of the rate control neural network and (ii) an exponential moving average of previous overshoots determined from the target data measure and previous data measures computed for the training example during the training of the rate control neural network.

16 . The system of claim 15 , the operations further comprising:

updating the historical performance using (i) the quality measure that measures a quality of the encoded representation and (ii) an overshoot for the data measure that measures a difference between an amount of data required to represent the encoded representation and the target data measure.

17 . The system of claim 12 , the operations further comprising, for each of one or more auxiliary tasks:

processing the feature representation for the video frame using a corresponding auxiliary neural network head to generate a predicted output for the auxiliary task; and

determining a respective error between the predicted output and a corresponding ground truth output for the auxiliary task;

wherein training the rate control neural network using the reward value through reinforcement learning comprises training the rate control neural network using the respective errors for the one or more auxiliary tasks.

18 . One or more computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations for training a rate control neural network for use in encoding sequences of video frames, wherein the rate control neural network is configured to, during encoding of an input sequence of video frames and for each video frame in the sequence, receive input features for the video frame and process the input features to generate a respective score for each of a plurality of possible quantization parameter values, the method comprising, at an iteration which is one of a sequence of iterations of training the rate control neural network:

obtaining a training example comprising a training sequence of video frames and a target data measure for the training sequence;

obtaining a historical performance for the training example, wherein the historical performance is a historical performance of training the rate control neural network on the training example at preceding iterations of the sequence of iterations;

generating an encoded representation of the training sequence that comprises a sequence of encoded video frames, comprising, for each video frame in the training sequence:

generating, using the rate control neural network, a policy output for the video frame that comprises a respective policy score for each of the plurality of possible quantization parameter values;

selecting, using the policy output, a quantization parameter value from the plurality of possible quantization parameter values; and

encoding the video frame using a video codec in accordance with the selected quantization parameter value;

determining a current performance for the training example, comprising determining (i) a quality measure that measures a quality of the encoded representation and (ii) a data measure that measures an amount of data required to represent the encoded representation;

generating a reward value from the current performance and the historical performance; and

training the rate control neural network using the reward value through reinforcement learning.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 6, 2025
From: DEEPMIND TECHNOLOGIES LIMITED
To: GDM HOLDING LLC
Reel/Frame 071498/0210 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 3, 2024
From: ZHERNOV, ANTON; GU, CHENJIE; MANKOWITZ, DANIEL J.; SCHRITTWIESER, JULIAN; MANDHANE, AMOL BALKISHAN; RAUH, MARY ELIZABETH; WANG, MIAOSEN; HUBERT, THOMAS KEISUKE
To: DEEPMIND TECHNOLOGIES LIMITED
Reel/Frame 066012/0191 →
Continuity (2)
Provisional Application 63194940 · May 28, 2021
Related Publication 20240267532A1 · Aug 8, 2024
References Cited (74)
US 20190132591A1 · Zhang et al. · 2019 [cited by applicant]
US 20190335192A1 · Otto · 2019 [cited by examiner]
US 20200344472A1 · Peng et al. · 2020 [cited by applicant]
US 20240161488A1 · Solovyev · 2024 [cited by examiner]
CN 110351555A · 2019 [cited by applicant]
CN 111294595A · 2020 [cited by applicant]
CN 112399176 · 2021 [cited by applicant]
JP 2019512938 · 2019 [cited by applicant]
KR 20030009575A · 2003 [cited by applicant]
KR 100790900 · 2008 [cited by applicant]
Achiam et al., “Constrained policy optimization,” CoRR, May 28, 2018, arxiv.org/abs/1805.11074, 15 pages. [cited by applicant]
Ba et al., “Layer normalization,” CoRR, Jul. 21, 2016, arXiv: 1607.06450, 14 pages. [cited by applicant]
Bohez et al., “Value constrained model-free continuous control,” CoRR, Feb. 12, 2019, arXiv:1902.04623, 12 pages. [cited by applicant]
Calian et al., “Balancing constraints and rewards with meta-gradient D4PG,” CoRR, Oct. 13, arxiv.org/abs/2010.06324, 22 pages. [cited by applicant]
Chiang et al., “A new rate control scheme using quadratic rate distortion model,” Proceedings of 3rd IEEE International Conference on Image Processing, Sep. 19, 1996, 2:73-76. [cited by applicant]
Chow et al., “A lyapunov-based approach to safe reinforcement learning,” Advances in Neural Information Processing Systems 31 (NeurIPS 2018), 2018, 10 pages. [cited by applicant]
Chromium.googlesource.com [online], “libvpx,” Dec. 30, 2013, retrieved on Sep. 11, 2023, retrieved from URL<https://chromium.googlesource.com/webm/libvpx>, 2 pages. [cited by applicant]
Chromium.googlesource.com [online], “simple_encode.h,” Feb. 11, 2022, retrieved on Sep. 11, 2023, retrieved from URL<https://chromium.googlesource.com/webm/libvpx/+/master/vp9/encoder/vp9_fi rstpass.h/>, 7 pages. [cited by applicant]
Chromium.googlesource.com [online], “vp9_firstpass.h,” Feb. 22, 2022, retrieved on Sep. 11, 2023, retrieved from URL<https://chromium.googlesource.com/webm/libvpx/+/master/vp9/encoder/vp9_fi rstpass.h/>, 7 pages. [cited by applicant]
Cisco.com [online], “Cisco Annual Internet Report (2018-2023),” Mar. 18, 2020, retrieved on Sep. 9, 2023, retrieved from URL<https://www.cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-repo… [cited by applicant]
Cloud.google.com [online], “Accelerate AI development with Google Cloud TPUs,” May 17, 2017, retrieved on Sep. 8, 2023, retrieved from URL<https://cloud.google.com/tpu/>, 10 pages. [cited by applicant]
Coulom, “Efficient selectivity and backup operators in monte-carlo tree search,” International Conference on Computers and Games, 2006, pp. 72-83. [cited by applicant]
Dabney et al., “Distributional reinforcement learning with quantile regression,” Proceedings of the AAAI Conference on Artificial Intelligence, Apr. 29, 2018, 32(1):2892-2901. [cited by applicant]
Dabney et al., “Implicit quantile networks for distributional reinforcement learning,” Proceedings of the 35th International Conference on Machine Learning, 2018, 80:1096-1105. [cited by applicant]
Dai et al., “Transformer-xl: Attentive language models beyond a fixed-length context,” CoRR, Jan. 9, 2019, arXiv:1901.02860, 20 pages. [cited by applicant]
Developers.google.com [online], “VP9 Bitrate Modes in Detail,” Apr. 20, 2019, retrieved on Sep. 11, 2023, retrieved from URL<https://developers.google.com/media/vp9/bitrate-modes/>, 18 pages. [cited by applicant]
Efroni et al., “Exploration-exploitation in constrained MDPs,” CoRR, Mar. 4, 2020, arxiv.org/abs/2003.02189, 44 pages. [cited by applicant]
Gao et al., “SSIM-based game theory approach for rate-distortion optimized intra frame ctu-level bit allocation,” IEEE Transactions on Multimedia, Jun. 2016, 18(6):988-999. [cited by applicant]
Github.com [online], “google-deepmind/dm-haiku,” Feb. 20, 2020, retrieved on Sep. 8, 2023, retrieved from URL<https://github.com/google-deepmind/dm-haiku/>, 11 pages. [cited by applicant]
Github.com [online], “google-deepmind/optax,” May 23, 2021, retrieved on Sep. 8, 2023, retrieved from URL<https://github.com/google-deepmind/optax>, 7 pages. [cited by applicant]
He et al., “Identity mappings in deep residual networks,” European Conference on Computer Vision, Sep. 17, 2016, pp. 630-645. [cited by applicant]
He et al., “Optimum bit allocation and accurate rate control for video coding via p-domain source modeling,” IEEE Transactions on Circuits and Systems for Video Technology, Oct. 2002, 12(10):840-849. [cited by applicant]
Horgan et al., “Distributed prioritized experience replay,” CoRR, Match 2, 2018, arXiv:1803.00933, 19 pages. [cited by applicant]
Hu et al., “Reinforcement learning for hevc/h.265 intra-frame rate control,” 2018 IEEE International Symposium on Circuits and Systems (ISCAS), May 27-30, 2018, pp. 1-5. [cited by applicant]
Interntional Search Report and Written Opinion in International Appln. No. PCT/EP2022/064566, dated Oct. 4, 2022, 15 pages. [cited by applicant]
Github.com [online], “JAX: composable transformations of Python+NumPy programs,” Mar. 8, 2020, retrieved on Sep. 11, 2023, retrieved from URL<http://www.assaabloy.com/en/com/Press-News/News/2011/NFC-enabled-mobile-acces… [cited by applicant]
Jiang et al., “On enhancing H.264/AVC video rate control by psnr-based frame complexity estimation,” IEEE Transactions on Consumer Electronics, Feb. 2005, 51(1):281-286. [cited by applicant]
Kwon et al., “Rate control for h.264 video with enhanced rate and distortion models,” IEEE Transactions on Circuits and Systems for Video Technology, May 2007, 17(5):517-529. [cited by applicant]
Kwon et al., “Rate control method based on deep rein forcement learning for dynamic video sequences in hevc,” IEEE Transactions on Circuits and Systems for Video Technology, May 2007, 17(5):517-529. [cited by applicant]
Laterre et al., “Ranked reward: Enabling self-play reinforcement learning for combinatorial optimization,” CoRR, Jul. 4, 2018, arXiv:1807.01672, 11 pages. [cited by applicant]
Levine et al., “End-to-end training of deep visuomotor policies,” The Journal of Machine Learning Research, Jan. 1, 2016, 17(1):1334-1373. [cited by applicant]
Li et al., “λ domain rate control algorithm for high efficiency video coding,” IEEE transactions on Image Processing, Sep. 2014, 23(9):3841-3854. [cited by applicant]
Lin, “Self-improving reactive agents based on reinforcement learning, planning and teaching,” Machine Learning, May 1992, 8:293-321. [cited by applicant]
Ma et al., “Rate-distortion analysis for H.264/AVC video coding and its application to rate control,” IEEE Transactions on Circuits and Systems for Video Technology, Dec. 2005, 15(12):1533-1544. [cited by applicant]
Mao et al., “Neural Rate Control for Video Encoding Using Imitation Learning,” CoRR, Dec. 9, 2020, arXiv:2012.05339v1, 13 pages. [cited by applicant]
Mirhoseini et al., “Chip placement with deep reinforcement learning,” CORR, Apr. 22, 2020, arXiv:2004.10746, 15 pages. [cited by applicant]
Mnih et al., “Playing atari with deep reinforcement learning,” CoRR, Dec. 19, 2013, arXiv:1312.5602, 9 pages. [cited by applicant]
Mukherjee et al., “The latest open-source video codec VP9—an overview and preliminary results,” 2013 Picture Coding Symposium (PCS), Dec. 8-11, 2013, pp. 390-393. [cited by applicant]
Netflixtechblog.com [online], “Toward A Practical Perceptual Video Quality Metric,” Jun. 6, 2016, retrieved on Sep. 11, 2023, retrieved from URL<http://www.assaabloy.com/en/com/Press-News/News/2011/NFC-enabled-mobile-ac… [cited by applicant]
Office Action in Australian Appln. No. 2022279597, dated Sep. 21, 2023, 3 pages. [cited by applicant]
Paternain et al., “Constrained reinforcement learning has zero duality gap,” Advances in Neural Information Processing Systems, 2019, pp. 7555-7565. [cited by applicant]
Salimans et al., “Evolution strategies as a scalable alternative to reinforcement learning,” CoRR, Mar. 10, 2017, arXiv:1703.03864, 13 pages. [cited by applicant]
Sanz-Rodriguez et al., “RBF-based QP estimation model for VBR control in H.264/SVC,” IEEE Transactions on Circuits and Systems for Video Technology, Sep. 2011, 21(9):1263-1277. [cited by applicant]
Schmidt et al., “Self-play learning without a reward metric,” CoRR, Dec. 16, 2019, arXiv:1912.07557, 6 pages. [cited by applicant]
Schrittwieser et al., “Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model,” Nature, Dec. 23, 2020, 588(7839):604-609. [cited by applicant]
Shi et al., “Reinforced Bit Allocation under Task-Driven Semantic Distortion Metrics,” CoRR, Oct. 16, 2019, arXiv:1910.07392v1, 5 pages. [cited by applicant]
Silver et al., “Mastering the game of Go with deep neural networks and tree search,” Nature, Jan. 28, 2016, 529(7587):484. [cited by applicant]
Tessler et al., “A deep hierarchical approach to lifelong learning in minecraft,” Proceedings of the AAAI Conference on Artificial Intelligence, Feb. 12, 2017, 31(1):1553-1561. [cited by applicant]
Tessler et al., “Reward constrained policy optimization,” CoRR, May 28, 2018, arxiv.org/abs/1805.11074, 15 pages. [cited by applicant]
Vinyals et al., “Grandmaster level in starcraft ii using multi-agent reinforcement learning,” Nature, Oct. 30, 2019, 575(7782):350-354. [cited by applicant]
Wang et al., “Image quality assessment: from error visibility to structural similarity,” IEEE Transactions on Image Processing, Apr. 2004, 13(4):600-612. [cited by applicant]
Wang et al., “Youtube UGC dataset for video compression research,” 2019 IEEE 21st International Workshop on Multimedia Signal Processing (MMSP), Sep. 27-29, 2019, 5 pages. [cited by applicant]
Wen et al., “Trellis-based r-d optimal quantization in H.263+,” IEEE Transactions on Image Processing, Aug. 2000, 9(8):1431-1434. [cited by applicant]
Zhang et al., “ Reward constrained interactive recommendation with natural language feedback,” CoRR, May 4, 2020, arxiv.org/abs/2005.01618, 13 pages. [cited by applicant]
Zhou et al., “Rate control method based on deep reinforcement learning for dynamic video sequences in HEVC,” IEE Transactions on Multimedia, May 6, 2020, 23:1106-1121. [cited by applicant]
Office Action in Indian Appln. No. 202327058852, mailed on Jun. 12, 2025, 7 pages (with English translation). [cited by applicant]
International Preliminary Report on Patentability in International Appln. No. PCT/EP2022/064566, dated Dec. 7, 2023, 9 pages. [cited by applicant]
Decision to Grant Patent in Japanese Appln. No. 2023-560140, dated Apr. 30, 2024, 5 pages (with English translation). [cited by applicant]
Notice of Acceptance in Australian Appln. No. 2022279597, dated Jun. 26, 2024, 3 pages. [cited by applicant]
Office Action in Australian Appln. No. 2022279597, dated May 9, 2024, 3 pages. [cited by applicant]
Office Action in Australian Appln. No. 2024227268, mailed on Sep. 24, 2025, 2 pages. [cited by applicant]
Office Action in European Appln. No. 22734129.4, dated Jan. 12, 2026, 7 pages. [cited by applicant]
Office Action in Korean Appln. No. 2023-7033044, mailed on Mar. 6, 2026, 17 pages (with English translation). [cited by applicant]
Notice of Acceptance in Australian Appln. No. 2024227268, dated Mar. 27, 2026, 3 pages. [cited by applicant]