ProximalGradientDescentSolve¶
Iteratively solve a convex optimization problems using the proximal gradient descent method.
This node can solve (find the minimum of) a wide range of convex optimization problems common in machine learning and engineering sciences, both smooth and non-smooth. If the problem is smooth, then a cost function to minimize, which is a function of some vector- or matrix-shaped weights to optimize (w), optionally along with a scalar bias (b) that is also optimized, and provided data (D), is wired into the "cost" input as a graph with placeholders of same name. This is then solved via gradient descent (or optionally accelerated gradient descent). Alternatively, if the cost is further subject to a hard constraint, a small graph that applies one of the constraint nodes to the weights w may be wired into the "constraint" input; this is then solved via projected gradient descent (optionally accelerated). Lastly, if the cost function has a non-smooth term (e.g., a regularization term), then a graph that uses one of the proximal operator nodes (or which manually implements a proximal operator corresponding to the desired non-smooth term) can be wired into the "prox" input; in this case the problem is solved via proximal gradient descent (this is also known as the ISTA algorithm or, if accelerated, FISTA). In simple cases, the initial weights can be omitted, but in the general case, initial weights (e.g., an appropriately shaped all-zeros array or packet) must be provided since otherwise the shape is unknown. Like with all solve nodes, the solution is differentiable, meaning that the node can be used in a place where gradients are taken, for example in the network graph a DeepModel node. More Info... Version 0.2.0
Ports/Properties¶
data¶
Data to process.
weights¶
Initial and final weights. If not set, will be initialized to a packet equivalent to a single all-zeroes instance of the training-data.
bias¶
Optional estimated bias, if used as second argument in cost.
state¶
Optional initial and final solver state.
cost¶
Smooth part of cost function given some data.
cost__signature¶
Signature for the "cost" input. This represents the signature for the subgraph that is wired into the "cost" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "cost" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
prox¶
Optional proximal operator of non-smooth term(s).
prox__signature¶
Signature for the "prox" input. This represents the signature for the subgraph that is wired into the "prox" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "prox" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
constraint¶
Optional hard constraints.
constraint__signature¶
Signature for the "constraint" input. This represents the signature for the subgraph that is wired into the "constraint" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "constraint" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
hyper_params¶
Hyper-parameters for the cost function. This is a dictionary of arbitrary key-value pairs that can be used to configure the cost function and proximal operators. The respective graphs may then declare and use placeholders named the same as of the dictionary keys.
max_iter¶
Maximum number of iterations.
abstol¶
Absolute convergence tolerance. If weights change less than this (after normalization by step size), the optimization terminates. Note that this depends on the data scale.
stepsize¶
Optional step size. If unspecified, the step size is adapted automatically using back-tracking line search.
max_backtrack¶
Maximum number of line search steps per iteration. Only used if step size is left to automatic.
backtrack_factor¶
Backtracking line search factor. Only used if stepsize is 0. The default depends on the chosen algorithm, and is 0.5 for PGD.
acceleration¶
Whether to use Nesterov acceleration. This will usually lead to faster convergence at minimal per-iteration overhead.
use_jit¶
If enabled, attempt to use JIT compilation for the inner loop. This incurs a one-time compilation cost, but the actual solving will be greatly accelerated if using the GPU.
unroll¶
Whether to unroll the optimization loop. This can save some per-iteration overhead, but the benefit depends on the specific use case.
implicit_diff¶
Whether to use implicit differentiation for computing gradients. The alternative is to unroll the solver iterations.
verbosity¶
Verbosity level. 0: no output, 1: per-iteration summary. Note that JIT will be disabled if verbosity is used.
incremental_updates¶
Whether to use incremental updates from the previous state. If not set, the previous or wired-in state is ignored.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.