SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Miaoxi Zhu $^{1}$  Li Shen $^{2*}$  Bo Du $^{1*}$  Dacheng Tao $^{3}$
<sup>1</sup> School of Computer Science, National Engineering Research Center for Multimedia Software,
Institute of Artificial Intelligence and Hubei Key Laboratory of Multimedia
and Network Communication Engineering, Wuhan University, China
$^{2}$ JD Explore Academy, China  $^{3}$ The University of Sydney, Australia
{zhumx,dubo}@whu.edu.cn,{mathshenli,dacheng.tao}@gmail.com
The growing size of available data has attracted increasing interest in solving minimax problems in a decentralized manner for various machine learning tasks. Previous theoretical research has primarily focused on the convergence rate and communication complexity of decentralized minimax algorithms, with little attention given to their generalization. In this paper, we investigate the primal-dual generalization bound of the decentralized stochastic gradient descent ascent (D-SGDA) algorithm using the approach of algorithmic stability under both convex-concave and nonconvex-nonconcave settings. Our theory refines the algorithmic stability in a decentralized manner and demonstrates that the decentralized structure does not destroy the stability and generalization of D-SGDA, implying that it can generalize as well as the vanilla SGDA in certain situations. Our results analyze the impact of different topologies on the generalization bound of the D-SGDA algorithm beyond trivial factors such as sample sizes, learning rates, and iterations. We also evaluate the optimization error and balance it with the generalization gap to obtain the optimal population risk of D-SGDA in the convex-concave setting. Additionally, we perform several numerical experiments which validate our theoretical findings.
Minimax problems have shown extensive applications in machine learning, such as adversarial robustness [26, 16], GAN [11], the zero-sum game [27], multi-agent reinforcement learning [33], AUC maximization [41]. Alongside this, as the use of large-scale models has become widespread, distributed learning algorithms have emerged as a noteworthy approach for handling massive amounts of data and model parameters [5, 1]. Without a parameter server [20] aggregating all data from each local agent, decentralized algorithms that do not rely on the central structure can be advantageous when network bandwidth is low or latency is high, and they can also protect data privacy[21]. In this work, we consider the following decentralized minimax stochastic optimization problems:
$$
\min  _ {\boldsymbol {x} \in \mathcal {X}} \max  _ {\boldsymbol {y} \in \mathcal {Y}} F (\boldsymbol {x}, \boldsymbol {y}) := \frac {1}{m} \sum_ {i = 1} ^ {m} F _ {i} (\boldsymbol {x}, \boldsymbol {y}) := \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {E} _ {\xi_ {i} \sim \mathcal {D} _ {i}} [ f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) ] \tag {1}
$$
where  $m$  denotes the number of agents,  $F_{i}$  is the local loss function,  $\xi_{i}$  represents local data stored on agent  $i$ , and  $\mathcal{X} \subseteq \mathbb{R}^{d_{\mathbf{x}}}$ ,  $\mathcal{Y} \subseteq \mathbb{R}^{d_{\mathbf{y}}}$ . Note that the data distributions  $\mathcal{D}_i$  may differ across the agents.
The most straightforward algorithm for solving the above stochastic minimax optimization problem is to apply Stochastic Gradient Descent Ascent (SGDA) [14, 22] in a decentralized manner, named
Table 1: Main results on different cases: SC-SC, C-C, and NC-NC represent strongly-convex-strongly-concave, convex-concave, and nonconvex-nonconcave, respectively.  $\tilde{\mathcal{O}}$  means it contains the logarithmic function.  $C_{\lambda}$  is a constant concerning about the spectral gap  $1 - \lambda$  of different topology which is defined in Thm. 2.  $T$  represents iterations.  $L$  is Lipschitz constant.  $\mu$  represents the strong convexity and strong concavity parameter.  $n$  denotes the sample size in each node.  $m$  denotes the number of nodes and  $0 < c \leq 1$  is configurable constant.
Cases	Measure	Bound
SC-SC	strong/weak primal-dual generalization gap	\(\widetilde{\mathcal{O}}\left(\frac{C_{\lambda}}{T^{\frac{L}{L+\mu}}}+ \frac{T^{1-c}}{n}\right)\) [Thm. 2]
strong/weak primal-dual population risk	\(\mathcal{O}\left(\frac{C_{\lambda}}{T^{\min\{\frac{1}{2}, L+\mu\}}}+\frac{1}{n}\right)\) [Thm. 3]
C-C	weak primal-dual generalization gap	\(\mathcal{O}\left(\frac{1}{(1-\lambda)T}+\frac{1}{n}\right)\) [Thm. 4]
weak primal-dual population risk	\(\mathcal{O}\left(\frac{1}{(1-\lambda)T^{\frac{1}{3}}}+\frac{T^{\frac{1}{3}}}{n}\right)\) [Thm. 5]
NC-NC	weak primal-dual generalization gap	\(\mathcal{O}\left((C_{\lambda}T^{L})^{\frac{1}{c+L}}\left(\frac{m}{n}\right)^{1-\frac{1}{c+L}}\right)\) [Thm. 6]
D-SGDA. Many algorithms [36, 7, 10, 43, 35, 38, 25, 12, 24, 34, 2] have been proposed to solve Problem (1). As for the theoretical part, they mainly focus on analyzing the convergence behavior and communication complexity of their proposed algorithms. Due to the inaccessibility of the data distribution  $\mathcal{D}_i$ , they approximate the expectation value by averaged sum on the training dataset  $S = \{S_1,\dots,S_m\}$  with local samples  $\xi_{i,l_i}$  stored in local dataset  $S_{i} = \{\xi_{i,l_{i}}\}_{1\leq l_{i}\leq n}$ :
$$
\min  _ {\boldsymbol {x} \in \mathcal {X}} \max  _ {\boldsymbol {y} \in \mathcal {Y}} F _ {\mathcal {S}} (\boldsymbol {x}, \boldsymbol {y}), \text {w i t h} F _ {\mathcal {S}} (\boldsymbol {x}, \boldsymbol {y}) = \frac {1}{m} \sum_ {i = 1} ^ {m} F _ {\mathcal {S} _ {i}} (\boldsymbol {x}, \boldsymbol {y}) = \frac {1}{m} \sum_ {i = 1} ^ {m} \frac {1}{n} \sum_ {l _ {i} = 1} ^ {n} f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i, l _ {i}}) \tag {2}
$$
However, it is insufficient to evaluate the stochastic algorithm not to consider the generalization performance, which is roughly the gap between Eq. (1) and Eq. (2). Generally speaking, saddle point of  $F_{S}(\pmb{x}, \pmb{y})$  may not be the optimal solution of  $\min_{\pmb{x}} \max_{\pmb{y}} F(\pmb{x}, \pmb{y})$ . As a result, the model learned by Eq. (2) may not perform well on the test dataset. In fact, the generalization gap is a crucial criterion for us to foresee the performance of the trained model on the unknown dataset. Furthermore, it is quite necessary for us to make a trade-off between the optimization error and the generalization gap to obtain models with optimal population risk (see Eq. (1)).
Concerning the stability and generalization of the minimax problem, several works [19, 30, 9, 42] have studied the generalization gap and population risk of some algorithms, including SGDA, SGDmax, PPM, and AGDA. However, these results cannot be directly extended to the decentralized case due to the additional communication step during the training process. Intuitively, the number of nodes and communication topology in decentralized training may exert a potential influence on the model's generalizability. Note that even for the decentralized minimization problem, the generalization and stability of decentralized SGD are adversely affected by an extra non-vanishing term [32], and the stability usually suffers from a constant term  $\lambda^2$  [44], compared to vanilla SGD. Building upon these findings, we argue that it is worthy to investigate the generalization and stability of D-SGDA for decentralized minimax problems, where there do exist more newly unveiled problems.
To mitigate this theoretical deficiency, we present the first comprehensive analysis of the stability and generalization of D-SGDA for the decentralized minimax problem in this paper. Specifically, we develop a refined stability analysis in a decentralized manner and derive the generalization gap and population risk for D-SGDA under different settings. The main theoretical results are summarized in Table 1. And our main contributions are summarized as follows:
- First work on the stability and generalization of D-SGDA for decentralized minimax problem. We extend the concepts of algorithmic stability, which includes argument stability and weak stability, to the decentralized setting. And we establish a universal connection between argument stability and different measures of generalization gap in the framework of decentralization. We propose a subtle technique to distribute the "different" samples in the neighboring datasets among agents by methods of permutation and combination.
- New theoretical results. Our theoretical results reveal that decentralized structure does not hurt the stability and generalizability of D-SGDA compared with SGDA and explain how topology of the communication network influences the performance in strongly-convex-strongly-concave,
convex-concave, and nonconvex-nonconcave conditions (see Table 1,2). We also evaluate the optimization error and leverage it with generalization gap to obtain the optimal population risk.
- Experiments. We provide several numerical experiments on AUC maximization (C-C) and adversarial learning (NC-NC) in which we vary different factors to support our theoretical findings. The preliminary experimental results align with our theoretical insights.
Decentralized minimax problem. Existing works mainly focus on improving the convergence rate and communication complexity. Liu et al. [23] propose DPOSG, which is firstly applied in case of nonconvex-nonconcave, i.e., GAN training, and they prove  $\mathcal{O}(\epsilon^{-12})$  computational complexity and  $\mathcal{O}(log(1 / \epsilon))$  communication complexity on the busiest node. Xian et al. [36] propose DM-HSGD with convergence rate of  $\mathcal{O}(\kappa^3\epsilon^{-3})$  and Chen et al. [7] propose DREAM with communication rounds of  $\mathcal{O}(\kappa^2\epsilon^{-2} / \sqrt{1 - \lambda_2})$  in nonconvex-strongly-concave condition. Chen et al. [6] propose SPIDER-GDA and achieve stochastic first-order oracle of  $\mathcal{O}((n + \sqrt{n}\kappa_x\kappa_y^2)\log (1 / \epsilon))$  under two-sided PL condition. Rogozin et al. [31] propose a Mirror-prox based algorithm with  $\mathcal{O}(\epsilon^{-1})$  communication complexity in C-C setting. Huang [15], Luo and Ye [25] accelerates by variance reduction. Beznosikov et al. [3] considers time-varying networks with heterogeneous data, Kovalev et al. [18] provides a rigorous complexity for decentralized variational inequalities.
Stability and generalization. There are mainly two approaches to investigating the generalization: algorithm-independent generalization, which is also called uniform convergence generalization, and algorithm-dependent generalization respectively. Where the former may degrade to a vacuous conclusion in [28] and we adopt the latter method in our paper which can better explain the generalization behavior of a detailed algorithm. Bousquet and Elisseeff [4] come up with algorithmic stability, Elisseeff et al. [8] extend the concept to randomized algorithms. Hardt et al. [13] further develop the framework by connecting algorithmic stability with the generalization gap. Sun et al. [32] and Zhu et al. [44] extend the generalization and stability analysis to D-SGD. In the minimax problem, Zhang et al. [42] focus on argument stability and prove  $\mathcal{O}(1/n)$  weak and strong generalization bounds for the SC-SC condition; Farnia and Ozdaglar [9] analyze the uniform stability and generalization gap of GDA, GDmax, and PPM (proximal point method) in the case of NC-NC and Lei et al. [19] summarize the connection between different measures of stability and generalization gap and further develop the corresponding high-probability results. Xing et al. [37] specify the generalization gap for adversarial training and Yang et al. [39] investigate the stability-based generalization of SGDA with differential privacy constraints. Ozdaglar et al. [30] propose a new metric to better evaluate the generalization performance even in the case when the existing metric fails.
In this section, we provide the necessary assumptions, notations, terminologies of population risk, generalization gap, and algorithmic stability in decentralized minimax problems.
3.1 Basic Assumptions
Notations. We use bold lower case to denote vectors and bold upper case to denote matrices.  $\| \cdot \| _2$  means  $\ell_2$  norm for vectors and  $\| \cdot \| _F$  means Frobenius norm for matrices, and we will omit the subscript when the type of norm is clear from the context.  $\mathbb{1}_n\in \mathbb{R}^n$  denotes the all-one vector and  $\lambda_{i}(\cdot)$  represents the  $i$ -th largest eigenvalue of a matrix.  $[n]\coloneqq \{1,2,\dots,n\}$ .
Assumption 1 (Lipschitz continuous). Each local function  $f_{i}$  is differentiable and there exists  $G > 0$  that  $f_{i}$  is  $G$ -Lipschitz continuous with respect to both  $x$  and  $y$  on any given sample  $\xi_{i}$ , i.e.,
$$
| f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) - f _ {i} (\boldsymbol {x} ^ {\prime}, \boldsymbol {y} ^ {\prime}; \xi_ {i}) | \leq G \left\| \left( \begin{array}{c} \boldsymbol {x} - \boldsymbol {x} ^ {\prime} \\ \boldsymbol {y} - \boldsymbol {y} ^ {\prime} \end{array} \right) \right\| _ {2}.
$$
Assumption 2 (Lipschitz smooth). Each local function  $f_{i}$  is differentiable and there exists  $L > 0$  that  $f_{i}$  is  $L$ -Lipschitz smooth with respect to both  $x$  and  $y$  on any given sample  $\xi_{i}$ , i.e.,
$$
\left\| \left( \begin{array}{c} \nabla_ {\boldsymbol {x}} f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) - \nabla_ {\boldsymbol {x}} f _ {i} (\boldsymbol {x} ^ {\prime}, \boldsymbol {y} ^ {\prime}; \xi_ {i}) \\ \nabla_ {\boldsymbol {y}} f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) - \nabla_ {\boldsymbol {y}} f _ {i} (\boldsymbol {x} ^ {\prime}, \boldsymbol {y} ^ {\prime}; \xi_ {i}) \end{array} \right) \right\| \leq L \left\| \left( \begin{array}{c} \boldsymbol {x} - \boldsymbol {x} ^ {\prime} \\ \boldsymbol {y} - \boldsymbol {y} ^ {\prime} \end{array} \right) \right\| _ {2}.
$$
Definition 1 (Convexity-Concavity). For each local loss function  $f_{i}(\pmb {x},\pmb {y};\xi_{i})$ , we say that  $f_{i}$  is  $\mu_{\pmb{x}}$ -strongly convex on  $\pmb{x}$  if for any given  $\pmb{y}$  and on any given sample  $\xi_{i}$ , there holds:
$$
f _ {i} \left(\boldsymbol {x} ^ {\prime}, \boldsymbol {y}; \xi_ {i}\right) \geq f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) + \nabla_ {\boldsymbol {x}} f _ {i} \left(\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}\right) ^ {T} \left(\boldsymbol {x} ^ {\prime} - \boldsymbol {x}\right) + \frac {\mu_ {x}}{2} \| \boldsymbol {x} ^ {\prime} - \boldsymbol {x} \| ^ {2}, \mu_ {\boldsymbol {x}} \geq 0, \forall \boldsymbol {x}, \boldsymbol {x} ^ {\prime}.
$$
we say that  $f_{i}$  is  $\mu_{\pmb{y}}$ -strongly concave on  $\pmb{y}$  if for any given  $\pmb{x}$  and on any given sample  $\xi_{i}$ , there holds:
$$
f _ {i} (\boldsymbol {x}, \boldsymbol {y} ^ {\prime}; \xi_ {i}) \leq f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) + \nabla_ {\boldsymbol {y}} f _ {i} (\boldsymbol {x}, \boldsymbol {y}; \xi_ {i}) ^ {T} (\boldsymbol {y} ^ {\prime} - \boldsymbol {y}) - \frac {\mu_ {\boldsymbol {y}}}{2} \| \boldsymbol {y} ^ {\prime} - \boldsymbol {y} \| ^ {2}, \mu_ {\boldsymbol {y}} \geq 0, \forall \boldsymbol {y}, \boldsymbol {y} ^ {\prime}.
$$
We can call it is convex w.r.t.  $\pmb{x}$  when  $\mu_{\pmb{x}} = 0$  and concave w.r.t.  $\pmb{y}$  when  $\mu_{\pmb{y}} = 0$ .
Remark 1. Assumptions about the Lipschitz continuity and smoothness are commonly used in the context of decentralized minimax optimization problems [42, 9, 32].
3.2 Decentralized Stochastic Gradient Descent Ascent (D-SGDA)
In decentralized setting, each node will exchange information alternatively and we represent the communication network between nodes as  $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , which is a connected graph with node set  $\mathcal{V} = \{1,2,\dots,m\}$  and edge set  $\mathcal{E} \subseteq \mathcal{V} \times \mathcal{V}$ . Specifically,  $(i,l) \in \mathcal{E}$  indicates that agent  $l$  can receive information from agent  $i$  and therefore we symbolize the in and out neighbors as  $\mathcal{N}^{in}(i) \triangleq \{l \in \mathcal{V}, (l,i) \in \mathcal{E}\}$  and  $\mathcal{N}^{out}(i) \triangleq \{l \in \mathcal{V}, (i,l) \in \mathcal{E}\}$  respectively. In an undirected graph, there is no consideration about the order, thus  $(i,l) \in \mathcal{E}$  implies  $(l,i) \in \mathcal{E}$  and the in and out neighbors are identical which we will abbreviate as  $\mathcal{N}$  for brief. In our work, we focus on undirected graphs. The communication graph is associated with an adjacency matrix, which is also called a mixing matrix,  $\boldsymbol{W} = [\omega_{ij}] \in \mathbb{R}^{m \times m}$ . It implies the connection between  $m$  agents that  $\omega_{ij} > 0$  if and only if  $(j,i) \in \mathcal{E}$ , otherwise  $\omega_{ij} = 0$ . And there are some basic assumptions about the mixing matrix which is commonly used in decentralized settings [17, 21, 23, 32].
Assumption 3 (Mixing matrix). We assume the mixing matrix  $\mathbf{W} = [\omega_{ik}] \in [0,1]^{m \times m}$  defined on the graph  $\mathcal{G} = (\mathcal{V},\mathcal{E})$  is a symmetric doubly stochastic matrix, which holds the property that  $\mathbf{W}^T = \mathbf{W}$  and  $\mathbf{W}\mathbb{1}_m = \mathbb{1}_m, \mathbb{1}_m^T\mathbf{W} = \mathbb{1}_m^T$ . Besides, we assume  $\lambda := \max \{| \lambda_2|, |\lambda_m(\mathbf{W})| \} \in (0,1)$ .
For a symmetric doubly stochastic matrix,  $\mathbf{W}$  holds the property that:  $\lambda_1 = 1$ . For different topologies,  $\lambda \rightarrow 1$  implies the sparsity while  $\lambda \rightarrow 0$  implies the complete connection. Nedic et al. [29] and Ying et al. [40] list upper bounds for the spectral gap  $1 - \lambda$  over the commonly communication network. More knowledge on decentralized optimization is placed in Appendix A.
In this paper, we study the decentralized minimax problem solved via D-SGDA (see Algorithm 1). We use the superscript to denote the  $t$ -th iteration and the subscript to denote the  $i$ -th local agent. During iteration, each client first computes its local gradient approximation by  $\nabla_{\boldsymbol{x}}f_{i}(\boldsymbol{x}_{i}^{t},\boldsymbol{y}_{i}^{t};\xi_{i,j_{t}(i)})$  and  $\nabla_{\boldsymbol{y}}f_{i}(\boldsymbol{x}_{i}^{t},\boldsymbol{y}_{i}^{t};\xi_{i,j_{t}(i)})$  respectively where  $j_{t}(i)$  is randomly chosen from  $[n]$ . Then each client communicates with its neighbor  $\mathcal{N}(i)$  and updates by SGDA.
Algorithm 1 D-SGDA
Initialize:  $\boldsymbol{x}_i^0 = 0; \boldsymbol{y}_i^0 = 0, i = 1, \dots, m$
for  $t = 1,2,\dots ,T$  do
$$
\boldsymbol {x} _ {i} ^ {t + 1} = P _ {\mathcal {X}} \left(\sum_ {k \in \mathcal {N} (i)} \omega_ {i k} \boldsymbol {x} _ {k} ^ {t} - \eta_ {\boldsymbol {x}, t} \nabla_ {\boldsymbol {x}} f _ {i} (\boldsymbol {x} _ {i} ^ {t}, \boldsymbol {y} _ {i} ^ {t}; \xi_ {i, j t (i)})\right)
$$
$$
\boldsymbol {y} _ {i} ^ {t + 1} = P _ {\mathcal {Y}} \left(\sum_ {k \in \mathcal {N} (i)} \omega_ {i k} \boldsymbol {y} _ {k} ^ {t} + \eta_ {\boldsymbol {y}, t} \nabla_ {\boldsymbol {y}} f _ {i} \left(\boldsymbol {x} _ {i} ^ {t}, \boldsymbol {y} _ {i} ^ {t}; \xi_ {i, j _ {t} (i)}\right)\right)
$$
Output:  $\boldsymbol{x}^t = \frac{1}{m}\sum_{i=1}^{m}\boldsymbol{x}_i^t$ ;  $\boldsymbol{y}^t = \frac{1}{m}\sum_{i=1}^{m}\boldsymbol{y}_i^t$
3.3 Generalization Gap
In a sense, we obtain the result by minimizing the empirical one  $F_{S}$  in Eq. (2), which differs from the population one  $F$  in Eq. (1). So we can not guarantee the same performance on the unknown distribution as on the training dataset. And therefore the gap between the empirical one and the population one reflects the ability of generalization. Unlike the standard learning theory which only contains a single variable that can directly define the population risk and empirical risk by the objective function[4]. Owing to the structure of minimax, there are different methods to define the population and empirical risk as concluded in [19], where primal-dual measure starts from the idea of duality gap in optimization. And we first introduce two types of population risks as follows.
Definition 2 (Population risk). For a randomized model  $(x, y)$ , we define the population risk as:
1. Weak primal-dual population risk:  $\Delta^w (\pmb {x},\pmb {y}) = \sup_{\pmb{y}'\in \mathcal{Y}}\mathbb{E}[F(\pmb {x},\pmb{y}')] - \inf_{\pmb{x}'\in \mathcal{X}}\mathbb{E}[F(\pmb{x}',\pmb{y})]$
2. Strong primal-dual population risk:  $\Delta^s (\pmb {x},\pmb {y}) = \mathbb{E}[\sup_{\pmb {y}'\in \mathcal{Y}}F(\pmb {x},\pmb {y}') - \inf_{\pmb{x}'\in \mathcal{X}}F(\pmb {x}',\pmb {y})]$
Here the expectation is taken over the randomness of the model. By replacing function  $F$  with function  $F_{S}$  (see Eq. (2)) in Def. 2 when considering the empirical risk, we obtain the corresponding weak primal-dual empirical risk  $\Delta_S^w (\pmb {x},\pmb {y}) = \sup_{\pmb {y}'\in \mathcal{Y}}\mathbb{E}[F_S(\pmb {x},\pmb {y}')] - \inf_{\pmb{x}'\in \mathcal{X}}\mathbb{E}[F_S(\pmb {x}',\pmb {y})]$  and strong primal-dual empirical risk  $\Delta_S^s (\pmb {x},\pmb {y}) = \mathbb{E}[\sup_{\pmb {y}'\in \mathcal{Y}}F_S(\pmb {x},\pmb {y}') - \inf_{\pmb {x}'\in \mathcal{X}}F_S(\pmb {x}',\pmb {y})]$  respectively. Subtracting the empirical risk from population risk, we can define the generalization gap as follows.
Definition 3 (Generalization gap). For a randomized model  $(\boldsymbol{x},\boldsymbol{y})$ , we define the corresponding generalization gap as:
1. Weak primal-dual generalization gap:  $\epsilon_{gen}^{w}(\pmb{x},\pmb{y}) = \Delta^{w}(\pmb{x},\pmb{y}) - \Delta_{S}^{w}(\pmb{x},\pmb{y})$
2. Strong primal-dual generalization gap:  $\epsilon_{gen}^{s}(\pmb{x},\pmb{y}) = \Delta^{s}(\pmb{x},\pmb{y}) - \Delta_{\mathcal{S}}^{s}(\pmb{x},\pmb{y})$
Remark 2. Notice that we revise the name as generalization gap to avoid misunderstanding since "generalization error" usually refers to the empirical risk in learning theory (see [4]). Our primal target (see Problem (1)) is to obtain small population risk (Def. 2) which can be considered as a summation like  $\Delta^w (\pmb {x},\pmb {y}) = \epsilon_{gen}^w (\pmb {x},\pmb {y}) + \Delta_S^w (\pmb {x},\pmb {y})$ , where generalization gap reflects how well the model generalizes and empirical risk reflects the optimization performance. The strong primal-dual risk is stronger than the weak one due to  $\Delta^w (\pmb {x},\pmb {y})\leq \Delta^s (\pmb {x},\pmb {y})$  according to Jensen's inequality. But in some cases, it is sufficient to bound weak primal-dual population risk such as the MDP [42].
3.4 Algorithmic Stability
Inspired by [13] that the generalization gap of an  $\epsilon$ -stable algorithm can be bounded by  $\epsilon$ . And this connection between stability and generalization for minimax problem is furthermore established in [19]. For a randomized algorithm  $\mathcal{A}$  solving the problem (2), we use  $\mathcal{A}(\mathcal{S}) = (\mathcal{A}_x(\mathcal{S}), \mathcal{A}_y(\mathcal{S}))$  to denote the output of applying algorithm  $\mathcal{A}$  on dataset  $S = \{S_1, \dots, S_m\}$ . Let  $\mathbb{E}_S$  and  $\mathbb{E}_{\mathcal{A}}$  denote taking expectation on the randomness of the algorithm  $\mathcal{A}$  and the dataset  $S$  respectively. Sometimes we omit the subscript as  $\mathbb{E}[\cdot]$  when it is clear from the context. Next, we first refine the definitions of algorithmic stability in a decentralized manner and then provide a connection between algorithmic stability and generalization gap in the framework of decentralization.
Definition 4 (Decentralized neighboring dataset). We call  $S, S'$  the decentralized neighboring datasets when there are at most one different sample in each local dataset, where  $S = \{S_1, S_2, \ldots, S_m\}$ ,  $S' = \{S_1', S_2', \ldots, S_m'\}$  and each  $S_i$  and  $S_i'$  differs by at most one sample.
Definition 5 (Decentralized algorithmic stability). For a randomized algorithm  $\mathcal{A}$ , we say:
1.  $\mathcal{A}$  is  $\epsilon$ -argument stable if there holds for any neighboring datasets  $S, S'$ :