Next Article in Journal
Retrieval-Augmented Floor Plan Generation with Pre-Trained Text-to-Image Models: A Saudi Building Code Study
Previous Article in Journal
Four-Channel CIEL*a*b*-Infrared Image Representation for CNN-Based Oil Palm Fresh Fruit Bunch Ripeness Classification
Previous Article in Special Issue
Model-Consistency-Based PRACH Peak Validation Under Large Carrier Frequency Offsets
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Adaptive Hyperparameter Adjustment and Resource Allocation for Federated Learning in the Industrial Internet of Things

1
College of Computer and Artificial Intelligence, Zhengzhou University, Zhengzhou 450001, China
2
State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(17), 3776; https://doi.org/10.3390/electronics15173776
Submission received: 15 July 2026 / Revised: 12 August 2026 / Accepted: 13 August 2026 / Published: 24 August 2026

Abstract

Timely and accurate defect classification is critical for ensuring product quality and safety in industrial inspection scenarios. The widespread deployment of Internet of Things (IoT) devices equipped with sensing, computing, and communication capabilities has promoted the development of AI-enabled industrial applications. However, conventional AI approaches typically rely on centralized data collection and processing, which become impractical in real-world IoT environments due to growing privacy concerns and constrained device resources. To address these challenges, this paper proposes a communication-efficient adaptive federated learning algorithm for heterogeneous defect classification tasks. The proposed approach jointly accelerates the training process through three mechanisms: (i) adaptive local updates that balance communication and computation overheads; (ii) parameter compression that trades off communication cost against model accuracy; (iii) joint bandwidth and computation-power allocation that optimizes per-round communication and computation time across participating devices. We further analyze the joint effects of these three mechanisms and provide a convergence analysis. Extensive simulations show that the proposed method achieves competitive classification accuracy while reducing single-round training time by up to 70%.

1. Introduction

As a foundational element within the framework of Industry 4.0, the Industrial Internet of Things (IIoT) demonstrates remarkable promise in facilitating data-centric automation and operational control within manufacturing and industrial contexts [1]. The pervasive integration of the IIoT alongside the swift advancement of edge artificial intelligence (AI) has facilitated the connection of a large number of IIoT devices to the periphery of the Internet. Each of these devices consistently generates a large amount of data, which requires the use of deep learning (DL) methodologies for data processing to perform various tasks [2].
The conventional approach to centralized training of DL models necessitates a central server to aggregate the raw data produced by devices via wireless transmission, facilitating subsequent processing and analysis. However, in light of communication resource constraints and apprehensions regarding data privacy, it is impractical for all IIoT devices to transmit their data to a central server for the purpose of training DL models [3]. Therefore, the development of an effective and privacy-preserving distributed DL method is of great significance.
Federated learning (FL) is a promising distributed, privacy-preserving learning framework with extensive utility in IIoT domains. FL allows IIoT devices to share local model parameters instead of raw data for the collaborative training of global models, thereby addressing privacy concerns related to data sharing and reducing the communication overhead of DL model training in the IIoT [4,5]. It is important to note, however, that FL alone does not provide a complete privacy guarantee; recent studies have shown that adversaries may reconstruct training samples from shared gradients through gradient leakage attacks. To further strengthen privacy protection, complementary techniques such as secure aggregation and differential privacy can be integrated into the FL pipeline, though each introduces its own trade-offs in terms of communication overhead or model utility. In a typical industrial quality inspection scenario, multiple production lines or workshops are equipped with various inspection devices (e.g., high-resolution cameras, laser scanners, and ultrasonic sensors). These devices have different sensing, computing, and communication capabilities. These devices are often deployed in harsh environments with unstable network conditions, leading to significant heterogeneity in both hardware and communication. Moreover, data heterogeneity naturally arises because different production lines may manufacture different product types or operate under varying lighting and surface conditions, resulting in distinct defect patterns and label distributions across devices. For instance, one line may predominantly produce metal components with scratch defects, while another focuses on plastic parts with bubble or discoloration defects. This data and system heterogeneity poses substantial challenges for conventional federated learning algorithms. Additionally, applying FL to IIoT networks still faces other challenges. The number of parameters in DL models typically ranges from tens of thousands to hundreds of millions, requiring substantial communication resources for IIoT devices to update their local models. However, the operating environments of IIoT devices often constrain their communication bandwidth, posing challenges in meeting the communication demands of DL training. The disparity between the computing and storage requirements of DL models and the limited resources of IIoT devices is exacerbated by the growing complexity of DL models.
To address the above issue, many solutions have been proposed, including training local models for multiple rounds before updating their parameters, compressing local model parameters, and improving resource-allocation efficiency. Performing multiple rounds of local training improves the use of device computing power by reducing frequent model-parameter transmissions. This approach can balance computation and communication by introducing a local model update coefficient [6]. Parameter compression reduces the amount of transmitted data through compression techniques such as quantization and sparsity. A parameter-compression algorithm balances communication and model accuracy by determining the compression coefficient (quantization level), which represents the trade-off between bandwidth and accuracy [7]. Resource allocation aims to alleviate the communication bottleneck [8] and prevent devices from falling behind. Proper allocation of computing and bandwidth resources can determine the duration of a single communication round, balance communication and computation, and optimize device-side communication and computation. To improve the efficiency of federated learning, we study these methods in this paper.
The above three methods have been proven to significantly reduce communication overhead and the duration of individual federated learning rounds. However, the total time consumed by federated learning depends on two factors: (1) the number of communication rounds required to achieve the target model-convergence accuracy; (2) the duration of each communication round. These factors are interdependent and therefore require joint rather than isolated optimization. An effective solution should dynamically adjust the parameters based on historical training information to select the optimal quantization level, local update frequency, computation frequency, and bandwidth allocation, while automatically balancing communication time and model-convergence loss in each training round, thereby accelerating large-scale federated learning.
Our main contributions are summarized as follows:
  • We study the federated learning problem using practical formulations that minimize the global model error through local update coefficients, a compression budget, and client bandwidth and computing-power allocation.
  • We propose a new and efficient adaptive federated optimization algorithm that uses the upper bound of the global model error to adaptively adjust these four variables and improve the efficiency of federated learning.
  • In addition to providing a theoretical analysis of the algorithm, we demonstrate strong empirical performance on the NEU-DET dataset, which achieves faster convergence on Non-IID data.
The remainder of this article is organized as follows. Section 2 reviews the related work. In Section 3, we present the preliminary formulation of federated learning with gradient quantization and provide the convergence analysis. Section 4 introduces the system model and problem formulation. In Section 5 we propose the DDPG-based adaptive resource optimization framework. In Section 6, simulations are conducted to validate the proposed approach. Section 7 concludes the paper.

2. Related Work

(1) Studies on parameter quantification in FL: To alleviate the communication bottleneck in FL, much research has been done to reduce the number of model parameters to be transmitted, such as the works in [9,10,11,12,13,14]. Jhunjhunwala et al. [9] proposed an adaptive quantization strategy named AdaQuantFL, which can achieve convergence with fewer communication bits compared to fixed quantization level settings by varying the number of quantization levels during the training process, while having minimal or almost no impact on training and testing accuracy. Yan et al. [10] proposed an innovative adaptive compressed random gradient descent (AC-SGD) strategy, which aims to optimize the training efficiency and accuracy of the model by dynamically adjusting the quantization bits and the sparsity size in a distributed machine learning environment. Singh et al. [11] proposed and analyzed SQuARM-SGD, which combines momentum update, sparsity and quantization techniques to improve communication efficiency while maintaining the training accuracy of the model. Basu et al. [12] proposed the QSparse local SGD algorithm, which organically integrates active thinning and quantization technology by tracking the subtle difference between the real gradient and the compressed gradient. The experimental results show that, compared to the most advanced technology, the local Qsparse SGD algorithm significantly reduces the number of bits required for transmission when achieving the same target accuracy. Chen et al. [13] proposed a novel communication-efficient distributed Adam for stochastic nonconvex optimization in the parameter-server model, which adopts a two-way quantization scheme and a two-way error feedback strategy between the server and workers. Furthermore, it characterizes the communication complexity between the server and workers when an ϵ -stationary point is achieved. Extensive experiments along with theoretical guarantees justify the advantages of the proposed algorithm. Xu et al. [14] proposed a training-efficient federated learning algorithm aimed at improving training efficiency in edge computing systems by optimizing local update frequency and model compression ratio. Based on the theoretical upper bound of the model convergence rate, the algorithm can adaptively determine the suitable local updating frequency and the model compression ratio for different edge nodes according to their characteristics. Experimental results show that, compared with the baseline methods, the proposed algorithm significantly reduces traffic consumption and training completion time while achieving similar test accuracy.
(2) Studies on multiple rounds of local training: Adam is a commonly used distributed training algorithm. In each iteration, a device calculates the cumulative averages of the sample and historical gradients and updates the model parameters accordingly [14]; the central server then aggregates these gradients and updates the parameter vectors. Such frequent communication is unacceptable in low-bandwidth network environments. Federated learning, as an emerging distributed training framework, allows user nodes to perform multiple local parameter updates instead of only one update, greatly reducing the frequency of model aggregation and saving communication costs.
Li et al. [15] proposed a control algorithm that dynamically adjusts the aggregation frequency to minimize learning loss under limited resources. Sun et al. [16] adaptively adjusted the frequency of global aggregation using the Lyapunov method and DRL to improve federated learning performance under a limited resource budget. Stich et al. [17,18] used Local SGD, proved its convergence rate for convex problems, and showed that it has the same convergence rate as mini-batch SGD in terms of the number of gradient evaluations while requiring fewer communication rounds. Li et al. [19] proposed FedProx, which introduces a local model update coefficient that determines the ratio of computation to communication. In FedProx, multiple local updates are conducted with a fixed number of local iterations. Cheng et al. [20,21] proposed an adaptive communication strategy that dynamically adjusts the number of local updates, balances the trade-off between communication and computation, and addresses heterogeneous device computing and communication capabilities. Woodworth et al. [22] assume that each machine can access stochastic gradient estimates for its unique convex objective function. They theoretically analyze the convergence rate and the required number of communication rounds for Local SGD in heterogeneous distributed settings. Pan et al. [23] proposed a federated learning deep Q-learning (FL-DQL) method that adaptively selects the number of local client updates to achieve the best trade-off between local updates and global parameter aggregation, thereby effectively reducing the communication overhead between clients and servers in federated learning. Liu et al. [24] proposed an adaptive control algorithm for jointly adjusting the batch size and the number of local updates. First, based on the convergence bound of the training error under heterogeneous training datasets across devices, they obtained a closed-form solution for the jointly optimized batch size and aggregation frequency, which is applicable to all devices. They then designed an efficient algorithm to assign different batch configurations to different devices, which can further improve model accuracy and address heterogeneity in both data and system characteristics. Experimental results demonstrate that the proposed algorithm improves model accuracy and addresses data and system heterogeneity.
(3) Studies on resource-utilization optimization for FL: Research on wireless federated learning (FL) mainly focuses on the heterogeneity of communication resources and assumes that all edge devices perform the same number of local updates in each communication round. However, this assumption may result in longer computation delays for some edge devices, thereby prolonging model-aggregation time. In certain application scenarios, such as defect detection, devices require real-time feedback for object detection, which imposes stringent requirements on low-latency model training and communication. To address these issues and reduce the total delay of wireless FL systems, the studies in [25,26,27,28,29] proposed delay-optimization methods for FL over wireless networks. These methods aim to address system heterogeneity. By accounting for system heterogeneity, wireless FL with low latency and high communication efficiency can be achieved.
He et al. [25] proposed a digital-twin-enabled federated learning architecture and studied the communication-resource allocation of federated servers in heterogeneous cellular-network scenarios. The problem was formulated as a Markov decision process (MDP), and a resource-allocation scheme based on deep deterministic policy gradient (DDPG) was then proposed, effectively reducing the task-transmission failure rate and system energy consumption. Zhang et al. [26] proposed a federated learning architecture integrating blockchain, considered the dynamic uncertainty of the edge-network environment, and formulated channel-resource and block-size allocation as a Markov decision process, which they solved using deep reinforcement learning (DRL).
Ren et al. [27] studied resource allocation among the cloud, edge servers, and participating nodes in a non-orthogonal multiple-access scenario and proposed a resource-allocation scheme for edge servers in a multilayer federated learning architecture using DRL. The proposed scheme can effectively alleviate the communication bottleneck of federated learning while reducing energy consumption. Ruby et al. [28] studied resource allocation among the cloud, edge servers, and participating nodes in an orthogonal multiple-access scenario. In their study, the server resource-allocation problem and the participating-node resource-allocation problem were first solved as independent subproblems, after which the two subproblems were jointly optimized using a recursive method based on binary search. To minimize federated learning training delay, Wei et al. [29] proved that the resource-allocation problem between the federated server and participating nodes is NP-hard and then proposed a heuristic algorithm to effectively reduce the training delay of federated learning. In parallel with the above communication and resource optimization efforts, another line of research has focused on privacy-preserving mechanisms for FL in resource-constrained IoT environments. While secure aggregation and differential privacy are widely adopted as complementary privacy-enhancing techniques, their computational overhead often poses significant challenges for low-powered edge devices. To address this, recent work such as [30] proposed a computationally efficient secure aggregation scheme that minimizes computational costs while maintaining fault tolerance and dynamic client participation, making it particularly suitable for resource-limited IoT infrastructures.
In summary, existing studies on communication-efficient FL have largely addressed the three acceleration mechanisms (i.e., local updates, gradient quantization, and resource allocation) in isolation or with only partial integration. While adaptive strategies have been proposed for individual components, a unified framework that jointly optimizes local update frequency, quantization level, bandwidth allocation, and computing frequency allocation in a dynamic and data-driven manner remains largely unexplored. Moreover, most existing resource allocation methods rely on static heuristics or simplified system models, which may not adapt well to the time-varying channel conditions and heterogeneous device capabilities typical of IIoT environments. These limitations are particularly critical in surface defect detection tasks, where inspection devices often operate under complex and variable working conditions with limited resources, making it difficult to achieve optimal performance. Therefore, this paper considers the heterogeneous device capabilities and proposes a DDPG-based adaptive FL framework that jointly optimizes all four variables in a coordinated manner to improve the defect detection performance.

3. Federated Learning with Gradient Quantization

3.1. Preliminaries of Federated Learning

The system considered in this study consists of a central server and N IIoT devices. The set N = { 1 , 2 , , N } contains the indices of the IIoT devices. Let D i denote the dataset of device i, and let | D i | denote its size. The j-th data sample of device i is denoted by ξ i j = ( a i j , b i j ) , where a i j is the feature vector of the j-th data sample of device i, and b i j is the corresponding label. Without loss of generality, our analysis of federated learning is based on FedAvg [31], which is the most widely adopted federated learning framework. The objective loss function is given in (1).
f ( x ) = i = 1 N | D i | j | D j | f i ( x ) .
f i ( x ) = E ξ ( i ) D i [ f i x , ξ ( i ) ] ,
where f ( x ) and f i ( x ) represent the global and local loss functions, respectively, and ξ ( i ) D i represents a randomly selected sample from the local dataset of user i. Equation (1) gives the general data-size-weighted FedAvg objective. In the main experimental setting of this work, all clients contain the same number of local training samples; therefore, the data-size weights become identical and the objective reduces to uniform client weighting. Here, x is the model parameter to be optimized and x * is the globally optimal solution.
In the r-th training round, M users are randomly selected to participate, and the selected set of users is denoted by S r . Each user i S r receives the global model x ¯ r broadcast by the server and initializes its local model as x r , 0 ( i ) = x ¯ r , where x r , 0 ( i ) is the initial model parameter of user i in the r-th round. User i then trains the local model using its own dataset. We use the adaptive moment estimation (Adam) optimizer with τ local updates. The model-parameter update is expressed as
x r , k ( i ) = x r , k 1 ( i ) + Δ x r , k ( i ) , k = 1 , , τ ,
where
m r , k ( i ) = β 1 m r , k 1 ( i ) + 1 β 1 f i x r , k 1 ( i ) , m ^ r , k ( i ) = m r , k ( i ) 1 β 1 k , v r , k ( i ) = β 2 v r , k 1 ( i ) + 1 β 2 f i x r , k 1 ( i ) 2 , v ^ r , k ( i ) = v r , k ( i ) 1 β 2 k , Δ x r , k ( i ) = α m ^ r , k ( i ) v ^ r , k ( i ) + ϵ ,
where m r , k ( i ) can be understood as the momentum, v r , k ( i ) can be understood as the variance of the gradient changes, and they are estimates of the first and second moments of Δ f i ( x ) . β 1 , β 2 , and α are learning rates. User i then sends only the local model parameters, rather than the original data, to the parameter server. Considering the sparsity of the gradient, the difference Δ r ( i ) between the updated and pre-update models can be transmitted:
Δ r ( i ) = x r , τ ( i ) x r , 0 ( i ) .

3.2. Parameter Quantization

In the model-aggregation phase, we aggregate the quantized gradient instead of directly aggregating the model weights. Before transmission, each user i applies the function Y γ Δ r ( i ) : R d R d . Each of the d elements in Δ r ( i ) is randomly mapped to a specific value, where γ represents the number of quantization levels and directly reflects the amount of information loss. For the e-th element of the parameter vector Δ r , Δ r ( i ) e , the specific mapping method is
Y γ Δ r ( i ) e = Δ r ( i ) 2 sign Δ r ( i ) e q e Δ r ( i ) , γ ,
where q e Δ r ( i ) , γ is a random mapping
q e Δ r ( i ) , γ = m + 1 γ p = Δ r ( i ) e Δ r ( i ) 2 γ m m γ , else
The positive integer m [ 0 , γ 1 ] satisfies m γ Δ r ( i ) e Δ r ( i ) 2 < ( m + 1 ) γ .
The random quantizer is an unbiased estimator of the original parameter, i.e., E Y γ ( x ) = x . Although each individual quantized realization deviates from the true value, the variance of this deviation is bounded by d γ 2 x 2 , as shown in Lemma 1. For the above compression strategy, the corresponding relationship between the quantization level and the number of quantization bits b in each dimension of the parameter is
b = log 2 ( γ + 1 ) ,
where · denotes rounding up.
Therefore, the total communication volume in the r-th round can be expressed as
C r = M d log 2 ( γ + 1 ) + d + 32 ,
where d log 2 ( γ + 1 ) represents the bits required to encode the quantization levels of the d model-update elements, the additional d bits represent one sign bit for each element, and the 32-bit term represents the single-precision scaling factor Δ r ( i ) 2 required for reconstruction. The communication-cost model considers only the algorithm-dependent uplink payload. Model metadata, client identifiers, protocol headers, and other fixed communication overheads are neglected. Since all d dimensions are quantized and transmitted, additional dimension indices are not required.
Because the server has sufficient resources for downlink communication, compression is applied only during uplink communication. Since all participating clients have equal local dataset sizes in the main experimental setting, the data-size-weighted aggregation reduces to uniform averaging, as expressed in (10). The quantized model-update elements, their sign information, and the corresponding scaling factor are then transmitted to the parameter server for weighted aggregation according to the local dataset sizes, which can be expressed as
Δ r = i S r | D i | j S r | D j | Y γ Δ r ( i ) , x ¯ r + 1 x ¯ r + Δ r .
Note that, in the main experimental setting, all participating clients have equal local dataset sizes, so the weighted aggregation in (10) naturally reduces to uniform averaging. This ensures that the experimental results remain consistent with the convergence analysis, which was originally derived under the equal-sample-size assumption.

3.3. Convergence Analysis of Federated Learning with Gradient Quantization

To derive an upper bound on the error of federated learning with multiple local updates, parameter compression, bandwidth allocation, and computational-frequency allocation, this section first establishes the convergence-error bound. The following widely adopted assumptions are used:
Assumption 1 (Lipschitz Gradient).
There is a constant L such that, for all x , y R d , f ( x ) f ( y ) L x y .
Assumption 2 (Lower Bound).
The function f ( x ) is lower-bounded, i.e., inf x R d f ( x ) = f * > .
Assumption 3 (Bounded Gradient).
There is a constant G such that, for all i { 1 , , n } and ξ i D i ,
F i x ; ξ i G .
Assumption 4.
Assuming ϵ is a small positive constant, in general, the step size satisfies Δ x r , k ( i ) α , so we can determine the upper bound of the iteration step size by setting α, in order to reach the optimal solution within a certain number of times.
Definition 1.
In the convergence-error analysis, because the objective function is nonconvex, we use the expected gradient norm as the convergence metric. For any sufficiently small ε, this condition ensures that the algorithm converges to a stationary point, as expressed by
E min r [ 0 , R ] f x ¯ r 2 ε ,
Note that Assumption 4 only requires a uniform upper bound on the local update step size. This condition is satisfied by Adam with a fixed learning rate α and a small positive ϵ , and the specific forms of momentum and second-moment scaling affect the numerical constants but not the functional dependence of the convergence bound on the number of local updates, the quantization level, and the resource allocation variables. Specifically, the momentum and adaptive second-moment estimates affect the effective magnitude of the local updates and are therefore reflected in the corresponding constants of the convergence bound. For example, the Lipschitz constant L and the gradient bound G may be scaled by factors related to the momentum coefficient and the adaptive learning rate. These internal dynamics do not change the functional dependence on the key optimization variables. Therefore, while the exact numerical constants may differ from those of plain SGD, the relative trade-offs captured by the bound remain valid and effectively guide the joint optimization. Our convergence analysis thus applies to Adam as a special case within the broader class of adaptive gradient methods considered in [32,33,34].
Lemma 1.
For the parameter-quantization function Y γ with quantization level γ, the following holds for all x: E Y γ ( x ) x 2 d γ 2 x 2 .
Proof. 
The detailed proof can be found in [13,35]. □
Furthermore, if Assumptions 1–4, Definition 1, and Lemma 1 hold, the expected convergence performance can be obtained as follows:
Theorem 1.
Given the selected set of devices S r , quantization-level strategy γ, number of local updates τ, expected time of one round E ( T r ) , and total time T, the upper bound on the error after R iterations can be expressed as
E min r [ 0 , R ] f x ¯ r 2 2 E f x ¯ 0 E f x * E T r T τ + L 2 α 2 ( τ 1 ) ( 2 τ 1 ) 6 + L d α 2 τ M γ 2 + L M 1 + M 1 N 1 α 2
Proof. 
The detailed proof is provided in Appendix A. □

4. Optimization of the Expected Learning Error

As mentioned above, the gradient-quantization level, the number of local training iterations, and the time overhead significantly affect convergence performance. In addition, the resource-allocation strategy significantly affects the time overhead of FL convergence. Therefore, it is beneficial to flexibly adjust the gradient-quantization level, the number of local training iterations, bandwidth allocation, and transmission-power configuration to balance convergence performance and training cost (i.e., time overhead).

4.1. Time Consumption Model

(1) Local computation time: The local computation time of edge device n is defined as
T comp r , n = τ L D n g n c , n ,
where g n c is the computing power of device n, quantified by the C P U frequency of edge device n. τ is the number of local iterations, and L is the number of C P U cycles required to compute a single data sample ξ .
(2) Gradient updating time: Each selected edge device n uploads its model difference to the edge server through frequency-division multiple access (FDMA) [36]. The transmission rate of edge device n in communication round t is
C comm r , n = B n r log 2 1 + h n r p n N 0 , n ,
where B n r is the uplink bandwidth allocated to edge device n, h n t is the channel gain between edge device n and the edge server in the t-th communication round, p n is the transmission power of edge device n, and N 0 is the power spectral density of additive Gaussian noise. Note that the channel gain is allowed to vary across communication rounds, which captures the time-varying nature of wireless networks in real IIoT environments. Assume that the information content of each local model parameter is C r M . In this case, the uplink transmission time of edge device n in communication round t is
T comm r , n = C r M C comm r , n = C r M B n r log 2 1 + h n r p n N 0 , n .
Therefore, the duration of each federated learning round is
T r = max n S r T c o m p r , n + T c o m m r , n ,
Note that, in this work, we focus on optimizing the training latency of the federated learning process, rather than the inference latency of the deployed model.

4.2. Problem Formulation

The goal of this section is to minimize the federated learning error within a given time by jointly optimizing the number of local updates τ , quantization level γ , bandwidth resources B, and computing resources g. The optimization problem can be expressed as follows:
min γ , τ , B n r , g n r E f x ¯ R s . t . ( 1 ) , ( 2 ) , ( 5 ) , ( 6 ) ( 10 ) , ( 13 ) ( 16 ) , r = 1 R T r T , n S r B n r = 1 , B n r 0 , r , 0 g n r g max , γ 0 , 2 16 , τ Z + 1 , τ max ,
where R is the total number of training rounds, x ¯ R represents the global model parameters after the R-th aggregation, and f ( x ¯ R ) is the global loss function after R training rounds.
Based on the above derivation, the squared norm of the expected gradient of the loss function for the nonconvex objective tends to a constant value at a specific learning rate. Equation (13) further reveals how the number of local updates, quantization level, bandwidth configuration, and computation frequency affect the relationship between the convergence error and the duration of a single training round. Note that the original optimization goal in (18) is to minimize the expected global loss E [ f ( x ¯ R ) ] . However, directly optimizing this loss is intractable. Instead, we resort to the convergence upper bound provided by Theorem 1, which is expressed in terms of the expected squared gradient norm. Equation (18) defines the original objective in terms of the expected global loss, whereas Theorem 1 characterizes the convergence behavior through the expected gradient norm. Therefore, the derived bound is used as a tractable convergence-oriented surrogate rather than a direct upper bound on the final loss. Throughout this paper, we consistently treat this gradient-norm bound as the optimization target for guiding the learning process toward a stationary point, rather than as a formal upper bound on the loss itself.
However, because of the complex form and strong nonlinearity of (13), it is difficult to obtain a closed-form optimal solution using traditional methods. Moreover, the value f ( x * ) is difficult to determine at an early stage, further complicating the problem. Because the initial model parameters x ¯ r change in each round, the parameters must be dynamically adjusted during the learning process. Existing dynamic programming algorithms have difficulty solving this sequential decision-making problem because deterministic mappings between the current state and action are unavailable. Therefore, we propose an experience-driven algorithm based on deep reinforcement learning (DRL) to solve this problem.

5. DDPG-Based Adaptive Resource Optimization

In this section, we introduce the design principles and system framework of the adaptive joint-optimization federated learning algorithm. The system framework is shown in Figure 1 and mainly includes two parts: a federated learning module and a DRL module. The federated learning module mainly includes user-terminal devices and model information, aggregates user model parameters, and outputs a new global model for the next round. The DRL module interacts with the federated learning environment in real time and outputs adaptive decisions. It is mainly responsible for perceiving the training state, dynamically adjusting the parameters of each participating user for the next training round, and updating the neural-network parameters at specific times.
Deep reinforcement learning is an optimization method that obtains feedback from the environment to guide behavior and has clear advantages in fields such as automatic control, robotics, and distributed systems. We first model the adaptive hyperparameter-selection process as a Markov decision process (MDP) suitable for federated learning scenarios to accurately simulate changes in the training state. The Markov decision process is represented by the five-tuple ( S , A , U , P , β ) , where S represents the state set, A represents the action set, and U represents the reward function. Each state-action pair ( s r , a r ) yields an immediate reward u r = U s r , a r . Here, P is the state-transition probability, indicating the probability of transitioning to a specific state after taking an action in the current state. The discount factor β [ 0 , 1 ] reflects the decreasing influence of the current reward on future long-term rewards. The main goal of reinforcement learning is to enable the agent to identify appropriate action strategies in different states and maximize the long-term accumulated reward through continuous interaction, namely u R = r = 1 R β r 1 u r . Next, specific definitions are given for the state, action, and reward function of the system considered in this article.

5.1. State Space

At the r-th iteration, the state s r is composed of the following components:
  • The global loss at the r-th iteration: l r = i S r l r ( i ) | S r | , where l r ( 1 ) , , l r ( N ) correspond to the losses on the local datasets of the users, respectively.
  • The global loss at the ( r 1 ) -th iteration: l r 1 = i S r 1 l r 1 ( i ) | S r 1 | .
  • The number of local updates at the ( r 1 ) -th iteration: τ r 1 .
  • The number of quantization bits at the ( r 1 ) -th iteration: b r 1 .
  • The amount of uncompressed information at the ( r 1 ) -th iteration: c n y r 1 .
  • The compressed communication volume at the ( r 1 ) -th iteration: c n r 1 .
  • The bandwidth-allocation strategy at the ( r 1 ) -th iteration: B r 1 = [ B 1 r 1 , , B n r 1 ] .
  • The computational-frequency allocation strategy at the ( r 1 ) -th iteration: g r 1 = [ g 1 r 1 , , g n r 1 ] .
  • The channel state at the r-th iteration: h r = [ h 1 r , , h n r ] .
In summary, the state at the r-th iteration is
s r = [ l ¯ r , l ¯ r 1 , τ r 1 , b r 1 , c n y r 1 , c n r 1 , B 1 r 1 , , B n r 1 , g 1 r 1 , , g n r 1 , h 1 r , , h n r ] .

5.2. Action Space

At the r-th iteration, the action a r is composed of the following components:
  • The change in the number of local updates at the r-th iteration: τ r .
  • The change in the number of quantization bits at the r-th iteration: b r , which is mapped to the corresponding quantization level γ r according to (8).
  • The bandwidth-allocation strategy at the r-th iteration: B r = [ B 1 r , , B n r ] .
  • The computational-frequency allocation strategy at the r-th iteration: g r = [ g 1 r , , g n r ] .
In summary, the action at the r-th iteration is
a r = τ r , b r , B 1 r , , B n r , g 1 r , , g n r .
Note that the two discrete variables, i.e., the number of local updates τ r and the quantization bits b r , are scaled to the respective integer ranges and rounded to the nearest integer using nearest-neighbor rounding. For the continuous variables, B n r is projected to simplex via Softmax, and g n r is mapped to [ 0 , g max ] via Sigmoid to satisfy the constraints in (18). We adopt the n-way k-shot setting from few-shot learning to simulate heterogeneous data distributions. For each client i, we first draw a base number of classes n i Uniform ( n ¯ ρ , n ¯ + ρ ) , where n ¯ is the average number of classes per client. ρ { 2 , 3 , 5 } controls the degree of class-space heterogeneity. We define ρ as the maximum deviation from the mean in both the number of classes and the number of samples per class. A larger ρ leads to greater diversity in both the class space and the data size per class, thus creating a more heterogeneous overall data distribution. For each selected class c of client i, we draw a per-class sample count k i , c Uniform ( k ¯ ρ , k ¯ + ρ ) , where k ¯ is the average number of samples per class. The total number of samples per client is fixed. The client partition is fixed and reused consistently across all experiments. The dataset is randomly partitioned into 80% training and 20% testing samples per client.

5.3. Reward Function

The entire DRL-network training process is guided by rewards. After the parameter server in state s r executes the parameter-selection strategy specified by action a r , it receives feedback at the end of the training round that evaluates the contribution of this action to the optimization objective; this feedback is called the reward. We denote the reward received at the end of each FL training round by R r . The reward must be carefully designed to minimize the system cost and enable the RL model to help the FL system converge with the highest possible communication efficiency. It is defined as follows:
R r = A E ( T r ) T τ + L 2 α 2 ( τ 1 ) ( 2 τ 1 ) 6 + L d α 2 τ M γ 2 + L M 1 + M 1 N 1 α 2 .
where constant A > 0 is a scaling factor introduced to balance the numerical magnitudes between the time-related term and the accuracy-related term in the upper bound.
There are many training algorithms for selecting the optimal action, including value-based and policy-based learning [37]. DDPG is a policy-based deep reinforcement learning method that represents the deterministic policy μ ( s ) using a deep neural network and updates the network parameters using the deterministic policy gradient. It is suitable for reinforcement learning scenarios with large or continuous action spaces. The DDPG training process is shown in Algorithm 1.
Algorithm 1 The Proposed DDPG-Based Resource-Optimization Algorithm
Require: global model x ¯ 0 , number of user nodes N, number of selected users M, reward discount factor β , critic network Q, actor network μ , corresponding target networks Q and μ , target-network reset interval s t e p , maximum local epochs τ max , maximum quantization bits b max , replay buffer size B size , number of episodes E, number of communication rounds per episode R
Ensure: global model x ¯ R
 1:
Randomly initialize θ Q and θ μ ; set θ Q θ Q , θ μ θ μ
 2:
Initialize experience replay buffer D with capacity B size
 3:
Server-side:
 4:
for  e = 1 to E do
 5:
   Initialize the global model as x ¯ 0
 6:
    t m p = 0
 7:
   for  r = 0 to R 1  do
 8:
     Randomly select S r = M users from the user set
 9:
     Send the global model x ¯ r to the selected users
10:
    Receive the loss values from the user nodes
11:
    Update the state s r
12:
    Input s r into the D D P G module to obtain action a r and the corresponding γ r , τ r , B n r , g n r
13:
     Send τ r , b r , B n r , g n r to all selected users
14:
     for each selected user i S r in parallel do
15:
           Y γ ( Δ r ( i ) ) C l i e n t U p d a t e ( i , x ¯ r , b r , τ r , B n r , g n r )
16:
     end for
17:
     Update the global model to x ¯ r + 1 according to (10)
18:
     Calculate the reward R r 1 according to (21)
19:
     Store s r 1 , a r 1 , R r , s r in the experience replay buffer D
20:
     Sample experience from D to update the critic network and actor policy network
21:
 
22:
     if  t m p mod s t e p = 0  then
23:
                     θ Q τ θ Q + ( 1 τ ) θ Q
24:
                     θ μ τ θ μ + ( 1 τ ) θ μ
25:
     end if
26:
      t m p + = 1
27:
    end for
28:
end for
29:
return the final global model x ¯ R
30:
ClientUpdate( i , x ¯ r , τ r , b r , B n r , g n r ):
31:
Initialize model x r , 0 ( i ) = x ¯ r
32:
for  k = 1 to τ r  do
33:
    Update the local model as (3)
34:
end for
35:
Calculate the gradient accumulator Δ r ( i ) according to (5)
36:
Parameter quantization is performed according to (6), and the quantization level is 2 b r

6. Performance Evaluation

To verify the effectiveness of the algorithm, we set the number of participating users N to 13 and select 10 users in each round during training. The experimental environment and parameter settings are summarized in Table 1 and Table 2, respectively. We selected the widely used NEU-DET dataset [38], which contains a total of 1800 samples, for the experiments.
The standard torchvision ResNet-18 architecture is adopted and initialized from scratch, with its original classification layer replaced by a 512–ReLU–6 head. All images are converted to RGB, resized to 224 × 224 , transformed into tensors, and normalized using a channel-wise mean and standard deviation of ( 0.5 ,   0.5 ,   0.5 ) , without additional data augmentation. The DDPG actor adopts a 48–400–300–22 architecture with LayerNorm and ReLU activations in the hidden layers and a tanh output layer, whereas the critic adopts a 70–400–300–1 architecture with ReLU activations. Exploration is performed by adding Gaussian noise N ( 0 ,   0 . 15 2 ) to each action component, followed by clipping to [ 1 ,   1 ] . The replay-buffer capacity is 10,000 transitions. The target networks are soft-updated after each DDPG update with a coefficient of ζ = 0.001 , and the discount factor is set to β = 0.99 . For each random seed, the DDPG controller is trained online for one episode consisting of 20 federated communication rounds, and five independent random seeds are evaluated.
To simulate Non-IID (non-independent and identically distributed) data, we introduce n to control the number of classes and k to control the number of instances in each class, following [39]. To investigate the impact of Non-IID data on training performance, we set three levels of dataset heterogeneity across clients. We adopt the concept of n-way k-shot learning from few-shot learning, where n controls the number of classes and k controls the number of training instances in each class. To simulate heterogeneous scenarios, we randomly vary the values of n and k across devices. We first define the average values of n and k and then add random noise to each user’s n and k. The variance of n controls the heterogeneity of the class space, whereas the variance of k controls the imbalance in data size. We define ρ to balance n and k. As ρ increases, the client class distributions and data sizes become more diverse, resulting in greater dataset heterogeneity. For the main ρ ( 2 ) setting, each participating client contains 108 training images. The actual partition gives an average of n ¯ = 2.2 observed classes per client and an effective average of k ¯ = 50.4 samples per class. The client partition is fixed across all methods, and five independent training seeds (1–5) are used. Therefore, the main Non-IID setting mainly reflects label-distribution heterogeneity rather than client-level sample-size imbalance.

6.1. Simulation of Local Training Frequency and the Quantization Mechanism

To verify the effectiveness of the proposed algorithm, we compare it with three other algorithms under different settings of γ and τ . Because the reward functions of the comparison algorithms cannot directly use our proposed reward function, we set their reward function to R r = l r l ¯ r 1 ( T r C ) , where C is a constant. The initial number of local updates for the proposed algorithm is 1, the quantization level is 2 16 , and the computation-frequency range is 200–400 MHz. To explore the impact of data heterogeneity on algorithm performance, all algorithms are tested under three data-distribution settings, with identical initial computation-frequency and bandwidth-allocation settings. The goal of the proposed algorithm is to maintain high communication efficiency while accelerating convergence, that is, to minimize the training loss in each communication round. Therefore, curves with respect to the number of communication rounds are plotted.
  • AdaQuantFL: This is an advanced adaptive compression algorithm that can explicitly calculate the quantization level from loss values. However, it does not consider the impact of the local update frequency.
  • Local: The number of local updates τ is set to 5, which is a median value, and the quantization level γ is set to 2 8 .
  • Pone: The participating devices perform only one local update in each training round. This method minimizes the impact of model differences among users. The quantization level γ is set to 2 8 , which is also a median value.
Figure 2 shows the image-classification results obtained using ResNet for datasets with different levels of Non-IID data. The horizontal axis represents the communication round, and the vertical axis represents the test accuracy. The results show that the test accuracy increases as training progresses and stabilizes after a certain number of communication rounds, verifying the effectiveness of the proposed algorithm. In Figure 2a, the Non-IID degree is ρ ( 2 ) . The test accuracies of the proposed and comparison algorithms are close, although the proposed algorithm performs slightly better. In Figure 2b, the Non-IID degree is ρ ( 3 ) . After 50 communication rounds, the proposed algorithm is slightly inferior to AdaQuantFL in terms of test accuracy but outperforms Local and Pone. The reason is that the proposed algorithm uses a high quantization level in the later stage, which causes greater precision loss. In Figure 2c, the Non-IID degree is ρ ( 5 ) . There is little difference among the algorithm curves after convergence. Pone is not optimal at the beginning but achieves the best performance in the middle stage before declining slightly. Local and AdaQuantFL perform best initially, but the accuracy of AdaQuantFL declines in the later stage. The proposed algorithm is inferior to Local in the early stage because it performs fewer local updates than Local, and it is inferior to Pone in the middle stage because of its higher quantization level; however, its accuracy increases again as the number of communication rounds increases. Pone allows each device to perform only one local update, which slows the improvement in accuracy. However, Pone uses as few local updates as possible to minimize model differences among devices. Consequently, its test accuracy eventually reaches the optimal level but declines at the end, indicating that an excessive communication frequency is unnecessary.
The horizontal axis in Figure 3 represents the number of communication rounds, and the vertical axis represents the training loss. The results show that the training loss decreases as training progresses and stabilizes after a certain number of communication rounds. In Figure 3a, the Non-IID degree is ρ ( 2 ) . The training losses of the proposed algorithm and AdaQuantFL decrease more steadily, the training loss of Local decreases more substantially in the later stage, and that of Pone decreases the most slowly. The higher quantization level of the proposed algorithm in the later stage slows the decrease in training loss. In Figure 3b, the Non-IID degree is ρ ( 3 ) . The training losses of the proposed algorithm, Local, and AdaQuantFL decrease at similar rates, whereas the training loss of Pone decreases sharply late in training. This result indicates that an appropriate number of local updates can accelerate training-loss convergence compared with excessive reliance on communication. In Figure 3c, the Non-IID degree is ρ ( 5 ) . The training losses of the proposed algorithm, Local, and AdaQuantFL decrease at similar rates, consistent with the results in Figure 3b. The only difference is that the training loss of Pone remains higher than those of the other three algorithms.
The horizontal axis of each plot in Figure 4 represents the number of communication rounds, and the vertical axis represents time. The results show that the time stabilizes as training progresses. Figure 4 shows similar trends under the three settings, and the proposed algorithm demonstrates a substantial advantage in terms of time. AdaQuantFL consumes the most time, whereas Local and Pone perform similarly. The reason is that all algorithms use the same computation-frequency selection and bandwidth-allocation strategies; therefore, the differences arise from their differences.
As the degree of Non-IID data across devices increases from ρ ( 2 ) to ρ ( 5 ) , the algorithm maintains convergence, although the test accuracy decreases. When three classes are assigned to each device, the test accuracy decreases significantly. When five classes are assigned to each device, the performance is similar to that under ρ ( 3 ) . Figure 2, Figure 3 and Figure 4 show that the proposed algorithm can effectively reduce the training loss and maintain a small difference in test accuracy while achieving the minimum time cost compared with the other algorithms. In other words, the proposed algorithm achieves the minimum error in the shortest time. Compared with AdaQuantFL, the proposed algorithm achieves faster loss convergence by controlling four variables. Local and Pone use fixed numbers of local updates and quantization levels. The difference between Local and Pone lies in their numbers of local updates. This difference is not obvious in terms of time; however, in terms of training loss, Pone clearly decreases more slowly.
Time is used as the horizontal axis, whereas accuracy and training loss are used as the respective vertical axes to compare the proposed and comparison algorithms under ρ ( 2 ) and ρ ( 3 ) , as shown in Figure 5. The proposed algorithm achieves the highest accuracy in the shortest time under both ρ ( 2 ) and ρ ( 3 ) , further demonstrating its advantages.

6.2. Simulation of Resource Scheduling

The goal of this chapter remains to minimize the training loss in each round under a given time limit. As shown in the previous experiments, as the Non-IID degree of the data increases, the proposed algorithm adaptively adjusts the number of local updates and the quantization level. Although it is slightly inferior in test accuracy, it has a clear advantage in terms of time. To further investigate the impact of bandwidth allocation and computation-frequency selection on the proposed algorithm, we introduce the following four comparison algorithms. Except for their bandwidth-allocation and computation-frequency selection strategies, these comparison algorithms use the method proposed in this chapter to jointly regulate the number of local updates and the quantization level:
  • Fixed Bandwidth Allocation, Optimized Local Computing Capacity (OCA): The computation frequency of the defect-detection equipment is set to 400 MHz, while bandwidth allocation follows the proposed algorithm.
  • Fixed Local Computing Capacity, Optimized Bandwidth Allocation (OBA): The bandwidth is equally allocated among the defect-detection devices, while computation-frequency allocation follows the proposed algorithm.
  • Equal Client (EC): The bandwidth is equally allocated among the devices, and the computing frequency of each edge device is set to 400 MHz.
  • Random Allocation (Random): The computation frequency of each edge device is randomly selected from [ 200 ,   400 ] MHz, and the bandwidth is randomly allocated among the devices.
Experiments are conducted under the ρ ( 2 ) setting, and the results are shown in the following figure.
Figure 6a shows how the test accuracies of the proposed and comparison algorithms change as the number of communication rounds increases. The proposed algorithm and OCA exhibit comparable performance and outperform the other comparison algorithms. Figure 6b shows how the training losses of the proposed and comparison algorithms change as the number of communication rounds increases. The performance of the proposed algorithm is close to that of EC. Figure 6c shows how the times of the proposed and comparison algorithms change as the number of communication rounds increases. OCA and EC outperform the proposed algorithm, while the proposed algorithm outperforms Random. As the number of communication rounds increases, the performance of the proposed algorithm catches up with that of OBA. Figure 6d shows how the test accuracies of the proposed and comparison algorithms change over time. EC and OCA achieve high test accuracy in a relatively short time, and the proposed algorithm also achieves satisfactory test accuracy after a period of time, outperforming OBA and Random. Figure 6e shows how the training losses of the proposed and comparison algorithms change over time. EC and OCA perform similarly to, and better than, OBA, the proposed algorithm, and Random.
In summary, OCA and EC perform well, with EC representing the ideal case. OCA sets the computation frequency to its maximum value. The proposed algorithm catches up with EC and OCA, performs on par with OBA, and outperforms Random. These results demonstrate the effectiveness of the proposed algorithm. The proposed algorithm is advantageous because it jointly controls computation-frequency selection and bandwidth allocation through reinforcement learning.

7. Conclusions

This paper proposed an adaptive federated learning framework that jointly optimizes the local update frequency, gradient quantization level, bandwidth allocation, and computing-resource allocation for heterogeneous industrial Internet of Things devices. A convergence upper bound was first derived to characterize the effects of these variables on model error and training time. The joint optimization was then formulated as a Markov decision process and solved using a DDPG-based algorithm. Experiments on the NEU-DET dataset under different Non-IID settings showed that the proposed method maintains competitive classification accuracy while reducing training time. The resource-scheduling results further demonstrated the benefit of jointly adapting communication and computing resources compared with fixed or random allocation strategies. Additionally, we will also explore the integration of energy-aware optimization into the current framework, particularly for battery-constrained IIoT devices.

Author Contributions

Conceptualization, S.H.; Methodology, S.H.; Validation, H.W. and C.B.; Writing—original draft, H.W.; Visualization, H.W. and C.B.; Project administration, S.H. and H.T.; Funding acquisition, H.T. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Open Foundation of State Key Laboratory of Networking and Switching Technology (Beijing University of Posts and Telecommunications) under Grant SKLNST-2021-1-11.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The NEU-DET dataset analyzed in this study is publicly available from the source cited in the manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Proof of Theorem 1

Proof of Theorem 1. 
The convergence rate of the algorithm is
E f x ¯ r + 1 E f ( x ¯ r ) E f x ¯ r , 1 S r i S r Y γ ( x r , τ ( j ) x r , 0 ( i ) ) + L 2 E 1 S r i S r Y γ x r , γ ( i ) x r ; 0 ( i ) 2
For the second term of the equation:
E f x ¯ r , 1 S r i S r Y γ ( x r , τ ( i ) x r , 0 ( i ) ) = E f x ¯ r , 1 | N | i N Y γ ( x r , τ ( i ) x r , 0 ( i ) ) = ( a ) f x ¯ r , 1 N i = 1 N k = 0 τ 1 Δ x t , k ( i ) = k = 0 τ 1 f x ¯ r , 1 N i = 1 N Δ x t , k ( i ) = ( b ) k = 0 τ 1 ( 1 2 f x ¯ r 2 + 1 2 1 N i = 1 N Δ x t , k ( i ) 2 1 2 f x ¯ r 1 N i = 1 N Δ x r , k ( i ) 2 ) ( c ) k = 0 τ 1 ( 1 2 f x ¯ r 2 + 1 2 1 N i = 1 N Δ x t , k ( i ) 2 L 2 2 N i = 1 N x ¯ r x r , k ( i ) 2 )
where ( a ) holds because E Y γ ( x ) = x , ( b ) follows from the identity x 1 , x 2 = x 1 2 + x 2 2 x 1 x 2 2 for any two vectors x 1 and x 2 , and ( c ) follows because the function f i ( x ) is L-smooth. For x ¯ r x r , k ( i ) 2 , we have
E x ¯ r x r , k ( i ) 2 ( d ) E j = 0 k 1 Δ x t , j ( i ) 2 ( e ) k 2 α 2 .
Here, ( d ) follows from the inequality
j = 1 n a j 2 n j = 1 n a j 2 , n > 0 ,
and ( e ) follows from Assumption 1.
For the third term of the equation:
L 2 E 1 M i S r Y γ ( x r , k ( i ) x r , 0 ( i ) ) 2 = L 2 M 2 E [ i = 1 N I ( i S r ) Y γ ( k = 0 τ 1 Δ x t , k ( i ) ) k = 0 τ 1 Δ x t , k ( i ) + k = 0 τ 1 Δ x t , k ( i ) 2 ] = ( f ) L 2 M 2 E i = 1 N I ( i S r ) Y γ ( k = 0 τ 1 Δ x t , k ( i ) ) k = 0 τ 1 Δ x t , k ( i ) 2 + L 2 M 2 E i = 1 N I ( i S r ) k = 0 τ 1 Δ x t , k ( i ) 2 = ( g ) L 2 M N E i = 1 N Y γ ( k = 0 τ 1 Δ x t , k ( i ) ) k = 0 τ 1 Δ x t , k ( i ) 2 + L 2 M 2 E i = 1 N I ( i S r ) k = 0 τ 1 Δ x t , k ( i ) 2 = ( h ) L τ 2 d α 2 2 M γ 2 + L 2 M 2 E [ i = 1 N I ( i S r ) k = 0 τ 1 Δ x t , k ( i ) 2 ]
where I i S r is the indicator function: its value is 1 when i S r and 0 otherwise. Equality ( f ) follows from the unbiasedness of the quantization result. Equality ( g ) follows because, when E x i = 0 for i = 1 , 2 , , n and x 1 , x 2 , , x n are mutually independent, E x 1 + + x n 2 = E x 1 2 + + x n 2 . Equality ( h ) follows from Assumption 1.
L 2 M 2 E i = 1 N P { i S r } k = 0 τ 1 Δ x t , k ( i ) 2 = L 2 M 2 i N P { i S r } E k = 0 r 1 Δ x t , k ( i ) 2 + L 2 M 2 i j P { i , j S r } E k = 0 τ 1 Δ x t , k ( i ) , k = 0 τ 1 Δ x t , k ( j ) . = L 2 M N i N E k = 0 τ 1 Δ x t , k ( i ) 2 + L ( M 1 ) 2 M N ( N 1 ) i j E k = 0 τ 1 Δ x t , k ( i ) , k = 0 τ 1 Δ x t , k ( j ) = ( i ) L 2 M N 1 + M 1 N 1 i = 1 N E k = 0 τ 1 Δ x t , k ( i ) 2 = ( j ) L 2 M 1 + M 1 N 1 τ 2 α 2
where ( i ) follows because P ( i S r ) = f r a c M N and P ( i S r , j S r ) = M ( M 1 ) ( N 2 N ) , and ( j ) follows from Assumption 1. By combining the above bounds, we obtain
E [ f ( x ¯ r + 1 ) ] E [ f ( x ¯ r ) ] E [ f ( x ¯ r ) , 1 | S r | i S r Y γ ( x r , k ( i ) x r , 0 ( i ) ) ] + L 2 E [ 1 | S r | i S r Y γ ( x r , k ( i ) x r , 0 ( i ) ) 2 ] . E [ f ( x ¯ r ) ] k = 0 τ 1 ( 1 2 f ( x ¯ r ) 2 + 1 2 1 N i = 1 N Δ x t , k ( i ) 2 L 2 k 2 α 2 2 ) + L τ 2 d α 2 2 M γ 2 + L 2 M ( 1 + M 1 N 1 ) τ 2 α 2
Dropping the negative term and using k = 0 τ 1 k 2 = τ ( τ 1 ) ( 2 τ 1 ) 6 yield
E f x ¯ r + 1 E f x ¯ r τ 2 E f x ¯ r 2 + L 2 α 2 τ ( τ 1 ) ( 2 τ 1 ) 12 + L τ 2 α 2 d 2 M γ 2 + L 2 M 1 + M 1 N 1 τ 2 α 2
Rearranging the previous equation, summing it over the iterations, and using f x * f x ¯ R yield
1 R r = 0 R 1 E f x ¯ r 2 2 f x ¯ 0 f x * R τ + L 2 α 2 ( τ 1 ) ( 2 τ 1 ) 6 + L d α 2 τ M γ 2 + L M 1 + M 1 N 1 α 2
If the expected time of one round is E ( T r ) and the total time is T, then we obtain an upper bound on the error as a function of the total time. □

References

  1. Ali, H.A.S.; Rani J, V. Machine Learning for Internet of Things (IoT) Security: A Comprehensive Survey. Int. J. Comput. Netw. Appl. 2024, 11, 617–659. [Google Scholar] [CrossRef] [Scilit]
  2. Merlino, V.; Allegra, D. Energy-based approach for attack detection in IoT devices: A survey. Internet Things 2024, 27, 101306. [Google Scholar] [CrossRef] [Scilit]
  3. Ghosh, A.M.; Grolinger, K. Edge-cloud computing for Internet of Things data analytics: Embedding intelligence in the edge with deep learning. IEEE Trans. Ind. Inform. 2020, 17, 2191–2200. [Google Scholar]
  4. Khan, L.U.; Saad, W.; Han, Z.; Hossain, E.; Hong, C.S. Federated learning for internet of things: Recent advances, taxonomy, and open challenges. IEEE Commun. Surv. Tutor. 2021, 23, 1759–1799. [Google Scholar] [CrossRef] [Scilit]
  5. Zhao, P.; Su, N.; Wang, Y.; Sun, S.; Li, X. A Survey on Collaboration Computing for Industrial Internet of Things: Digital Twin, Federated Learning, and Swarm Learning. IEEE Internet Things J. 2026, 13, 3850–3869. [Google Scholar] [CrossRef] [Scilit]
  6. Reisizadeh, A.; Mokhtari, A.; Hassani, H.; Jadbabaie, A.; Pedarsani, R. Fedpaq: A communication-efficient federated learning method with periodic averaging and quantization. In Proceedings of the International Conference on Artificial Intelligence and Statistics; PMLR: Cambridge, MA, USA, 2020; pp. 2021–2031. [Google Scholar]
  7. Mitra, A.; Jaafar, R.; Pappas, G.J.; Hassani, H. Linear convergence in federated learning: Tackling client heterogeneity and sparse gradients. Adv. Neural Inf. Process. Syst. 2021, 34, 14606–14619. [Google Scholar]
  8. Zhao, T.; Li, F.; He, L. DRL-based joint resource allocation and device orchestration for hierarchical federated learning in NOMA-enabled industrial IoT. IEEE Trans. Ind. Inform. 2022, 19, 7468–7479. [Google Scholar] [CrossRef] [Scilit]
  9. Jhunjhunwala, D.; Gadhikar, A.; Joshi, G.; Eldar, Y.C. Adaptive quantization of model updates for communication-efficient federated learning. In Proceedings of the ICASSP 2021–2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); IEEE: New York, NY, USA, 2021; pp. 3110–3114. [Google Scholar]
  10. Yan, G.; Li, T.; Huang, S.L.; Lan, T.; Song, L. AC-SGD: Adaptively compressed SGD for communication-efficient distributed learning. IEEE J. Sel. Areas Commun. 2022, 40, 2678–2693. [Google Scholar] [CrossRef] [Scilit]
  11. Singh, N.; Data, D.; George, J.; Diggavi, S. SQuARM-SGD: Communication-efficient momentum SGD for decentralized optimization. IEEE J. Sel. Areas Inf. Theory 2021, 2, 954–969. [Google Scholar] [CrossRef] [Scilit]
  12. Basu, D.; Data, D.; Karakus, C.; Diggavi, S.N. Qsparse-local-SGD: Distributed SGD with quantization, sparsification, and local computations. IEEE J. Sel. Areas Inf. Theory 2020, 1, 217–226. [Google Scholar] [CrossRef] [Scilit]
  13. Chen, C.; Shen, L.; Liu, W.; Luo, Z.Q. Efficient-adam: Communication-efficient distributed adam. IEEE Trans. Signal Process. 2023, 71, 3257–3266. [Google Scholar] [CrossRef] [Scilit]
  14. Xu, Y.; Liao, Y.; Xu, H.; Ma, Z.; Wang, L.; Liu, J. Adaptive control of local updating and model compression for efficient federated learning. IEEE Trans. Mob. Comput. 2022, 22, 5675–5689. [Google Scholar] [CrossRef] [Scilit]
  15. Li, Z.; Zhang, K.; Zhang, Y.; Liu, Y.; Chen, Y. D2D-Assisted Adaptive Federated Learning in Energy-Constrained Edge Computing. Appl. Sci. 2024, 14, 4989. [Google Scholar] [CrossRef] [Scilit]
  16. Sun, W.; Lei, S.; Wang, L.; Liu, Z.; Zhang, Y. Adaptive federated learning and digital twin for industrial internet of things. IEEE Trans. Ind. Inform. 2020, 17, 5605–5614. [Google Scholar] [CrossRef] [Scilit]
  17. Stich, S.U. Local SGD Converges Fast and Communicates Little. In Proceedings of the 7th International Conference on Learning Representations (ICLR), New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
  18. Du, H.; Cheng, C.; Ni, C. A unified momentum-based paradigm of decentralized SGD for non-convex models and heterogeneous data. Artif. Intell. 2024, 332, 104130. [Google Scholar] [CrossRef] [Scilit]
  19. Li, T.; Sahu, A.K.; Zaheer, M.; Sanjabi, M.; Talwalkar, A.; Smith, V. Federated optimization in heterogeneous networks. Proc. Mach. Learn. Syst. 2020, 2, 429–450. [Google Scholar]
  20. Cheng, J.; Luo, P.; Xiong, N.; Wu, J. AAFL: Asynchronous-adaptive federated learning in edge-based wireless communication systems for countering communicable infectious diseasess. IEEE J. Sel. Areas Commun. 2022, 40, 3172–3190. [Google Scholar] [CrossRef] [Scilit]
  21. Liu, Y.; Huang, P.; Yang, F.; Huang, K.; Shu, L. QuAsyncFL: Asynchronous Federated Learning with Quantization for Cloud-Edge-Terminal Collaboration Enabled AIoT. IEEE Internet Things J. 2024, 11, 59–69. [Google Scholar] [CrossRef] [Scilit]
  22. Woodworth, B.E.; Patel, K.K.; Srebro, N. Minibatch vs local sgd for heterogeneous distributed learning. Adv. Neural Inf. Process. Syst. 2020, 33, 6281–6292. [Google Scholar]
  23. Pan, Z.; Geng, H.; Wei, L.; Zhao, W. Adaptive client model update with reinforcement learning in synchronous federated learning. In Proceedings of the 2022 32nd International Telecommunication Networks and Applications Conference (ITNAC); IEEE: New York, NY, USA, 2022; pp. 1–3. [Google Scholar]
  24. Liu, W.; Zhang, X.; Duan, J.; Joe-Wong, C.; Zhou, Z.; Chen, X. AdaCoOpt: Leverage the interplay of batch size and aggregation frequency for federated learning. In Proceedings of the 2023 IEEE/ACM 31st International Symposium on Quality of Service (IWQoS); IEEE: New York, NY, USA, 2023; pp. 1–10. [Google Scholar]
  25. He, Y.; Yang, M.; He, Z.; Guizani, M. Resource allocation based on digital twin-enabled federated learning framework in heterogeneous cellular network. IEEE Trans. Veh. Technol. 2022, 72, 1149–1158. [Google Scholar] [CrossRef] [Scilit]
  26. Zhang, J.; Liu, Y.; Qin, X.; Xu, X.; Zhang, P. Adaptive resource allocation for blockchain-based federated learning in Internet of Things. IEEE Internet Things J. 2023, 10, 10621–10635. [Google Scholar] [CrossRef] [Scilit]
  27. Ren, Y.; Wu, C.; So, D.K.C. Energy-Efficient User-Edge Association and Resource Allocation for NOMA-Based Hierarchical Federated Learning: A Long-Term Perspective. In Proceedings of the ICC 2024—IEEE International Conference on Communications; IEEE: New York, NY, USA, 2024; pp. 1539–1544. [Google Scholar] [CrossRef] [Scilit]
  28. Ruby, R.; Yang, H.; De Figueiredo, F.A.; Huynh-The, T.; Wu, K. Energy-efficient multiprocessor-based computation and communication resource allocation in two-tier federated learning networks. IEEE Internet Things J. 2022, 10, 5689–5703. [Google Scholar] [CrossRef] [Scilit]
  29. Wei, Z.; He, R.; Chen, X.; Song, C. Dynamic resource allocation for digital twin-enhanced hierarchical federated learning in sustainable Internet of Things. Comput. Commun. 2026, 248, 108410. [Google Scholar] [CrossRef] [Scilit]
  30. Kumar, D.; Pawar, P.P.; Meesala, M.K.; Pareek, P.K.; Addula, S.R.; Shwetha, K.S. Trustworthy IoT Infrastructures: Privacy-Preserving Federated Learning with Efficient Secure Aggregation for Cybersecurity. In Proceedings of the 2024 International Conference on Integrated Intelligence and Communication Systems (ICIICS); IEEE: New York, NY, USA, 2024; pp. 1–8. [Google Scholar] [CrossRef] [Scilit]
  31. McMahan, B.; Moore, E.; Ramage, D.; Hampson, S.; Agüera y Arcas, B. Communication-Efficient Learning of Deep Networks from Decentralized Data. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, Lauderdale, FL, USA, 20–22 April 2017; Proceedings of Machine Learning Research; PMLR: Cambridge, MA, USA, 2017; Volume 54, pp. 1273–1282. [Google Scholar]
  32. Wang, J.; Joshi, G. Cooperative SGD: A unified framework for the design and analysis of local-update SGD algorithms. J. Mach. Learn. Res. 2021, 22, 1–50. [Google Scholar]
  33. Koloskova, A.; Loizou, N.; Boreiri, S.; Jaggi, M.; Stich, S. A unified theory of decentralized SGD with changing topology and local updates. In Proceedings of the International Conference on Machine Learning; PMLR: Cambridge, MA, USA, 2020; pp. 5381–5393. [Google Scholar]
  34. Zhou, X.; Yang, G. More communication-efficient distributed sparse learning. Inf. Sci. 2024, 668, 120523. [Google Scholar] [CrossRef] [Scilit]
  35. Alistarh, D.; Grubic, D.; Li, J.; Tomioka, R.; Vojnovic, M. QSGD: Communication-efficient SGD via gradient quantization and encoding. Adv. Neural Inf. Process. Syst. 2017, 30, 1709–1720. [Google Scholar]
  36. Madani, N.; Sodagari, S. Trade-Off Analysis of NOMA-D2D and OFDMA-D2D Systems: Resource Allocation Perspective. IEEE Access 2024, 12, 25459–25468. [Google Scholar] [CrossRef] [Scilit]
  37. Arulkumaran, K.; Deisenroth, M.P.; Brundage, M.; Bharath, A.A. Deep Reinforcement Learning: A Brief Survey. IEEE Signal Process. Mag. 2017, 34, 26–38. [Google Scholar] [CrossRef] [Scilit]
  38. Ren, F.; Fei, J.; Li, H.; Doma, B.T. Steel Surface Defect Detection Using Improved Deep Learning Algorithm: ECA-SimSPPF-SIoU-Yolov5. IEEE Access 2024, 12, 32545–32553. [Google Scholar] [CrossRef] [Scilit]
  39. Tan, Y.; Long, G.; Liu, L.; Zhou, T.; Lu, Q.; Jiang, J.; Zhang, C. Fedproto: Federated prototype learning across heterogeneous clients. In Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, 22 January–1 March 2022; Volume 36, pp. 8432–8440. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Description of the proposed federated learning resource-optimization process for a surface-defect classification task.
Figure 1. Description of the proposed federated learning resource-optimization process for a surface-defect classification task.
Electronics 15 03776 g001
Figure 2. Accuracy with respect to communication rounds under different Non-IID degrees.
Figure 2. Accuracy with respect to communication rounds under different Non-IID degrees.
Electronics 15 03776 g002
Figure 3. Training loss with respect to communication rounds under different Non-IID levels.
Figure 3. Training loss with respect to communication rounds under different Non-IID levels.
Electronics 15 03776 g003
Figure 4. Single-round training time with respect to communication rounds under different Non-IID levels.
Figure 4. Single-round training time with respect to communication rounds under different Non-IID levels.
Electronics 15 03776 g004
Figure 5. Accuracy with respect to cumulative training time under different Non-IID levels.
Figure 5. Accuracy with respect to cumulative training time under different Non-IID levels.
Electronics 15 03776 g005
Figure 6. Curve of training loss with respect to communication rounds under different Non-IID levels.
Figure 6. Curve of training loss with respect to communication rounds under different Non-IID levels.
Electronics 15 03776 g006
Table 1. Configuration of the Execution Environment.
Table 1. Configuration of the Execution Environment.
Network StructureParameter Information
CPU12th Gen Intel(R) Core(TM) i5-12400F 2.50 GHz
GPUNVIDIA GeForce GTX 3070
OSWin 10
Deep learning frameworktorch 1.13.0 + cu117
EditorPycharm Community 2023.3
Table 2. Training hyperparameter settings.
Table 2. Training hyperparameter settings.
ParameterSetting
ResNet learning rate0.001
ResNet batch size32
DDPG actor learning rate 1 × 10 4
DDPG critic learning rate 1 × 10 3
DDPG mini-batch size10
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

He, S.; Wei, H.; Bi, C.; Tian, H. Adaptive Hyperparameter Adjustment and Resource Allocation for Federated Learning in the Industrial Internet of Things. Electronics 2026, 15, 3776. https://doi.org/10.3390/electronics15173776

AMA Style

He S, Wei H, Bi C, Tian H. Adaptive Hyperparameter Adjustment and Resource Allocation for Federated Learning in the Industrial Internet of Things. Electronics. 2026; 15(17):3776. https://doi.org/10.3390/electronics15173776

Chicago/Turabian Style

He, Shuo, Heyang Wei, Congxian Bi, and Hui Tian. 2026. "Adaptive Hyperparameter Adjustment and Resource Allocation for Federated Learning in the Industrial Internet of Things" Electronics 15, no. 17: 3776. https://doi.org/10.3390/electronics15173776

APA Style

He, S., Wei, H., Bi, C., & Tian, H. (2026). Adaptive Hyperparameter Adjustment and Resource Allocation for Federated Learning in the Industrial Internet of Things. Electronics, 15(17), 3776. https://doi.org/10.3390/electronics15173776

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop