hyri.regulariser.prox_ellipsoid#

Implement projection onto weighted ellipsoidal constraint sets.

This file provides the proximal operator used by constrained optimisation variants that require projection onto per-channel weighted \(\ell_2\) balls.

Class

ProxEllipsoid

Project channel tensors with a weighted ellipsoidal proximity operator.

class hyri.regulariser.prox_ellipsoid.ProxEllipsoid(center: list[Tensor], precond_weight: list[Tensor] | None = None, radius: Tensor | None = None, rank_num_ch: int = 1, rank_ch_start: int = 0, itr_min: int = 1, itr_max: int = 10, rel_var_tol: float = 1e-06, device: device = device(type='cpu'), dtype: dtype = torch.complex64, verbose: bool = False)#

Bases: Regulariser

Project channel tensors with a weighted ellipsoidal proximity operator.

This class implements the non-Euclidean proximity operator used for preconditioned data-fidelity updates. For each local channel \(i\), the data-fidelity term is the indicator function of a shifted weighted ellipsoid,

\[h_i(\mathbf{z}) = \iota_{\mathcal{B}_i}(\mathbf{z}),\]

and the weighted proximity operator is

\[\operatorname{prox}^{\mathbf{U}_i}_{h_i}(\mathbf{z}) = \arg\min_{\bar{\mathbf{z}}} \iota_{\mathcal{B}_i}(\bar{\mathbf{z}}) + \frac{1}{2} (\mathbf{z}-\bar{\mathbf{z}})^\dagger \mathbf{U}_i (\mathbf{z}-\bar{\mathbf{z}}).\]

For diagonal positive preconditioning \(\mathbf{U}_i\), this operator is equivalent to a skewed projection onto a generalised ellipsoid. In this class, \(\mathbf{U}_i\) is represented through per-channel diagonal preconditioning weights, while center and radius define the corresponding constraint set used by the projection step.

Shape:
  • Input – List of C tensors, where C = len(center) = rank_num_ch, and each tensor x[i] has the same shape as center[i].

  • Output – List of C tensors with the same list length and per-channel tensor shapes as the input list.

_center#

Per-channel ellipsoid centres.

Type:

tuple[torch.Tensor, …]

_precond_weight#

Per-channel preconditioners.

Type:

tuple[torch.Tensor, …]

_radius#

Per-channel projection radii.

Type:

torch.Tensor

_gd_step_size#

Per-channel gradient step sizes.

Type:

tuple[float, …]

Example

>>> centre = [torch.zeros(4, 4)]
>>> prox = ProxEllipsoid(center=centre)
>>> x = [torch.ones(4, 4)]
>>> y = prox(x)
>>> y[0].shape
torch.Size([4, 4])

References

Onose, A., Dabbech, A., & Wiaux, Y. (2017). An accelerated splitting algorithm for radio-interferometric imaging: when natural and uniform weighting meet. MNRAS, 469(1), 938-949.

Initialise the ellipsoidal projection operator.

Parameters:
  • center (List[torch.Tensor]) – Per-channel ellipsoid centres.

  • precond_weight (Optional[List[torch.Tensor]], optional) – Per-channel diagonal preconditioning weights. If None, unit weights are used. Default: None.

  • radius (Optional[torch.Tensor], optional) – Per-channel ellipsoid radii. If None, radii are initialised from a chi-square-inspired bound. Default: None.

  • rank_num_ch (int, optional) – Number of channels handled by this rank. Default: 1.

  • rank_ch_start (int, optional) – Global start index of local channels. Default: 0.

  • itr_min (int, optional) – Minimum projection iterations. Default: 1.

  • itr_max (int, optional) – Maximum projection iterations. Default: 10.

  • rel_var_tol (float, optional) – Relative variation tolerance used for stopping. Default: 1e-6.

  • device (torch.device, optional) – Execution device. Default: torch.device(“cpu”).

  • dtype (torch.dtype, optional) – Tensor dtype used for internal state. Default: torch.complex64.

  • verbose (bool, optional) – Enable verbose logging. Default: False.

__call__(x: list[Tensor]) → list[Tensor]#

Project channel tensors onto the configured ellipsoids.

Parameters:

x (List[torch.Tensor]) – Input tensors, one tensor per local channel.

Returns:

Projected tensors with the same structure as x.

Return type:

List[torch.Tensor]

_grad_descent(result: list[Tensor], target: list[Tensor]) → list[Tensor]#

Perform one weighted forward gradient step.

Parameters:
Returns:

Updated tensors before the projection step.

Return type:

List[torch.Tensor]

_proj_l2_ball(x: list[Tensor]) → list[Tensor]#

Project tensors onto per-channel Euclidean balls.

Parameters:

x (List[torch.Tensor]) – Tensors to be projected.

Returns:

Projected tensors.

Return type:

List[torch.Tensor]

update(*args, **kwargs)#

Keep the operator state unchanged.

This operator does not require per-iteration parameter updates.

get_radius() → tuple[float, ...]#

Return configured per-channel projection radii.

Returns:

Radius values for each local channel.

Return type:

torch.Tensor

set_radius(radius: tuple[float, ...]) → None#

Set the projection radii for each local channel.

Parameters:

radius (Tuple[float, ...]) – Radius values for each local channel.

get_precond_weight() → tuple[Tensor, ...]#

Return per-channel preconditioning weights.

Returns:

Preconditioning tensors.

Return type:

Tuple[torch.Tensor, …]