Code for our paper "A Library of Mirrors: Deep Neural Nets in Low Dimensions are Convex Lasso Models with Reflection Features" (https://arxiv.org/abs/2403.01046#). This paper shows that training neural networks with 1-D data is equivalent to solving a Lasso problem with an explicit and simple dictionary.
The training problem for a
The weights are regularized with the
We show this non-convex training problem is equivalent to the Lasso problem
The matrix
The files Fig2.ipynb, Fig3.ipynb, Fig18.ipynb, and Fig19.ipynb in the directory /codeForFigs contain the code for Figures 2,3,18, and 19 in the paper. The files Nonconvex_training.ipynb and convex_training.ipynb contain code for training 1D ReLU networks using the conventional, non-convex training problem and our equivalent convex, Lasso problem, respectively.