Batch Reinforcement Learning
By parallelizing the training process of the reinforcement learning system on multiple CPU cores and hardware accelerators, the problem of low training efficiency in the existing technology is solved, achieving more efficient action selection neural network training and robot control strategy learning, and improving Performance of real-world applications.
Patent Information
- Application Number
- CN201880038408.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-08-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2038-08-24
AI Technical Summary
Existing reinforcement learning systems have time- and computing resource-intensive bottlenecks in the process of training data collection and neural network training, resulting in low training efficiency and difficulty in effectively learning robot control strategies and applying them to real-world environments.
Parallelization technology is used to train action selection neural networks on multiple CPU cores and hardware accelerators. By simulating multiple environment copies in parallel and performing neural network inference, training time and computing resource requirements are reduced.
Significantly improves the training efficiency of action selection neural networks, allowing more efficient learning of robot control strategies in simulations and enabling higher-performance robot operations in the real world.
Smart Images

Figure CN110753936B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of U.S. Patent Application No. 62 / 550,513, filed on August 25, 2017, entitled “Batch Training of Action Selection Neural Networks,” the entire contents of which are incorporated herein by reference. Background Art
[0003] This specification relates to reinforcement learning.
[0004] In a reinforcement learning system, an agent interacts with an environment by performing actions selected by the reinforcement learning system in response to receiving observations characterizing the current state of the environment.
[0005] Some reinforcement learning systems select an action to be performed by an agent in response to receiving a given observation based on the output of a neural network.
[0006] A neural network is a machine learning model that uses one or more layers of nonlinear units to predict an output for a received input. Some neural networks are deep neural networks that include one or more hidden layers in addition to the output layer. The output of each hidden layer is used as the input for the next layer in the network (i.e., the next hidden layer or output layer). Each layer of the network generates an output based on the received input according to the current values of the corresponding set of parameters. Summary of the invention
[0007] This specification describes a system implemented as a computer program on one or more computers at one or more locations that selects actions to be performed by an agent interacting with an environment. More specifically, this specification describes batch reinforcement learning techniques that allow neural networks to be trained in a shorter time and more computationally efficient manner, where the neural network is used to select actions to be performed by the agent. The techniques described in this specification are particularly suitable for execution on a computing device with multiple CPU (central processing unit) cores and / or hardware accelerators (such as graphics processing units (GPUs) and / or tensor processing units (TPUs). In addition, the techniques described in this specification are particularly suitable for training neural networks, which are then used to control robots (or other mechanical agents). In particular, using the described techniques, control policies for robots, i.e., policies for controlling robots by selecting actions using neural networks, can be learned in simulation and then applied to real-world environments.
[0008] Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages.
[0009] Embodiments of the described system facilitate improved training of action selection neural networks. In particular, by simulating multiple environment replicas in parallel and performing the neural network inference required to select actions in parallel as described in this specification, the computational efficiency of the training process is improved and parallelization on multiple CPU cores can be exploited. Furthermore, the techniques described in this specification can allow control policies for robots to be learned more efficiently in simulation and can result in higher performance robots when the learned policies are applied in the real world.
[0010] More specifically, reinforcement learning techniques generally involve repeatedly performing two steps: (1) causing an agent to interact with an environment in order to collect training data, i.e., transition tuples, for training an action selection neural network, and (2) training the action selection neural network on the collected transition tuples. The performance of conventional reinforcement learning techniques is limited by the time and computational resources required to collect transition tuples from the environment, which are then used to train the neural network. That is, collecting transition tuples requires a greater amount of time and a greater amount of computational resources than training the network on the collected transition tuples, and thus slows down and reduces the computational efficiency of the training process.
[0011] The training data collection step consists of two phases in sequence (both of which are time and resource intensive): (1) performing actions in the environment, i.e., having the agent perform actions, observing the impact of performing the actions on the environment, and generating corresponding training data, and (2) performing neural network inference to select actions to be performed by the agent.
[0012] The described system alleviates the bottleneck and reduces the computational resources, such as time, computing power, or both, required to train a neural network by parallelizing these two time-intensive stages. In particular, the described system allows both: (i) performing neural network inference to select actions for multiple copies of an environment in parallel, and (ii) performing actions in the environment in parallel for each of the multiple copies of the environment. As a result, the amount of training time and computational resources required to train an action selection neural network is significantly reduced relative to conventional techniques.
[0013] The details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a block diagram of an example reinforcement learning system.
[0015] Figure 2 is a flowchart of an example process of batch reinforcement learning.
[0016] Figure 3 is a flowchart of an example process for batch reinforcement learning using computational graphs.
[0017] The same reference numbers and designations in different drawings indicate the same elements. DETAILED DESCRIPTION
[0018] Figure 1 An example reinforcement learning system 100 is shown. Reinforcement learning system 100 is an example of a system implemented as a computer program on one or more computers at one or more locations in which the systems, components, and techniques described below are implemented.
[0019] The reinforcement learning system 100 trains an action selection neural network 140 for selecting an action to be performed by an agent interacting with an environment at each of a plurality of time steps so as to cause the agent to perform a specified task.
[0020] At each time step, the system 100 receives data representing the current state of the environment, such as an image of the environment, and selects an action to be performed by the agent in response to the received data using the action selection neural network 140. The data representing the state of the environment will be referred to as observations in this specification. At each time step, the state of the environment at the time step (represented by the observations) depends on the state of the environment at the previous time step and the action performed by the agent at the previous time step.
[0021] At each time step, the agent may receive (or the environment may generate) a reward based on the current state of the environment and the agent's actions at that time step. In general, rewards are numerical values and may be based on any event or aspect of the environment. For example, a reward may indicate whether the agent has completed a task (e.g., navigated to a goal location in the environment) or the agent's progress toward completing a task.
[0022] Typically, the environment is a simulated environment, and the agent is implemented as one or more computer programs that interact with the simulated environment. For example, the environment can be a simulated version of a real-world environment, and the agent is a simulated version of a mechanical agent that interacts with the real-world environment. For example, the agent can be a simulated version of a robot that interacts with the environment to complete a specified task (e.g., navigating to a specific location in the environment, locating a specific object in the environment, or moving an object to a specific location). As another example, the agent can be a simulated version of an autonomous or semi-autonomous vehicle that navigates in a simulated version of a real-world environment (e.g., a motion simulation environment), such as a driving simulation or a flight simulation, to complete a specified task, such as navigating to a specific location while meeting safety or passenger comfort goals. In these examples, the action can be a control input for controlling a robot or autonomous vehicle. For example, in the case of a robot, the input can include torques for controlling the robot joints.
[0023] In some cases, observations are images of the simulated environment, sensor data captured by simulated sensors of a simulated agent, or other high-dimensional data. In other cases, observations are low-dimensional features derived from high-dimensional data by another system.
[0024] To select an action to be performed by the agent in response to a given observation, the system 100 processes inputs including the given observation using an action selection neural network 140 to generate a network output for the observation, and then uses the network output to select an action.
[0025] In some cases, the action selection neural network 140 generates a network output that includes, for each of a set of possible actions that can be performed by the agent, a corresponding Q-value, i.e., an estimate of the reward received if the reinforcement learning agent performs the action in response to the observations. In these cases, the system 100 may select the action with the highest Q-value, or may select a random action with the highest Q-value and probability ε with probability 1-ε.
[0026] In some other cases, the network output defines a probability distribution of actions in a set of possible actions. For example, when the set of actions is fine, the network output may include the corresponding probability of each action in the set. When the set of actions is continuous, the network output may include distribution parameters over the set of actions, such as the mean and variance. In these cases, the system 100 may select an action by sampling an action from the probability distribution.
[0027] In other cases, the network output identifies an action from a set of possible actions. For example, when an action is a point in a continuous action space, the action can be a point in the space. In these cases, the system 100 can select an action by selecting the identified action or by adding noise to the identified action and selecting the noisy action.
[0028] To allow the neural network 140 to be effectively used to select actions to be performed by the agent, ie, for the agent to successfully complete a designated task, the system 100 trains the neural network 140 to update the parameter values of the neural network.
[0029] Once neural network 140 has been trained, system 100 may use the trained neural network to select actions to be performed by an agent, may provide data specifying the trained neural network to another system, or may use the trained neural network to select actions to be performed by a different agent interacting with a different environment.
[0030] In a particular example, when the environment is a simulated version of a real-world environment and the agent is a simulated version of a real-world agent, the system 100 may use a trained neural network (or a trained neural network after trained parameter values have been fine-tuned) to select actions to be performed by the real-world agent interacting with the real-world environment to perform a specified task. That is, the system 100 may train an action selection neural network 140 to learn a control policy for a robot in simulation, and may then use or provide the trained action selection neural network 140 for controlling a robot interacting with a real-world environment. In this context, a control policy refers to using the output generated by the action selection neural network 140 to select actions to be performed by the robot. As the action selection neural network 140 is trained, the control policy is improved, i.e., the robot exhibits improved performance on a specified task due to changes in the network parameter values.
[0031] In particular, the system 100 trains the neural network 140 by performing an iterative training process using multiple environment replicas 120A-N. Each environment replica is an instance of the environment, and each environment replica is consistent with the other environment replicas, but can be in a different state than the other replicas at any given time, i.e., as a result of the agent performing different actions, as a result of the replicas being initialized to different states, or both. For example, the environment replicas can each be an instance of a simulated environment maintained in a particular platform, such as DeepMind Labs or OpenAI Gym.
[0032] Each environment copy 120A-N is maintained in a separate process 130A-N. By maintaining the copies in separate processes, the system 100 allows each environment copy to operate independently without being restricted by the global interpreter lock or any other thread synchronization mechanism. For example, each process 130A-N can launch and maintain an independent instance of the same environment within a particular platform. By spawning separate processes for each environment, all available CPU cores can step the environment in parallel. When training on a GPU, the system can switch between full load of the CPU and GPU. This stage can be parallelized by introducing action delays so that the environment can be stepped along with the algorithm.
[0033] During the training process, the system 100 repeatedly obtains observations 190A-N and rewards 180A-N from the process maintaining each copy of the environment, selects an action to be performed by the corresponding agent in response to each observation using the action selection neural network 140, and provides the selected action 170A-N to the corresponding process. The system 100 also trains the action selection neural network 140 using the rewards, selected actions, and observations.
[0034] In particular, the reinforcement learning system 100 includes a batch inference engine 110 and a training engine 150 .
[0035] At each iteration of the training process, the batch inference engine 110 receives a corresponding observation from each of the processes 130A-N. Each observation characterizes the current state of the environment copy maintained by the process from which the observation is received. The batch inference engine 110 then generates a batch of observations, which includes each of the observations received in the iteration, and uses the action selection neural network 140 and processes the observations in the batch in parallel according to the current values of the network parameters to generate an action batch, which includes, for each environment copy, the corresponding actions to be performed by the agent in response to the current observation characterizing the current state of the environment copy. That is, as described above, the action selection neural network 140 generates the network output of each observation in parallel, and the batch inference engine 110 selects the corresponding action according to each network output. Therefore, the system 100 parallelizes the neural network inference in each iteration of the training process, that is, so that actions are selected in parallel for each environment copy. Parallelizing the neural network inference to generate a batch of actions according to a batch of observations allows the use of the internal thread pool of the batch inference engine 110, such as a TensorFlow session, or a hardware accelerator (such as a graphics processing unit and / or a tensor processing unit).
[0036] The batch inference engine 110 then provides the actions of each environment copy to the processes 130A-N that maintain the environment copies. Each process causes the agents to execute the corresponding actions in parallel and provides the reinforcement learning system 100 with the corresponding subsequent observations and corresponding rewards. The subsequent observations are observations that characterize the subsequent states to which the environment copies transition as a result of the agents executing the actions of the environment copies in the action batch, and the rewards are the rewards generated as a result of the environment copies transitioning to the subsequent states. Thus, in each iteration of the training process, the system 100 parallelizes the actions performed in the environment across the environment copies.
[0037] The training engine 150 generates a batch of training tuples, which includes a corresponding training tuple for each environment copy. The training tuple for a given environment copy usually includes at least a subsequent observation value of the environment copy at the iteration and a reward of the environment copy at the iteration, in addition to the current observation value of the environment copy at the iteration and the selected action of the environment copy at the iteration.
[0038] The training engine 150 then trains the action selection neural network on the batch of training tuples using a reinforcement learning technique to update the current values of the network parameters. The reinforcement learning technique can be any technique suitable for an action selection neural network, i.e., it can be used to train a neural network that generates the kind of output generated by the action selection neural network 140, and can be an on-policy or off-policy technique. Examples of reinforcement learning techniques that can be used include a proximal policy optimization (PPO) algorithm, a deep deterministic policy gradients (DDPG) algorithm, an asynchronous action evaluation (A3C) algorithm, a deep Q-network (DQN) algorithm, and a double DQN algorithm.
[0039] This completes an iteration of the iterative training process. The reinforcement learning system 100 may repeatedly perform iterations of this training process to continue updating the values of the network parameters.
[0040] As can be seen from the above description, and as will be described in more detail below, in each iteration of the training process, the system 100 parallelizes two stages that are typically bottlenecks in conventional reinforcement learning processes: processing inputs using the action selection neural network 140 to select actions, and taking actions in the environment to collect training tuples. This allows the system 100 to train the action selection neural network 140 to be able to achieve high-quality agent performance on a specified task in less time, while consuming less computing resources, compared to conventional systems.
[0041] In some embodiments, the reinforcement learning system 100 performs reasoning and training of the action selection neural network 140 in a framework that represents neural network operations as a computational graph. In particular, the nodes in the graph represent operations, and the edges represent the input and output data flows of the operations. An example of such a framework is the TensorFlow framework described in M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, GS Corrado, A. Davis, J. Dean, M. Devin et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv: 1603.04467, 2016. In such a framework, each operation is assigned to a corresponding device managed by the system 100, and the training of the action selection neural network 140 is performed by executing the computational graph (i.e., by causing the devices to execute their corresponding assigned operations). The hardware devices are typically heterogeneous and may include any suitable hardware devices, for example, any combination of CPUs, GPUs, ASICs or other dedicated hardware, FPGAs, etc.
[0042] In these embodiments, the system may implement the operations performed by the batch inference engine 110 and the training engine 150 as different subgraphs of the computation graph. For example, the operations performed by the batch inference engine 110 may be implemented as a reasoning subgraph of the computation graph, and the operations performed by the training engine 150 may be implemented as a training subgraph of the computation graph. Figure 3 Describes in more detail the use of computational graphs to train neural networks.
[0043] Figure 2 is a flow chart of an example process for batch reinforcement learning. For convenience, process 200 will be described as being performed by a system of one or more computers located in one or more locations. For example, a reinforcement learning system appropriately programmed according to the present specification, such as Figure 1 The reinforcement learning system 100 can perform process 200.
[0044] The system can repeatedly perform process 200 to train the action selection neural network. In other words, process 200 corresponds to an iteration of the above-mentioned iterative training process.
[0045] The system obtains an observation batch (step 202). The observation batch includes a plurality of current observations, each of which represents a current state of a different environment copy.
[0046] The system processes the observations in the batch of observations using the action selection neural network to generate a batch of actions (step 204). The batch of actions includes a corresponding action for each environment replica generated based on the observations received from the environment replicas. In particular, the system processes the observations in the batch of observations using the action selection neural network in parallel, generates a batch of network outputs, and then uses each network output to select a corresponding action.
[0047] The system obtains a batch of transition tuples (step 206). In particular, the system provides each of the corresponding actions in the batch of actions to the process that maintains the environment copy corresponding to the action, so that the environment copy transitions to the corresponding subsequent state in parallel, and obtains the subsequent observation value and reward of the environment copy maintained in the process from each of the processes. After the subsequent observation value and reward have been obtained from all processes, the system generates a batch of transition tuples based on the data obtained from the process.
[0048] To ensure the effectiveness of the training process, the system can restrict each of the processes that maintain a copy of the environment to only perform stepwise processing on the copy of the environment maintained by the copy of the environment in response to a given action provided by the system. That is, the system instructs each process to cause the agent to take an action to cause a single transition from one state to another, and then freezes the copy of the environment so that no additional transitions occur until another action is received from the system.
[0049] The system trains the action selection neural network on the transition tuple batch (step 208). That is, the system performs iterations of the above reinforcement learning technique on the transition tuple batch to update the values of the network parameters.
[0050] Figure 3 is a flow chart of an example process for batch reinforcement learning using a computation graph. For convenience, process 300 will be described as being performed by a system of one or more computers located in one or more locations. For example, a reinforcement learning system appropriately programmed according to the present specification, such as Figure 1 The reinforcement learning system 100 can perform process 300.
[0051] The system initializes multiple copies of the environment in separate processes (step 302). That is, each copy of the environment is initialized in a process separate from each other copy of the environment. As described above, each copy of the environment is the same environment, but is initialized with an initial state (e.g., a randomly selected initial state) that is different from other environments. For example, the system can spawn N new processes and instantiate a separate copy of the environment in each of the N processes. If the process has already been spawned, the system can perform a reset operation (which can be represented as a node in a computational graph) that causes each process to reinitialize the environment maintained by the process to a corresponding initial state.
[0052] The system can then repeat steps 304-312 of process 300 until the training episode is complete. For example, the system can repeat these steps for a fixed number of iterations, or until some other termination criteria occurs in the environment, such as the agent completing the task in one or more of the environment copies.
[0053] The system receives a corresponding observation from each process (step 304). Each observation is an observation that characterizes the current state of the copy of the environment maintained in the process. Because each copy of the environment may have been initialized in a different state, and because different actions may be selected for different environments, even if the agent has performed the same number of actions in each copy of the environment, at any given time, each copy of the environment may be in a different state than any other copy of the environment.
[0054] The system executes an inference subgraph of the computation graph to select a corresponding action for each environment replica (step 306). In particular, the inference subgraph includes a node that generates an observation batch from the received observations. An observation batch is a single tensor that is a combination (e.g., a cascade) of observations received from processes. The inference subgraph also includes a set of nodes that represent a forward pass of the action selection neural network performed on the observation batch tensor to generate a corresponding network output for each observation. The inference subgraph also includes a node that uses the network output of the observations received from the environment replicas to select a corresponding action for each environment replica, i.e., as described above with reference to Figure 1 described.
[0055] The system provides each action to the corresponding process (step 308) and obtains subsequent observations and rewards from the process (step 310). That is, the system provides the action selected for a given copy of the environment to the process in which the given copy of the environment is maintained. In turn, the process causes the agent to perform the selected action to cause the environment to change state and provide the resulting reward and subsequent observation to the system. The system then obtains from each process the rewards and subsequent observations generated as a result of the agent performing the provided action.
[0056] In particular, the system can provide actions to the corresponding processes by executing a node in the computation graph, which represents receiving a batch of actions as input, issuing corresponding calls to each of the external processes in parallel along with the actions of the environment replica, and then waiting until subsequent observations and rewards are obtained from each process in response to the corresponding calls.
[0057] The system executes the training subgraph to update the parameter values of the action selection neural network (step 312).
[0058] In particular, the training subgraph includes a node that generates a batch of training tuples, one or more nodes that determine the gradient of a loss function of a reinforcement learning technique with respect to the batch of training tuples, and one or more nodes that perform a back propagation through an action selection neural network to update network parameter values.
[0059] This specification uses the term "configuration" in conjunction with system and computer program components. For a system of one or more computers to be configured to perform a particular operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof, which, in operation, causes the system to perform the operation or action. For one or more computer programs to be configured to perform a particular operation or action, it means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action.
[0060] The embodiments of the subject matter and functional operations described in this specification may be implemented in digital electronic circuit systems, tangibly embodied computer software or firmware, computer hardware (including the structures disclosed in this specification and their structural equivalents), or in a combination of one or more of them. The embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory storage medium, which are used to be executed by a data processing device or to control the operation of the data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical signal, optical signal, or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device.
[0061] The term "data processing device" refers to data processing hardware and covers all kinds of devices, equipment and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. The device may also be or additionally include a special logic circuit system, for example, an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the device may optionally include code that creates an operating environment for a computer program, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0062] A computer program may also be referred to or described as a program, software, software application, app, module, software module, script or code, and may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it may be deployed in any form, including as a stand-alone program, or as a module, component, subroutine or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, subroutines or portions of code). A computer program may be deployed to execute on one computer, or on multiple computers located at one site or distributed across multiple sites and interconnected by a data communications network.
[0063] In this specification, the term "engine" is used broadly to refer to a software-based system, subsystem, or process that is programmed to perform one or more specified functions. Typically, an engine will be implemented as one or more software modules or components installed on one or more computers located in one or more locations. In some cases, one or more computers will be dedicated to a specific engine; in other cases, multiple engines can be installed and run on the same one or more computers.
[0064] The processes and logic flows described in this specification can be performed by one or more programmable computers that execute one or more computer programs to perform functions by operating input data and generating output. The processes and logic flows can also be performed by a dedicated logic circuit system (e.g., FPGA or ASIC), or by a combination of a dedicated logic circuit system and one or more programmed computers.
[0065] A computer suitable for executing a computer program may be based on a general-purpose microprocessor or a special-purpose microprocessor or both, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a central processing unit for executing or running instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory may be supplemented by or incorporated into a special-purpose logic circuit system. Typically, the computer will also include or be operably coupled to one or more mass storage devices (such as magnetic, magneto-optical disks or optical disks) for storing data to receive data from them, or to transfer data thereto, or both. However, the computer does not require such a device. In addition, the computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device, such as a universal serial bus (USB) flash drive, to name just a few examples.
[0066] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; CD-ROM and DVD-ROM disks.
[0067] To provide interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having a display device for displaying information to the user, such as a cathode ray tube (CRT) monitor or a liquid crystal display (LCD) monitor, and a keyboard and pointing device, such as a mouse or trackball, through which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including sound, voice, or tactile input. In addition, the computer may interact with the user by sending documents to and receiving documents from a device used by the user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser. In addition, the computer may interact with the user by sending a text message or other form of message to a personal device (e.g., a smartphone running a messaging application) and, in response, receiving a response message from the user.
[0068] The data processing apparatus for implementing the machine learning model may also include, for example, dedicated hardware accelerator units for processing the common and computationally intensive parts of machine learning training or production, i.e., inference, workloads.
[0069] Machine learning models can be implemented and deployed using machine learning frameworks such as the TensorFlow framework, Microsoft Cognitive Toolkit framework, Apache Singa framework, or Apache MXNet framework.
[0070] Embodiments of the subject matter described in this specification may be implemented in a computing system that includes a back-end component (e.g., as a data server, or includes a middleware component, such as an application server), or includes a front-end component (e.g., a client computer with a graphical user interface, a web browser, or an application through which a user can interact with an implementation of the subject matter described in this specification), or any combination of one or more such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks (LANs) and wide area networks (WANs), such as the Internet.
[0071] A computing system may include a client and a server. The client and the server are usually remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by means of computer programs running on respective computers and having a client-server relationship with each other. In some embodiments, the server transmits data (HTML pages) to a user device, for example, for the purpose of displaying data to a user interacting with a device acting as a client and receiving user input from the user. Data generated at the user device, such as the result of a user interaction, can be received from the device at the server.
[0072] Although this specification contains many specified implementation details, these details should not be interpreted as limitations on any invention or limitations on the scope of the claimed protection, but rather as descriptions of features specified in specific embodiments of specific inventions. In this specification, certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may be described above as working in certain combinations, and even initially claimed as such, in some cases, one or more features in the claimed combination may be deleted from the combination, and the claimed combination may point to a sub-combination or a variant of a sub-combination.
[0073] Similarly, although operations are depicted in a particular order in the drawings, and the claims are recited in a particular order, this should not be construed as requiring that such operations be performed in the particular order or sequence shown, or that all of the illustrated operations be performed, in order to obtain the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated into a single software product or packaged into multiple software products.
[0074] Specific embodiments of the subject matter have been described. Other embodiments are also within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous.
Claims
1. A method of training an action selection neural network to select actions to be performed by an agent interacting with an environment by processing a computational graph comprising nodes representing neural network operations and edges representing input and output data flows of the neural network operations using a plurality of processors, in, The action selection neural network has a plurality of network parameters and is configured to receive input observations and process the input observations according to the network parameters to generate network outputs, the network outputs defining actions to be performed by the agent in response to the input observations, wherein the computation graph includes an inference subgraph and a training subgraph, and wherein the method using the plurality of processors comprises: Obtaining an observation batch including a plurality of current observations, each current observation representing a current state of a corresponding one of a plurality of environment copies, wherein each environment copy is maintained by a separate process, and, for each of the plurality of current observations, the corresponding environment copy has been processed in parallel steps using available processors of a plurality of processors; processing current observations in a batch of observations in parallel using the action selection neural network according to current values of the network parameters to generate a batch of actions, the batch of actions including, for each environment replica, a corresponding action to be performed by the agent in response to the current observation characterizing a current state of the environment replica, the processing comprising executing an inference subgraph of a computation graph using the plurality of processors, wherein the inference subgraph performs batch inference for the action selection neural network on the current observations in the batch of observations to generate a corresponding network output for each current observation, and selecting a corresponding action from each network output; A batch of transition tuples is obtained, the batch of transition tuples including a corresponding transition tuple for each environment copy based on: restricting each of the processes maintaining a corresponding copy of the environment to step-processing the copy of the environment a single time in response to a corresponding selected action of the batch of actions generated by the inference subgraph, wherein the copies of the environment are step-processed in parallel using available processors in the plurality of processors, and each copy of the environment outputs a subsequent observation and reward; The batch of transition tuples is generated using the subsequent observations and rewards obtained, wherein the corresponding transition tuple for each environment copy includes: (i) subsequent observations representing subsequent states to which the environment replica is transitioned as a result of the agent executing the corresponding action in the action batch for the environment replica, and (ii) a reward generated as a result of the transition of the environment copy to the subsequent state; and The action selection neural network is trained on the batch of transition tuples using a reinforcement learning technique to update current values of the network parameters, the training comprising executing a training subgraph of a computation graph using the plurality of processors, wherein the training subgraph takes as input a batch of transition tuples and current values of the network parameters, and applies the reinforcement learning technique to the training tuples in the batch to generate updated values of the network parameters.
2. The method according to claim 1, in, Obtaining a batch of transition tuples including a corresponding transition tuple for each of the environment copies comprises: providing each of the corresponding actions in the batch of actions to a process maintaining a copy of the environment corresponding to the action so that the copies of the environment transition to subsequent states in parallel; and From each of the processes, the subsequent observations and rewards are obtained for a copy of the environment maintained within the process.
3. The method according to claim 2, in, Obtaining the transition tuple batch further includes: After obtaining the subsequent observations and rewards from all of the processes, the batch of transition tuples is generated based on the data obtained from the processes.
4. The method according to claim 1, in, Obtaining a batch of transition tuples including a corresponding transition tuple for each of the environment copies comprises: issuing corresponding calls to each of the processes in parallel along with the actions for the copies of the environment; Waiting until subsequent observations and rewards are obtained from each of the processes in response to the corresponding calls; and After determining that subsequent observations and rewards have been obtained from each of the processes, the transition tuple batch is generated using the obtained subsequent observations and rewards.
5. The method according to claim 1, in, The reinforcement learning technique is the Proximal Policy Optimization (PPO) algorithm.
6. A system for training an action selection neural network to select actions to be performed by an agent interacting with an environment by processing a computational graph including nodes representing neural network operations and edges representing input and output data flows of the neural network operations using multiple processors, comprising one or more computers including multiple processors and one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform the following operations: training an action selection neural network to select actions to be performed by an agent interacting with an environment by processing a computational graph including nodes representing neural network operations and edges representing input and output data flows of the neural network operations using the multiple processors, in, The action selection neural network has a plurality of network parameters and is configured to receive input observations and process the input observations according to the network parameters to generate network outputs, the network outputs defining actions to be performed by the agent in response to the input observations, wherein the computation graph includes an inference subgraph and a training subgraph, and wherein the operations using the plurality of processors include: Obtaining an observation batch including a plurality of current observations, each current observation representing a current state of a corresponding one of a plurality of environment copies, wherein each environment copy is maintained by a separate process, and, for each of the plurality of current observations, the corresponding environment copy has been processed in parallel steps using available processors of a plurality of processors; processing current observations in a batch of observations in parallel using the action selection neural network according to current values of the network parameters to generate a batch of actions, the batch of actions including, for each environment replica, a corresponding action to be performed by the agent in response to the current observation characterizing a current state of the environment replica, the processing comprising executing an inference subgraph of a computation graph using the plurality of processors, wherein the inference subgraph performs batch inference for the action selection neural network on the current observations in the batch of observations to generate a corresponding network output for each current observation, and selecting a corresponding action from each network output; A batch of transition tuples is obtained, the batch of transition tuples including a corresponding transition tuple for each environment copy based on: restricting each of the processes maintaining a corresponding copy of the environment to step-processing the copy of the environment a single time in response to a corresponding selected action of the batch of actions generated by the inference subgraph, wherein the copies of the environment are step-processed in parallel using available processors in the plurality of processors, and each copy of the environment outputs a subsequent observation and reward; The batch of transition tuples is generated using the subsequent observations and rewards obtained, wherein the corresponding transition tuple for each environment copy includes: (i) subsequent observations representing subsequent states to which the environment replica is transitioned as a result of the agent executing the corresponding action in the action batch for the environment replica, and (ii) a reward generated as a result of the transition of the environment copy to the subsequent state; and The action selection neural network is trained on the batch of transition tuples using a reinforcement learning technique to update current values of the network parameters, the training comprising executing a training subgraph of a computation graph using the plurality of processors, wherein the training subgraph takes as input a batch of transition tuples and current values of the network parameters, and applies the reinforcement learning technique to the training tuples in the batch to generate updated values of the network parameters.
7. The system according to claim 6, in, Obtaining a batch of transition tuples including a corresponding transition tuple for each of the environment copies comprises: providing each of the corresponding actions in the batch of actions to a process maintaining a copy of the environment corresponding to the action so that the copies of the environment transition to subsequent states in parallel; and From each of the processes, the subsequent observations and rewards are obtained for a copy of the environment maintained within the process.
8. The system according to claim 7, in, Obtaining the transition tuple batch further includes: After obtaining the subsequent observations and rewards from all of the processes, the batch of transition tuples is generated based on the data obtained from the processes.
9. The system according to claim 6, in, Obtaining a batch of transition tuples including a corresponding transition tuple for each of the environment copies comprises: issuing corresponding calls to each of the processes in parallel along with the actions for the copies of the environment; Waiting until subsequent observations and rewards are obtained from each of the processes in response to the corresponding calls; and After determining that subsequent observations and rewards have been obtained from each of the processes, the transition tuple batch is generated using the obtained subsequent observations and rewards.
10. The system according to claim 6, in, The reinforcement learning technique is the Proximal Policy Optimization (PPO) algorithm.
11. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more computers comprising a plurality of processors, cause the one or more computers to perform the following operations: a method of training an action selection neural network to select actions to be performed by an agent interacting with an environment by processing a computational graph comprising nodes representing neural network operations and edges representing input and output data flows of the neural network operations using the plurality of processors, in, The action selection neural network has a plurality of network parameters and is configured to receive input observations and process the input observations according to the network parameters to generate network outputs, the network outputs defining actions to be performed by the agent in response to the input observations, wherein the computation graph includes an inference subgraph and a training subgraph, and wherein the operations using the plurality of processors include: Obtaining an observation batch including a plurality of current observations, each current observation representing a current state of a corresponding one of a plurality of environment copies, wherein each environment copy is maintained by a separate process, and, for each of the plurality of current observations, the corresponding environment copy has been processed in parallel steps using available processors of a plurality of processors; processing current observations in a batch of observations in parallel using the action selection neural network according to current values of the network parameters to generate a batch of actions, the batch of actions including, for each environment replica, a corresponding action to be performed by the agent in response to the current observation characterizing a current state of the environment replica, the processing comprising executing an inference subgraph of a computation graph using the plurality of processors, wherein the inference subgraph performs batch inference for the action selection neural network on the current observations in the batch of observations to generate a corresponding network output for each current observation, and selecting a corresponding action from each network output; A batch of transition tuples is obtained, the batch of transition tuples including a corresponding transition tuple for each environment copy based on: restricting each of the processes maintaining a corresponding copy of the environment to step-processing the copy of the environment a single time in response to a corresponding selected action of the batch of actions generated by the inference subgraph, wherein the copies of the environment are step-processed in parallel using available processors in the plurality of processors, and each copy of the environment outputs a subsequent observation and reward; The batch of transition tuples is generated using the subsequent observations and rewards obtained, wherein the corresponding transition tuple for each environment copy includes: (i) subsequent observations representing subsequent states to which the environment replica is transitioned as a result of the agent executing the corresponding action in the action batch for the environment replica, and (ii) a reward generated as a result of the transition of the environment copy to the subsequent state; and The action selection neural network is trained on the batch of transition tuples using a reinforcement learning technique to update current values of the network parameters, the training comprising executing a training subgraph of a computation graph using the plurality of processors, wherein the training subgraph takes as input a batch of transition tuples and current values of the network parameters, and applies the reinforcement learning technique to the training tuples in the batch to generate updated values of the network parameters.
12. The non-transitory computer-readable storage medium according to claim 11, in, Obtaining a batch of transition tuples including a corresponding transition tuple for each of the environment copies comprises: providing each of the corresponding actions in the batch of actions to a process maintaining a copy of the environment corresponding to the action so that the copies of the environment transition to subsequent states in parallel; and From each of the processes, the subsequent observations and rewards are obtained for a copy of the environment maintained within the process.
13. The non-transitory computer-readable storage medium according to claim 12, in, Obtaining the transition tuple batch further includes: After obtaining the subsequent observations and rewards from all of the processes, the batch of transition tuples is generated based on the data obtained from the processes.
Citation Information
Patent Citations
Mobile robot continuous control method based on non-map motion planner
CN106950969A
