Add proximal gradient optimizers: FBS, FISTA, and FASTA - #427
Merged
Conversation
Member
Author
conradsnicta
approved these changes
Sep 16, 2025
Member
Author
zoq
approved these changes
Sep 17, 2025
coatless
approved these changes
Sep 17, 2025
Member
Author
|
A couple unexpected fixes were necessary to make this build... once I get things to pass I'll go ahead and merge. |
Member
Author
|
Not sure what is going on with the GPU runners, but the tests at least build, and this PR doesn't modify any GPU tests, so I am going to assume that it would work fine if it did run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I implemented these a very long time ago but only just now got the okay to contribute them back.
This PR implements three new optimizers for ensmallen:
FBS: forward-backward splittingFISTA: fast iterative shrinkage-thresholding algorithmFASTA: fast adaptive shrinkage/thresholding algorithmThese are differentiable optimizers, sort of, but they are specifically made for a class of functions that consist of both a differentiable part and a non-differentiable part:
This situation arises all over the place. For me, the interesting application is L1-constrained objective functions like this one:
Here, the L1 penalty is not differentiable and is instead often solved with "proximal gradient" algorithms, that take a 'forward' step to improve the differentiable
f(x)term, then a 'backward' step to ensure that the objective of the non-differentiableg(x)parameter did not increase too much. That backward step can also be called 'shrinkage'.Inside of ensmallen, I implemented this type of constrained objective function by having the
FBS,FISTA, andFASTAfunctions take bothf(x)andg(x)separately. The classesL1PenaltyandL1Constraintare implemented, and the documentation includes examples of how to do L1-regularized optimization with ensmallen. It looks like this:Originally, my aim was to implement newGLMNET, another proximal gradient optimizer (it is what is inside LIBLINEAR), and then compare whether ensmallen's newGLMNET was better or worse than these three optimizers for learning L1-constrained logistic regression models. However, that project was never completed and funding situation changes mean it's on indefinite hold (honestly speaking I am unlikely to ever return to that effort). At the same time, these three optimizers are tested and ready to go.