This repository provides a minimal, extendable codebase to run experiments for minimum-ℓ_p interpolation in overparameterized linear regression.
- Solver: CVXPY with MOSEK (default).
- Design: i.i.d. Gaussian features.
- Ground truth
w*: (i) spikee1, (ii) flat on a support of sizes. - Usage: HPC-friendly command line (
python -m minlp ...) and plainpython main.py.
Note: For MOSEK you need a valid license (student/academic free licenses available). Set the environment variable
MOSEKLM_LICENSE_FILEto point to your license file (or use MOSEK's default license discovery).
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# Optional (if not already provided by your environment)
pip install mosekRun a small n-sweep at fixed d:
python -m minlp \
--d 50000 \
--n_list 250 500 1000 2000 3000 4000 5000 \
--p 1.9 \
--r_list 1.1 1.5 1.9 \
--sigma 0.5 \
--w_mode e1 \
--s 1 \
--reps 2 \
--n_test 20000 \
--out results_n_sweep.csvOr using the root script:
python main.py --helpWe intentionally avoid interactive plotting and produce CSV logs only.
You can submit array jobs by varying --seed and/or --reps.
Example shell snippet (replace addqueue with your scheduler wrapper as needed):
#!/usr/bin/env bash
# scripts/addqueue_example.sh
set -e
MEM_GB=${1:-16}
OUT=${2:-"results.csv"}
# Example: one job
addqueue -m ${MEM_GB} /usr/bin/python -m minlp \
--d 50000 \
--n_list 500 1000 2000 3000 4000 5000 \
--p 1.9 \
--r_list 1.1 1.5 1.9 \
--sigma 0.5 \
--w_mode e1 \
--s 1 \
--reps 1 \
--seed 0 \
--n_test 20000 \
--out ${OUT}minlp/— package with datasets, solver, experiment runner, CLI (__main__.py)main.py— convenience wrapper to runpython main.py ...requirements.txt— Python dependenciesscripts/— example HPC submission scriptplot_results.py— optional quick plotting script once CSV exists
- New model classes (e.g., diagonal linear networks) can live under
minlp/models/. Plug them intominlp/experiments.pyfollowing the interface infit_min_lp. - Custom data generators can be added to
minlp/datasets.py. - You can add new metrics to
minlp/metrics.pyand log them inexperiments.py.
We thread a single RNG seed through NumPy. The convex program solved by MOSEK is deterministic given the data (up to solver tolerances).
MIT License (see LICENSE).