\begin{algorithm}[H]
\caption{TAS-GS Training Loop (schedules per \S\ref{sec:method:train})}
\label{alg:train}
\begin{algorithmic}[1]
\Require $\mathcal{S}$ initialized from SfM, schedules $T_{\text{regularize}}$, $T_{\text{build}}$, warm-ups, weights $(\lambda_{\mathrm{opacity}},\lambda_{\mathrm{app}},\lambda_{\mathrm{sem}})$
\For{$t=1\ldots T$}
  \State Render minibatch views, compute $\mathcal{L}_{\mathrm{photo}}=\ell_1+\text{DSSIM}$
  \State $\mathcal{L}_{\mathrm{opacity}} \leftarrow -\frac{1}{|\mathcal{V}|}\sum_{i\in\mathcal{V}} \big[o_i\log o_i+(1-o_i)\log(1-o_i)\big]$
  \If{$t\ge$ warm-up for regularization and $t \bmod T_{\text{regularize}}=0$}
    \State Run Alg.~\ref{alg:build-graph}, \ref{alg:holes}, \ref{alg:plan-edits}, \ref{alg:execute}
  \EndIf
  \If{$t\ge$ warm-up for GNN and $t \bmod T_{\text{build}}=0$}
    \State Run Alg.~\ref{alg:gnn} to update $\{o_i,\mathbf{k}_i\}$ on a downsample
    \State $\mathcal{L}_{\text{GNN}} \leftarrow 0.1\,\mathcal{L}_{\text{vis}} + 1.0\,\mathcal{L}_{\text{inv}}$ (cf.\ Eq.~(9)–(10))
  \Else
    \State $\mathcal{L}_{\text{GNN}} \leftarrow 0$
  \EndIf
  \If{$t\ge$ warm-up for SRB}
    \State $\mathcal{L}_{\mathrm{SRB}} \leftarrow$ Alg.~\ref{alg:srb}
  \Else
    \State $\mathcal{L}_{\mathrm{SRB}} \leftarrow 0$
  \EndIf
  \State $\mathcal{L}\leftarrow \mathcal{L}_{\mathrm{photo}}+\lambda_{\mathrm{opacity}}\mathcal{L}_{\mathrm{opacity}}+\lambda_{\mathrm{app}}\mathcal{L}_{\text{GNN}}+\lambda_{\mathrm{sem}}\mathcal{L}_{\mathrm{SRB}}$
  \State Update $\mathcal{S}$ and module parameters by Adam, apply 3DGS densification/pruning policy
\EndFor
\State \Return Final $\mathcal{S}$ (standard 3D Gaussians $(\mathbf{p},o,\mathbf{s},\mathbf{r},\mathbf{k})$)
\end{algorithmic}
\end{algorithm}
