Manuscript Offprint
arXiv:2610.03330Cordial Learning: Distributed Training with Correlated Data
Abstract
We consider a distributed learning task with agents that have correlated data. Specifically, the label of an agent depends on the input of other agents for the same sample, and these inputs are also correlated. Correlated data is the reality when agents share the same environment. Existing decentralized methods, such as federated learning, ignore the structure of the problem and perform poorly on correlated data. On the other hand, centralized approaches are infeasible due to privacy and communication constraints. We introduce cordial (correlated and distributed) learning to address this gap by sharing only low-dimensional outputs between the agents while training local models to extract informative signals from peers. This distributed learning induces a game in which the loss function of each agent depends on the models of others. Assuming a linear model, we prove that cordial learning converges with probability one to a globally optimal solution, despite the nonconvex global objective. Experiments on structured multi-digit MNIST tasks demonstrate that cordial learning remains highly effective even in highly nonlinear settings.
Keywords: Federated Learning, Distributed Training, Game Theory, Collaborative Learning, Stochastic Optimization
1. Introduction
When deployed, ML systems rarely operate in a vacuum. Their data comes from a shared environment with many ML systems. Thus, the data of many ML systems can be highly correlated. Current ML architectures are trained in solitude, ignoring any interaction they may encounter after deployment.
In distributed learning, and federated learning (FL) in particular, all edge devices (agents) face the same learning task. The data collected by an edge device is valuable to all others since it extends their effective training dataset. FL then avoids sending explicit data to the server, maintaining user privacy, while still allowing agents to learn from each other's data indirectly.
When ML agents share an environment, one agent's data is helpful not only because more data is better, but mostly because it shows the agent the part of the bigger picture that it cannot see alone. Technically, it means that the label of one agent depends on the input of others. Even if the agents have different ML tasks, so they cannot learn directly from others' data, the data of others contains information that explains their label better.
The current distributed learning paradigm cannot benefit from the correlated data of ML agents that share an environment after deployment. In this paper, we introduce a new paradigm we term cordial learning (CL), since it is correlated and distributed. Similar to FL, CL is concerned with edge devices that each have a private dataset. However, the l-th datapoint of all devices is correlated (input and label), for every index l.
CL is the practical reality in the following example applications:
Multi-Digit MNIST: Each classifier sees a handwritten digit as input. However, the digits of all agents are dependent (e.g., credit card numbers, error correction codes, or the same handwriting). For example, adjacent digits must add up to 10, or all digits tend to equal a common hidden digit.
Remote Sensors: The agents are sensors that collect local environmental features (e.g., temperature, vibration, gas). The task is to classify whether a global phenomenon, such as a fire or earthquake, is occurring. Since all sensors in the same region are exposed to the same event, their data (inputs and labels) are correlated. However, each sensor only observes part of the full picture. Sharing model outputs, rather than raw data, allows the agents to benefit from the collective information while meeting the communication constraints.
Medical Wearables in Shared Environments: Each agent monitors a different patient using wearable sensors that record local physiological signals (e.g., heart rate, skin temperature). The task is to detect the onset of a disease. When patients are nearby, such as on a hospital ward or during an outbreak, their health outcomes are correlated, as infection spreads. In this case, leveraging cross-patient correlations can improve prediction accuracy. However, direct data sharing is prohibited due to privacy constraints. A distributed learning approach that shares only model outputs can enable collaboration without compromising sensitive health data.
Formation Control: A group of moving agents often has to maintain a target formation. Examples are platoons of autonomous vehicles or drones. Each vehicle collects local sensor data (e.g., LiDAR, radar, velocity) and must classify whether to accelerate, maintain speed, or decelerate. Since vehicles influence each other's decisions, especially those of their neighbors, their data is correlated. However, each vehicle observes only partial information. Sharing embedded outputs rather than raw sensory data allows collaborative real-time decision-making while preserving autonomy.
Our goal is to design a distributed training scheme that achieves close to optimal performance in this cordial learning scenario, while maintaining low communication overhead. We measure performance by the sum of loss functions of all agents.
A centralized architecture would collect data from all agents and train one large model to fit their combined input to their combined labels. Then, the central server is needed in real-time, so all devices can send their input data to the server and receive the result back. Such a centralized architecture requires significant communication between a central server and the agents to collect all their data, both in training and in real-time. Then the central server must train a huge ML model with a large dataset to obtain all agent models. Perhaps even worse, collecting user data in the central server can violate user privacy. It also creates a single point of failure. Communication, latency, complexity, and privacy are known issues with any centralized architecture. In the context of cordial learning, the centralized architecture is also data-inefficient. The classification tasks are inherently distributed in the sense that each agent observes a different part of the whole problem. A centralized agent will waste a lot of data “understanding” the distributed nature of the problem (e.g., that there are N digits in the multi-digit example). In other words, since the problem is distributed, a data-efficient architecture will also have to be distributed.
In CL, the learning tasks of the agents are intertwined. If two agents each observe a digit, knowing that both digits are even or odd together, then each agent only needs the other agent to detect the parity of its digit. However, being able to classify a digit is very much related to classifying its parity. On the other hand, only sending the decision is not enough information. If an agent believes that the digit is six, but digits nine and three together are more likely, then this information is lost. A similar tradeoff exists in remote sensors that detect fire - even if one sensor is sure that currently there is no fire in its region, some indicators can help sensors in more sensitive areas to lower their detection threshold.
We propose using an embedded output as the basic communication unit between the agents. The embedding is in the dimension of the output, a short vector compared to the input vectors. This embedded output is similar to the softmax output of a neural network (NN), but not the same. The softmax output of our agents is computed after incorporating the information from other agents, while the embedded output is processed before.
In CL, agents maintain coordination layers dedicated to extracting useful information from the inputs they receive from other agents for the same sample. Thus, each agent simultaneously trains its NN along with these additional layers. This introduces a unique coupling (or interaction) between the agents. The weights of the NN of agent n affect not only the loss of agent n, but also the loss of all other agents, since it changes the information they receive from agent n. As our analysis reveals, this interaction requires careful design. The sum of loss functions is nonconvex even in the linear regression case. Thus, many suboptimal stationary points may exist.
For the linear theoretical model, we show that if the learning of the “coordination layers” is slower than the learning of the embedding layers, then CL is guaranteed to converge to the optimal agent models that minimize the nonconvex sum of loss functions. This happens even though each agent locally optimizes only its loss function, ignoring the effect of its model on the loss of others. This makes CL a scalable, distributed training algorithm that can incorporate many devices, with little communication overhead.
In Bistritz et al. (2020), we designed a distributed distillation scheme in which agents share softmax outputs on common unlabeled data to learn from each other's private data without revealing it. Since softmax is a short vector, the resulting communication overhead is dramatically lower than with FL, and devices with different ML architectures can participate in the training. Distributed distillation does not deal with correlated data. In CL, agents share embedded outputs to learn from other agents about the same sample they are currently learning from.
Game theory and learning have recently become intertwined. The literature on learning in games studies the interaction between players who learn to maximize their reward. Then, convergence to a Nash equilibrium (NE) is guaranteed for various distributed algorithms in many scenarios (Xu et al., 2025; Ratliff et al., 2016; Bistritz et al., 2022; Chasnov et al., 2020; Mazumdar et al., 2020). We study the opposite - how games can help in learning. Game theory has already been proven insightful for learning in generative adversarial networks (GANs; Goodfellow et al., 2020). Unlike the zero-sum games studied in GANs, our players are cooperative and each is an individual ML system (Bistritz and Bambos, 2020).
Distributed learning with linear models that observe local measurements with correlated noise was studied in Hong et al. (2022). The risk functions include a term that penalizes for deviating from neighboring models. In our scenario, players do not necessarily converge to the same model. On the contrary, players may face non-identically distributed data and need to take heterogeneous actions (e.g., the medical wearables example above).
Performative prediction studies a game scenario where the actions of one learner affect both the risk scores and the distributions of the data of the others (Narang et al., 2023; Lin and Zrnic, 2024; Perdomo et al., 2020). The goal is to compute an equilibrium that predicts the behavior of selfish learners. In contrast, our agents are cooperative. Furthermore, given the distribution, the datapoints of different players in Narang et al. (2023) are independent, while ours are correlated. Finally, Narang et al. (2023) assumes that players can observe each other's actions, which is unacceptable in our case since it would mean that players can observe the model parameters of everyone.
CL resembles vertical federated learning (VFL) (Liu et al., 2024). In VFL, the different agents have different nonoverlapping features of the same sample. This means that the inputs of the agents are correlated. However, in VFL, there is one learning task and one label, which only the “active agent” possesses. In contrast, in CL, each agent has its own local learning task and its own label, and the labels are correlated between agents. In this sense, VFL is a special case of CL, where all labels are identical and only one agent orchestrates the learning.
Multitask learning (MTL) (Maurer, 2006) is also concerned with intertwined learning tasks. However, MTL trains a centralized architecture and not distributed agents. Even more important is that MTL is trained for tasks that occur asynchronously in real-time. In contrast, CL trains distributed agents that learn from synchronous correlated data points in real-time.
While successive classification shares the idea of interdependent models, it differs from our setting in several fundamental ways. In pipelines such as Faster R-CNN (Ren et al., 2015), the region proposal network and the final classifier share a common feature extraction backbone, introducing architectural coupling. However, the overall computation proceeds sequentially: region proposals are generated and then classified. In contrast, CL involves a

(a) Centralized agent architecture.

Agent 1


Agent 2


Agent 3


Agent 4

(b) Isolated agents (no communication).

Agent 1

Agent 2
Shared information
Shared information

Agent 3
Shared information
Shared information

Agent 4
(c) Cordial agents with shared information.
Figure 1: Different agent configurations for a digit classification task.
network of distributed agents, each owning a private task and dataset. These agents do not share a backbone or data. Instead, they coordinate through shared latent representations generated during training. Information flows bidirectionally, and learning is formulated as a nonconvex game where each agent's model parameters affect others.
3. Problem Formulation
We consider distributed agents, each on a different device. Agent has a labeled training dataset , where is an input and is a label (either for classification or regression). We assume that is the -th sample of a random vector . The crux of our model is that are statistically dependent. The datasets of all agents are then independent samples of the vector . This can be thought of as one large feature vector that is distributed across agents, which is reminiscent of the idea of vertical federated learning (Liu et al., 2024). However, in cordial learning, each agent has their own learning task with their own label vector.
Ideally, to train the N agents, we would wish to minimize the following empirical risk
for a loss function (e.g., MSE), where is the model parameters of agent n.
A centralized architecture to solve (1) treats the agents as one big model where the input is and the output is . However, each agent can only observe its local data and not for . For this reason, the traditional approach is just to train each model separately, such that the -th agent minimizes its loss function:
3.1 Linear Mean-Squared Error Model
In general ML scenarios, the loss functions can be highly nonconvex and intractable. To capture the essence of the correlated data scenario and analyze the theoretical performance guarantees of cordial learning, we adopt a linear model. In this model, the random label vector of agent i is a linear mixture of the input of all agents:
where and are the unknown distribution parameters, and is a zero-mean noise with variance , that is independent of all .
We assume without loss of generality that and for all . As usual, each agent can preprocess the inputs to satisfy these assumptions. We also assume that for all .
The naive approach to this problem is to ignore the correlation between the agents and train each of them separately, using the following loss function for agent i:
where the norm is the Frobenius norm (throughout the paper).
Such a training scheme is suboptimal. On the other extreme, we could train all agents in a centralized manner, which is encoded in the following loss function for agent i:
so the model parameters are given by the matrices for all . This is equivalent to a large learning model that faces a prediction task with an -dimensional output. By construction, the centralized approach can achieve the minimal training loss. However, centralized training will require each agent to share all its data with all others. Then the central server will still be needed in real-time to collect the inputs from all devices, process them, and send back the results to the agents. The communication overhead of such sharing is infeasible in large networks, especially in real-time. Moreover, sharing explicit data violates user privacy. Last but not least, when the task structure is distributed (e.g., remote fire sensors or medical sensors), a distributed architecture is more data-efficient than a centralized one that wastes data to understand the distributed structure of the problem.
Our goal is to bypass the issues of a centralized training scheme while improving performance over the naive isolated scheme. To that end, we design a distributed learning algorithm where each agent processes the output of each other agent using dedicated coordination layers . The loss function for agent is then given by:
(6)
Therefore, each agent's loss depends on the models of other agents.
Our distributed training approach introduces a continuous game with the agents as players. The action of each player is its local model and for each . At each turn , each agent will choose a new action and . The cost function of a player is just its loss function given in (6). The game induced by (6) presents a conflict between the players. Each player seeks to adjust to minimize their own loss function. However, by doing so they change the loss values of others. In general, pushing in the direction of (defined in Assumption 1 below) conflicts with pushing such that .
Motivated by practical settings, we make the following assumption, which means that the agent model matrices are not arbitrary. Instead, their right processing (as modeled by ) can “filter” the input for all agents. For example, while one agent may only be interested in whether the digit the other sees is even, the first layers that are required to detect the digit from the background are helpful for all agents.
Assumption 1. Define where is the covariance matrix of and . We assume there exists \Lambda_j^i^* such that \Lambda_j^i^* A_j^* = B_j^i for all .
is the optimal linear estimator of from . Therefore, the assumption above means that the information that agent i can potentially extract from its input, given an optimal model, is enough to compute the effect of agent i on all other agents.
Assumption 1 is much weaker than assuming that every improvement of towards also improves the quality of the information received by other agents, i.e., pushes closer to . Such an assumption would have made the game induced by (6) a potential game, with the sum of loss functions as the potential function (Héliou et al., 2017). Nevertheless, the cordial learning game is not a potential game. Often, updates of by agent to decrease its loss function in (6) increase the loss values for other agents.
Although cordial learning can work without Assumption 1, its optimality is based on this assumption. Naturally, the more reasonable this assumption is in a given scenario, the more valuable the information the agent sends to its peers.
Our goal is to design a distributed training algorithm that minimizes the global objective:
In the CL algorithm, agent uses the local variables and for . Thus, is uncorrelated with for every . We then work with the residualized versions of (6) and (7), obtained by replacing with in the loss function of agent .
Assumption 1 implies that and for all and constitute a globally optimal solution of (7) when using the variables, achieving the minimal total MSE . However, the sum of the agents' loss functions is nonconvex (see Appendix B). Each agent's loss is only convex in its own parameters when the other agents' embedding matrices are held fixed. Thus, convergence to a global minimum is not guaranteed even for centralized gradient descent over . This constitutes a major technical challenge in designing a distributed algorithm that optimizes the residualized version of (7).
4. Cordial Learning Algorithm and Performance
We propose a novel algorithm, termed cordial learning (correlated and distributed learning), to deal with the correlated data scenario. In cordial learning (CL), agents only share their embedded outputs and never their explicit datapoints. Then, each agent's model includes coordination layers to process the inputs from other agents. The pseudocode for CL is given in Algorithm 1. To keep it tractable, our theoretical model is linear (Maurer, 2006), but CL applies more broadly to any scenario in which training data is correlated between agents. We support this claim with experiments on deep neural networks (see Section 6).
CL is distributed since each agent calculates the gradients over its local parameters only. Instead of optimizing the global objective (7) directly, each agent optimizes its local objective given in (6). The local loss function depends on for agent , where for , the models of other agents, are treated as constants.
Centralized gradient descent that optimizes (7) would require each agent i to know the gradient of the loss function of agent j with respect to . CL bypasses that, as each agent runs a two-time-scale SGD to minimize its loss function (6) with respect to its parameters alone. The stochastic gradients of an agent employ information sent by others.
In general, SGD does not converge in games. When it does converge, it is to a stationary point that, under mild conditions, is a Nash equilibrium (NE) (Mazumdar et al., 2020), which is typically socially inefficient (Roughgarden, 2015; Sessa et al., 2019). Surprisingly, our main theorem shows that in the game induced by the designed loss functions in (6), a two-time-scale SGD converges to a global minimum of the sum of loss functions.

Figure 2: Cordial Learning information flow
To deal with the correlated input data, each agent subtracts the component that is correlated with from all of its received data, resulting in local data variables . The goal of these local variables is to make the expected gradient with respect to independent of and of (Lemma 3), and also reduce the variance of the stochastic gradients (Lemma 4 and Lemma 5).
Let be the covariance matrix of and . Define and , which is the version of after subtracting the information it holds about . We then have
which implies that agent i, which receives MjXj, can compute MjZj if it knows Cov (MjXj, Xi).
Algorithm 1 Cordial Learning
Initialization: Let be the label vector of agent . Let be the input vector of agent . are initialized with random values for each . Let be sequences that are tuned according to the conditions of Theorem 2.
For training iterations:
-
Sample Batches: Sample two independent batches of data indices uniformly at random from a global index set shared across agents. Stack the local input vectors corresponding to these indices in and , matrices of dimensions .
-
Communication: Send the embedded outputs and to all other agents.
-
Construct Local Variables: For each sample ID in and each , let and . Compute
- Update :
where
and is the projection into the set .
- Update for all :
where
End
To run CL, is needed in computing the stochastic gradients and . Since is unknown, CL constructs two independent estimates of this covariance. At each iteration, two independent batches and are sampled. The batch is used to compute the stochastic gradient, while is used to construct an independent covariance estimate.
For each sample l in , define
The corresponding local variables are
where for , we set .
The covariance estimators are independent of the l-th sample, and independent of each other. CL uses in the stochastic gradient with respect to . In the stochastic gradient with respect to , it uses in the prediction term and the independent in the multiplicative term. As Lemma 3 shows, the resulting stochastic gradients are unbiased.
CL utilizes common randomness between the agents, which generate the correlated samples that correspond to the same sample ID. This can be implemented using traditional epochs where agents go over all datapoints in a pre-agreed order.
The communication between agents in CL can be implemented with or without a central server. The agents communicate both in training and online after deployment, to extract information from the correlation between their online test (unlabeled) samples using the coordination layers they trained offline. At test time, agent i computes using an estimate of obtained from training samples with the final trained models.
Our main theorem states that CL converges with probability 1 to a global minimum of the sum of loss functions of all agents.
Theorem 2 makes a standard SGD assumption on the step sizes of and . On top of that, we assume that the update of the is slower than that of the , formalized by the requirement that .
The projection of into the radius ball is only done when calculating the stochastic gradient . The coordination layers only affect the variance of and not its bias. Hence, this projection ensures that the variance of does not explode. This is guaranteed by the assumption that .
Theorem 2. Consider agents that run cordial learning (Algorithm 1), where the samples of in and are independent within each iteration and IID over . Assume that and satisfy Assumption 1. Let be step size sequences of the embedding layers and coordination layers, respectively, and be the projection radius. Assume that , , and . Further assume that . Then, for all , the loss function
converges to its global minimum with probability 1.
5. Convergence Analysis
In this section, we detail our convergence analysis that leads to the performance guarantees of Theorem 2. Throughout our analysis, we use the following filtration, which summarizes the past iterates of the algorithm:
Lemma 3 below computes the stochastic gradients used in Algorithm 1. Naturally, the stochastic gradient of the loss with respect to the embedding parameters depends on the models of other agents, and on the coordination parameters . However, the expected gradients of the loss function of agent with respect to depend only on . This unique fact is crucial to our analysis. In particular, we can project into a ball with a controlled radius without creating any bias in . Consequently, we can first show the convergence of , which is then used to prove convergence of .
Lemma 3. Let be the covariance matrix between and . Recall that in Algorithm 1, agent i uses, for each sample in the batch, the stochastic gradients
and for an agent
Then, the expectations of the stochastic gradients are given by
and
In particular, the fact that the expected gradient with respect to is suggests that in the absence of noise, will converge to with no consideration to other agents. This would not be the case if each agent took a gradient step to minimize the global objective in (7). The gradient of (7) with respect to has other terms that push to solve .
The next lemma bounds the variances of our stochastic gradients. We see that converges to minimal error only since converges to for other agents, which indicates that learning is coupled between agents. Nevertheless, the convergence of also helps learning , since the variance of the stochastic gradient of tends to decrease as the error of decreases (see (22) in the proof of Lemma 4). This shows that the learning of and is coupled. The decreasing variance of as converges is the reason for working with the local variables, which subtract the influence of from the received variables.
The bounds of Lemma 4 are worst case and therefore do not show the dependence on the convergence error of . They also ignore the dependence on the variance of that decreases in the batch size. The proof of Theorem 2 only needs the bounds as stated in Lemma 4. Performance in practice, of course, benefits a lot from the decreasing variances of the stochastic gradients.
Lemma 4. Let \Lambda_j^i^* be such that B_j^i = \Lambda_j^i^* A_j^*. Recall the stochastic gradients and defined in (16) and (17), for the parameters at iteration . Then for all
and for all i, j, understanding that ,
\mathbb{E}\left\{\left\|\boldsymbol{g}_{\Lambda_{j}^{i}}\left(t\right)\right\|^{2}\left|\mathcal{F}_{t}\right\}=O\left(\sum_{l=1}^{N}\left(1+\left\|\Lambda_{l}^{i}\left(t\right)\right\|^{2}\right)\sum_{k=1}^{N}\left(1+\left\|M_{k}\left(t\right)-A_{k}^{*}\right\|^{2}\right)^{2}\right). \tag{21}Proof Let be the estimated covariance matrix based on the batch samples. Let , which approximates . For sufficiently large constants
Shitrit and Bistritz
\begin{align*}&\frac{1}{4}\mathbb{E}\big\{\big\|\boldsymbol{g}_{M_{i}}\left(t\right)\big\|^{2}\big|\mathcal{F}_{t}\big\}=\\&\mathbb{E}\Big\{\Big\|\left(A_{i}-M_{i}\left(t\right)\right)X_{i}X_{i}^{T}+\sum_{j\neq i}\Big(B_{j}^{i}X_{j}-\Pi_{t}\left[\Lambda_{j}^{i}\left(t\right)\right]M_{j}\left(t\right)\tilde{Z}_{j,0}^{i}\Big)X_{i}^{T}+\nu_{i}X_{i}^{T}\Big\|^{2}\Big|\mathcal{F}_{t}\Big\}\overset{=}{(a)}\\&\mathbb{E}\Big\{\Big\|\left(A_{i}-M_{i}\left(t\right)\right)X_{i}X_{i}^{T}+\sum_{j\neq i}\Big(B_{j}^{i}\left(\tilde{Z}_{j,0}^{i}+\tilde{R}_{j}^{i}X_{i}\right)-\Pi_{t}\left[\Lambda_{j}^{i}\left(t\right)\right]M_{j}\left(t\right)\tilde{Z}_{j,0}^{i}\Big)X_{i}^{T}+\nu_{i}X_{i}^{T}\Big\|^{2}\Big|\mathcal{F}_{t}\Big\}=\\&\mathbb{E}\Big\{\Big\|\left(A_{i}+\sum_{j\neq i}B_{j}^{i}\tilde{R}_{j}^{i}-M_{i}\left(t\right)\right)X_{i}X_{i}^{T}+\sum_{j\neq i}\Big(B_{j}^{i}-\Pi_{t}\left[\Lambda_{j}^{i}\left(t\right)\right]M_{j}\left(t\right)\right)\tilde{Z}_{j,0}^{i}X_{i}^{T}+\nu_{i}X_{i}^{T}\Big\|^{2}\Big|\mathcal{F}_{t}\Big\}\leq\\&\quad3\mathbb{E}\left\{\left\|\nu_{i}X_{i}^{T}\right\|^{2}\right\}+3\mathbb{E}\left\{\Big\|M_{i}\left(t\right)-\tilde{A}_{i}\Big\|^{2}\left\|X_{i}X_{i}^{T}\right\|^{2}\big|\mathcal{F}_{t}\right\}\\&\quad+3N\mathbb{E}\left\{\sum_{j\neq i}\left\|B_{j}^{i}-\Pi_{t}\left[\Lambda_{j}^{i}\left(t\right)\right]M_{j}\left(t\right)\right\|^{2}\Big\|\tilde{Z}_{j,0}^{i}X_{i}^{T}\Big\|^{2}\big|\mathcal{F}_{t}\right\}\leq\frac{<}{(b)}\\&\quad3\mathbb{E}\left\{\left\|\nu_{i}\right\|^{2}\right\}\mathbb{E}\left\{\left\|X_{i}\right\|^{2}\right\}+3\mathbb{E}\left\{\Big\|M_{i}\left(t\right)-\tilde{A}_{i}\Big\|^{2}\right\}\mathbb{E}\left\{\left\|X_{i}X_{i}^{T}\right\|^{2}\right\}\\&\quad+3N\sum_{j\neq i}\left\|B_{j}^{i}-\Pi_{t}\left[\Lambda_{j}^{i}\left(t\right)\right]M_{j}\left(t\right)\right\|^{2}\mathbb{E}\left\{\Big\|\tilde{Z}_{j,0}^{i}X_{i}^{T}\Big\|^{2}\right\}\leq\frac{<}{(c)}\end{align*}where (a) uses that , (b) uses that is independent of and that is independent of the -th sample, and (c) uses that and are bounded.
Similarly, for the stochastic gradient with respect to ,
where in (a) we used that , , are bounded and
The following lemma is not necessary to prove Theorem 2. However, it sheds more light on how CL works. While Theorem 2 shows that the loss of each agent goes to its global minimum, Lemma 5 shows that each effective coordination error converges to zero with probability one. Since is bounded and , we have for all large . Together with (Theorem 2) and the bound (22) in the proof of
Lemma 4, it implies that the variance of has a decreasing upper bound that reaches an error floor, determined by the label noise and covariance estimation.
The assumptions of Lemma 5 essentially rule out redundant dimensions in the learning problem. If a nonzero linear combination of is constant, then some feature observed by one agent is perfectly determined by features observed by the others and can therefore be removed without losing information.
Lemma 5. Assume that no nonzero linear combination of is a constant with probability 1. Then in CL, for each ( ), with probability 1 as .
Proof Let . Without loss of generality, let , and define
Let be the block covariance matrix of , whose block is . Then
Let be the covariance matrix of and . Define
The Schur complement of in is , which equals since . Let be the vector that stacks . If is not full-rank, then there exists such that . However, the variance of is , so is a constant with probability 1, contradicting the assumption. Therefore, is positive definite, implying that its Schur complement is also positive definite.
Therefore,
The proof of Theorem 2 shows that with probability one. Since , it follows that
for every . The same argument applies to every agent i.
6. Experiments
In this section, we test CL numerically. The first set of simulations uses our linear theoretical model, assumed in Theorem 2. The second set goes beyond the linear model and runs CL with deep neural networks that classify the digits of a composite MNIST image.
6.1 Linear Model Simulations
Input Data Generation. We simulated agents. Agent has an input and a label , with and . As assumed in Section 3.1, the inputs have zero mean and are whitened, so that . The inputs of different agents are correlated coordinate by coordinate. For each coordinate , the vector has a correlation matrix , and different coordinates are independent, so that . In every run we draw a new matrix with unit diagonal and off-diagonal entries , where the entries of are drawn uniformly from . Such a matrix is not always positive semidefinite. In that case, we replace it by a nearby correlation matrix: we raise its eigenvalues to at least and rescale it to a unit diagonal. This was needed in about 60% of the runs with , in less than 10% of the runs with , and in none with .
We use two input distributions. In the first, the inputs are Gaussian with correlation matrix . In the second, the inputs have Laplace marginals: we draw Gaussian inputs as before and map every coordinate to , where is the standard normal distribution function and is that of the Laplace distribution with unit variance. The coordinates of each agent stay independent with unit variance, but their correlations across agents change. For Laplacian inputs, , where is the correlation of the transformed coordinates, which we compute from by numerical integration. In the rest of this section, refers to this matrix for Laplacian inputs.
Output Generation. The entries of and are drawn independently from for Gaussian inputs and from a Laplace distribution with scale 0.4 for Laplacian inputs. To ensure that the fixed-point iteration below is a contraction, the coordination matrices of each agent are scaled by
with , where is the spectral norm. We then compute as the fixed point of the Picard iteration
set , and generate the labels as . By construction, Assumption 1 holds and is the optimal linear estimator of from . The labels are noiseless ( ), so the global minimum of the loss (14) of every agent is 0.
Training Procedure. The agents run Algorithm 1. At each iteration, they sample two independent batches and of fresh samples, so the samples are independent across iterations, as Theorem 2 assumes. The stochastic gradients (10) and (12) are averaged over the batch. The initial values and are random, with entries drawn from the same distribution as the entries of and of before scaling. The step sizes and the projection radius are
with , and , and with and such that and . These sequences satisfy all the conditions of Theorem 2: , , and . Isolated agents minimize (4) by SGD with the same step size , using the batch . Each agent trains for 20,000 iterations.
Evaluation. For cordial agents, we report the loss (14) of each agent, which is the objective of Theorem 2, averaged over the N agents. For isolated agents, we report the loss (4). The smallest possible isolated loss is , attained by . We compute both losses in closed form from the known input covariance, so the curves carry no evaluation noise. The residualization in (14) uses the true covariance , while the agents themselves only use the estimates of Algorithm 1. Each configuration was repeated for 100 independent runs, each with new parameters, a new initialization and new samples.
Results. Figure 3 shows the loss of cordial and isolated agents for all six configurations. Isolated agents converge to the best isolated predictor within about 100 iterations. Their median loss is at most 1.6% above the best isolated loss from then on. Cordial agents start with a higher loss, since their coordination matrices are initialized at random, but it drops quickly. After 20 iterations, it is lower than that of the isolated agents in 94–100% of the runs of each configuration, and from iteration 140 on, it is lower in all 600 runs. The loss of cordial agents then keeps decreasing towards the global minimum. After 20,000 iterations, the median ratio between the loss of cordial and isolated agents ranges from 0.36% (N = 8, Gaussian inputs) to 1.4% (N = 32, Laplacian inputs), and it is below 2.4% in every run. On the log-log scale, the loss of cordial agents decreases almost linearly, with a slope between -0.58 and -0.49 from iteration 2,000 to 20,000 in all configurations. The loss therefore decreases like a power of t. The loss at the last iteration is larger with more agents and with Laplacian inputs, while the rate of decrease is about the same in all configurations.
6.2 MNIST-Based Multi-Agent Simulations
Input Data Generation. Each data sample is a horizontal concatenation of N MNIST digits, which forms a image. Agent i sees the i-th digit and has to classify it. The digits of a sample are correlated, and the rule that generates them defines the dataset. Section 6.2.1 uses a deterministic rule (Pairwise-10), and Section 6.2.2 a probabilistic one (a common cause). We vary the amount of data by the number P of MNIST images per digit. The training composites are built from a pool of P MNIST training images of each digit, and the validation composites from a second pool of P training images of each digit, disjoint from the first. The test composites are built from a pool of P MNIST test images of each digit. Therefore, no image appears in two of the three sets. A composite takes a random image from the pool of each of its digits. Pixel values are scaled to . We call one such random construction of the training, validation and test sets a draw of the images.
Isolated agents
Cordial learning
--- Best isolated predictor
N = 8, Gaussian inputs
N = 16, Gaussian inputs
N = 32, Gaussian inputs

N = 8, Laplacian inputs
N = 16, Laplacian inputs
N = 32, Laplacian inputs

Iteration
Iteration
Iteration
Figure 3: Linear model: loss of cordial agents (14) and of isolated agents (4) for N = 8, 16, 32 agents with Gaussian (top) and Laplacian (bottom) inputs. The lines show the median over 100 runs of the loss averaged over the agents, and the shaded bands show the 10th to 90th percentiles across runs. The dashed line is the median loss of the best isolated predictor . The global minimum of the loss of cordial agents is 0. Both axes are logarithmic.
Neural Network Architectures. Every agent runs the LeNet-5-style network of Figure 4. Its embedding layers are conv1 (6 filters of size , padded to keep the size), pool1 ( max pooling), conv2 (16 filters of size ), pool2, conv3 (120 filters of size ), fc1 (84 units) and fc2 (10 units). All layers use ReLU activations, and dropout follows every convolution, every pooling layer and fc1. The output of fc2, after its ReLU, is the embedded output of agent , the analogue of . We compare three architectures:
- Cordial Learning: Each agent sends to all others, both in training and at test time. During training, the communicated embedded outputs are computed with dropout, as in the forward pass. In its layer , agent computes , where are weight matrices and are biases, and its prediction is the softmax of , where has 10 units. The matrices and the bias form the coordination layer, which adds the message term to . It is initialized to zero. The received embedded outputs are treated as constants, so the parameters of agent are updated only by the gradient of its own loss, as in Algorithm 1.
• Isolated Agents: The same network without the message term. The agents do not communicate.
• Centralized Architecture: A single standard CNN that receives the entire image and predicts all the digits jointly. It has three convolutional layers with filters (padded to keep the size), each followed by ReLU and max pooling, a fully connected hidden layer, and an output layer with 10N units, with a softmax over each group of 10. Dropout follows every pooling layer and the hidden layer. The numbers of filters and hidden units are tuned from (6, 16, 120) filters with 128 hidden units, (16, 32, 64) with 128 or 256, and (32, 64, 128) with 256. It is trained on the sum of the losses of all agents.
Training and Evaluation. All models are trained with Adam on batches of 65 composites, reshuffled every epoch. The loss is the sum over the agents of the cross-entropy of each agent's digit. In epoch , the learning rate of all layers except the coordination layers is . The coordination layers are not trained in the first epochs, and after that their learning rate is . Therefore, and , as in Theorem 2. With Adam, however, these are nominal learning rates and not the step sizes of Theorem 2. The delay lets the embeddings become informative before the agents start to rely on them. Isolated agents and the centralized network use the schedule for all their layers.
The hyperparameters of every method were tuned with 4 agents on the validation set of the first draw of the images (see below), separately for every dataset and data size, with the same number of runs for all methods. The initial learning rate is drawn log-uniformly from ( for the centralized network), from (without the largest values for larger ), and the dropout rate from . For cordial agents, is also drawn log-uniformly from , and from a grid that scales with the number of epochs (e.g., for ). For the centralized network, we also tune the numbers of filters and hidden units. For each method, we trained 40 random configurations, then 40 perturbations of the five best, and then retrained the three best with three more random seeds. For Pairwise-10 and for the common-cause dataset with , with and , the candidates also include the configurations of an earlier random search, the same for all methods (12 and 10 per method, respectively, with epoch limits of 1,000 and 120). The configuration with the lowest validation loss, averaged over its four seeds, was selected. Tuning runs stop after 200, 80, and 15 epochs without an improvement of the validation loss for , 100, and 500, respectively, or at an epoch limit of 1,500, 600, and 180 epochs.
With the selected hyperparameters, each method was trained with 10 random seeds for a fixed number of epochs: either the maximal number of epochs for tuning, or 1.5 times this number if one of the selected configurations reached its best validation loss in the last 10% of the tuning epochs. The number of agents changes, but the hyperparameters tuned with 4 agents are kept. We keep the network with the lowest validation loss during training, which we evaluate every 5, 2, and 1 epochs for , and 500 (for cordial agents, from epoch K on), and evaluate it on the test set without dropout. We report the test loss per agent (the sum over agents of the mean test cross-entropy, divided by ) and the test accuracy averaged over the agents. For cordial agents, we also report the test accuracy when the message term is removed, which shows how much the agents rely on the received embedded outputs. The selected hyperparameters are listed in Table 1.
DISTRIBUTED TRAINING WITH CORRELATED DATA
| Dataset | P | Cordial learning | Isolated agents | Centralized | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| K | Drop. | Drop. | Width | Drop. | |||||||||
| Pairwise-10 | 25 | 0.0023 | 0.0052 | 50 | 300 | 0.5 | 0.0012 | 300 | 0.5 | 0.006 | 300 | 16-32-64; 128 | 0.5 |
| 100 | 0.0025 | 0.0071 | 100 | 100 | 0.5 | 0.0015 | 100 | 0.25 | 0.0041 | 100 | 16-32-64; 256 | 0.5 | |
| 500 | 0.0011 | 0.018 | 10 | 10 | 0.25 | 0.001 | 30 | 0.25 | 0.0017 | 30 | 32-64-128; 256 | 0.5 | |
| Common, p = 0.8 | 25 | 0.0041 | 0.00017 | 100 | 100 | 0.5 | 0.0018 | 300 | 0.5 | 0.002 | 30 | 32-64-128; 256 | 0.5 |
| 100 | 0.0065 | 0.00019 | 0 | 30 | 0.25 | 0.0017 | 100 | 0.25 | 0.0025 | 100 | 32-64-128; 256 | 0.5 | |
| 500 | 0.001 | 0.0001 | 0 | 30 | 0.25 | 0.0052 | 10 | 0.25 | 0.0015 | 30 | 32-64-128; 256 | 0.5 | |
| Common, p = 0.6 | 25 | 0.004 | 0.0013 | 400 | 30 | 0.5 | 0.0017 | 300 | 0.5 | 0.00075 | 10 | 32-64-128; 256 | 0.5 |
| 100 | 0.0044 | 0.00031 | 10 | 100 | 0.25 | 0.0014 | 30 | 0.25 | 0.0032 | 100 | 16-32-64; 128 | 0.5 | |
| 500 | 0.0014 | 0.00028 | 0 | 30 | 0.25 | 0.0019 | 10 | 0.25 | 0.0012 | 30 | 32-64-128; 256 | 0.5 | |
Table 1: Selected hyperparameters for Pairwise-10 and the common-cause datasets with and (tuned with 4 agents): initial learning rates and , decay constant , start of the coordination layers and dropout rate. The width of the centralized network gives the numbers of filters of its three convolutional layers and the number of hidden units.
With few images, the results depend on which images are drawn into the three pools. We therefore repeated the final runs of all methods on two further independent draws of the training, validation and test pools, with the same hyperparameters, numbers of epochs and random seeds, and report the results of all three draws together (30 runs per method). To compare two methods, we compare every run of one method with every run of the other on the same draw (100 pairs per draw) and report the number of pairs in which the first method has the lower test loss.
The received embedded outputs are not residualized, so the coordination layers use the raw values . Without residualization, the second batch is not needed. We also do not project the coordination layers.

Figure 4: NN Architecture
6.2.1 THE PAIRWISE-10 DATASET
In the Pairwise-10 dataset, the digits of a sample satisfy two rules. The digits at positions , , ... sum to 10, and so do the digits at positions , , ... The valid tuples of digits are therefore , and for , with . In particular, the digit of any single agent determines the digits of all other agents. Each of the three sets has P composites of every valid tuple, that is, 9P composites. We report P=25, 100, and 500, from 225 to 4,500 composites per set. The final runs have 2,250, 600, and 180 epochs, respectively.
Results. Figure 5 shows the test loss during training for P = 25, 100 and 500, and Table 2 lists the test loss and accuracy of the selected networks. CL is much better than isolated training in every setting. For P = 25, the median test loss per agent of isolated agents is 0.45, 0.30 and 0.30 for 2, 4 and 6 agents. Cordial learning reduces it to 0.23, 0.014 and 0.0028, and raises the median accuracy from 0.88, 0.91 and 0.91 to 0.94, 0.996 and 1.000. For P = 500, isolated agents reach an accuracy of 0.98 and a test loss of 0.06–0.07, and CL reduces the test loss to 0.008, 0.0009 and less than . In every setting, every run of CL has a lower test loss than every run of isolated agents on the same draw, except for 2 agents with P = 25, where this holds for 297 of the 300 pairs of runs. The gain grows with the number of agents, which is expected, since every additional agent brings another view of the same information. The draw of the images matters for P = 25: the median test loss of isolated agents with 2 agents is 0.31, 0.47 and 0.49 on the three draws, and that of CL is 0.093, 0.30 and 0.26. The advantage of CL holds on every draw.
The centralized network shows what can be achieved when observing all digits. With P = 500, it reaches a test loss of 0.002 for 2 agents and less than 0.0001 for 4 and 6 agents. CL reaches almost the same accuracy (at least 0.998), although the agents only exchange their 10-dimensional embedded outputs and never their inputs or gradients. The centralized network has the lower test loss in most pairs of runs.
With less data, the centralized network often failed to train. With the selected configuration, 47 of its 180 runs with P = 25 and P = 100 did not learn at all: the network predicts the uniform distribution over the nine possible digits for every agent, with a test loss of . This happened in 7, 12 and 15 of the 30 runs with P = 25 and 2, 4 and 6 agents, and in 0, 6 and 7 of the 30 runs with P = 100. This occurred even though none of the four tuning runs of the selected configuration failed. None of the 180 runs of CL with failed, and their lowest accuracy is 0.90. For P = 25 and 2, 4 and 6 agents, the median test loss of CL is 0.23, 0.014 and 0.0028, and that of the centralized network is 0.30, 0.027 and 1.1. Without the runs that did not learn, the median test loss of the centralized network is 0.23, 0.0002 and less than .
The gain of CL comes from the received embedded outputs. When the message term is removed, the accuracy of cordial agents drops to between 0.65 and 0.95, below that of isolated agents in every setting. Cordial agents learn to combine their own image with the embedded outputs of the others, instead of classifying their own digit alone. This fits the structure of Pairwise-10, where a single received embedded output can carry as much information about the digit of agent i as its own image.
Isolated agents Cordial learning Centralized CNN
2 agents, 25 images per digit

4 agents, 25 images per digit
6 agents, 25 images per digit
2 agents, 100 images per digit
4 agents, 100 images per digit
6 agents, 100 images per digit

2 agents, 500 images per digit
4 agents, 500 images per digit
6 agents, 500 images per digit

Epoch
Epoch
Epoch
Figure 5: Pairwise-10: test loss per agent during training of isolated agents, cordial agents and the centralized network. The lines show the median over 30 runs (10 random seeds on each of three draws of the images) and the shaded bands the interquartile range. The sharp drop in the loss of cordial agents is at epoch K, when the coordination layers start training. The vertical axis is logarithmic, and losses below (including losses that are exactly zero in single precision) are drawn at .
6.2.2 THE COMMON-CAUSE DATASETS
In Pairwise-10, the digit of one agent determines the digits of all others. In the common-cause datasets, the dependence is probabilistic and much weaker. A hidden class z is drawn uniformly from , and the digit of each agent is independently equal to z with probability p and uniform on the nine other digits otherwise. The digit of every agent is therefore uniform, and the digits of two agents are equal with probability . For
| P | N | Method | Test accuracy | |||
|---|---|---|---|---|---|---|
| Runs | messages removed | Test loss per agent | ||||
| 25 | 2 | Isolated | 30 | 0.883 | - | 0.454 [0.397, 0.495] |
| Cordial learning | 30 | 0.944 | 0.760 | 0.232 [0.117, 0.302] | ||
| Centralized | 30 (7) | 0.963 | - | 0.299 [0.146, 0.826] | ||
| 4 | Isolated | 30 | 0.913 | - | 0.295 [0.274, 0.421] | |
| Cordial learning | 30 | 0.996 | 0.684 | 0.014 [0.0087, 0.036] | ||
| Centralized | 30 (12) | 0.996 | - | 0.027 [0.00013, 2.197] | ||
| 6 | Isolated | 30 | 0.911 | - | 0.296 [0.191, 0.364] | |
| Cordial learning | 30 | 1.000 | 0.651 | 0.0028 [0.00088, 0.0044] | ||
| Centralized | 30 (15) | 0.547 | - | 1.128 , 2.197] | ||
| 100 | 2 | Isolated | 30 | 0.960 | - | 0.182 [0.161, 0.205] |
| Cordial learning | 30 | 0.993 | 0.928 | 0.022 [0.016, 0.039] | ||
| Centralized | 30 | 0.998 | - | 0.015 [0.0013, 0.071] | ||
| 4 | Isolated | 30 | 0.961 | - | 0.194 [0.159, 0.214] | |
| Cordial learning | 30 | 0.999 | 0.903 | 0.0016 [0.00089, 0.0032] | ||
| Centralized | 30 (6) | 0.999 | - | 0.0017 , 0.015] | ||
| 6 | Isolated | 30 | 0.953 | - | 0.208 [0.189, 0.216] | |
| Cordial learning | 30 | 1.000 | 0.882 | 0.00032 [0.00022, 0.00068] | ||
| Centralized | 30 (7) | 1.000 | - | , 0.023] | ||
| 500 | 2 | Isolated | 30 | 0.981 | - | 0.069 [0.059, 0.073] |
| Cordial learning | 30 | 0.998 | 0.954 | 0.0078 [0.0066, 0.011] | ||
| Centralized | 30 | 0.999 | - | 0.0024 [0.0017, 0.0036] | ||
| 4 | Isolated | 30 | 0.982 | - | 0.063 [0.062, 0.067] | |
| Cordial learning | 30 | 1.000 | 0.910 | 0.00085 [0.00029, 0.0018] | ||
| Centralized | 30 | 1.000 | - | , 0.0016] | ||
| 6 | Isolated | 30 | 0.981 | - | 0.066 [0.064, 0.069] | |
| Cordial learning | 30 | 1.000 | 0.916 | , 0.00013] | ||
| Centralized | 30 | 1.000 | - | , ] | ||
Table 2: Pairwise-10: test accuracy (averaged over the agents) and test loss per agent of the network with the lowest validation loss, median over the runs, with the interquartile range of the loss in brackets. Runs is the number of runs: 30 for , 100 and 500 (three draws of the images, 10 random seeds each); the number of runs that did not learn (test loss ln 9) is given in parentheses. For cordial agents, messages removed is the test accuracy when the message term is removed.
the digits are independent, and as grows, the other agents carry more information about the digit of agent . We report and . As a reference for this information, the best prediction of the digit of an agent from the true digits of the other agents alone has an accuracy of 0.64, 0.74 and 0.79 for with , and 0.38, 0.45 and 0.54 with . Each of the three sets has composites, the same number as in Pairwise-10. All hyperparameters were tuned separately for each value of and , as described above. The final runs have 1,500, 900, and 180 epochs for and 2,250, 900, and 180 epochs for , for , and 500.
Results. Figures 6 and 7 show the test loss during training for p = 0.8 and p = 0.6, and Table 3 lists the test loss and accuracy of all methods.
For and , CL is better than isolated training in every setting and on every draw of the images. It has the lower test loss in 256 to 300 of the 300 pairs of runs for and . Its median test loss is 18% to 35% lower, and its error rate is 15% to 28% lower than that of isolated agents. The gain is larger with 4 and 6 agents than with 2 agents. For and 6 agents the test loss drops from 0.068 to 0.044 and the accuracy rises from 0.982 to 0.987. For , CL is better with 6 agents (274 of 300 pairs, a 9% lower loss); with 2 and 4 agents, the two methods are on par, where CL wins in 155 and 191 of 300 pairs, respectively.
For , the less correlated scenario, the gain of CL depends on the amount of data. For , CL is better on every draw, in 246 to 282 of 300 pairs, with a 7% to 13% lower test loss. For , it is better with 4 agents (210 of 300 pairs) and on par with 2 and 6 agents. For , CL is worse than isolated training with 4 agents on every draw (78 of 300 pairs) and with 6 agents on two of the three draws (98 of 300 pairs), and on par with 2 agents. A likely reason is that the coordination layers overfit. With 225 training composites, the embedded output of a neighbor may identify its digit almost perfectly on the training images but not on new images, and the dependence between the digits is too weak to make up for these errors. Tuning selected the latest start of the coordination layers in its grid ( of 2,250 epochs), which suggests that on the validation set, the received embedded outputs help little.
When the message term is removed, the accuracy of cordial agents drops in every setting with , and in 7 of these 12 settings it falls below that of isolated agents. For example, with p = 0.8, accuracy drops from 0.985 to 0.977 for P = 500 and 4 agents, against 0.980 for isolated agents. Unlike in Pairwise-10, where the received embedded outputs can replace the agent's own image, here they presumably correct the predictions on images whose digit is ambiguous.
For , the centralized network is the best method and its test loss is 19% to 36% lower than that of CL. However, with , it is the worst method, with a test loss of 0.39 to 0.97, against 0.30 to 0.38 for isolated agents and 0.31 to 0.42 for CL. Its validation loss is lowest after a median of 96 to 242 epochs, while CL reaches its lowest validation loss near the end of training (after a median of 1,314 to 2,144 epochs), so the centralized network presumably overfits the 225 training composites. For , 18 of its 90 runs with and 2 of its 90 runs with did not learn at all and stayed at the uniform prediction (test loss ), as in Pairwise-10. CL has a lower median test loss than the centralized network in all settings with , for with and 4 or 6 agents, and for with and 6 agents. Unlike in Pairwise-10, this is not due to the runs that did not learn: without them, the median test loss of the centralized network for is 0.16 and 0.30 for with 4 and 6 agents, and 0.26 for with 6 agents.
Isolated agents — Cordial learning — Centralized CNN
2 agents, 25 images per digit

4 agents, 25 images per digit
6 agents, 25 images per digit
2 agents, 100 images per digit
4 agents, 100 images per digit
6 agents, 100 images per digit
2 agents, 500 images per digit
4 agents, 500 images per digit
6 agents, 500 images per digit
Epoch
Epoch
Epoch
Figure 6: Common-cause dataset with p = 0.8: test loss per agent during training of isolated agents, cordial agents and the centralized network. The lines show the median over 30 runs (10 random seeds on each of 3 draws) and the shaded bands the interquartile range.
Isolated agents Cordial learning Centralized CNN

2 agents, 100 images per digit
4 agents, 100 images per digit
6 agents, 100 images per digit
2 agents, 500 images per digit
4 agents, 500 images per digit
6 agents, 500 images per digit
Epoch
Epoch
Epoch
Figure 7: Common-cause dataset with p = 0.6: test loss per agent during training, as in Figure 6.
| p | P | N | Runs | Test loss per agent | Test accuracy | CL < ISO | |||||
| ISO | CL | Cen. | ISO | CL | CL, removed | Cen. | |||||
| 0.8 | 25 | 2 | 30 | 0.350 | 0.350 | 0.395 | 0.910 | 0.910 | 0.897 | 0.900 | 52% |
| 4 | 30 | 0.298 | 0.310 | 0.827 | 0.914 | 0.911 | 0.891 | 0.771 | 64% | ||
| 6 | 30 | 0.360 | 0.328 | 0.952 | 0.904 | 0.906 | 0.862 | 0.762 | 91% | ||
| 100 | 2 | 30 | 0.203 | 0.166 | 0.952 | 0.961 | 0.955 | 0.971 | 85% | ||
| 4 | 30 | 0.196 | 0.147 | 0.956 | 0.967 | 0.958 | 0.961 | 99% | |||
| 6 | 30 | 0.172 | 0.119 | 0.961 | 0.971 | 0.957 | 0.913 | 99.7% | |||
| 500 | 2 | 30 | 0.080 | 0.061 | 0.039 | 0.980 | 0.983 | 0.978 | 0.989 | 97% | |
| 4 | 30 | 0.079 | 0.051 | 0.035 | 0.980 | 0.985 | 0.977 | 0.991 | 100% | ||
| 6 | 30 | 0.068 | 0.044 | 0.036 | 0.982 | 0.987 | 0.978 | 0.990 | 100% | ||
| 0.6 | 25 | 2 | 30 | 0.334 | 0.341 | 0.428 | 0.912 | 0.909 | 0.908 | 0.878 | 52% |
| 4 | 30 | 0.381 | 0.422 | 0.826 | 0.892 | 0.876 | 0.878 | 0.759 | 26% | ||
| 6 | 30 | 0.319 | 0.326 | 0.975 | 0.916 | 0.908 | 0.899 | 0.703 | 33% | ||
| 100 | 2 | 30 | 0.208 | 0.213 | 0.134 | 0.953 | 0.958 | 0.957 | 0.968 | 43% | |
| 4 | 30 | 0.180 | 0.158 | 0.959 | 0.965 | 0.963 | 0.971 | 70% | |||
| 6 | 30 | 0.191 | 0.195 | 0.952 | 0.954 | 0.950 | 0.936 | 53% | |||
| 500 | 2 | 30 | 0.080 | 0.074 | 0.049 | 0.978 | 0.980 | 0.979 | 0.987 | 82% | |
| 4 | 30 | 0.072 | 0.067 | 0.051 | 0.979 | 0.982 | 0.979 | 0.987 | 93% | ||
| 6 | 30 | 0.072 | 0.063 | 0.050 | 0.981 | 0.982 | 0.979 | 0.988 | 94% | ||
Table 3: Common-cause datasets: median test loss per agent and median test accuracy (averaged over the agents) of isolated agents (ISO), cordial learning (CL) and the centralized network (Cen.). Runs is the number of runs per method (three draws of the images for and 500). CL, removed is the accuracy of cordial agents when the message term is removed. is the fraction of pairs of runs on the same draw in which cordial learning has the lower test loss. A superscript gives the number of runs of the centralized network that did not learn (test loss was ).
7. Conclusions
We studied a distributed learning scenario in which agents' data are correlated. This generalizes the federated learning scenario where agents have independent data. To allow agents to learn from each other, we propose cordial learning, where agents send their embedded outputs to others. The agents train layers to learn how to extract valuable information from the embedded outputs of other agents. For a linear model where the label of an agent is a linear mixture of the inputs of all agents, under mild assumptions, we proved that cordial learning converges to models that minimize the sum of losses of all agents. Experiments on multi-digit MNIST with deep neural networks show that cordial learning performs well even beyond the theoretical model we analyzed.
Our analysis focused on asymptotic convergence to the optimal models. The question of analyzing and optimizing the convergence rate remains open. The related question of proving optimal regret bounds in online learning settings is also open.
Cordial learning is a first step towards studying distributed learning scenarios with correlated data. A challenging open question from this perspective is designing a cordial learning scheme where agents learn how to efficiently compress the information they send based on the loss functions of the receiving agents.
Acknowledgments
This research was supported by the Koret Foundation grant for Smart Cities and Digital Living 2030.
Appendix A. Proof of Lemma 3
We start by writing the stochastic loss:
(27)
Thus the gradient of with respect to is
(28)
where we used the derivative rules and . The stochastic gradient in (16) is (28) with replaced by its projection .
The gradient of with respect to is
Algorithm 1 replaces in the last factor by , which is computed from the independent batch . This gives
With this replacement, the two covariance estimates in each product are independent, which makes (29) unbiased (see (32)).
The expected gradients are as follows:
(30)
where we used
and
Next,
(31) where we used
Here we used that is computed using the leave-one-out samples from , while is computed using the independent batch . Hence, , , and the given sample are mutually independent. Moreover,
Appendix B. Nonconvex Objective
We show that the global objective in (7) is nonconvex, even in the two-agent scalar case. Let , and let and be zero-mean random variables satisfying and .
Consider the noiseless labels and . Then and , so Assumption 1 is satisfied by taking and .
For two scalar agents, the global objective is
where and .
Next we restrict this objective to the affine subspace and . On this subspace,
The Hessian of h is
At ,
whose determinant is -4. Hence, is indefinite, and is not convex.
Since the restriction of a convex function to any affine subspace must be convex, the full objective is not convex. Therefore, the global objective in (7) is nonconvex.
Appendix C. Proof of Theorem 2
We start by proving the convergence of . We have
where (a) uses Lemma 3 and Lemma 4. We also used that is measurable by .
Given the inequality above, we can apply the Robbins-Siegmund Theorem (Robbins and Siegmund, 1971) with (using their notation) , , and . Hence, with probability 1, for all :
and converges to some random variable, which must be zero with probability 1, since any positive probability to be positive would contradict (34), since by assumption.
Now let . We have for some constant
where (a) follows from Lemma 3 and Lemma 4.
To deal with the bias term in (35), we write:
(36)
For the first term in (36), we use the convexity of to obtain
(37)
since by definition of .
For the second term in (36) we use:
(38)
where (a) follows from the Cauchy-Schwarz inequality and the triangle inequality, and (b) uses .
For the third term in (36) we use:
(39)
where (a) follows from the Cauchy-Schwarz inequality and the triangle inequality. In (b) we used that, for , , , , , and , Cauchy-Schwarz and the L1-L2 norm inequality yield
Plugging (36), (37), (39) and (38) into (35), we obtain
Given (41), we can again apply the Robbins-Siegmund Theorem with ,
and
We know from (34) that . Thus, using the assumption that :
(44)
Then, and are also finite since converges to zero with probability 1, and .
Hence, the Robbins-Siegmund Theorem implies that with probability 1, for all i:
and converges to some random variable as . In particular, is bounded.
Define the closed set
which is nonempty by Assumption 1. Let be a countable dense subset of . Applying the preceding Robbins-Siegmund argument to every fixed \mathbf{\Lambda}^i^* \in \mathcal{S}_i^0, and taking the intersection of the resulting probability-one events, shows that, with probability one, \|\mathbf{\Lambda}^i(t) - \mathbf{\Lambda}^i^*\| converges for every \mathbf{\Lambda}^i^* \in \mathcal{S}_i^0. The same conclusion holds for every \mathbf{\Lambda}^i^* \in \mathcal{S}_i since for any \mathbf{\Lambda}^i^* \in \mathcal{S}_i and any sequence converging to \mathbf{\Lambda}^i^*,
uniformly in t.
Moreover, since , (45) implies that
Consequently, there exists a subsequence such that . By boundedness, this subsequence has a further subsequence, which we denote again by , such that . Since is continuous, and hence .
As shown above, has a limit. Along the subsequence , it converges to zero. Therefore, its full-sequence limit is zero, and with probability one. By continuity of , it follows that with probability one.
Together with for every , and the boundedness of , this implies that the loss of each agent , , converges to its global minimum with probability one.
References
Ilai Bistritz and Nicholas Bambos. Cooperative multi-player bandit optimization. Advances in Neural Information Processing Systems, 33, 2020.
Ilai Bistritz, Ariana Mann, and Nicholas Bambos. Distributed distillation for on-device learning. Advances in Neural Information Processing Systems, 33:22593–22604, 2020.
Ilai Bistritz, Zhengyuan Zhou, Xi Chen, Nicholas Bambos, and Jose Blanchet. No weighted-regret learning in adversarial bandits with delays. Journal of Machine Learning Research, 23(139):1–43, 2022.
Benjamin Chasnov, Lillian Ratliff, Eric Mazumdar, and Samuel Burden. Convergence analysis of gradient-based learning in continuous games. In Uncertainty in Artificial Intelligence, pages 935–944. PMLR, 2020.
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. Communications of the ACM, 63(11):139–144, 2020.
Amélie Héliou, Johanne Cohen, and Panayotis Mertikopoulos. Learning with bandit feedback in potential games. Advances in Neural Information Processing Systems, 30, 2017.
Lingzhou Hong, Alfredo Garcia, and Ceyhun Eksin. Distributed networked learning with correlated data. Automatica, 137:110134, 2022.
Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. Foundations and Trends® in Machine Learning, 14(1–2):1–210, 2021.
Anastasiia Koloskova, Sebastian U Stich, and Martin Jaggi. Sharper convergence guarantees for asynchronous SGD for distributed and federated learning. Advances in Neural Information Processing Systems, 35:17202–17215, 2022.
Licong Lin and Tijana Zrnic. Plug-in performative optimization. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 30546–30565. PMLR, 21–27 Jul 2024.
Yang Liu, Yan Kang, Tianyuan Zou, Yanhong Pu, Yuanqin He, Xiaozhou Ye, Ye Ouyang, Ya-Qin Zhang, and Qiang Yang. Vertical federated learning: Concepts, advances, and challenges. IEEE Transactions on Knowledge and Data Engineering, 36(7):3615–3634, 2024.
Andreas Maurer. Bounds for linear multi-task learning. Journal of Machine Learning Research, 7:117–139, 2006.
Eric Mazumdar, Lillian J Ratliff, and S Shankar Sastry. On gradient-based learning in continuous games. SIAM Journal on Mathematics of Data Science, 2(1):103–131, 2020.
Aritra Mitra, Rayana Jaafar, George J Pappas, and Hamed Hassani. Linear convergence in federated learning: Tackling client heterogeneity and sparse gradients. Advances in Neural Information Processing Systems, 34:14606–14619, 2021.
Adhyyan Narang, Evan Faulkner, Dmitriy Drusvyatskiy, Maryam Fazel, and Lillian J Ratliff. Multiplayer performative prediction: Learning in decision-dependent games. Journal of Machine Learning Research, 24(202):1–56, 2023.
Juan Perdomo, Tijana Zrnic, Celestine Mendler-Dünner, and Moritz Hardt. Performative prediction. In International Conference on Machine Learning, pages 7599–7609. PMLR, 2020.
Lillian J Ratliff, Samuel A Burden, and S Shankar Sastry. On the characterization of local Nash equilibria in continuous games. IEEE Transactions on Automatic Control, 61(8):2301–2307, 2016.
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. Advances in Neural Information Processing Systems, 28, 2015.
Herbert Robbins and David Siegmund. A convergence theorem for non negative almost supermartingales and some applications. In Optimizing Methods in Statistics, pages 233–257. Academic Press, 1971.
Tim Roughgarden. Intrinsic robustness of the price of anarchy. Journal of the ACM (JACM), 62(5):1–42, 2015.
Pier Giuseppe Sessa, Maryam Kamgarpour, and Andreas Krause. Bounding inefficiency of equilibria in continuous actions games using submodularity and curvature. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2017–2027. PMLR, 2019.
Jianyu Wang and Gauri Joshi. Cooperative SGD: A unified framework for the design and analysis of local-update SGD algorithms. Journal of Machine Learning Research, 22(213):1–50, 2021.
Zelai Xu, Chao Yu, Yancheng Liang, Yi Wu, and Yu Wang. Learning global Nash equilibrium in team competitive games with generalized fictitious cross-play. Journal of Machine Learning Research, 26(44):1–30, 2025.