Skip to content

← optimization package

LowRankPenalty

A penalty encouraging solution matrices or tensors that are low rank with respect to two or more axes.

The operator penalizes the sum of singular values in the input (across one or more 2d slices through the data specified by the two axes), which has the side effect of encouraging solutions that are low rank with respect to those two axes. Low rank solutions can be interpreted as a sum of a small number of rank-1 matrices (along the given slices), where a rank-1 matrix can be interpreted as a profile along one axis multiplied by a profile along the other axis. Each of the two axes can also be given as a flattened list of axes, in which case the operator will learn a profile along the flattened list of axes and then combine that with the profile along the other axis (note that the flattened profile is full-rank with respect to the flattened axes however, which can be fairly high dimensional if these axes are long). A less common use case is to employ the alternative non- convex Schatten-q norm via the norm parameter and the associated shape parameter, which can yield better results in practice given a skilled choice of solver and problem setup, but which sacrifices the otherwise guaranteed global optimality. Like all proximal operators, this is normally used as part of the optimization problem formulation given to a (typically convex) solver node. Version 1.0.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: INOUT

step_size

Step size.

  • verbose name: Step Size
  • default value: None
  • port type: DataPort
  • value type: float (can be None)
  • data direction: IN

step_count

Current step count for outer solver.

  • verbose name: Step Count
  • default value: None
  • port type: DataPort
  • value type: int (can be None)
  • data direction: IN

axis1

First axis along which the data are low rank. Along with the second axis this specifies a slice through the data along which low rank structure is encouraged by the penalty. A low-rank structure can be interpreted as the solution being a sum of a small number of latent 2d patterns along these 2 axes, each of which is a rank-1 matrix; this can be interpreted as a profile along one axis multiplied by a profile along the other axis. Note that if the data has any additional axes, the solution will be sparse with respect to those other axes, meaning that only few of the elements have nonzero values (and those values correspond to the low-rank slices). If the input is given as a packet, this can be an axis name,a comma-separated list of axis names (e.g., time,frequency), or an axis index (0, 1, etc.) or comma-separated list thereof. If the input is given as an array, only axis indices or lists thereof can be given. Lists mean that the given axes are first flattened, and then a profile is learned along that flattened axis, which is then combined with the profile along axis2. This can also be interpreted as the profile extending across the given axes, but note that the profile will be full rank with respect to those flattened axes. The effect on the original data is in all cases back-transformed to the original data shape.

  • verbose name: First Axis
  • default value: time
  • port type: ComboPort
  • value type: str (can be None)

axis2

Second axis along which the data are low rank. See the description of the axis1 parameter for more details.

  • verbose name: Second Axis
  • default value: space
  • port type: ComboPort
  • value type: str (can be None)

norm

The norm to use to encourage a low-rank structure. The default choice is the trace norm, which penalizes the sum of singular values of each 2d slice of the solution (and if there are multiple slices then the sum of trace norms across those slices, which is equivalent to the trace norm of a block-diagonal matrix with the slices as blocks). The other choice is the Schatten-q norm, which is a non-convex alternative to the trace norm; as a result of the non-convexity, the solution is not guaranteed to be globally optimal; however, this norm can work better than the trace norm with a skilled choice of solver and problem structure for the same reasons as described in the SparseProx node.

  • verbose name: Norm
  • default value: trace
  • port type: EnumPort
  • value type: str (can be None)

rank_sparsity

Degree of rank-wise sparsity in the solution. Larger values will encourage the solution to have lower rank, meaning that the solution will be a sum of fewer rank-1 matrices (along some chosen slice directions).

  • verbose name: Rank Sparsity
  • default value: 1.0
  • port type: FloatPort
  • value type: float (can be None)

norm_shape

Shape of the non-convex Schatten-q norm, if selected (must be between 0 and 1). A good default is 0.75.

  • verbose name: Norm Parameter (If Norm Is Schatten-Q)
  • default value: None
  • port type: FloatPort
  • value type: float (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)