# linear95/club architecture

> Architecture diagram of the GitHub repository linear95/club, 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/linear95/club
- Repository: https://github.com/linear95/club

## Overview

CLUB is a research-code repository for estimating mutual information and minimizing it in learning models. The main workflows are running the estimator comparisons, training an Information Bottleneck model, and training/evaluating a domain-adaptation model. The README documents the notebook capabilities; source excerpts show selected implementation details, while some links rely on the SOURCE INDEX or README rather than inspected notebook contents.

Main entry points: [`MI_DA/main_DANN.py`](https://github.com/linear95/club/blob/master/MI_DA/main_DANN.py) (DA Training and Evaluation), [`MI_IB/CLUB_MNIST_IB.py`](https://github.com/linear95/club/blob/master/MI_IB/CLUB_MNIST_IB.py) (IB Training), [`MI_DA/utils.py`](https://github.com/linear95/club/blob/master/MI_DA/utils.py) (DA Utilities), [`mi_estimation.ipynb`](https://github.com/linear95/club/blob/master/mi_estimation.ipynb) (Estimator Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_estimation["MI Estimation"]
  node_estimation_demo["Estimator Demo"]
  node_minimization_demo["Gaussian Demo"]
end

subgraph group_ib["Information Bottleneck"]
  node_ib_runner["IB Training<br/>[CLUB_MNIST_IB.py]"]
  node_ib_architecture["IB Networks<br/>[architecture.py]"]
  node_ib_utils["IB Utilities<br/>[utils.py]"]
end

subgraph group_da["Domain Adaptation"]
  node_da_data["Domain Data Loader<br/>[imageloader.py]"]
  node_da_runner["DA Training and Evaluation<br/>[main_DANN.py]"]
  node_dann_model["DANN Model<br/>[MNISTModel_DANN.py]"]
  node_da_utils["DA Utilities<br/>[utils.py]"]
end

subgraph group_shared["Shared MI Methods"]
  node_estimators["MI Estimators<br/>[mi_estimators.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs comparison"| node_estimation_demo
node_estimation_demo -->|"uses estimators"| node_estimators
node_researcher -->|"runs toy example"| node_minimization_demo
node_researcher -->|"runs IB training"| node_ib_runner
node_ib_runner -->|"calls networks"| node_ib_architecture
node_ib_runner -->|"uses utilities"| node_ib_utils
node_researcher -->|"runs adaptation"| node_da_runner
node_da_runner -->|"loads datasets"| node_da_data
node_da_runner -->|"trains model"| node_dann_model
node_da_runner -->|"uses utilities"| node_da_utils
node_da_data -->|"uses encoding"| node_da_utils
node_dann_model -->|"uses helpers"| node_da_utils

click node_estimation_demo "https://github.com/linear95/club/blob/master/mi_estimation.ipynb"
click node_estimators "https://github.com/linear95/club/blob/master/mi_estimators.py"
click node_minimization_demo "https://github.com/linear95/club/blob/master/mi_minimization.ipynb"
click node_ib_runner "https://github.com/linear95/club/blob/master/MI_IB/CLUB_MNIST_IB.py"
click node_ib_architecture "https://github.com/linear95/club/blob/master/MI_IB/architecture.py"
click node_ib_utils "https://github.com/linear95/club/blob/master/MI_IB/utils.py"
click node_da_data "https://github.com/linear95/club/blob/master/MI_DA/imageloader.py"
click node_da_runner "https://github.com/linear95/club/blob/master/MI_DA/main_DANN.py"
click node_dann_model "https://github.com/linear95/club/blob/master/MI_DA/MNISTModel_DANN.py"
click node_da_utils "https://github.com/linear95/club/blob/master/MI_DA/utils.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_estimation_demo,node_minimization_demo toneBlue
class node_ib_runner,node_ib_architecture,node_ib_utils toneAmber
class node_da_data,node_da_runner,node_dann_model,node_da_utils toneMint
class node_estimators toneRose
class node_researcher toneIndigo
```

## Components

### MI Estimation

- [Estimator Demo](https://github.com/linear95/club/blob/master/mi_estimation.ipynb): `mi_estimation.ipynb`
- [Gaussian Demo](https://github.com/linear95/club/blob/master/mi_minimization.ipynb): `mi_minimization.ipynb`

### Information Bottleneck

- [IB Training](https://github.com/linear95/club/blob/master/MI_IB/CLUB_MNIST_IB.py): `MI_IB/CLUB_MNIST_IB.py`
- [IB Networks](https://github.com/linear95/club/blob/master/MI_IB/architecture.py): `MI_IB/architecture.py`
- [IB Utilities](https://github.com/linear95/club/blob/master/MI_IB/utils.py): `MI_IB/utils.py`

### Domain Adaptation

- [Domain Data Loader](https://github.com/linear95/club/blob/master/MI_DA/imageloader.py): `MI_DA/imageloader.py`
- [DA Training and Evaluation](https://github.com/linear95/club/blob/master/MI_DA/main_DANN.py): `MI_DA/main_DANN.py`
- [DANN Model](https://github.com/linear95/club/blob/master/MI_DA/MNISTModel_DANN.py): `MI_DA/MNISTModel_DANN.py`
- [DA Utilities](https://github.com/linear95/club/blob/master/MI_DA/utils.py): `MI_DA/utils.py`

### Shared MI Methods

- [MI Estimators](https://github.com/linear95/club/blob/master/mi_estimators.py): `mi_estimators.py`

### Other components

- **Researcher**

## Connections

- Researcher → Estimator Demo: runs comparison (evidence: `README.md`)
- Estimator Demo → MI Estimators: uses estimators (evidence: `README.md`)
- Researcher → Gaussian Demo: runs toy example (evidence: `README.md`)
- Researcher → IB Training: runs IB training
- IB Training → IB Networks: calls networks (evidence: `MI_IB/CLUB_MNIST_IB.py`)
- IB Training → IB Utilities: uses utilities (evidence: `MI_IB/CLUB_MNIST_IB.py`)
- Researcher → DA Training and Evaluation: runs adaptation
- DA Training and Evaluation → Domain Data Loader: loads datasets (evidence: `MI_DA/main_DANN.py`)
- DA Training and Evaluation → DANN Model: trains model (evidence: `MI_DA/main_DANN.py`)
- DA Training and Evaluation → DA Utilities: uses utilities (evidence: `MI_DA/main_DANN.py`)
- Domain Data Loader → DA Utilities: uses encoding (evidence: `MI_DA/imageloader.py`)
- DANN Model → DA Utilities: uses helpers (evidence: `MI_DA/MNISTModel_DANN.py`)
