FL Nodes

Definition

FL nodes are participants in a decentralised learning system where multiple entities collaboratively train a shared machine learning model without exchanging their local data. These nodes can be any devices or servers contributing computational resources and data to the training process.

Description

FL nodes play critical roles in ensuring the integrity and efficiency of the FL Alliance working process. They are randomly allocated the roles of proposers and voters with the goal of avoiding collusion and other malicious behaviours. By distributing these roles randomly, the system ensures a fair and unbiased approach to model training and evaluation.

Specifically, developers join as FL nodes to collaboratively train a global model while using their local data and computing power. They are randomly allocated the following roles:

  • Proposers: Responsible for performing local training using their own data and proposing updates to the global model.

  • Voters: Responsible for aggregating local model updates, evaluating the global model, and casting votes to either support or oppose the proposed updates.

Slash and Reward Mechanism

  • Reward: Participants are incentivised through rewards for honest participation and accurate contributions to the model training and evaluation process. Rewards are given to those whose votes align with the majority decision and to proposers when the majority supports their updates.

  • Slash: Participants face penalties in the form of slashing their staked tokens if their votes do not align with the majority decision. This mechanism discourages malicious behavior and ensures that participants act in the best interest of the model's integrity.

Motivation

The motivation behind this FL Alliance system is to create a decentralised and secure environment for federated learning. By using random functions to allocate roles and a staking mechanism to ensure commitment, the system promotes trust and reliability among participants. The slash and reward mechanism further incentivises honest behaviour, ensuring the collaborative effort results in a high-quality global model.

Example

The steps to calculate reward for a participant are as followed:

  1. Calculate the number of rounds left:

roundsLeft=totalNumberOfRounds(currentRound1)\begin{align*} \text{roundsLeft} &= \text{totalNumberOfRounds} - (\text{currentRound} - 1) \end{align*}
  1. Calculate the reward amount for the current round:

roundRewardAmount=rewardPoolroundsLeft\begin{align*} \text{roundRewardAmount} &= \frac{\text{rewardPool}}{\text{roundsLeft}} \end{align*}
  1. Calculate the proportion of stakes for the participant:

proportion=roundStakedTokens[_round][participant]roundTotalStakesForGoodParticipants\begin{align*} \text{proportion} &= \frac{\text{roundStakedTokens}[\_round][\text{participant}]}{\text{roundTotalStakesForGoodParticipants}} \end{align*}
  1. Calculate the reward amount for the participant:

rewardAmount=roundRewardAmount×proportion\begin{align*} \text{rewardAmount} &= {\text{roundRewardAmount} \times \text{proportion}} \end{align*}

Let’s say we have 4 participants participating in the FL Alliance. In each round, 2 of them are randomly assigned to the role of proposer, the other 2 are assigned as voters. Participant A and B both staked 50 FML respectively, whereas participants C and D staked 100 FML respectively. Let’s assume further that there are 4 rounds of training in total.

Assuming all are honest participants (meaning no one will get slashed), their respective rewards are:

ParticipantsInitial StakeRewards in Round 1Rewards in Round 2Rewards in Round 3Rewards in Round 4

Participant A

50

91.66666667

133.3333333

175

216.6666667

Participant B

50

91.66666667

133.3333333

175

216.6666667

Participant C

100

183.3333333

266.6666667

350

433.3333333

Participant D

100

183.3333333

266.6666667

350

433.3333333

Total Stake Amount of All Good Participants Per Round

300

550

800

1050

1300

Reward Pool (remaining)

1000

750

500

250

0

Reward Amount Per Round

N/A

250

250

250

250

Last updated