---
title: 'Safe-AltGDmin: Constrained Multi-Task Bandits'
url: https://www.emergentmind.com/topics/safe-altgdmin
type: topic
---

# Safe-AltGDmin: Constrained Multi-Task Bandits

Searching arXiv for the cited papers and related work to ground the article.
Safe-AltGDmin is the name given to the “Safe-Alternating projected Gradient Descent and minimization” procedure introduced for Constrained Multi-Task Representation Learning (CMTRL) in conservative linear bandits. It addresses a multi-task setting in which task parameters share a common low-dimensional representation, while every action must satisfy a stage-wise performance constraint relative to a known baseline. The method combines conservative exploration in the first epoch, truncated spectral initialization, alternating least-squares updates for task-specific coefficients, projected gradient descent on a shared feature extractor, and sample splitting to obtain high-probability safety, exponential subspace contraction, and sublinear regret [2605.12176].

## 1. Problem setting and formal objective

Safe-AltGDmin is formulated for $T$ linear bandit tasks in a $d$ dimensional space. At round $n \in \{1,\dots,N\}$, task $t$ selects an action $x_{n,t} \in \mathbb{R}^d$ and observes
$$
y_{n,t} = x_{n,t}^\top \theta_t^* + \eta_{n,t},
$$
where $\theta_t^* \in \mathbb{R}^d$ is unknown and the noise variables are i.i.d. zero-mean sub-Gaussian, with the analysis using Gaussian noise of variance $\sigma^2$. The tasks share an $r$-dimensional representation, with $r \ll \min\{d,T\}$, so that there exist $B^* \in \mathbb{R}^{d \times r}$ with orthonormal columns and $W^* = [w_1^*,\dots,w_T^*] \in \mathbb{R}^{r \times T}$ such that
$$
\Theta^* := [\theta_1^*,\dots,\theta_T^*] = B^* W^*, \qquad \theta_t^* = B^* w_t^*.
$$
The singular spectrum of $\Theta^*$ determines $\sigma_{\min}$, $\sigma_{\max}$, the condition number $\kappa := \sigma_{\max}/\sigma_{\min}$, and the noise-to-signal ratio $\mathrm{NSR} := \sigma^2/\sigma_{\min}^2$ [2605.12176].

The defining safety requirement is stage-wise and baseline-relative. For each task $t$ and round $n$, a baseline action $x_{bn,t}$ and its known baseline reward $r_{bn,t} = x_{bn,t}^\top \theta_t^*$ are given, and the learner must satisfy
$$
x_{n,t}^\top \theta_t^* \ge (1-\alpha) r_{bn,t},
$$
with known $\alpha \in (0,1)$. The safe set for task $t$ is therefore
$$
X_{\mathrm{safe},t}(\theta_t^*) = \{x \in \mathbb{R}^d : x^\top \theta_t^* \ge (1-\alpha) r_{bn,t}\}.
$$
Because $\theta_t^*$ is unknown, safety is enforced indirectly: epoch $1$ uses conservative randomized mixtures of the baseline, and later epochs use greedy actions with respect to the current estimate, together with a high-probability safety proof [2605.12176].

The estimation problem is organized by epochs. If the horizon is partitioned as $0 = G_0 < G_1 < \dots < G_M = N$, then in epoch $m$ the factorization $\Theta = BW$ is fitted by minimizing the nonconvex squared loss
$$
L_m(B,W) := \sum_{t=1}^T \sum_{n=G_{m-1}+1}^{G_m} \big(y_{n,t} - x_{n,t}^\top B w_t\big)^2,
$$
optionally with the Stiefel constraint $B^\top B = I_r$, which the algorithm enforces through a projection or QR step [2605.12176].

## 2. Alternating projected GD and minimization

The algorithm alternates between minimization in the task-specific block $W$ and projected gradient descent in the shared block $B$. This is the same structural pattern as the broader AltGDmin framework for partly-decoupled optimization, in which the loss is differentiable in one block and the other block is fast to minimize, often because it decouples across clients or samples [2504.14741].

In Safe-AltGDmin, epoch $1$ is a safe exploration phase. For each task $t$ and each round $n \le G_1$, the action is
$$
x_{n,t} = (1-p)x_{bn,t} + p \zeta_{n,t}, \qquad \zeta_{n,t} \sim N(0,I_d),
$$
where the user parameter $p \in [0,1]$ trades exploration and safety. The paper also requires $p \in [0,0.25] \cup [0.75,1]$ for contraction in epoch $1$, so that the Gram matrix remains well-conditioned [2605.12176].

Initialization is spectral and truncation-based. Let $\Phi_t^{(1)}$ be the $d \times G_1$ design matrix of epoch-$1$ contexts for task $t$, and let $y_t^{(1)}$ collect the corresponding rewards. The unnormalized method-of-moments estimator is
$$
\Theta_{0,\mathrm{full}} := [\Phi_1^{(1)} y_1^{(1)}, \dots, \Phi_T^{(1)} y_T^{(1)}].
$$
To mitigate heavy tails, the labels are truncated entrywise using a global threshold $a$, giving $y_{t,\mathrm{trunc}}^{(1)}$, and then
$$
\Theta_0 := [\Phi_1^{(1)} y_{1,\mathrm{trunc}}^{(1)}, \dots, \Phi_T^{(1)} y_{T,\mathrm{trunc}}^{(1)}].
$$
The initial factor $B^{(0)}$ is set to the top-$r$ left singular vectors of $\Theta_0$ [2605.12176].

Within each epoch, the data are partitioned into $2L$ disjoint blocks per task. This sample-splitting design removes statistical dependencies between the $W$-update and the $B$-gradient computation. For $\ell = 1,\dots,L$, the algorithm executes two steps. First, for each task $t$, it solves ordinary least squares on block $(t,\ell)$:
$$
w_t^{(\ell)} = \arg\min_w \| y_{t,\ell}^{(m)} - \Phi_{t,\ell}^{(m)\top} B^{(\ell-1)} w \|_2^2.
$$
This gives the closed-form update
$$
w_t^{(\ell)} =
\big(B^{(\ell-1)\top}\Phi_{t,\ell}^{(m)}\Phi_{t,\ell}^{(m)\top}B^{(\ell-1)}\big)^{-1}
B^{(\ell-1)\top}\Phi_{t,\ell}^{(m)} y_{t,\ell}^{(m)}.
$$

Second, using the independent block $(\ell+L)$, it computes an empirical gradient of $L_m$ at $(B^{(\ell-1)},W^{(\ell)})$,
$$
\nabla_B L_m \approx -2 \sum_{t=1}^T \Phi_{t,\ell+L}^{(m)}
\big(y_{t,\ell+L}^{(m)} - \Phi_{t,\ell+L}^{(m)\top} B^{(\ell-1)} w_t^{(\ell)}\big)
w_t^{(\ell)\top},
$$
takes the step
$$
\widetilde B^{(\ell)} = B^{(\ell-1)} - \gamma \nabla_B L_m,
$$
and projects onto the Stiefel set
$$
C_B := \{B \in \mathbb{R}^{d \times r} : B^\top B = I_r\}
$$
by QR or polar decomposition:
$$
B^{(\ell)} = \Pi_{C_B}(\widetilde B^{(\ell)}) = qf(\widetilde B^{(\ell)}).
$$
After $L$ such iterations, the epoch output is $B^{(m)} := B^{(L)}$, $W^{(m)} := W^{(L)}$, and $\widehat\theta_t^{(m)} := B^{(m)} w_t^{(m)}$ [2605.12176].

## 3. Safety mechanisms and the meaning of “safe”

The “safe” component of Safe-AltGDmin is algorithmic and statistical rather than a separate projection onto an explicit safe action set. In epoch $1$, safety is guaranteed by choosing $p$ small enough. A sufficient condition states that, for confidence $\delta \in (0,1)$,
$$
p \le \frac{\alpha r_{bn,t}}{r_{bn,t} + \sqrt{2 \log( 2 T G_1 / \delta )}\,\|\theta_t^*\|_2},
$$
which yields, with probability at least $1-\delta$,
$$
(1-p) x_{bn,t}^\top \theta_t^* + p \zeta_{n,t}^\top \theta_t^* \ge (1-\alpha) r_{bn,t}
$$
for all $n \le G_1$ and all tasks $t$. Since $\|\theta_t^*\|_2$ is unknown, the analysis replaces it by the computable upper bound $\sqrt{u}\,\sigma_{\max}$ derived from the incoherence parameter $u$ [2605.12176].

In later epochs, the algorithm uses the greedy action
$$
x_{n,t} = \arg\max_{x \in X} x^\top \widehat\theta_t^{(m-1)},
$$
without an explicit safe-set restriction. Safety is instead proved by combining a uniform Gaussian concentration bound for
$$
|x_{n,t}^\top(\theta_t^* - \widehat\theta_t^{(m-1)})|
$$
with exponential contraction of the estimation error. Under the sample-size and iteration conditions of the main theorem, every greedy action in epochs $m \ge 2$ satisfies
$$
x_{n,t}^\top \theta_t^* \ge (1-\alpha) r_{bn,t}
$$
with high probability [2605.12176].

Several additional devices stabilize the optimization itself. The step size is chosen small enough that $I - \gamma W W^\top$ is positive semidefinite; a practical form consistent with the proofs is
$$
\gamma = \frac{c}{\kappa_p^2 \|\Theta_0\|_2^2}, \qquad
\kappa_p := 1 + \frac{0.04}{(1-2p)^2}, \qquad c \in (0,0.5).
$$
The only explicit constraint set projected onto in the CMTRL algorithm is the Stiefel set $C_B$, while $W$ remains unconstrained. This aligns Safe-AltGDmin with the broader AltGDmin literature, where projections, safe constant step sizes, robust spectral initializers, and sample splitting are the primary stability mechanisms rather than line search or trust-region procedures [2605.12176; 2504.14741].

## 4. Assumptions and theoretical guarantees

The analysis assumes a shared representation $\Theta^* = B^* W^*$ with orthonormal $B^*$, bounded baseline gaps $0 \le K_\ell \le K_{bn,t} \le K_u$, Gaussian design and noise in epoch $1$, and column-wise incoherence of $W^*$:
$$
\|w_t^*\|_2^2 \le u \, (\sigma_{\max}^2 / r)
\qquad \text{for all } t.
$$
These assumptions ensure that no single task dominates and that the effective local quadratic model has the strong convexity and smoothness needed for contraction [2605.12176].

The initialization guarantee states that if
$$
G_1 T \ge C u^2 \kappa^2 (d r^2 + \mathrm{NSR}),
$$
then, with probability at least $1-\exp(-c(d+T))$,
$$
SD(B^{(0)}, B^*) \le \epsilon_0,
$$
where
$$
SD(B,B^*) := \|(I - B B^\top) B^*\|_F.
$$
In epoch $1$, if $SD(B^{(0)},B^*) \le \epsilon_0 \le 0.02 \mu u r \kappa^2$, if $p \in [0,0.25] \cup [0.75,1]$, and if the prescribed sample-size conditions hold, then with probability at least $1-d^{-10}$,
$$
SD(B^{(\ell)}, B^*) \le (1 - c_1 \gamma \sigma_{\min}^2)\, SD(B^{(\ell-1)}, B^*)
\qquad \text{for all } \ell=1,\dots,L.
$$
For later epochs, if $SD(B^{(1)},B^*)$ is sufficiently small and the per-epoch sample sizes are large enough at target accuracy $\epsilon$, then
$$
SD(B^{(\ell)}, B^*) \le
(1 - c_2 \gamma \sigma_{\min}^2)^{(m-2)L+\ell} SD(B^{(1)}, B^*)
$$
with probability at least $1-((m-1)L+\ell)d^{-10}$, yielding exponential decay down to $O(\epsilon)$ [2605.12176].

The task-parameter errors inherit the same contraction:
$$
\|\theta_t^* - \widehat\theta_t^{(m)}\|_2
\le
\Big(1 + \frac{0.04}{(1-2p)^2}\Big)\sqrt{u}\,\sigma_{\max}\, SD(B^{(m)}, B^*).
$$
The safety theorem combines these estimation bounds with lower bounds on the per-epoch sample sizes and the requirement
$$
L \ge C \kappa^2 \log(NT),
$$
or the explicit logarithmic form appearing in the proof, to show that every greedy action in epochs $m \ge 2$ is stage-wise safe with high probability [2605.12176].

The regret guarantee is
$$
R_{N,T}
:=
\sum_{n=1}^N \sum_{t=1}^T
\big(x_{n,t}^{*\top}\theta_t^* - x_{n,t}^\top \theta_t^*\big)
\le
C \sqrt{rNT (p^2-p+1)\log(NT)} \cdot \sqrt{u \sigma_{\max}},
$$
with probability at least $1-2\delta-MLd^{-10}$. Ignoring constants and logarithms, this gives
$$
R_{N,T} = \widetilde O(\sqrt{rNT}),
$$
which depends on the intrinsic rank $r$ rather than the ambient dimension $d$ [2605.12176].

## 5. Relation to AltGDmin and federated low-rank recovery

Safe-AltGDmin is a specialized member of the AltGDmin family. In the general partly-decoupled template, one solves
$$
\min_{Z_a,Z_b} f(Z_a,Z_b;D),
$$
where $f$ is differentiable in $Z_a$ and the minimization over $Z_b$ is closed-form or reliably solved. When
$$
f(Z_a,Z_b;D)=\sum_{\ell=1}^{\gamma} f_\ell(Z_a,(Z_b)_\ell;D_\ell),
$$
the $Z_b$-update decomposes into $\gamma$ local problems, and clients transmit only partial gradients in the shared block $Z_a$, making AltGDmin communication-efficient in vertically federated settings [2504.14741].

The low-rank recovery literature that preceded Safe-AltGDmin already contained most of the optimization safeguards later emphasized in the bandit setting. For low-rank column-wise sensing, AltGDmin alternates closed-form updates
$$
b_j = (A_j U)^\dagger y_j
$$
with a projected gradient step
$$
U^+ = QR\!\left(U - \frac{\eta}{m}\nabla_U f(U,B)\right),
$$
and uses truncated spectral initialization, sample splitting, and constant step sizes such as $\eta = 0.4/m^2$ to obtain geometric convergence in subspace distance [2306.17782]. For federated low-rank matrix completion, the algorithm similarly alternates decoupled least squares over columns with a masked gradient step and QR on $U$, while row-incoherence projection at initialization preserves the assumptions needed for concentration and contraction [2405.06569].

A recurrent misconception is that “Safe-AltGDmin” names a universally standardized variant across the entire AltGDmin literature. The record is more specific. The CMTRL bandit paper explicitly introduces “Safe-AltGDmin” as a named algorithm [2605.12176]. By contrast, the general AltGDmin framework paper states that no named “Safe-AltGDmin” variant is introduced there, even though its core method already incorporates safety-critical mechanisms such as QR projection, explicit safe step-size choices, robust spectral initializers based on truncation, incoherence projection for LRMC initialization, and sample splitting [2504.14741]. The LRMC paper likewise presents “Toward a ‘Safe-AltGDmin’” as a safety-enhanced variant grounded in the analysis rather than the paper’s primary named algorithm [2405.06569].

## 6. Empirical behavior, implementation choices, and limitations

The empirical study for Safe-AltGDmin uses both synthetic data and Movielens-100K. In the synthetic setup, the default parameters are $d=100$, $T=100$, ten actions per round per task, Gaussian noise variance $10^{-6}$, and a baseline equal to the 5th-best action; $B^*$ and $W^*$ are drawn from Gaussian distributions and orthonormalized. In the Movielens-100K setup, ratings are normalized to $[0,1]$, matrix factorization is used, columns are clustered into $T$ groups to define task-specific contexts, and the rank is set to $r=1$. Baselines include a trace-norm convex relaxation, Thompson sampling with safe set estimation per task, and a method-of-moments estimator followed by least squares and greedy action selection [2605.12176].

The reported findings are threefold. First, the estimation error $\|\widehat\Theta - \Theta^*\|_F$ is consistently lower than for the baselines and improves as $T$ increases, reflecting the benefit of shared representation learning. Second, Safe-AltGDmin and Thompson sampling with safe set estimation incur near-zero safety violations, whereas trace-norm and method-of-moments baselines show many violations because they ignore constraints. Third, the regret displays sublinear growth in $N$ and $T$, consistent with the $\widetilde O(\sqrt{rNT})$ theory; trace-norm and method-of-moments procedures can have lower regret only by violating safety [2605.12176].

The implementation guidance given for the algorithm is tightly coupled to the theory. The paper recommends choosing
$$
p \le \frac{\alpha r_{b,\min}}{r_{b,\min} + \sqrt{2\log(2TG_1/\delta)}\,\theta_{\max}}
$$
with $p \in [0,0.25] \cup [0.75,1]$, setting
$$
\gamma = \frac{c}{\kappa_p^2 \|\Theta_0\|_2^2}, \qquad c \in (0,0.5),
$$
and taking
$$
L = C \kappa^2 \log(NT)
$$
or the explicit form from the safety theorem. The per-GD-iteration complexity is
$$
O((G_m-G_{m-1})Tdr),
$$
projection costs $O(dr^2)$, total per-epoch complexity is
$$
O((G_m-G_{m-1})Tdr + dr^2),
$$
and communication is $O(dr)$ if the method is distributed [2605.12176].

The limitations stated for the method are equally specific. If tasks do not share a low-dimensional representation, so that the effective rank is large, the advantage diminishes because regret and sample complexity scale with $r$. Tight safety parameters, meaning small $\alpha$, and weak baselines, meaning small $r_{bn,t}$, restrict epoch-$1$ exploration because $p$ must be very small. Context distributions that are adversarial or heavy-tailed beyond the truncation robustness require more advanced robust estimators. The paper identifies nonlinear shared representations, contextual safety constraints, adaptive rank selection, and distributed or federated implementations leveraging the same AltGDmin core as natural extensions [2605.12176].

Source: https://www.emergentmind.com/topics/safe-altgdmin