Federal learning device scheduling optimization method based on fairness and consistency optimization
By constructing a two-layer federated learning scheduling mechanism, optimizing device selection and model aggregation, the problems of high latency, poor fairness, and insufficient consistency caused by device heterogeneity in cross-device environments are solved, achieving more efficient global model training and better model accuracy.
Patent Information
- Application Number
- CN202611570177.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-12
- Publication Date
- 2026-11-06
AI Technical Summary
Traditional federated learning methods suffer from high latency, poor fairness, and insufficient model consistency in cross-device environments due to heterogeneity in device computing power, communication bandwidth, and availability. In particular, they are prone to disrupting the statistical consistency of the global model under non-uniform device sampling.
We adopt a device scheduling method based on fairness and consistency optimization. By constructing a two-layer federated learning scheduling mechanism, we design a self-normalized inverse probability weighted aggregation model and device selection strategy. Combined with evolutionary warm-up and online hierarchical scheduling, we optimize device selection and model aggregation.
It improves the global model accuracy, reduces the cost of a single training round, and enhances the fairness of device participation and the statistical consistency of the model, especially performing well in highly heterogeneous and non-independent i.i.d. environments.
Smart Images

Figure CN123048355A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of federated learning technology, and in particular to a method for optimizing the scheduling of federated learning devices based on fairness and consistency. Background Technology
[0002] Traditional centralized machine learning methods, which require uploading large amounts of raw data to a central server for unified training, not only incur significant communication overhead but also pose serious risks of data privacy breaches. To address these issues, federated learning, a distributed machine learning method that protects data privacy, has emerged. Federated learning allows the central server to select a small number of available devices for local model training in each round, and achieves global aggregation by uploading updated model parameters instead of the original data. Due to its advantages in privacy protection and communication efficiency, federated learning has been widely applied in cross-device scenarios such as smartphones and the Internet of Things (IoT).
[0003] However, in real-world cross-device federated learning deployments, devices face significant heterogeneity in terms of computing power, communication bandwidth, and availability. Traditional naive or purely random device sampling strategies are inefficient and easily dragged down by underperforming devices, leading to excessively high latency in single-round training. Simultaneously, due to the continuous differences in device availability, this sampling introduces systemic unfairness: some devices are frequently selected, while others, with extremely low participation rates, have their local data excluded during long-term training, resulting in bias in the global model. Furthermore, to address latency and fairness issues, existing research typically adjusts the sampling probabilities of devices, but this raises a more fundamental contradiction: when devices participate with non-uniform probabilities, directly aggregating their model updates disrupts the statistical consistency of the global model relative to the data-scale weighted objective. Summary of the Invention
[0004] In view of this, the present invention provides a federated learning device scheduling optimization method based on fairness and consistency optimization, which can improve the global model accuracy, reduce the cost per round, and improve the fairness of device participation and the statistical consistency of the model.
[0005] In a first aspect, the present invention provides a federated learning device scheduling optimization method based on fairness and consistency optimization, the method comprising:
[0006] Step 1: Train federated learning and configure a cross-device federated learning environment; Step 2: Based on Step 1, construct an optimization model for joint equipment scheduling and model aggregation; Step 3: Based on Step 2, design a cross-device federated learning scheduling mechanism based on a two-layer architecture to optimize device scheduling.
[0007] Optionally, step 1 includes: Step 11: Global model initialization; Generate initial global model parameters through random initialization or preset parameters. And send it to all participating devices; Step 12, Local Model Training on Each Device; Using local datasets For the received global model The training process aims to minimize the local loss function. ,in The loss function of the model is and the parameters of the trained local model are . ; Step 13: Upload local model parameters; the device will upload the trained local model parameters. and A local data sample is uploaded to the server; Step 14: Global Model Aggregation; The server aggregates the local model parameters of all devices using a weighted average method to obtain the aggregated global model, where the updated global model parameters... : ; in, The total number of devices participating in the training. The total number of data samples, and Representing the equipment and equipment The number of local data samples; Step 15: Iterative training; redistribute the aggregated global model to each device and repeat the above steps until the global model converges or reaches the preset training rounds.
[0008] Optionally, step 2 includes: Step 21: Global optimization objective of federated learning; set the experimental environment to include... A synchronous cross-device federated learning system with candidate devices, satisfying partial participation constraints; assuming each candidate device... Local storage has For each data sample, the corresponding local empirical loss function is denoted as . The overall global optimization objective of the system is set as minimizing the global loss function weighted by data size. : ; in, Represents global model parameters. This represents a global loss function weighted by data size. This represents the total number of candidate devices. and Indicates the index number of the candidate device. and Representing the equipment and equipment The number of local data samples, Indicates equipment The local empirical loss function; Step 22, Equipment Selection and Model Building; in each round of model training In this scenario, the server only schedules a subset of currently available devices. This triggers the execution of local stochastic gradient descent (SGD) and the uploading of updated parameters, a process that does not involve the transmission of the original data; therefore, the system defines a device selection indicator variable. When the device Select to add to the current round subset hour, Conversely The core decision-making task of the system scheduling module is to calculate and output the edge inclusion probability for each currently available device. ,Right now ; Step 23: A statistically consistent aggregation model based on self-normalized inverse probability weighted IPW; to ensure statistical consistency between the global model update and the target global risk under non-uniform device selection probabilities, a self-normalized inverse probability weighted IPW aggregation module is constructed on the server side; global model update... and parameters for the next round The expressions are as follows: ; ; To control the variance during model updates, a preset lower bound is set for the edge inclusion probability. That is, mandatory constraints ,in It is a constant; when the device side uses near-end regularization to stabilize local training, the server-side aggregate weight model is not modified. Step 24: Participate in the fairness constraint and duality solution model; The Jain fairness index is introduced to construct a long-term participatory fairness evaluation and constraint model. Indicates that the equipment As of the The Jain index, representing the cumulative number of selections up to the end of the round, determines the fairness of participation in the system. The expression is: ; Among them, the index The range of values reflects the evenness of opportunity allocation in the system. The representation system achieves an ideal state of fairness; The online forced system approximates the set target fairness index. Introduce a nonnegative scalar dual multiplier into the optimization model. It is then iteratively updated online after each communication round, and its expression is: ; =max(x,0) represents the non-negative projection operator, used to ensure that the dual multipliers corresponding to the fairness constraints are non-negative.
[0009] Optionally, step 3 includes: Step 31, Runtime Detection and Evolutionary Warm-up Strategy; Design a warm-up module based on offline detection and imitation learning: a. Device Feature Acquisition and Delay Stratification: Before global training begins, the system sends probe commands to each candidate device, collecting two types of surrogate metrics: one is a statistical utility surrogate reflecting the potential contribution of the device to model convergence; the other is a system cost surrogate characterizing hardware and network constraints. Based on the system cost surrogate, the devices are categorized as follows: One latency level to reduce heterogeneity of devices within the group; b. Baseline scoring model construction; for devices within each latency level. The system constructs a baseline scoring function: ; in, As a proxy for statistical utility, As a proxy for system cost, The designated participating debt item is used to compensate for the long-term participation of equipment with downside risk. To balance the hyperparameters of each item; c. Evolutionary Search and Model Training: The system performs a small-scale evolutionary search on a subset of candidate devices. By performing mutation operations on the baseline subset under the premise of satisfying the round time constraint, multiple candidate subsets are generated. Each candidate subset is evaluated based on the verification accuracy per unit clock time, and the subsets with excellent performance are retained and pairwise preferences are extracted. Then, a lightweight ranking model is trained through imitation learning, thereby generating a stable initial priority sequence of devices for each delay level. Step 32: Online hierarchical device scheduling; During the global online training phase, the device edge inclusion probability output by the scheduling module is... Decouple and factorize into the product of the upper-level controller quota and the lower-level selector probability: ; The above decomposition satisfies the following constraints: ; Indicates equipment Delay level to which it belongs This indicates the level of participation in the quota allocation at the higher level. This represents the probability of choosing within a group, determined at the lower level. This indicates the total number of fixed participating devices in a single wheel.
[0010] Optionally, step 32 includes: Step 321, Upper-level strategy: Hierarchical quota control based on multi-objective rewards; The upper-level controller dynamically adjusts the hierarchical quota vector based on the delay feedback from the previous round. The objective function of the upper-level controller is modeled as maximizing a scalar reward function, whose expression is: ; in, The absolute improvement in the accuracy of global model validation. For the first The average time taken by the wheel For the normalized round-trip cost agency of selected equipment, The Jain index represents the system's current accumulated participation fairness. The target fairness index, These correspond to the penalty weight parameters for long running time, high cost, and fairness violation, respectively. Perform online parameter updates using lightweight contextual Bandit or reinforcement learning algorithms; Step 322, Lower-level strategy: Dynamic evaluation and selection of equipment within the group; For any delay level g, the lower-level selection module refines the sorting model generated during the warm-up phase and calculates a dynamic round score for each device: ; in, and These are utility and cost proxies that are updated in real time. For the updated participating debt items, An optional link bottleneck penalty term is used to handle tie-breaking operations for devices with the same score; adaptive coefficients in the model. Dynamic evolution is achieved through a multi-agent collaborative reinforcement learning mechanism, with scalar rewards from the upper-level controller. Maintain consistency in the direction of optimization; Step 323: A probability mapping mechanism based on random rounding; To convert the continuous theoretical within-group selection probability and tiered quotas To transform this into a practical discrete device selection operation, a random rounding module is designed to perform the following operations: ①For latency level Calculate the integer value of the quota benchmark. ; ②Based on dynamic round scoring The devices within the group are sorted in descending order, and the top-ranked devices are directly admitted. The equipment, namely ; ③ If there are fractional quota shares, i.e. Then, with the choice probability With a probability proportional to the number of devices, an additional device is randomly sampled from the remaining device pool at the current level.
[0011] In a second aspect, embodiments of the present invention provide a computer-readable storage medium comprising a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to execute the federated learning device scheduling optimization method based on fairness and consistency optimization in the first aspect or any possible implementation thereof.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the federated learning device scheduling optimization method based on fairness and consistency optimization in the first aspect or any possible implementation of the first aspect.
[0013] The technical solution provided by this invention includes training federated learning and configuring a cross-device federated learning environment; constructing an optimized model for joint device scheduling and model aggregation; and designing a cross-device federated learning scheduling mechanism based on a two-layer architecture to optimize device scheduling. This method optimizes the cross-device federated learning process in a heterogeneous device environment, improves the global model accuracy, reduces the cost per round, and enhances the fairness of device participation and the consistency of model statistics. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating a federated learning device scheduling optimization method based on fairness and consistency optimization provided in an embodiment of the present invention; Figure 2 This is a comparison curve provided by an embodiment of the present invention in the case of non-independent and identically distributed non-IID partitioning of the CIFAR-10 dataset; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention are also intended to include the plural forms unless the context clearly indicates otherwise.
[0018] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0019] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0020] Figure 1 A flowchart of a federated learning device scheduling optimization method based on fairness and consistency optimization provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method includes: Step 1: Train federated learning and configure a cross-device federated learning environment; In this embodiment of the invention, step 1 includes: Step 11: Global model initialization; Generate initial global model parameters through random initialization or preset parameters. And send it to all participating devices; Step 12, Local Model Training on Each Device; Using local datasets For the received global model The training process aims to minimize the local loss function. ,in The loss function of the model (e.g., cross-entropy loss) is used, and the parameters of the trained local model are... ; Step 13: Upload local model parameters; the device will upload the trained local model parameters. and A local data sample is uploaded to the server; Step 14: Global Model Aggregation; The server aggregates the local model parameters of all devices using a weighted average method to obtain the aggregated global model, where the updated global model parameters... : ; in, The total number of devices participating in the training. The total number of data samples, and Representing the equipment and equipment The number of local data samples; Step 15: Iterative training; redistribute the aggregated global model to each device and repeat the above steps until the global model converges or reaches the preset training rounds.
[0021] Step 2: Based on Step 1, construct an optimization model for joint equipment scheduling and model aggregation; In this embodiment of the invention, for cross-device federated learning environments with highly heterogeneous device computing power, communication network bandwidth, and availability status, an optimization model that balances fairness and statistical consistency for joint device scheduling and model aggregation is constructed. Step 2 includes: Step 21: Global optimization objective of federated learning; set the experimental environment to include... A synchronous cross-device federated learning system with candidate devices, satisfying partial participation constraints; assuming each candidate device... Local storage has For each data sample, the corresponding local empirical loss function is denoted as . The overall global optimization objective of the system is set as minimizing the global loss function weighted by data size. : ; in, Represents global model parameters. This represents a global loss function weighted by data size. This represents the total number of candidate devices. and Indicates the index number of the candidate device. and Representing the equipment and equipment The number of local data samples, Indicates equipment The local empirical loss function; Step 22, Equipment Selection and Model Building; in each round of model training In this scenario, the server only schedules a subset of currently available devices. This triggers the execution of local stochastic gradient descent (SGD) and the uploading of updated parameters, a process that does not involve the transmission of the original data; therefore, the system defines a device selection indicator variable. When the device Select to add to the current round subset hour, Conversely The core decision-making task of the system scheduling module is to calculate and output the edge inclusion probability for each currently available device. ,Right now ; Step 23: A statistically consistent aggregation model based on self-normalized inverse probability weighted IPW; to ensure statistical consistency between the global model update and the target global risk under non-uniform device selection probabilities, a self-normalized inverse probability weighted IPW aggregation module is constructed on the server side; global model update... and parameters for the next round The expressions are as follows: ; ; To control the variance during model updates, a preset lower bound is set for the edge inclusion probability. That is, mandatory constraints ,in It is a constant; when the device side uses near-end regularization to stabilize local training, the server-side aggregate weight model is not modified. Step 24: Participate in the fairness constraint and duality solution model; To address the systemic unfairness of some devices not being selected for extended periods in heterogeneous environments, the Jain fairness index is introduced to construct a long-term participation fairness evaluation and constraint model. Indicates that the equipment As of the The Jain index, representing the cumulative number of selections up to the end of the round, determines the fairness of participation in the system. The expression is: ; Among them, the index The range of values reflects the evenness of opportunity allocation in the system. The system represents an ideal state of fairness; however, it should be noted that this fairness index is only used to guide the scheduler's device selection decisions and does not interfere with the weight calculation of the global model aggregation.
[0022] The online forced system approximates the set target fairness index. Introduce a nonnegative scalar dual multiplier into the optimization model. It is then iteratively updated online after each communication round, and its expression is: ; =max(x,0) represents the non-negative projection operator, used to ensure that the dual multipliers corresponding to the fairness constraints are non-negative.
[0023] The system architecture of this invention strictly follows the principle of decoupling scheduling and aggregation: the system's multi-objective performance improvement in single-round cost, training latency and participation fairness depends entirely and solely on the scheduler's dynamic selection optimization of the target device set (i.e., changing the physical distribution of participating devices); the self-normalized inverse probability weighted IPW aggregation rule on the central server side remains strictly unchanged, thereby achieving perfect coordination between the scheduling efficiency of the underlying heterogeneous resources and the statistical consistency of the upper-layer global model.
[0024] Step 3: Based on Step 2, design a cross-device federated learning scheduling mechanism based on a two-layer architecture to optimize device scheduling.
[0025] In this embodiment of the invention, the cross-device federated learning scheduling mechanism based on a two-layer architecture aims to improve the speed at which the model reaches the target accuracy and the fairness of participation by optimizing the selection of the target device, while ensuring the strict consistency of the aggregation logic on the server side. The scheduling mechanism is divided into an evolutionary warm-up stage before global training and an online hierarchical scheduling stage during formal training.
[0026] In this embodiment of the invention, step 3 includes: Step 31, Runtime Detection and Evolutionary Warm-up Strategy; To overcome the cold start problem in the initial stage of the online scheduler, a warm-up module based on offline detection and imitation learning is designed: a. Device Feature Acquisition and Delay Stratification: Before global training begins, the system sends probe commands to each candidate device, collecting two types of surrogate metrics: one is a statistical utility surrogate reflecting the device's potential contribution to model convergence (e.g., recent loss reduction rate normalized based on local data volume); the other is a system cost surrogate characterizing hardware and network constraints (e.g., the sum of local computation time and uplink transmission time). Based on the system cost surrogate, devices are categorized as follows: Latency Tiers are used to reduce heterogeneity among devices within the group; b. Baseline scoring model construction; for devices within each latency level. The system constructs a baseline scoring function: ; in, As a proxy for statistical utility, As a proxy for system cost, The designated participating debt item is used to compensate for the long-term participation of equipment with downside risk. To balance the hyperparameters of each item; c. Evolutionary Search and Model Training: The system performs a small-scale evolutionary search on a subset of candidate devices. By performing mutation operations (such as replacement, addition, and removal) on the baseline subset under the premise of satisfying the round time constraint, multiple candidate subsets are generated. Each candidate subset is evaluated based on the verification accuracy per unit clock time, and the subsets with excellent performance are retained and pairwise preferences are extracted. Then, a lightweight ranking model (such as a linear sorter or a shallow neural network) is trained through imitation learning, thereby generating a stable initial priority sequence of devices for each delay level. Step 32: Online hierarchical device scheduling; During the global online training phase, the device edge inclusion probability output by the scheduling module is... Decouple and factorize into the product of the upper-level controller quota and the lower-level selector probability: ; The above decomposition satisfies the following constraints: ; Indicates equipment Delay level to which it belongs This indicates the level of participation in the quota allocation at the higher level. This represents the probability of choosing within a group, determined at the lower level. This indicates the total number of fixed participating devices in a single wheel.
[0027] In this embodiment of the invention, step 32 includes: Step 321, Upper-level strategy: Hierarchical quota control based on multi-objective rewards; The upper-level controller dynamically adjusts the hierarchical quota vector based on the delay feedback from the previous round. The objective function of the upper-level controller is modeled as maximizing a scalar reward function, whose expression is: ; in, The absolute improvement in the accuracy of global model validation. For the first The average time taken by the wheel For the normalized round-trip cost agency of selected equipment, The Jain index represents the system's current accumulated participation fairness. The target fairness index, These correspond to the penalty weight parameters for long running time, high cost, and fairness violation, respectively. Perform online parameter updates using lightweight contextual Bandit or reinforcement learning algorithms; Step 322, Lower-level strategy: Dynamic evaluation and selection of equipment within the group; For any delay level g, the lower-level selection module refines the sorting model generated during the warm-up phase and calculates a dynamic round score for each device: ; in, and These are utility and cost proxies that are updated in real time. For the updated participating debt items, An optional link bottleneck penalty term is used to handle tie-breaking operations for devices with the same score; adaptive coefficients in the model. Dynamic evolution is achieved through a multi-agent collaborative reinforcement learning mechanism, with scalar rewards from the upper-level controller. Maintain consistency in the direction of optimization; Step 323: A probability mapping mechanism based on random rounding; To convert the continuous theoretical within-group selection probability and tiered quotas To transform this into a practical discrete device selection operation, a random rounding module is designed to perform the following operations: ①For latency level Calculate the integer value of the quota benchmark. ; ②Based on dynamic round scoring The devices within the group are sorted in descending order, and the top-ranked devices are directly admitted. The equipment, namely ; ③ If there are fractional quota shares, i.e. Then, with the choice probability With a probability proportional to the number of devices, an additional device is randomly sampled from the remaining device pool at the current level.
[0028] This mechanism guarantees the absolute validity of factorization at the device level, thus enabling the marginal inclusion probability output by the scheduler to be directly input to the server for self-normalized inverse probability weighted IPW aggregation.
[0029] In embodiments of the present invention, such as Figure 2 As shown, in the non-independent and identically distributed (non-IID) partitioning scenario of the CIFAR-10 dataset, the comparative experimental results of the global model test accuracy as a function of communication rounds are presented. The convergence performance of the method of this invention is compared with that of existing representative baseline algorithms (traditional federated averaging algorithm FedAvg, scheduling algorithm Oort and FedMarl).
[0030] The comparison curves reveal two key advantages: First, in terms of model convergence speed, HERO-FL achieves faster model accuracy with fewer communication rounds in the early and middle stages of training, significantly outperforming traditional FedAvg and existing scheduling algorithms like Oort. Second, regarding final model performance, the method of this invention consistently achieves higher final test accuracy than other baseline methods during the later stages of training convergence, a significant advantage particularly pronounced in highly non-independent and identically distributed (non-IID) environments. Existing schedulers lacking fairness constraints often exacerbate participation imbalance, leading to decreased model generalization performance; however, this invention, by introducing chance fairness constraints based on the Jain exponent, effectively avoids the loss of long-tail data.
[0031] In summary, this invention fully demonstrates that the proposed two-layer cross-device federated learning scheduling mechanism, while jointly optimizing training latency and participation fairness, combined with the self-normalized inverse probability weighted (IPW) aggregation mechanism on the central server side, not only does not reduce the training efficiency of the corresponding model, but also effectively accelerates the convergence of the global model and improves the final model generalization accuracy by making more reasonable and unbiased dynamic selections of heterogeneous devices.
[0032] This invention addresses the heterogeneity challenges in cross-device environments by constructing a cross-device federated learning scheduling mechanism with a two-layer architecture combining evolutionary hot-start and an online hierarchical controller. In the upper-layer strategy, the invention divides devices into multiple latency levels based on runtime detection characteristics and dynamically allocates participation quotas for each level through a controller constrained by round deadlines and the Jain fairness index. In the lower-layer strategy, the edge inclusion probability of each candidate device is dynamically calculated and output by balancing statistical utility and round costs within the layer. Crucially, this invention directly transmits the explicit edge inclusion probability generated by the scheduler to the server, where self-normalized inverse probability weighting (IPW) is used for model updates. This collaborative design of scheduling and aggregation ensures that the improvement in fairness and efficiency comes entirely from device selection decisions, without requiring any heuristic weight modifications at the aggregation level, thus strictly guaranteeing aggregation consistency.
[0033] Through the aforementioned mechanism, this invention improves the speed at which the federated learning global model reaches the target accuracy without altering the server-side aggregation and statistical alignment principles. In practical applications, this method not only significantly reduces the normalization computation cost and system latency per round, but also achieves superior long-term participation coverage compared to existing technologies in highly non-independent and identically distributed (non-IID) data partitioning and extremely heterogeneous environments. This invention provides a novel technical solution for multi-objective optimization and dynamic resource scheduling problems, and is particularly suitable for large-scale distributed scenarios with dynamic fluctuations in device resources and complex network conditions.
[0034] This invention addresses the problems of system unfairness caused by uneven participation, global model statistical inconsistency caused by non-uniform sampling, and excessive training latency and energy consumption in cross-device federated learning in highly heterogeneous device environments.
[0035] The technical solution provided by this invention includes training federated learning and configuring a cross-device federated learning environment; constructing an optimized model for joint device scheduling and model aggregation; and designing a cross-device federated learning scheduling mechanism based on a two-layer architecture to optimize device scheduling. This method optimizes the cross-device federated learning process in a heterogeneous device environment, improves the global model accuracy, reduces the cost per round, and enhances the fairness of device participation and the consistency of model statistics.
[0036] The various steps in the embodiments of the present invention can be performed by an electronic device. This electronic device includes, but is not limited to, tablet computers, portable PCs, and desktop computers.
[0037] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is running, it controls the electronic device containing the computer-readable storage medium to execute the above-described embodiment of the federated learning device scheduling optimization method based on fairness and consistency optimization.
[0038] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the electronic device 21 includes a processor 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the processor 211. When the computer program 213 is executed by the processor 211, it implements the federated learning device scheduling optimization method based on fairness and consistency optimization in the embodiment. To avoid repetition, it will not be described in detail here.
[0039] Electronic device 21 includes, but is not limited to, processor 211 and memory 212. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 21 and does not constitute a limitation on electronic device 21. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.
[0040] The processor 211 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0041] The memory 212 can be an internal storage unit of the electronic device 21, such as a hard disk or RAM of the electronic device 21. The memory 212 can also be an external storage device of the electronic device 21, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or FlashCard equipped on the electronic device 21. Furthermore, the memory 212 can include both internal and external storage units of the electronic device 21. The memory 212 is used to store computer programs and other programs and data required by network devices. The memory 212 can also be used to temporarily store data that has been output or will be output.
[0042] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A federated learning device scheduling optimization method based on fairness and consistency optimization, characterized in that, The method includes: Step 1: Train federated learning and configure a cross-device federated learning environment; Step 2: Based on Step 1, construct an optimization model for joint equipment scheduling and model aggregation; Step 3: Based on Step 2, design a cross-device federated learning scheduling mechanism based on a two-layer architecture to optimize device scheduling.
2. The method according to claim 1, characterized in that, Step 1 includes: Step 11: Global model initialization; Generate initial global model parameters through random initialization or preset parameters. And send it to all participating devices; Step 12, Local Model Training on Each Device; Using local datasets For the received global model The training process aims to minimize the local loss function. ,in The loss function of the model is and the parameters of the trained local model are . ; Step 13: Upload local model parameters; the device will upload the trained local model parameters. and A local data sample is uploaded to the server; Step 14: Global Model Aggregation; The server aggregates the local model parameters of all devices using a weighted average method to obtain the aggregated global model, where the updated global model parameters... : ; in, The total number of devices participating in the training. The total number of data samples, and Representing the equipment and equipment The number of local data samples; Step 15: Iterative training; redistribute the aggregated global model to each device and repeat the above steps until the global model converges or reaches the preset training rounds.
3. The method according to claim 2, characterized in that, Step 2 includes: Step 21: Global optimization objective of federated learning; set the experimental environment to include... A synchronous cross-device federated learning system with candidate devices, satisfying partial participation constraints; assuming each candidate device... Local storage has For each data sample, the corresponding local empirical loss function is denoted as . The overall global optimization objective of the system is set as minimizing the global loss function weighted by data size. : ; in, Represents global model parameters. This represents a global loss function weighted by data size. This represents the total number of candidate devices. and Indicates the index number of the candidate device. and Representing the equipment and equipment The number of local data samples, Indicates equipment The local empirical loss function; Step 22, Equipment Selection and Model Building; in each round of model training In this scenario, the server only schedules a subset of currently available devices. This triggers the execution of local stochastic gradient descent (SGD) and the uploading of updated parameters, a process that does not involve the transmission of the original data; therefore, the system defines a device selection indicator variable. When the device Select to add to the current round subset hour, Conversely The core decision-making task of the system scheduling module is to calculate and output the edge inclusion probability for each currently available device. ,Right now ; Step 23: A statistically consistent aggregation model based on self-normalized inverse probability weighted IPW; to ensure statistical consistency between the global model update and the target global risk under non-uniform device selection probabilities, a self-normalized inverse probability weighted IPW aggregation module is constructed on the server side; global model update... and parameters for the next round The expressions are as follows: ; ; To control the variance during model updates, a preset lower bound is set for the edge inclusion probability. That is, mandatory constraints ,in It is a constant; when the device side uses near-end regularization to stabilize local training, the server-side aggregate weight model is not modified. Step 24: Participate in the fairness constraint and duality solution model; The Jain fairness index is introduced to construct a long-term participatory fairness evaluation and constraint model. Indicates that the equipment As of the The Jain index, representing the cumulative number of selections up to the end of the round, determines the fairness of participation in the system. The expression is: ; Among them, the index The range of values reflects the evenness of opportunity allocation in the system. The representation system achieves an ideal state of fairness; The online forced system approximates the set target fairness index. Introduce a nonnegative scalar dual multiplier into the optimization model. It is then iteratively updated online after each communication round, and its expression is: ; =max(x,0) represents the non-negative projection operator, used to ensure that the dual multipliers corresponding to the fairness constraints are non-negative.
4. The method according to claim 3, characterized in that, Step 3 includes: Step 31, Runtime Detection and Evolutionary Warm-up Strategy; Design a warm-up module based on offline detection and imitation learning: a. Device Feature Acquisition and Delay Stratification: Before global training begins, the system sends probe commands to each candidate device, collecting two types of surrogate metrics: one is a statistical utility surrogate reflecting the potential contribution of the device to model convergence; the other is a system cost surrogate characterizing hardware and network constraints. Based on the system cost surrogate, the devices are categorized as follows: One latency level to reduce heterogeneity of devices within the group; b. Baseline scoring model construction; for devices within each latency level. The system constructs a baseline scoring function: ; in, As a proxy for statistical utility, As a proxy for system cost, The designated participating debt item is used to compensate for the long-term participation of equipment with downside risk. To balance the hyperparameters of each item; c. Evolutionary Search and Model Training: The system performs a small-scale evolutionary search on a subset of candidate devices. By performing mutation operations on the baseline subset under the premise of satisfying the round time constraint, multiple candidate subsets are generated. Each candidate subset is evaluated based on the verification accuracy per unit clock time, and the subsets with excellent performance are retained and pairwise preferences are extracted. Then, a lightweight ranking model is trained through imitation learning, thereby generating a stable initial priority sequence of devices for each delay level. Step 32: Online hierarchical device scheduling; During the global online training phase, the device edge inclusion probability output by the scheduling module is... Decouple and factorize into the product of the upper-level controller quota and the lower-level selector probability: ; The above decomposition satisfies the following constraints: ; Indicates equipment Delay level to which it belongs This indicates the level of participation in the quota allocation at the higher level. This represents the probability of choosing within a group, determined at the lower level. This indicates the total number of fixed participating devices in a single wheel.
5. The method according to claim 4, characterized in that, Step 32 includes: Step 321, Upper-level strategy: Hierarchical quota control based on multi-objective rewards; The upper-level controller dynamically adjusts the hierarchical quota vector based on the delay feedback from the previous round. The objective function of the upper-level controller is modeled as maximizing a scalar reward function, whose expression is: ; in, The absolute improvement in the accuracy of global model validation. For the first The average time taken by the wheel For the normalized round-trip cost agency of selected equipment, The Jain index represents the system's current accumulated participation fairness. The target fairness index, These correspond to the penalty weight parameters for long running time, high cost, and fairness violation, respectively. Perform online parameter updates using lightweight contextual Bandit or reinforcement learning algorithms; Step 322, Lower-level strategy: Dynamic evaluation and selection of equipment within the group; For any delay level g, the lower-level selection module refines the sorting model generated during the warm-up phase and calculates a dynamic round score for each device: ; in, and These are utility and cost proxies that are updated in real time. For the updated participating debt items, An optional link bottleneck penalty term is used to handle tie-breaking operations for devices with the same score; adaptive coefficients in the model. Dynamic evolution is achieved through a multi-agent collaborative reinforcement learning mechanism, with scalar rewards from the upper-level controller. Maintain consistency in the direction of optimization; Step 323: A probability mapping mechanism based on random rounding; To convert the continuous theoretical within-group selection probability and tiered quotas To transform this into a practical discrete device selection operation, a random rounding module is designed to perform the following operations: ①For latency level Calculate the integer value of the quota benchmark. ; ②Based on dynamic round scoring The devices within the group are sorted in descending order, and the top-ranked devices are directly admitted. The equipment, namely ; ③ If there are fractional quota shares, i.e. Then, with the choice probability With a probability proportional to the number of devices, an additional device is randomly sampled from the remaining device pool at the current level.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the federated learning device scheduling optimization method based on fairness and consistency optimization as described in any one of claims 1 to 5.
7. An electronic device, characterized in that, include: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the device, cause the device to perform the federated learning device scheduling optimization method based on fairness and consistency optimization as described in any one of claims 1 to 5.
