Dynamic Low-Rank Training with Spectral Regularization: Achieving Robustness in Compressed Representations
- Steffen Schotthöfer, Oak Ridge National Laboratory*
- Lexie Wang, Oak Ridge National Laboratory
- Stefan Schnake, Oak Ridge National Laboratory
*Corresponding author
Coming soon
This repository provides code for training neural networks using Dynamic Low-Rank Training (DLRT) with Spectral Regularization to achieve both compression and robustness. The method dynamically adapts the rank of weight matrices during training and introduces a spectral penalty that controls the tail of the singular spectrum.
- Start the ipynb "low_rank.ipynb"
- Run all cells
- Output is logged with wandb and in cell output.
-
Create a local python environment and install the python requirements in a local virtual environment:
python3 -m venv ./venv source venv/bin/activate pip install -r requirements.txt -
Run the bash scripts (It's recommended that you use the wandb logging option to visualize the results)
sh download_data.sh sh run_baseline.sh sh run_low_rank.sh