Grading
| Component | Points |
|---|---|
| Nickname | 5 |
| Development environment | 25 |
| Low Rank Gaussians | 70 |
Nickname
Change your nickname in Discord server to your full name (first and last name). This is important for communication purposes.Development Environment Setup
Please refer to the Development Environment Guide for setup instructions. After you clone or import the class github repo you need to provide proof that your development environment is correctly setup:- Complete this notebook to verify that Torch is running properly inside the docker container.. Note that you need to consult the repos Pull Requests if you are on a Apple M silicon platform.
- Create an account on Hugging Face and provide a screenshot of your profile.
.png files and named dev-environment-docker-xyz.png and must be located under the assignment submission folder in your cloned class repo.
If you have a very weak laptop and this does not allow you to launch dockers (highly unlikely), a screenshot of system monitor showing high CPU/RAM usage when trying to run a container as a proof that your laptop is too weak.
Low-Rank Gaussian Covariances
Assignment Notebook
Open Notebook in Colab
Low-Rank Gaussian Covariances Notebook
Learning objectives
By completing this assignment, you will:- Understand how matrix rank constrains changes in covariance structure.
- Relate low-rank matrices to a small number of dominant variance directions.
- Interpret eigenvalue spectra of covariance matrices.
Background
Let be a latent Gaussian vector, and let be an observed vector, Then follows a multivariate Gaussian distribution Throughout this notebook, you will reason about using eigenvalues and matrix rank.Reference distribution
A reference coefficient matrix is given. It induces the reference covariance This covariance represents a baseline Gaussian distribution against which others will be compared.Constructing Gaussian shifts
We now define two different ways to modify the coefficient matrix. Low-rank coefficient change A low-rank modification has the form where:- is a matrix
- is an matrix
Diffuse coefficient change A diffuse modification is a dense matrix with approximately full rank. It is scaled so that the Frobenius norms are equal: , ensuring both changes have the same overall magnitude.
Empirical covariance
From each modified coefficient matrix, samples are drawn and an empirical covariance is computed. These empirical covariances approximate the true Gaussian covariances.Eigenvalue analysis
In this section, you will explicitly measure how different coefficient changes affect the spectrum of a Gaussian covariance matrix.Step 1: Compute eigenvalues
For each of the following covariance matrices:- the reference covariance
- the empirical covariance from the low-rank modification
- the empirical covariance from the diffuse modification
Step 2: Visualize the spectra
Create a single plot that shows:- the eigenvalues of
- the eigenvalues of
- the eigenvalues of
- how many eigenvalues are significantly larger than the noise floor,
- and how the different modifications affect the spectrum.
Step 3: Quantify “significant change”
Define an eigenvalue as significantly changed if it differs from the corresponding eigenvalue of by more than a fixed threshold (e.g., 10% relative difference). Using this criterion:- Count how many eigenvalues change significantly in the low-rank case.
- Count how many eigenvalues change significantly in the diffuse case.
Step 4: Interpret the results
Answer the following questions in complete sentences:- In the low-rank case, how many eigenvalues change substantially, and how does this number relate to the rank of the coefficient modification?
- In the diffuse case, why are many eigenvalues affected, even though the overall magnitude of the change is the same?
- How do these observations illustrate the idea that matrix rank limits the number of variance directions that can change?
- eigenvalues,
- rank,
- and geometric directions of variance.

