Files
papers/hanzo-consensus-ai/sections/06-distributed-training-consensus.tex

49 lines
1.8 KiB
TeX

\section{Distributed Training Consensus}
\label{sec:training}
% ============================================================================
Distributed training on ACI requires consensus on gradient aggregation across
untrusted nodes.
\subsection{Byzantine Gradient Aggregation}
Standard distributed training uses AllReduce to average gradients:
\begin{equation}
\bar{\mathbf{g}} = \frac{1}{P} \sum_{p=1}^{P} \mathbf{g}_p.
\end{equation}
A Byzantine node can submit poisoned gradients to corrupt the model. We use
coordinate-wise trimmed mean~\cite{byzmean}:
\begin{equation}
\bar{g}_j^{\text{trim}} = \frac{1}{P - 2f}
\sum_{p=f+1}^{P-f} g_{(p),j},
\end{equation}
where $g_{(1),j} \leq \cdots \leq g_{(P),j}$ are the sorted gradient values
for coordinate $j$, and $f$ is the number of trimmed values from each end.
\begin{theorem}[Trimmed Mean Convergence]
Under standard assumptions (L-smooth, $\mu$-strongly convex loss), distributed
SGD with coordinate-wise trimmed mean converges at rate:
\begin{equation}
\mathbb{E}[F(\mathbf{w}_T) - F(\mathbf{w}^*)] \leq
\mathcal{O}\!\left(\frac{L}{\mu T} + \frac{f^2 \sigma^2}{\mu P^2}\right),
\end{equation}
where $\sigma^2$ is the gradient variance and $f < P/3$ is the number of
Byzantine workers.
\end{theorem}
\subsection{Gradient Commitment}
To prevent adaptive attacks (where a Byzantine node chooses its gradient after
seeing other gradients), we use a commit-reveal scheme analogous to inference
attestation:
\begin{enumerate}[leftmargin=1.4em]
\item Each worker commits $c_p = \texttt{Hash}(\mathbf{g}_p \| r_p)$.
\item After all commitments are received, workers reveal their gradients.
\item Gradients inconsistent with commitments are discarded.
\item Trimmed mean aggregation proceeds on valid gradients.
\end{enumerate}
% ============================================================================