Skip to main content

Understanding Information Theory and Information Bottleneck

What is Information Theory?

Information theory is a mathematical framework developed by Claude Shannon in the 1940s to understand how information is measured, transmitted, and compressed.

At its core, it deals with questions like:

  • How much information is in a message?
  • How can we represent that information efficiently?
  • How can we reduce noise when transmitting information?

Key Concept: Entropy

Entropy is a measure of uncertainty or unpredictability.

Think of it like this:

  • A fair coin (50% heads, 50% tails) has high entropy because it’s unpredictable.
  • A coin that always lands on heads has zero entropy because it’s completely predictable.

In deep learning, entropy tells us how much uncertainty there is in the model’s prediction.

What is the Information Bottleneck?

Imagine you're trying to compress an image to send over the internet. You want to remove unnecessary parts (like background noise) but keep the important content $\text{(like a person’s face)}$.

This is the idea behind the Information Bottleneck.

In deep learning:

  • neural network tries to learn a mapping from input (X) to output (Y).
  • The Information Bottleneck principle says: try to compress the input X into a hidden representation T, such that T contains as little information about X as possible while still keeping enough information to predict Y well.

This forces the model to focus only on relevant information and ignore noise.

Example: Classifying Handwritten Digits (MNIST)

Imagine a neural network classifying digits from the MNIST dataset.

  • Input(X): Raw pixel values from an image.
  • Output(Y): Digit label (0–9).
  • We want the hidden layers (T) to keep only what’s needed to guess the digit (like shape), and discard irrelevant things (like handwriting style or stroke thickness).

Information Bottleneck in Neural Networks

Here’s a visual breakdown:


Overtraining or keeping too much detail in T can lead to:

  • Overfitting (memorizing noise)
  • Poor generalization

2025.04.22 - [AI] - Entropy & Cross Entropy Loss in Deep Learning

References

  1. Tishby et al. (2000) – The Information Bottleneck Method
    https://arxiv.org/abs/physics/0004057
  2. Tishby and Zaslavsky (2015) – Deep Learning and the Information Bottleneck Principle
    https://arxiv.org/abs/1503.02406
  3. Alemi et al. (2016) – Deep Variational Information Bottleneck
    https://arxiv.org/abs/1612.00410

Comments

Popular

Understanding SentencePiece: A Language-Independent Tokenizer for AI Engineers

In the realm of Natural Language Processing (NLP), tokenization plays a pivotal role in preparing text data for machine learning models. Traditional tokenization methods often rely on language-specific rules and pre-tokenized inputs, which can be limiting when dealing with diverse languages and scripts. Enter SentencePiece—a language-independent tokenizer and detokenizer designed to address these challenges and streamline the preprocessing pipeline for neural text processing systems. What is SentencePiece? SentencePiece is an open-source tokenizer and detokenizer developed by Google, tailored for neural-based text processing tasks such as Neural Machine Translation (NMT). Unlike conventional tokenizers that depend on whitespace and language-specific rules, SentencePiece treats the input text as a raw byte sequence, enabling it to process languages without explicit word boundaries, such as Japanese, Chinese, and Korean. This approach allows SentencePiece to train subword models di...

Mastering the Byte Pair Encoding (BPE) Tokenizer for NLP and LLMs

Byte Pair Encoding (BPE) is one of the most important and widely adopted subword tokenization algorithms in modern Natural Language Processing (NLP), especially in training Large Language Models (LLMs) like GPT. This guide provides a deep technical dive into how BPE works, compares it with other tokenizers like WordPiece and SentencePiece, and explains its practical implementation with Python code. This article is optimized for AI engineers building real-world models and systems. 1. What is Byte Pair Encoding? BPE was originally introduced as a data compression algorithm by Gage in 1994. It replaces the most frequent pair of bytes in a sequence with a single, unused byte. In 2015, Sennrich et al. adapted BPE for NLP to address the out-of-vocabulary (OOV) problem in neural machine translation. Instead of working with full words, BPE decomposes them into subword units that can be recombined to represent rare or unseen words. 2. Why Tokenization Matters in LLMs Tokenization is th...

ZeRO: Deep Memory Optimization for Training Trillion-Parameter Models

In 2020, Microsoft researchers introduced ZeRO (Zero Redundancy Optimizer) via their paper "ZeRO: Memory Optimization Towards Training Trillion Parameter Models" (arXiv:1910.02054). ZeRO is a memory optimization technique that eliminates redundancy in distributed training, enabling efficient scaling to trillion-parameter models. This provides an in-depth technical breakdown of ZeRO's partitioning strategies, memory usage analysis, and integration with DeepSpeed. 1. What is ZeRO? ZeRO eliminates redundant memory copies of model states across GPUs. Instead of replicating parameters, gradients, and optimizer states across each GPU, ZeRO partitions them across all devices. This results in near-linear memory savings as the number of GPUs increases. 2. Limitations of Traditional Data Parallelism In standard data-parallel training, every GPU maintains: Model Parameters $\theta$ Gradients $\nabla \theta$ Optimizer States $O(\theta)$ This causes memory usage ...