[petsc-users] [tao] General L1,L2 optimization
Dener, Alp
adener at anl.gov
Fri Jan 25 12:47:55 CST 2019
Hi Toby,
On Jan 25, 2019, at 12:11 PM, Isaac, Tobin G <tisaac at cc.gatech.edu<mailto:tisaac at cc.gatech.edu>> wrote:
On Fri, Jan 25, 2019 at 04:29:11PM +0000, Dener, Alp via petsc-users wrote:
Hi Hansol,
We don’t have a Levenberg-Marquardt method available, and if the PETSc/TAO manual says otherwise, that may be misleading. Let me know where you saw that and I can take a look and fix it.
In the meantime, if you want to solve a least-squares problem, the master branch of PETSc on Bitbucket has a bound-constrained regularized Gauss-Newton (TAOBRGN) method available. The only available regularization right now is an L2 proximal point Tikhonov regularizer. There are ongoing efforts to support an L1 regularizer, and also the ability for users to define their own, but these have not made it into the master branch yet. We’re working on it and should be in for the next major PETSc release in the Spring.
If you’d like to use that method, you need to set the Tao type to TAOBRGN and then go through the TaoSetResidualRoutine() and TaoSetJacobianResidualRoutine() interfaces to define your problem.
In general, you can use other TAO algorithms (e.g.: BNLS, BQNLS, etc.) with your own regularization term by embedding it into the objective, gradient and Hessian (if applicable) evaluation callbacks. The caveat is that your regularizer needs to be C1 continuous for first-order methods and C2 continuous for second order methods. This typically limits you to L2-norm regularizers. There is no support yet for L1-norm regularizers, but as I said, we’re working on it right now and it should be available in a couple of months.
Is there a feature branch yet where we could see what is being
prepared?
Xiang has been working on it here: https://bitbucket.org/petsc/petsc/branch/xhuang/tao-feature-L1
Currently it’s a complete replacement of the L2 regularizer in BRGN, but we will merge and combine with the old regularizer, and make some interface changes to support user-provided regularizers before it’s ready for a pull request.
While I think it is nice as a convenience for Tao to support adding l1
regularization for people, my two cents is that this should call on a
deeper structure that supports separable objectives.
The Gauss-Newton code (BRGN) is a very simple wrapper around the existing Newton Line-Search (BNLS) algorithm. It constructs the problem from the provided residual and Jacobian, tacks on an L2 regularizer, and feeds it into BNLS underneath.
I’m not intimately familiar with the L1 regularizer that Xiang has been working on for some tomography problems but I’m reasonably sure that it does not take advantage of any kind of a structure in the objective function because it’s built on top of the same BRGN infrastructure.
I wasn’t aiming for a very sophisticated least squares solver when I put together BRGN. It’s more of a low-hanging fruit case, where we could write a very small amount of code that saves the user some time in constructing the same Gauss-Newton problem that they could actually have also constructed themselves manually if they defined the FormFunctionAndGradient() and FormHessian() routines appropriately for existing Newton solvers.
I agree that a more sophisticated and serious approach to least-squares problems would benefit from separable objective functions and algorithms that take advantage of structure, but we don’t have any solvers in Tao that do this yet. I personally wouldn’t mind adding other features to BRGN or adding other L-S solvers, but we don’t really have applications or use-cases in front of us so it’s hasn’t risen high up on the priority list. If you have a problem you want to solve or a particular algorithm to add to Tao, we can talk altogether with Todd and see what we have to do with Tao interfaces and other things to support those efforts and collaborate.
Best,
——
Alp Dener
Argonne National Laboratory
https://www.anl.gov/profile/alp-dener
For example, an implementation of total variation regularization would
apply l1 to some operator applied to the control variables, and
instead of creating a complete TV implementation in Tao, a user should
be able to express "This part (misfit) is smooth" and "This part is
not, but it is convex".
Toby
Hope that helps,
——
Alp Dener
Argonne National Laboratory
https://www.anl.gov/profile/alp-dener
On Jan 24, 2019, at 2:57 PM, David via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov><mailto:petsc-users at mcs.anl.gov>> wrote:
Hi. I was wondering whether there was some kind of general consensus about
the currently-best-implemented L1, L2 norm regularization for petsc/tao
that has been implemented.
Naively, I would shoot for Levenberg-Marquardt for some kind of random
matrix, or even generic
finite-difference stencil problem. (but it seems like LM is yet to be
implemented, but only on petsc manual pdf?)
Or perhaps, of the implemented ones, LMVM seems to work well, at least
on my local machine.
In any due case, I would highly appreciate the input and opinion about
these matters.
Thanks.
Hansol Suh,
PhD Student
Georgia Institute of Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190125/b0ae92e9/attachment-0001.html>
More information about the petsc-users
mailing list