기본 정보
- 저자
- DOI
- 10.1145/3372780.3378174
- 저널
- –
- 발행년도
- 2020
- 발행기관
- –
- 피인용수
- 32
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1145/3372780.3378174
- 토픽
- Graphene research and applications
- OpenAlex ID
- W3010672652
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (13) 프리즘 필름
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 12,071자
본문 펼치기
섹션 본문 24문단 · 11,507자
(제목 없음)
1Placement Optimization is an important problem in systems and chip design, which consists of mapping the nodes of a graph onto a limited set of resources to optimize for an objective, subject to constraints. In this paper, we start by motivating reinforcement learning as a solution to the placement problem. We then give an overview of what deep reinforcement learning is. We next formulate the placement problem as a reinforcement learning problem, and show how this problem can be solved with policy gradient optimization. Finally, we describe lessons we have learned from training deep reinforcement learning policies across a variety of placement optimization problems.
INTRODUCTION
2An important problem in systems and chip design is Placement Optimization, which refers to the problem of mapping the nodes of a graph onto a limited set of resources to optimize for an objective, subject to constraints. Common examples of this class of problem include placement of TensorFlow graphs onto hardware devices to minimize training or inference time, or placement of an ASIC or FPGA netlist onto a grid to optimize for power, performance, and area.
3Placement is a very challenging problem as several factors, including the size and topology of the input graph, number and properties of available resources, and the requirements and constraints of feasible placements all contribute to its complexity. There are many approaches to the placement problem. A range of algorithms including analytical approaches [3,12,14,15], genetic and hill-climbing methods [4,6,13], Integer Linear Programming (ILP) [2,27], and problem-specific heuristics have been proposed.
4More recently, a new type of approach to the placement problem based on deep Reinforcement Learning (RL) [16,17,28] has Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s). ISPD '20,March emerged. RL-based methods bring new challenges, such as interpretability, brittleness of training to convergence, and unsafe exploration. However, they also offer new opportunities, such as the ability to leverage distributed computing, ease of problem formulation, end-to-end optimization, and domain adaptation, meaning that these methods can potentially transfer what they learn from previous problems to new unseen instances.
5In this paper, we start by motivating reinforcement learning as a solution to the placement problem. We then give an overview of what deep reinforcement learning is. We then formulate the placement problem as an RL problem, and show how this problem can be solved with policy gradient optimization. Finally, we describe lessons we have learned from training deep RL policies across a variety of placement optimization problems.
DEEP REINFORCEMENT LEARNING
6Most successful applications of machine learning are examples of supervised learning, where a model is trained to approximate a particular function, given many input-output examples (e.g. given many images labeled as cat or dog, learn to predict whether a given image is that of a cat or a dog). Today's state-of-the-art supervised models are typically deep learning models, meaning that the function approximation is achieved by updating the weights of a multi-layered (deep) neural network via gradient descent against a differentiable loss function.
7Reinforcement learning, on the other hand, is a separate branch of machine learning in which a model, or policy in RL parlance, learns to take actions in an environment (either the real world or a simulation) to maximize a given reward function. One well-known example of reinforcement learning is AlphaGo [23], in which a policy learned to take actions (moves in the game of Go) to maximize its reward function (number of winning games). Deep reinforcement learning is simply reinforcement learning in which the policy is a deep neural network.
8RL problems can be reformulated as Markov Decision Processes (MDPs). MDPs rely on the Markov assumption, meaning that the next state +1 depends only on the current state , and is conditionally independent of the past.
9Like MDPs, RL problems are defined by five key components:
10• states: the set of possible states of the world (e.g. the set of valid board positions in Go) • actions: the set of actions that can be taken by the agent (e.g.
11all valid moves in a game of Go) • state transition probabilities: the probability of transitioning between any two given states.
12The equation above is the basis of various policy gradient optimization methods, such as REINFORCE [25], PPO [22], and SAC [9].
INGREDIENTS FOR RL SUCCESS
13In this section, we will share some of the lessons that we have learned in training deep reinforcement learning policies to solve placement problems in computer systems and chip design.
14Reward Function: Designing the right reward function is one of the most critical decisions. Some properties of effective reward functions are as follows:
151) Reward functions should be fast to evaluate; RL training often requires 10-100s of thousands of iterations of reward evaluation before reaching convergence. While the exact timing that makes a tractable reward function depends on the complexity of the problem, a sub-second reward function would be effective in nearly any scenario.
162) Reward functions should be strongly correlated with the true objective. In many real-world scenarios, we need to use simulators or proxy reward functions to approximate the true objective, which may be prohibitively expensive to calculate. If the proxy reward is not well-correlated with the true objective, we are solving the wrong problem and the learned placement is unlikely to be useful. While designing a good simulator or approximate function is a challenging task in its own right, it is helpful to build a reward function by combining various approximate metrics that each independently correlate with the true reward. For example, for TensorFlow placement, the proxy reward could be a composite function of total memory per device, number of inter-device (and therefore expensive) edges induced by the placement, imbalance of computation placed on each device. By incorporating a weighted average of multiple proxy rewards, the total variance of the reward error is reduced and over-fitting to a particular proxy metric is avoided.
173) Another important factor is correctly engineering the reward function. This could be as simple as normalizing the reward or applying more complex functions to change the shape of the reward. For example, for the device placement problem, measuring the runtime of one step of the TensorFlow graph was the true reward function. Due to the runtime varying widely across different placements, using the runtime directly would interfere with learning and gradient updates. We chose to instead use the square root of the runtime, which effectively dampened the range of values.
18Action Space: Another key ingredient is designing the appropriate action space. For example, the problem could be formulated as placing the nodes of the netlist one at a time onto the chip netlist, or as placing all of the nodes and then deciding which perturbation (e.g. swap, shift, rotate, etc.) to apply to each of the nodes in a fixed sequence. In device placement, we chose to place all of the Tensor-Flow nodes onto hardware devices before evaluating the reward for that placement, because otherwise measuring the reward of a partial placement would be very difficult, if not impossible. For ASIC placement, on the other hand, one can define partial reward functions, because it is possible to measure changes in metrics, such as wirelength and congestion, as nodes are being placed.
19Managing Constraints: The constraints for feasible placements vary across placement problems. For example, a common constraint is the capacity of placement locations, which limits the number of nodes that can be placed onto that location. For example in device placement, the memory footprint of the nodes placed onto a single device should not exceed the memory limit of that device. Another constraint is that certain nodes cannot co-exist on the same location. For example, in ASIC placement, two macro blocks cannot overlap on the chip canvas.
20There are many approaches to enforcing these constraints to avoid or reduce the number of infeasible placements generated by the policy. Perhaps the most straightforward way to handle the constraints is to penalize the policy with a large negative reward whenever it generates infeasible placements. A challenge with this solution is that the policy does not gain any information about how far this placement was from a feasible placement. In the most extreme case, if all of the initial placements generated by the policy are infeasible, there will be no positive signal to teach the policy how to explore the environment and training will fail. Thus, creating a reward function that penalizes the infeasible placements relative to how far they are from viable placements becomes critical.
21Another approach is to force the policy to only generate feasible placements. This can be accomplished via a function that masks out the infeasible placements. For example, a mask can be updated given the partial placement of the graph nodes. Each time a new node is placed, the density of all the locations is updated (based on the locations of the nodes that are already placed). The action space then becomes limited to those locations that have enough free capacity to accept the new node. This approach has its own challenges as calculating the mask, similar to calculating the reward, must be done efficiently.
22Representations: Finally, the way in which state is represented has significant impact on the performance of the policy and its ability to generalize to unseen instances of the placement problem. For example, in the earlier TensorFlow device placement papers [16,17], we represented the computational graph as a list of adjacencies, indices of the node operations, and sizes of the operations. This approach was effective when the policy was trained from scratch for each new TensorFlow graph, but was unable to generalize or transfer what it learned to new graphs. On the other hand, [28] used graph convolutional neural networks to learn better representations of the computational graph structure, and were able to transfer knowledge across graphs.
CONCLUSION
23In this paper we discuss placement optimization with deep reinforcement learning. Deep RL is a promising approach for solving combinatorial problems, and enables domain adaptation and direct optimization of non-differentiable objective functions. Training RL policies is a very challenging task, in part due to the brittleness of gradient updates and the costliness of evaluating rewards. In this work, we provide an overview of deep RL, formulate the placement problem as a RL problem, and discuss strategies for training successful RL agents.
24We predict a trend towards more effective RL-based domain adaptation techniques, in which graph neural networks will play a key role in enabling both higher sample efficiency and more optimal placements. We also foresee a future in which easy-to-use RL-based placement tools will enable non-ML experts to harness and improve upon these powerful techniques.
참고문헌 29건
- A new model for learning in graph domains Proceedings. 2005 IEEE International Joint Conference on Neural Networks, 2005. · 2006 10.1109/ijcnn.2005.1555942
- Constraint driven I/O planning and placement for chip-package co-design 2006 10.1145/1118299.1118356
- ePlace ACM Transactions on Design Automation of Electronic Systems · Association for Computing Machinery · 2015 10.1145/2699873
- Optimization by Simulated Annealing Science · American Association for the Advancement of Science · 1983 10.1126/science.220.4598.671
- A SimPLR method for routability-driven placement International Conference on Computer Aided Design · 2011 10.5555/2132325.2132346
- The Graph Neural Network Model IEEE Transactions on Neural Networks · Institute of Electrical and Electronics Engineers · 2008 10.1109/tnn.2008.2005605
- Simple statistical gradient-following algorithms for connectionist reinforcement learning Machine Learning · Springer Science+Business Media · 1992 10.1007/bf00992696
- Graph Echo State Networks 2022 International Joint Conference on Neural Networks (IJCNN) · 2010 10.1109/ijcnn.2010.5596796
- A genetic algorithm for macro cell placement European Design Automation Conference · 1992 10.5555/159754.160122
- 25th ACM/IEEE Design Automation Conference ® Computer · IEEE Computer Society · 1986 10.1109/mc.1986.1663069
- Mastering the game of Go with deep neural networks and tree search Nature · Nature Portfolio · 2016 10.1038/nature16961
- Genetic Placement IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems · Institute of Electrical and Electronics Engineers · 1987 10.1109/tcad.1987.1270337
- Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering arXiv (Cornell University) · Cornell University · 2016
- Device Placement Optimization with Reinforcement Learning arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1706.04972
- Diagnosing Non-Intermittent Anomalies in Reinforcement Learning Policy Executions (Short Paper) arXiv (Cornell University) · Cornell University · 2017 10.4230/oasics.dx.2024.16
- Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1801.01290
- A Hierarchical Model for Device Placement International Conference on Learning Representations · 2018
- RePlAce: Advancing Solution Quality and Routability Validation in Global Placement IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems · Institute of Electrical and Electronics Engineers · 2018 10.1109/tcad.2018.2859220
- DREAMPlace 2019 10.1145/3316781.3317803
- Trust Region Policy Optimization arXiv (Cornell University) · Cornell University · 2015
- When to Trust Your Model: Model-Based Policy Optimization arXiv (Cornell University) · Cornell University · 2019
- Asynchronous Methods for Deep Reinforcement Learning arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1602.01783
- Spectral Networks and Locally Connected Networks on Graphs arXiv (Cornell University) · Cornell University · 2013 10.48550/arxiv.1312.6203
- GDP: Generalized Device Placement for Dataflow Graphs arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1910.01578
- When to Trust Your Model: Model-Based Policy Optimization 2019
- A Comprehensive Survey on Graph Neural Networks IEEE Transactions on Neural Networks and Learning Systems · Institute of Electrical and Electronics Engineers · 2020 10.1109/tnnls.2020.2978386
- Proceedings of the International Conference on Computer-Aided Design 2012 10.1145/2429384
- A genetic algorithm for macro cell placement Proceedings EURO-DAC '92: European Design Automation Conference · 2003 10.1109/eurdac.1992.246265
- Deep Convolutional Networks on Graph-Structured Data arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1506.05163