scieee AI-readable full text Open interactive document viewer

Accelerating deep reinforcement learning for digital twin network optimization with evolutionary strategies

Güemes Palau, Carlos,Almasan Puscas, Felician Paul,Xiao, Shihan,Cheng, Xiangle,Shi, Xiang,Barlet Ros, Pere,Cabellos Aparicio, Alberto

Abstract

The recent growth of emergent network applications (e.g., satellite networks, vehicular networks) is increasing the complexity of managing modern communication networks. As a result, the community proposed the Digital Twin Networks (DTN) as a key enabler of efficient network management. Network operators can leverage the DTN to perform different optimization tasks (e.g., Traffic Engineering, Network Planning).Deep Reinforcement Learning (DRL) showed a high performance when applied to solve network optimization problems. In the context of DTN, DRL can be leveraged to solve optimization problems without directly impacting the real-world network behavior. However, DRL scales poorly with the problem size and complexity. In this paper, we explore the use of Evolutionary Strategies (ES) to train DRL agents for solving a routing optimization problem. The experimental results show that ES achieved a training time speed-up of 128 and 6 for the NSFNET and GEANT2 topologies respectively.

Full text

Accelerating Deep Reinforcement Learning for Digital Twin Network Optimization with Evolutionary Strategies Carlos G¨ uemes-Palau∗, Paul Almasan∗, Shihan Xiao†, Xiangle Cheng†, Xiang Shi† Pere Barlet-Ros∗, Albert Cabellos-Aparicio∗ ∗Barcelona Neural Networking Center, Universitat Polit` ecnica de Catalunya, Spain †Network Technology Lab., Huawei Technologies Co.,Ltd. Abstract—The recent growth of emergent network applications (e.g., satellite networks, vehicular networks) is increasing the complexity of managing modern communication networks. As a result, the community proposed the Digital Twin Networks (DTN) as a key enabler of efficient network management. Network operators can leverage the DTN to perform different optimization tasks (e.g., Traffic Engineering, Network Planning). Deep Reinforcement Learning (DRL) showed a high performance when applied to solve network optimization problems. In the context of DTN, DRL can be leveraged to solve optimization problems without directly impacting the real-world network behavior. However, DRL scales poorly with the problem size and complexity. In this paper, we explore the use of Evolutionary Strategies (ES) to train DRL agents for solving a routing optimization problem. The experimental results show that ES achieved a training time speed-up of 128 and 6 for the NSFNET and GEANT2 topologies respectively. Index Terms—Deep Reinforcement Learning, Digital Twin Network, Optimization, Evolutionary Strategies I. INTRODUCTION In the last years, different industry sectors adapted the digital twin paradigm to model complex systems. A digital twin can be seen as a digital representation of a real-world system or phenomena. In a networking context, the community proposed the Digital Twin Network (DTN) as a key technology to enable efficient operation in modern networks [1], [2]. The DTN is a digital replica of the physical network that enables operators to design high performance optimization solutions for complex scenarios, among other use cases [2]. Modern networks have seen a growing trend in network traffic, number of connected devices and a proliferation of emergent network applications (e.g., vehicular networks, IoT) [3]. These trends made modern networks become highly dynamic and heterogeneous, increasing the complexity of efficient network management. In addition, network applications impose different requirements on the real-world network (e.g., low latency, high throughput). However, these applications This publication is part of the Spanish I+D+i project TRAINER-A (ref.PID2020-118011GB-C21), funded by MCIN/ AEI/10.13039/501100011033. This work is also partially funded by the Catalan Institution for Research and Advanced Studies (ICREA) and the Secretariat for Universities and Research of the Ministry of Business and Knowledge of the Government of Catalonia and the European Social Fund. share the underlying network’s limited resources, making it difficult for the network operator to fulfill different requirements at the same time. The DTN is a key enabler for efficient optimization in modern networks [2]. In particular, the DTN models the realworld network dynamics such as the growing trend in network traffic or users. This enables the network operator to manage the network taking into account the underlying network events. For example, the network operator can efficiently plan the network or perform traffic engineering considering the network’s traffic trends. In other words, the DTN created new sprouts of network applications that they don’t only take into account the current network state, but also the past and the future. Network optimization consists in operating the network with the goal of using the network resources efficiently. In the DTN context, the optimization process consists in the interaction between a network optimizer and the DTN. The role of the DTN is to estimate the real-world network performance metrics (e.g., end-to-end delay). These metrics are used to guide the network optimizer towards high quality solutions (e.g., routing configurations, scheduling policies). Deep Reinforcement Learning (DRL) is a technology that showed high performance when applied on solving network optimization problems [4]–[7]. DRL differs from traditional optimization solutions (e.g., ILP, CP) because it leverages the knowledge learned in past optimizations, which is beneficial in highly dynamic scenarios. In addition, DRL enables high performance and real-time network operation in large network optimization scenarios (e.g., large network topologies) [5]. The main issue with DRL-based solutions is that they scale poorly. The DRL agent learns from a sequential interaction with an environment. When DRL is applied to large optimization scenarios (e.g., large network topologies) or highly complex optimization problems (e.g., Traffic Engineering), the interaction with the environment becomes computationally intensive. For example, we implemented the DRL solution meant for solving network routing optimization from [8] using the PPO algorithm [9]. The DRL agent took 3 minutes to train in the 14-node NSFNET topology [10], but when trained on the 24-node GEANT2 topology [11] it took nearly an hour. Hence, a simple exponential regression estimates that to train © 2022 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes,creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. DOI 10.1109/NOMS54207.2022.9789945 Enviroment Agent State s0 Action a0 Reward r0 State s1 Action a1 Reward r1 State s2 Interaction Stored Experiences Creates batches to train model Determines Behaviour Stores interactions NN Model Fig. 1: General overview of the DRL agent training process. in a 300-node topology would take around two weeks. This illustrates how applying DRL for solving real-world problems is limited by its sequential nature. In this paper, we explore an alternative method to train DRL agents using Evolution Strategies (ES) [12]. Specifically, ES removes the traditional backpropagation from the DRL agent’s training process and applies a highly parallelizable weight optimization algorithm to find the best set of weights for a Neural Network (NN). In addition, we integrated a Graph Neural Network (GNN) in the DRL agent to enable efficient optimization on graphs (i.e., network topology). To showcase the capabilities of combining ES with DRL on graph-based optimization problems, we apply it on a routing optimization scenario in Optical Transport Networks (OTN). Specifically, we implemented the DQN algorithm from [8] using PPO, which corresponds to our computational time baseline. We applied ES to the PPO algorithm version and executed it using up to 64 processes. II. PROBLEM STATEMENT In the DRL context, the training process requires a DRL agent and an environment. The DRL agent acts on the environment, changing its internal state. The environment defines the problem at hand that needs to be solved. After each action, the environment returns a new state and a reward, indicating the DRL agent if the action performed was good or bad. Generally, the training process is composed by two main phases. First, the DRL agent interacts with the environment and collects all the states and rewards returned by the environment. These interactions are stored and later on are used by different DRL algorithms to make the agent converge to a good policy [9], [13]. Second, the stored experiences are used to train the NN weights following a supervised learning fashion. Traditionally, the training process of DRL agents follows a sequential pattern that alternates between these two phases, which is illustrated in Figure 1. The NN weights of the DRL agent are typically trained using gradient descent with backpropagation. Therefore, the second phase can be easily accelerated using GPUs. However, to accelerate the first phase is challenging. Specifically, the sequential nature of the interaction between the DRL agent and the environment cannot be broken. In addition, the first phase scales poorly with the problem size, as larger problems typically require longer interactions with the environment. Generate Mutations Scores of Mutation #1 Scores of Mutation #N Updates Weights Weighted combination of mutations NN with mutated weights #1 NN with mutated weights #N EnviromentAgent Action State Reward Worker #1 Current NN Model Worker #N Fig. 2: General overview of ES applied to DRL. III. NETWORK OPTIMIZATION PROBLEM To showcase the capabilities of applying ES to accelerate the training of DRL agents, we train a DRL agent in a routing optimization use case. Particularly, we consider a SDN-based scenario where the DRL agent is placed in the control plane and is provided with a global view of the realworld Optical Transport Network (OTN) [14]. Its goal is to optimize the routing configuration by efficiently using the network’s resources. The optimization problem can be described as a classical resource allocation problem [8], [15], [16]. It is defined by an OTN whose links have a limited bandwidth capacity and a set of traffic demands, defined by the tuple {src, dst, bandwidth}. These demands need to be routed through a particular sequence of links that connect the src and the dst nodes. Once routed, the traffic demand occupies the links’ utilization, and the resources are not freed until the end of a DRL episode. Therefore, the problem consists of allocating the maximum traffic volume in the network. A traffic demand cannot be allocated when the bandwidth is larger than the available link capacity for any possible path, indicating the end of a DRL episode. IV. PROPOSED SOLUTION In this paper, we adapt Evolutionary Strategies (ES) [12] to accelerate the training of a DRL agent that performs routing optimization. ES are a set of optimization algorithms that are part of the family of evolutionary algorithms [12]. Specifically, ES follow an iterative method that tries to converge to a set of NN weights that maximizes some objective function. At the beginning of the optimization process, the objective function and a set of initial NN weights θinit are given. Then, these weights are perturbed, creating multiple mutations of the original weights. Each mutation is then evaluated and has associated a score, indicating how good or bad are the weights to satisfy the objective function. Afterwards, the mutations are combined into one update using natural gradient ascent. The optimization process starts again using the new weights θnew, and continues until convergence. Intuitively, the weights are updated to become similar to those of the better performing mutations. By the end of the ES algorithm, the NN weights Algorithm 1 Improved Parallelized ES Optimization Require: Learning rate α, noise standard deviation for mutations σ, initial policy parameters θ0, fitness function F, number of mutations k 1: for each worker i= 1, ..., n do 2: Obtain assigned number of mutations ki 3: if worker iis coordinator then ▷Coordinator thread 4: for t= 0,1,2, ... do 5: Sample global perturbations ϵ1, ..., ϵk;ϵ∼ N (0, I) 6: Compute local returns F′←F(θt+σϵi), ϵi∈ki 7: Receive and aggregate returns other workers: ˆ F 8: Obtain solution update ∆θ←α1 nσ Pn j=1 ˆ Fjϵj 9: Send ∆θto all worker threads 10: Update solution θt+1 ←θt+ ∆θ 11: else ▷Worker thread 12: for t= 0,1,2, ... do 13: Sample local perturbations ϵ1, ϵ2, ..., ϵki, ϵj∼ N (0, I) 14: Compute returns F′←F(θt+σϵi), ϵi∈ki 15: Send returns F′to coordinator thread 16: Receive ∆θand Update Solution θt+1 ←θt+ ∆θ θfinal will converge at a point where no mutations can be generated that obtain higher scores. A. Design In a DRL context, the initial weights for the DRL agent policy are obtained using some well-established method [17]. The weight perturbations are created using noise sampled from a multivariate Gaussian distribution. The number of mutations is a hyperparameter that has a trade-off between the quality of exploration (i.e., large number of mutations) and speed (i.e., low number of mutations). Each mutation defines a new DRL agent policy that is evaluated by making it interact with the environment. The resulting sum of rewards from each mutation is used to obtain the evaluation score. Figure 2 shows a general overview of ES applied to DRL. The particularities of our graph-based optimization problem forced us to make some adaptations to the original ES method [12]. Specifically, we designed a centralized version, where only one of the workers performs the weight updates and propagates the main NN weights to the other workers. We refer to this worker as the coordinator. With the centralized method it is no longer necessary for the perturbations to be replicated across all workers. This drastically reduces the memory cost. In our work, the workers only communicate with the coordinator, which results in less messages being sent. We also include some of the optional improvements proposed by the original paper, including fitness shaping, mirrored sampling and added noise to the action probabilities distribution of the agent [12]. Algorithm 1 describes the training process of a DRL agent using ES. The role of the workers is to sample the perturbations, evaluate the mutations, send the returns to the coordinator and update the solution. The coordinator has a more complex task which starts by generating the perturbations. Once these have been evaluated by the workers, the coordinator retrieves the scores and computes the new NN weights. This new set of weights is then sent to all the workers. 1 2 4 8 16 32 64 Number of workers 8 32 128 512 Time spent perfoming episodes per epoch (s) Local Server AWS NSFNET GÉANT2 NSFNET + GEÁNT2 (estimate) Fig. 3: Impact of the number of workers on the time spent per epoch performing episodes. Notice that the y-axis is in logarithmic scale. V. EXPERIMENTAL RESULTS In this section we train a DRL agent using ES to efficiently allocate traffic demands in the OTN routing scenario described in Section III. Specifically, we adapt the code from an existing solution and implement it so we can train DRL agents with PPO [8] and ES. We use the PPO implementation as the baseline. We train two different agents on the 14-node NSFNET [10] and the 24-node GEANT2 topologies [11]. We also train a third agent over both topologies simultaneously, so it learns to optimize both at the same time. Then we compare the training times of the agents when using PPO and ES. We execute the DRL agent with ES for a varying number of workers. First, we execute ES in a local server with 16 CPU cores with support for 32 concurrent threads of execution, where we use ES with 1, 2, 4, 8, 16 and 32 workers. Due to limited hardware capacity, we execute ES on an Amazon Web Services (AWS) c5a.16xlarge instance with 64 CPU cores, where we use ES with 32 and 64 workers. The source code is written in Python, with the usage of libraries such as Tensorflow for representing the GNN [18], NetworkX for representing the network state [19], the OpenAI Gym framework for representing the DRL environment [20], and MPI4PY for establishing the communication between workers [21]. The source code, along with all the training and evaluation results presented here, are publicly available1. While the aim of this paper is to reduce training time, having low inference time is also critical in the application of these solutions. Since we implement our DRL agents through NNs, it only takes in average 6ms to allocate a new demand. A. Training time speed-up In this experiment we want to see the impact of the number of workers in the training time of the DRL agent with ES. Figure 3 shows the experimental results based on the time spent per epoch to evaluate all the mutations across all configurations. The results show that increasing the number of workers results in a linear decrease in time spent interacting with the environment. While we evaluate the algorithms with up to 64 workers, ultimately we expect a speed-up as long we have as many workers as the number of mutations to evaluate. 1https://github.com/BNN-UPC/DRL-ES-OTN 1 2 4 8 16 32 64 Number of workers ×1/16 ×1/4 ×1 ×4 ×16 ×64 ×256 Training speed-up with ES (relative to PPO) Local Server AWS NSFNET GÉANT2 NSFNET + GEÁNT2 Fig. 4: Training speed-up achieved using ES for a different number of workers and topologies. B. Training speed-up relative to PPO In this experiment we compared the training time of the ES method against the traditional PPO with backpropagation. First, we measured the reward at which PPO converges. This was done by running a very large number of iterations, and then take the average reward during the last 50 evaluations. Then, we compared how long does it take for the ES to reach PPO’s performance in convergence. Figure 4 shows the experimental results. The y-axis indicates how much faster is the DRL agent trained with ES than the traditional PPO to converge. The horizontal dotted line at the value of ×1represents the break-even point where both techniques train just as fast. In other words, if ES’s performance is above the line it means that ES is faster than PPO, otherwise it means that PPO is faster than ES. The general trend indicates that a higher number of workers leads to a better performance relative to PPO. However, there is a clear difference between the models being trained on the NSFNET topology and on the GEANT2 topology. The results from the NSFNET topology indicate that ES surpasses PPO with only 2 workers. The speed-up only stalls when it reaches 16 workers. This can be attributed to ES’s reliance in randomness to update the solution. As a result, the model trained with 16 workers required more iterations before it reached PPO’s performance due to the poor quality of the perturbations. When considering the executions in the remote server we see that increasing the number of workers still results in an even more accelerated training. The evaluation results on the GEANT2 topology and on the mixed scenario with GEANT2 and NSFNET show a more modest speed-up. Specifically, the results indicate that more workers are needed to surpass PPO than in the case of training only on NSFNET. The performance gap between these scenarios highlights the weakness of ES: larger network optimization scenarios involve an increased training time for ES methods. This is because the GNN becomes larger, resulting in an increased number of mutations needed to try in each iteration. VI. DISCUSSION Training methods that use ES have several advantages compared to other traditional DRL techniques. First and utmost, it is trivial to parallelize the training in ES. This is because the task of evaluating the mutations, the most expensive part of the algorithm, can be split across multiple workers. ES also has less hyperparameters to fine-tune, being the number of mutations the most significant one. This results in a faster experiment setup. Additionally, ES benefits in avoiding several pitfalls of DRL. For example, ES do not have issues with environments with sparse rewards or they do not need for future rewards discount [12]. However, ES have two major disadvantages when compared to DRL. First, as it learns from sets of episodes rather than individual interactions, it also means that ES take a longer effort to update its solution. Also, ES cannot be executed in environments with potentially infinite episodes, as ES requires for the episode to end to evaluate its mutations. In practice a maximum episode length can be forced, but that means that the agent is not guaranteed to perform correctly after that point. VII. RELATED WORK There are several approaches that use DRL agents to tackle the network optimization problem [4]–[7], but they rely in traditional DRL algorithms for training their agents. The first initial attempts to accelerate DRL’s training was with A3C [22], in which several workers combined efforts to train a single centralized network. Shortly thereafter it was improved into A2C [23], a synchronous version of A3C which proved to perform better. There was also GA3C [24], which consisted in adapting A3C for it to take advantage of GPUs. From the most recent related work, Ape-X [25], D4PG [26] and IMPALA [27] are among the most widely used methods to accelerate DRL. While Ape-X is based on DQN and the others on actor-critic models, all three share the same paradigm: to accelerate interactions by having multiple actors interacting with the environment, all feeding a common experiences buffer so a learner can train the model. After the original OpenAI paper [12] there has been further research into using ES to train DRL agents [28], [29]. However, we are the first to analyze the benefits of this proposal in the context of network optimization. VIII. CONCLUSION In this paper we explored the use of ES to accelerate DRL agents for network optimization. The experimental results showed that increasing the number the workers resulted in a linear decrease in the training time of the DRL agent. Specifically, the results showed that we achieved over a 128- fold speed-up for the NSFNET topology, and a 6-fold speed-up for the GEANT2 topology. On top of that, ES provides additional advantages, such as requiring fewer hyperparameters and mitigating problems with RL algorithms, such as the ones associated with sparse rewards and non-MDP environments. As a result, ES should be considered as a viable alternative to accelerate DRL algorithms. However, results also suggest that ES does not scale to larger problems as we initially hoped. Choosing the best approach to accelerate the DRL training may depend on the nature of the environment, as well as on the number of trainable parameters of the DRL agent. REFERENCES [1] C. Zhou, H. Yang et al., “Digital Twin Network: Concepts and Reference Architecture,” Internet Engineering Task Force, Internet- Draft draft-zhou-nmrg-digitaltwin-network-concepts-06, Dec. 2021, work in Progress. [Online]. Available: https://datatracker.ietf.org/doc/ html/draft-zhou-nmrg-digitaltwin-network-concepts-06 [2] P. Almasan, M. Ferriol-Galm´ es et al., “Digital twin network: Opportunities and challenges,” arXiv preprint arXiv:2201.01144, 2022. [3] G. Wellbrock and T. J. Xia, “How will optical transport deal with future network traffic growth?” in 2014 The European Conf. on Optical Comm. (ECOC). Cannes, France: IEEE, 2014, pp. 1–3. [4] H. Zhu, V. Gupta et al., “Network planning with deep reinforcement learning,” in Proc. of the ACM SIGCOMM Conf., ser. SIGCOMM ’21. New York, USA: ACM, 2021, p. 258–271. [5] P. Almasan, S. Xiao et al., “Enero: Efficient real-time routing optimization,” arXiv preprint arXiv:2109.10883, 2021. [6] G. Bern´ ardez, J. Su´ arez-Varela et al., “Is machine learning ready for traffic engineering optimization?” in 2021 IEEE 29th Int’l. Conf. on Network Prot. (ICNP), 2021, pp. 1–11. [7] H. Mao, R. Netravali et al., “Neural adaptive video streaming with pensieve,” in Proc. of the Conf. of the ACM Special Interest Group on Data Comm., ser. SIGCOMM ’17. New York, USA: ACM, 2017, p. 197–210. [Online]. Available: https://doi.org/10.1145/3098822.3098843 [8] P. Almasan, J. Su´ arez-Varela et al., “Deep reinforcement learning meets graph neural networks: Exploring a routing optimization use case,” arXiv preprint arXiv:1910.07421, 2019. [9] J. Schulman, F. Wolski et al., “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017. [10] X. Hei, J. Zhang et al., “Wavelength converter placement in least-load- routing-based optical networks using genetic algorithms,” Journal of Optical Networking, vol. 3, no. 5, pp. 363–378, 2004. [11] F. Barreto, E. C. Wille et al., “Fast emergency paths schema to overcome transient link failures in ospf routing,” arXiv preprint arXiv:1204.2465, 2012. [12] T. Salimans, J. Ho et al., “Evolution strategies as a scalable alternative to reinforcement learning,” arXiv preprint arXiv:1703.03864, 2017. [13] T. P. Lillicrap, J. J. Hunt et al., “Continuous control with deep reinforcement learning,” arXiv preprint arXiv:1509.02971, 2015. [14] J. Strand, A. L. Chiu et al., “Issues for routing in the optical layer,” IEEE Comm. Magazine, vol. 39, no. 2, pp. 81–87, 2001. [15] X. Chen, J. Guo et al., “Deep-rmsa: A deep-reinforcement-learning routing, modulation and spectrum assignment agent for elastic optical networks,” in 2018 Optical Fiber Comm. Conf. and Exposition (OFC). IEEE, 2018, pp. 1–3. [16] J. Su´ arez-Varela, A. Mestres et al., “Routing in optical transport networks with deep reinforcement learning,” Journal of Optical Comm. and Networking, vol. 11, no. 11, pp. 547–558, 2019. [17] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in Proceedings of the thirteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, 2010, pp. 249–256. [18] M. Abadi, A. Agarwal et al., “TensorFlow: Large-scale machine learning on heterogeneous systems,” 2015, software available from tensorflow.org. [Online]. Available: https://www.tensorflow.org/ [19] NetworkX Developers, “NetworkX,” 2021. [Online]. Available: https: //github.com/networkx/networkx [20] G. Brockman, V. Cheung et al., “Openai gym,” arXiv preprint arXiv:1606.01540, 2016. [21] L. Dalcin and Y.-L. L. Fang, “mpi4py: Status update after 12 years of development,” Computing in Science Engineering, vol. 23, no. 4, pp. 47–54, 2021. [22] V. Mnih, A. P. Badia et al., “Asynchronous methods for deep reinforcement learning,” in Int’l Conf. on Machine Learning. PMLR, 2016, pp. 1928–1937. [23] A. V. Clemente, H. N. Castej´ on et al., “Efficient parallel methods for deep reinforcement learning,” arXiv preprint arXiv:1705.04862, 2017. [24] M. Babaeizadeh, I. Frosio et al., “Reinforcement learning through asynchronous advantage actor-critic on a gpu,” arXiv preprint arXiv:1611.06256, 2016. [25] D. Horgan, J. Quan et al., “Distributed prioritized experience replay,” arXiv preprint arXiv:1803.00933, 2018. [26] G. Barth-Maron, M. W. Hoffman et al., “Distributed distributional deterministic policy gradients,” arXiv preprint arXiv:1804.08617, 2018. [27] L. Espeholt, H. Soyer et al., “Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures,” in Int’l Conf. on Machine Learning. PMLR, 2018, pp. 1407–1416. [28] P. Pagliuca, N. Milano et al., “Efficacy of modern neuro-evolutionary strategies for continuous control optimization,” Frontiers in Robotics and AI, vol. 7, 2020. [Online]. Available: https://www.frontiersin.org/ article/10.3389/frobt.2020.00098 [29] S. Khadka and K. Tumer, “Evolutionary reinforcement learning,” CoRR, vol. abs/1805.07917, 2018. [Online]. Available: http://arxiv.org/ abs/1805.07917