← Latest papers
💻 computer science

NAE-VC: Neural Arithmetic Encoding as a Learned Replacement for CABAC in Modern Video Codecs

NAE-VC is a modular, learned entropy coding framework that replaces the standard CABAC engine in H.264, H.265, and H.266 codecs with a neural architecture combining context aggregation, Gaussian mixture modeling, and hyperpriors to achieve significant bitrate savings while maintaining full compatibility with existing video coding standards.

Original authors: Reka Sandaruwan Gallena Watthage, Anil Fernando

Published 2026-07-17
📖 7 min read🧠 Deep dive

Original authors: Reka Sandaruwan Gallena Watthage, Anil Fernando

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to send a massive, high-definition movie to a friend across the world. To make this possible without clogging the internet, you have to shrink the file down as much as you can. This process is called video compression. Think of it like packing a suitcase for a trip: you want to fit everything in, but you can't just throw things in randomly; you need a smart system to fold clothes tightly and arrange them so nothing is wasted.

In the world of video, this "smart packing system" has a final, crucial step called entropy coding. This is the very last stage where the computer decides exactly how to write the data into a stream of 1s and 0s. For decades, the industry has used a specific, hand-crafted method called CABAC (Context-based Adaptive Binary Arithmetic Coding) to do this. You can think of CABAC as a very experienced, but slightly rigid, librarian who has memorized a huge rulebook on how to organize books. It's good, but it follows fixed rules and can't easily adapt to weird or new patterns in the data. Meanwhile, a new wave of neural networks (computer systems that learn like brains) has shown they can be much better at predicting patterns, but they usually require replacing the entire video system from scratch, which is like rebuilding the whole library just to change the librarian.

This paper introduces a clever middle ground called NAE-VC. Instead of tearing down the whole library, the researchers built a "neural librarian" that can swap out the old, rule-bound librarian (CABAC) while keeping all the other parts of the video system exactly the same. They tested this new system on three generations of video standards (H.264, H.265, and H.266) and found that it consistently shrinks the file size further than the old method, proving that even the best hand-made rules have room for improvement if you let a learning computer take the wheel.

The Problem: The Rigid Librarian

For years, video codecs (the software that compresses video) have relied on CABAC to do the final packing. CABAC is like a librarian who has memorized a massive, hand-written rulebook. When a new piece of data arrives, the librarian checks a specific index in the book to guess how likely that piece is to appear next. If the data is common, they write it down with a short code; if it's rare, they use a longer code.

The problem is that this rulebook is fixed. It was designed by humans years ago and can't change based on the specific movie being watched. It also breaks complex data down into simple "yes/no" (binary) questions, which loses some of the rich, messy patterns found in real video. It's like trying to describe a complex painting by only asking "is it red?" or "is it blue?" one pixel at a time, rather than understanding the whole brushstroke.

The Solution: A Learning Librarian

The researchers proposed NAE-VC (Neural Arithmetic Encoding for Video Compression). Imagine replacing that rigid librarian with a super-smart, learning AI assistant. This assistant doesn't just look up a rule; it looks at the whole picture.

The AI assistant has three special ways of gathering clues before it decides how to pack the data:

  1. Spatial Context: It looks at the neighbors. Just like you know what's in the next room by looking at the current one, the AI looks at the pixels around the current one to guess what comes next.
  2. Channel Context: It looks at the frequency. Video data has different "layers" of detail (like bass and treble in music). The AI understands how these layers relate to each other.
  3. Temporal Context: It looks at the past. If you are watching a video of a ball moving, the AI knows the ball will likely be in a similar spot in the next frame. It uses this motion to make better guesses.

The AI combines all these clues using a technique called multi-head cross-attention (think of it as having four different experts in a meeting, each focusing on a different type of clue, and then voting on the best prediction). Instead of guessing a simple "yes or no," the AI predicts a Gaussian Mixture Model. In plain English, this means it doesn't just guess one number; it guesses a whole cloud of possibilities, understanding that the data might be clustered in a few different ways. This allows it to pack the data much more tightly.

The Results: Shaving Off Bits

The researchers tested this new "neural librarian" by swapping it into the reference software for three different video standards: H.264, H.265, and H.266. They kept everything else exactly the same so they could see if the new librarian was truly better.

The results were consistent across the board:

  • H.264 (The older standard): The new system saved about 4.82% of the file size in "All-Intra" mode (where every frame is independent) and 6.15% in "Low-Delay" mode (where frames depend on each other).
  • H.265 (The middle standard): It saved 3.67% (All-Intra) and 4.93% (Low-Delay).
  • H.266 (The newest, most advanced standard): Even though this standard already has a very sophisticated system, the new AI still managed to save 2.41% (All-Intra) and 3.28% (Low-Delay).

The paper suggests a clear pattern: the more advanced the original system was, the less room there was for improvement. H.264, being the oldest and simplest, had the most "headroom" for the AI to improve upon. However, the fact that the AI still improved the brand-new H.266 by over 2% is a big deal. It suggests that no matter how well humans design a rulebook, a learning system can find patterns they missed.

What This Means

The study shows that you don't need to throw away the entire video system to get better compression. You can surgically replace just the "packing" part with a smart, learning AI.

The researchers also checked if this made the video look better. They found that the savings weren't just a trick of the math; the video actually looked better to human eyes (measured by metrics like VMAF and MS-SSIM). The AI was better at preserving the important details that make a video look sharp and natural.

One interesting finding is that the new system works best when there is motion (like in a sports game or a movie) because it can use the "temporal context" (looking at the past) to make smarter guesses. In static scenes, the improvement is smaller, but still present.

The Catch

There is a cost to this extra smarts. The new system requires more computer power to run. For the older H.264 standard, the encoding time (the time it takes to compress the video) went up by about 4 times. For the newer, already complex H.266, the time only went up by about 15%. This suggests that this technology is most practical for modern, high-end video systems where the computer is already working hard, or for cloud servers where speed is less critical than saving storage space.

In short, the paper proves that by swapping out the final step of video compression with a learning AI, we can squeeze out more efficiency from our existing video standards, making our videos smaller and clearer without needing to wait for the next generation of video technology to arrive.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →