Applications of SAGA-based GLM Solver
About 448 wordsAbout 1 min
2025-07-14
I actually came across of the paper "Leveraging Sparse Linear Layers for Debuggable Deep Networks" last year and I have been using the package they developed to a project. But I never had a chance to take a note.
This paper investigates about applying generalized linear model(GLM) via elastic net to see the importance of deep feature representations of data points obtained from some pre-trained model. The authors developed a SAGA-based GLM solver to scale to large datasets. You can check their source code at here.
The authors of this paper construct a sparse decision layer for feature selection from the model's deep feature representations, which can be used for subsequent interpretability analysis and this so-called sparse decision layer could be applied to any layers.
The sparse decision layer primarily achieves this by fitting a GLM based on an elastic net. Specifically, let (X,y) denote normalized deep feature representations of input data points x and its corresponding target y, respectively. The goal is to fit a sparse linear model of the form E(Y∣X=x)=xtβ+β0. The sparsity is achieved via elastic net, which means the optimization is formulated as follows:
βmin2N1∣∣XTβ+β0−y∣∣22+λRα(β)
where N is the total number of samples, β denote as model parameters(weights and bias), λRα(β) is the elastic net penalty for given hyperparameters λ and α. Rα(β) has the form as follows:
Rα(β)=(1−α)21∣∣β∣∣22+α∣∣β∣∣1.
It's easy to find that the form of network ranges from Ridge Regression and Lasso Regression while the α changes. By computing different regularization paths(different value of λ), we could obtain different weights of the model, thus gaining the best fit model for application(or best ACC). And the weights corresponding to different features would indicate their relative importance(bigger the value, more important the feature).
However the typical solver could not scale to large datasets arise in deep learning, therefore they developed a SAGA-based solver using GPU to scale to large datasets.
The interesting thing is that they found use only Top-k features(The Top-k weights) could achieve quite results. Like the ACC or other indicators only decreased a little. It means most of the features may not be that useful to the model. This could provide us a great chance to discover patterns by investigating only a few features.
