# mutual-ai/information-bottleneck-for-deep-learning architecture

> Architecture diagram of the GitHub repository mutual-ai/information-bottleneck-for-deep-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mutual-ai/information-bottleneck-for-deep-learning
- Repository: https://github.com/mutual-ai/information-bottleneck-for-deep-learning

## Overview

This repository is an experimental information-bottleneck study for Fashion-MNIST, with notebook-based experiments comparing a batch-normalized MLP and a PyTorch CNN. The main workflow trains a model, captures hidden-layer activations, estimates input/representation and representation/label mutual information, and visualizes training metrics or the information plane. The tree also contains a vectorized MLP and PyTorch MLP/data-loading alternatives. Notebook internals were not sampled, so links between those experiment stages are left unverified where source does not establish them.

Main entry points: [`CNN.ipynb`](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/CNN.ipynb) (CNN experiment), [`torch_data_utils.py`](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/torch_data_utils.py) (Fashion-MNIST loader), [`Fashion MNIST experiments.ipynb`](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/Fashion%20MNIST%20experiments.ipynb) (MLP experiment), [`mlp.py`](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp.py) (Batch-norm MLP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiments["Experiments"]
  node_mlp_experiment["MLP experiment"]
  node_cnn_experiment["CNN experiment<br/>[CNN.ipynb]"]
  node_extension_experiment["Extension experiment<br/>[Extension.ipynb]"]
end

subgraph group_models["Model implementations"]
  node_mlp_model["Batch-norm MLP<br/>[mlp.py]"]
  node_vector_mlp["Vectorized MLP<br/>[mlp_vec.py]"]
  node_cnn_model["CNN model<br/>[cnn.py]"]
  node_torch_mlp["PyTorch MLP<br/>[mlp_torch.py]"]
end

subgraph group_analysis["Information analysis"]
  node_activations["Hidden activations<br/>[mlp.py]"]
  node_mi_estimator["MI estimator<br/>[mi_tool.py]"]
end

subgraph group_support["Data and visualization"]
  node_torch_data["Fashion-MNIST loader"]
  node_mnist_data["MNIST file loader<br/>[utils.py]"]
  node_plots["Metric and MI plots<br/>[plot_tool.py]"]
end

node_researcher(("Researcher"))
node_fashion_data[("Fashion-MNIST")]

node_researcher -->|"runs"| node_mlp_experiment
node_researcher -->|"runs"| node_cnn_experiment
node_mlp_experiment -.->|"configures"| node_mlp_model
node_cnn_experiment -.->|"configures"| node_cnn_model
node_extension_experiment -.->|"explores"| node_vector_mlp
node_extension_experiment -.->|"explores"| node_torch_mlp
node_mlp_model -->|"uses activations"| node_mnist_data
node_vector_mlp -->|"uses activations"| node_mnist_data
node_mlp_model -->|"yields"| node_activations
node_vector_mlp -->|"yields"| node_activations
node_activations -.->|"estimates MI"| node_mi_estimator
node_mi_estimator -->|"uses tuple helper"| node_mnist_data
node_plots -->|"plots results"| node_mi_estimator
node_torch_data -->|"loads"| node_fashion_data
node_torch_data -.->|"supplies batches"| node_cnn_experiment
node_torch_data -.->|"supplies batches"| node_torch_mlp
node_mlp_experiment -.->|"visualizes metrics"| node_plots
node_cnn_experiment -.->|"visualizes metrics"| node_plots

click node_mlp_experiment "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/Fashion%20MNIST%20experiments.ipynb"
click node_cnn_experiment "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/CNN.ipynb"
click node_extension_experiment "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/Extension.ipynb"
click node_mlp_model "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp.py"
click node_vector_mlp "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp_vec.py"
click node_cnn_model "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/cnn.py"
click node_torch_mlp "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp_torch.py"
click node_torch_data "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/torch_data_utils.py"
click node_mnist_data "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/utils.py"
click node_activations "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp.py"
click node_mi_estimator "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mi_tool.py"
click node_plots "https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/plot_tool.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mlp_experiment,node_cnn_experiment,node_extension_experiment toneBlue
class node_mlp_model,node_vector_mlp,node_cnn_model,node_torch_mlp,node_fashion_data toneAmber
class node_activations,node_mi_estimator toneMint
class node_torch_data,node_mnist_data,node_plots toneRose
class node_researcher toneIndigo
```

## Components

### Experiments

- [MLP experiment](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/Fashion%20MNIST%20experiments.ipynb): `Fashion MNIST experiments.ipynb`
- [CNN experiment](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/CNN.ipynb): `CNN.ipynb`
- [Extension experiment](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/Extension.ipynb): `Extension.ipynb`

### Model implementations

- [Batch-norm MLP](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp.py): `mlp.py`
- [Vectorized MLP](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp_vec.py): `mlp_vec.py`
- [CNN model](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/cnn.py): `cnn.py`
- [PyTorch MLP](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp_torch.py): `mlp_torch.py`

### Information analysis

- [Hidden activations](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mlp.py): `mlp.py`
- [MI estimator](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/mi_tool.py): `mi_tool.py`

### Data and visualization

- [Fashion-MNIST loader](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/torch_data_utils.py): `torch_data_utils.py`
- [MNIST file loader](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/utils.py): `utils.py`
- [Metric and MI plots](https://github.com/mutual-ai/information-bottleneck-for-deep-learning/blob/master/plot_tool.py): `plot_tool.py`

### Other components

- **Researcher**
- **Fashion-MNIST**

## Connections

- Researcher → MLP experiment: runs (evidence: `README.md`)
- Researcher → CNN experiment: runs (evidence: `README.md`)
- MLP experiment → Batch-norm MLP: configures
- CNN experiment → CNN model: configures
- Extension experiment → Vectorized MLP: explores
- Extension experiment → PyTorch MLP: explores
- Batch-norm MLP → MNIST file loader: uses activations (evidence: `mlp.py`)
- Vectorized MLP → MNIST file loader: uses activations (evidence: `mlp_vec.py`)
- Batch-norm MLP → Hidden activations: yields (evidence: `mlp.py`)
- Vectorized MLP → Hidden activations: yields (evidence: `mlp_vec.py`)
- Hidden activations → MI estimator: estimates MI
- MI estimator → MNIST file loader: uses tuple helper (evidence: `mi_tool.py`)
- Metric and MI plots → MI estimator: plots results (evidence: `plot_tool.py`)
- Fashion-MNIST loader → Fashion-MNIST: loads (evidence: `torch_data_utils.py`)
- Fashion-MNIST loader → CNN experiment: supplies batches
- Fashion-MNIST loader → PyTorch MLP: supplies batches
- MLP experiment → Metric and MI plots: visualizes metrics
- CNN experiment → Metric and MI plots: visualizes metrics
