How hmohebbi/disentangling_representations works
This research codebase trains a two-stage information-bottleneck model to separate textual and acoustic features in pretrained speech representations, then evaluates and interprets those representations. The main workflow is speech data and pretrained-model features → stage-one transcription representation → stage-two task representation → probing or attribution. The README also documents corpus preparation, attention-based frame localization, and latent-space visualization. Some analysis and preprocessing files were not sampled, so their internal connections are shown only where documented; unsampled source was not inspected.
Main entry points: training.py VIB training · z_probing.py Latent probing · compute_model_grads_wrt_input.py Gradient attribution · h_probing.py Hidden-state probing
Components 16
Data preparation
- Corpus preparation
preprocessing/dataset_generation.py - MFA corpus prep
analysis/preparing_corpus_for_mfa.py - Data and label utilities
utils.py
Disentanglement
- VIB training
vib/training.py - VIB encoders and decoders
vib/vib.py - Textual stage
vib/training.py - Acoustic stage
vib/training.py
Evaluation
- Probe models
probing/probe.py - Hidden-state probing
probing/h_probing.py - Latent probing
probing/z_probing.py
Interpretation
- Attention extraction
analysis/extract_attentions.py - Gradient attribution
analysis/compute_model_grads_wrt_input.py - Latent visualization
vib/tsne.py
Other components
- Researcher
- Speech datasets
- Pretrained speech model
Connections 27
- Researcher → VIB training: starts training
README.md - Speech datasets → VIB training: loads splits
vib/training.py - Pretrained speech model → VIB training: extracts features
vib/training.py - VIB training → VIB encoders and decoders: instantiates
vib/training.py - VIB training → Textual stage: trains stage one
README.md - VIB training → Acoustic stage: trains stage two
README.md - Hidden-state probing → Speech datasets: loads splits
probing/h_probing.py - Hidden-state probing → Pretrained speech model: extracts features
probing/h_probing.py - Hidden-state probing → Probe models: trains and evaluates
probing/h_probing.py - Latent probing → Speech datasets: loads splits
probing/z_probing.py - Latent probing → Pretrained speech model: extracts features
probing/z_probing.py - Latent probing → VIB encoders and decoders: loads latent models
probing/z_probing.py - Latent probing → Probe models: trains and evaluates
probing/z_probing.py - Hidden-state probing → Data and label utilities: uses mappings
probing/h_probing.py - Latent probing → Data and label utilities: uses mappings
probing/z_probing.py - VIB training → Data and label utilities: uses mappings
vib/training.py - Researcher → Corpus preparation: prepares corpus
README.md - MFA corpus prep → Gradient attribution: prepares alignments
README.md - Researcher → Attention extraction: localizes frames
README.md - Acoustic stage → Attention extraction: provides attention
README.md - Gradient attribution → Speech datasets: loads examples
analysis/compute_model_grads_wrt_input.py - Gradient attribution → Pretrained speech model: computes gradients through
analysis/compute_model_grads_wrt_input.py - Gradient attribution → Probe models: attributes predictions
analysis/compute_model_grads_wrt_input.py - Gradient attribution → Data and label utilities: loads alignments
analysis/compute_model_grads_wrt_input.py - Latent visualization → Speech datasets: loads examples
- Latent visualization → Pretrained speech model: extracts features
vib/tsne.py - Latent visualization → VIB encoders and decoders: embeds representations
vib/tsne.py