Methods and Apparatus
Adversarial reinforcement learning simulates scenarios to efficiently identify and correct defects in autonomous vehicle software, addressing inefficiencies in traditional testing methods and enhancing vehicle safety.
Patent Information
- Application Number
- JP2024522160
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-10-15
- Filing Date
- 2022-10-17
- Publication Date
- 2024-10-10
- Estimated Expiration
- 2042-10-17
AI Technical Summary
Traditional testing methods for autonomous vehicle control software are labor-intensive, expensive, and inefficient in capturing rare and extreme scenarios, leading to undetected flaws that increase risk.
A computer-implemented method using adversarial reinforcement learning to simulate scenarios, generate adversarial trajectories, and identify defects in autonomous vehicle software, reducing the need for real-world testing.
This approach efficiently generates diverse and challenging scenarios, significantly reducing the miles required for verification and validation, enhancing the safety of autonomous vehicles by identifying and correcting software flaws.
Smart Images

Figure 2024537334000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to autonomous vehicles. [Background technology]
[0002] Traditional testing of autonomous vehicle (AV) control software (also known as the AV stack), such as for SAE Level 1 through Level 5 compliance, is problematic. For example, traditional testing approaches typically involve manual (i.e., human), labor-intensive procedures.
[0003] 1. Test drive AVs on real-world roads or in a simulated environment with randomly occurring traffic, and collect data on the scenarios encountered and AV behavior.
[0004] 2. Identify challenging scenarios based on AV behavior (e.g., scenarios where a driver needs to intervene for safety and the AV did not brake early enough).
[0005] 3. Recreate the challenging scenario in simulation and add random noise to the scenario parameters (e.g., positions and speeds of surrounding vehicles / pedestrians / cyclists).
[0006] This approach is not only very expensive and time consuming, but also requires capturing low probability events that cannot be captured multiple times. Randomization of scenario parameters based on initial scenarios identified through real-world driving allows for an increase in the number of scenarios, but this is highly inefficient due to the number of miles required to identify these rare extreme case scenarios. Undetected defects in the control software increase the risk to the AV and its occupants.
[0007] Therefore, it is necessary to carry out testing etc. on AV. Summary of the Invention
[0008] A computer-implemented method for generating a trajectory of an actor according to a first aspect includes the steps of: - simulating a first scenario including an environment having an ego-vehicle, a set of actors including a first actor, and optionally a set of objects including a first object, using a first trajectory of the first actor; Observing, by a first adversarial reinforcement learning agent, a first observation of an environment (e.g., an ego-vehicle, a second actor in the collection, and / or a first object in the collection) in response to a first trajectory of a first actor; generating, by the first agent, a second trajectory for the first actor based on the first observation of the observed environment.
[0009] According to a second aspect, a computer-implemented method for simulating a scenario includes the steps of: The method includes generating a first trajectory of a first actor of a set of actors according to a first aspect, simulating a first scenario including an environment having an ego-vehicle, a set of actors including the first actor, and optionally a set of objects including a first object, wherein simulating the first scenario includes using the generated first trajectory of the first actor, and identifying defects in the ego-vehicle in the first scenario.
[0010] According to a third aspect, a computer-implemented method for developing an own vehicle includes: simulating a scenario according to the second aspect; and repairing the identified defects of the host vehicle.
[0011] A computer according to a fourth aspect includes a processor and a memory configured to carry out the methods according to the first, second and / or third aspects.
[0012] A computer program according to a fifth aspect comprises instructions which, when executed by a computer comprising a processor and a memory, cause the computer to perform the methods according to the first aspect, the second aspect and / or the third aspect.
[0013] A non-transitory computer-readable storage medium according to a sixth aspect includes instructions that, when executed by a computer including a processor and a memory, cause the computer to perform a method according to the first aspect, the second aspect and / or the third aspect.
[0014] According to one aspect of the disclosure, a computer-implemented method for generating new adversarial scenarios and agents involving autonomous vehicles includes performing reinforcement learning to train an agent using an autonomous vehicle software stack in a reinforcement learning environment to generate one or more episodes each representing an adversarial scenario that ends with a failure of the autonomous vehicle software stack; generating a plurality of descriptors based on the or each episode; and storing the plurality of descriptors in a database.
[0015] The autonomous vehicle may be the self-driving vehicle. The adversarial scenario may include a fault in the autonomous vehicle software stack. The agent may be a machine learning model. The machine learning model may include a neural network.
[0016] In one embodiment, the computer implemented method may include clustering a plurality of descriptors for the or each episode, and storing the plurality of descriptors includes storing the clusters of the descriptors in a database.
[0017] The computer-implemented method further includes generating new descriptors by moving from clusters of descriptors in the descriptor space.
[0018] Moving from a cluster of descriptors in descriptor space may include identifying a centroid of the cluster, moving a unit amount in a unit direction from the centroid to a new descriptor location, and generating the new descriptor as a descriptor at the new descriptor location.
[0019] Moving from a cluster of descriptors in descriptor space may include identifying an established boundary of the cluster, moving a unit amount in a unit direction from the boundary to a new descriptor location, and generating a new descriptor as the descriptor at the new descriptor location.
[0020] Moving from a cluster of descriptors in descriptor space may include identifying an established boundary of the cluster, moving a unit amount from the boundary in a local normal direction to a new descriptor location, and generating a new descriptor as the descriptor at the new descriptor location.
[0021] The established boundaries may be identified using a signed distance function.
[0022] The one or more episodes may include multiple episodes, and clustering the multiple episodes may include generating multiple clusters, and storing the clusters may include storing the multiple clusters in a database, and navigating from the clusters may include navigating from the multiple clusters by determining a union between each cluster, determining a difference between the cluster space and the union, determining a centroid of the differences, and generating a new descriptor as a descriptor at the centroid of the differences.
[0023] The computer-implemented method may further include generating a seed state from the new descriptor, and re-performing reinforcement learning using the seed state, generating the plurality of descriptors, and storing the plurality of descriptors.
[0024] The computer-implemented method may further include reinitializing the agent, and re-performing reinforcement learning using the reinitialized agent, generating the plurality of descriptors, and storing the plurality of descriptors.
[0025] The environment may further include context data.
[0026] The context data may include one or more internal maps and / or one or more external maps.
[0027] The computer-implemented method may further include modifying the context data of the environment, and re-performing the reinforcement learning, generating the plurality of descriptors, and storing the plurality of descriptors using the modified context data.
[0028] An episode may include multiple points, and each point may include a state output by the environment and an action output by the agent. These points may be time points or location points of the autonomous vehicle.
[0029] Generating the plurality of descriptors may include encoding each of the plurality of points into a latent space.
[0030] The fault may include an event selected from the group including: a collision occurs between the agent and the autonomous vehicle software stack; a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold; a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold; an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold; and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
[0031] According to one aspect of the disclosure, a computer-implemented method for generating an agent from a scenario involving an autonomous vehicle includes performing reinforcement learning to train an agent using an autonomous vehicle software stack in a reinforcement learning environment to generate one or more episodes, each episode representing an adversarial scenario that terminates with a failure of the autonomous vehicle software stack; re-running the reinforcement learning of the agent to generate new episodes; comparing the new episodes to the one or more episodes; and generating the agent by replicating the agent trained using reinforcement learning based on the comparison.
[0032] The fault may include an event selected from the group including: a collision occurs between the agent and the autonomous vehicle software stack; a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold; a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold; an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold; and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
[0033] The environment may further include context data.
[0034] The context data may include one or more internal maps and / or one or more external maps.
[0035] An episode may include multiple points, each of which includes a state output by the environment and an action output by the agent. These points may be time points or position points of the autonomous vehicle.
[0036] Comparing the new episode to the one or more episodes may include determining a variance between the new episode and the one or more episodes, and generating an agent by replicating the agent trained using reinforcement learning based on the comparison may include replicating the agent trained using reinforcement learning if the variance is less than a variance threshold.
[0037] According to one aspect of the disclosure, a computer-implemented method for generating new adversarial scenarios and agents involving autonomous vehicles includes performing reinforcement learning to train an agent using a proxy for the autonomous vehicle software stack in a reinforcement learning environment to generate one or more episodes each representing an adversarial scenario that terminates with a failure of the proxy for the autonomous vehicle software stack; generating a plurality of descriptors based on the or each episode; and storing the plurality of descriptors in a database.
[0038] The computer implemented method may include clustering a plurality of descriptors for the or each episode, and storing the plurality of descriptors may include storing the clusters of descriptors in a database.
[0039] The computer-implemented method may further include generating new descriptors by moving from clusters of descriptors in the descriptor space.
[0040] Moving from a cluster of descriptors in descriptor space may include identifying a centroid of the cluster, moving a unit amount in a unit direction from the centroid to a new descriptor location, and generating the new descriptor as a descriptor at the new descriptor location.
[0041] Moving from a cluster of descriptors in descriptor space may include identifying an established boundary of the cluster, moving a unit amount in a unit direction from the boundary to a new descriptor location, and generating a new descriptor as the descriptor at the new descriptor location.
[0042] Moving from a cluster of descriptors in descriptor space may include identifying an established boundary of the cluster, moving a unit amount from the boundary in a local normal direction to a new descriptor location, and generating a new descriptor as the descriptor at the new descriptor location.
[0043] The established boundaries may be identified using a signed distance function.
[0044] The one or more episodes may include multiple episodes, and clustering the multiple episodes may include generating multiple clusters, storing the clusters may include storing the multiple clusters in a database, and navigating from the clusters may include navigating from the multiple clusters by determining a union between each cluster, determining a difference between the cluster space and the union, determining a centroid of the differences, and generating a new descriptor as a descriptor at the centroid of the differences.
[0045] The computer-implemented method may further include generating a seed state from the new descriptor, and re-performing reinforcement learning using the seed state, generating the plurality of descriptors, and storing the plurality of descriptors.
[0046] The computer-implemented method may further include reinitializing the agent, and re-performing reinforcement learning using the reinitialized agent, generating the plurality of descriptors, and storing the plurality of descriptors.
[0047] The environment may further include context data.
[0048] The context data may include one or more internal maps and / or one or more external maps.
[0049] The computer-implemented method may further include modifying the context data of the environment, and re-performing the reinforcement learning, generating the plurality of descriptors, and storing the plurality of descriptors using the modified context data.
[0050] An episode may include multiple points, each of which may include a state output by the environment and an action output by the agent. The multiple points may be time points or location points of the autonomous vehicle.
[0051] Generating the plurality of descriptors may include encoding each of the plurality of points into a latent space.
[0052] The fault may include an event selected from the group including: a collision occurs between the agent and the autonomous vehicle software stack; a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold; a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold; an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold; and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
[0053] The proxy may include a machine learning model, which is optionally a neural network, which is optionally a convolutional neural network.
[0054] According to another aspect, a computer-implemented method for generating an agent from a scenario involving an autonomous vehicle includes providing an agent trained using reinforcement learning in an environment with a proxy of an autonomous vehicle software stack, and performing reinforcement learning to optimize the agent using a full autonomous vehicle software stack on which the proxy is based.
[0055] This aspect may optionally be expressed as a computer-implemented method for a new adversarial scenario and agent involving an autonomous vehicle, the method including providing an agent trained using reinforcement learning in an environment with a proxy of an autonomous vehicle software stack, performing reinforcement learning to optimize the agent using a full autonomous vehicle software stack on which the proxy is based, generating one or more episodes when optimizing the agent, and generating a plurality of descriptors for each other episode.
[0056] The agent may include providing a trained agent when performing the computer implemented method of the above aspect.
[0057] According to one aspect of the present disclosure, a computer-implemented method for generating abnormal trajectory data for an agent in an autonomous vehicle scenario includes receiving context data including non-anomalous trajectory data for the agent using an adversarial machine learning model; generating abnormal trajectory data from the context data using the adversarial machine learning model; and storing the abnormal trajectory data in a database.
[0058] The autonomous vehicle may be the self-driving vehicle.
[0059] The adversarial machine learning model may include a generative adversarial network trained to generate anomalous trajectory data from non-anomalous trajectory data.
[0060] The computer-implemented method may further include receiving the noise with an adversarial machine learning model, and generating anomalous trajectory data from the context data with the adversarial machine learning model includes generating the anomalous trajectory data based on the noise.
[0061] The contextual data may further include an internal map and / or an external map.
[0062] The non-anomalous trajectory data may include trajectory data associated with no violations between the agent and the autonomous vehicle.
[0063] The anomalous trajectory data may include trajectory data associated with a violation between the agent and the autonomous vehicle, or trajectory data not associated with no violation between the agent and the self vehicle.
[0064] The violation may include an event selected from the group including: a collision occurs, coming within a minimum distance, a deceleration of the autonomous vehicle exceeds a deceleration threshold, an acceleration of the autonomous vehicle exceeds an acceleration threshold, and a jerk of the autonomous vehicle exceeds a jerk threshold. In other words, the event may be an event selected from the group including: a collision occurs between the agent and the autonomous vehicle software stack, a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold, a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold, an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold, and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
[0065] According to one aspect of the present disclosure, a computer-implemented method for training an adversarial machine learning model to generate anomalous trajectory data includes providing context data including non-anomalous trajectory data of an agent as input to an adversarial machine learning model; generating predicted anomalous trajectory data from the context data by the adversarial machine learning model; calculating a loss between the predicted anomalous trajectory data and the non-anomalous trajectory data; and modifying parameter settings of the adversarial machine learning model to reduce the loss.
[0066] The adversarial machine learning model may include a generative adversarial network.
[0067] The generative adversarial network may be a first generative adversarial network forming part of a cycle generative adversarial network that includes a second generative adversarial network. The method may include providing the generated anomaly trajectory data as an input to the second generative adversarial network, generating reconstructed non-anomalous trajectory data by the second generative adversarial network, calculating a loss between the reconstructed non-anomalous trajectory data and the non-anomalous trajectory data, and modifying parameter settings of the second generative adversarial network to reduce the second loss, the loss being the first loss.
[0068] The second loss may include a reconstruction loss and / or an adversarial loss.
[0069] The losses may include adversarial losses and / or predicted losses.
[0070] The non-anomalous trajectory data may be labeled.
[0071] The contextual data may further include an internal map and / or an external map.
[0072] The non-anomalous trajectory data may include trajectory data associated with no violations between the agent and the autonomous vehicle.
[0073] The anomalous trajectory data may include trajectory data associated with a violation between the agent and the autonomous vehicle, or trajectory data not associated with no violation between the agent and the self vehicle.
[0074] The violation may include an event selected from the group including: a collision occurs between the agent and the autonomous vehicle; the distance between the agent and the autonomous vehicle is less than a minimum distance threshold; the deceleration of the autonomous vehicle is greater than a deceleration threshold; the acceleration of the autonomous vehicle is greater than an acceleration threshold; and the jerk of the autonomous vehicle is greater than a jerk threshold.
[0075] A transitory or non-transitory computer readable medium comprises instructions that, when executed by one or more processors, cause the one or more processors to perform a method according to any of the preceding claims. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0076] According to the invention there is provided a method as set out in the accompanying claims. Also provided is a computer program, a computer and a non-transitory computer readable storage medium. Further features of the invention will become apparent from the dependent claims and the following description.
[0077] method A computer-implemented method for generating a trajectory of an actor according to a first aspect includes the steps of: - simulating a first scenario including an environment having an ego-vehicle, a set of actors including a first actor, and optionally a set of objects including a first object, using a first trajectory of the first actor; Observing, by a first adversarial reinforcement learning agent, a first observation of an environment (e.g., an ego-vehicle, a second actor in the collection, and / or a first object in the collection) in response to a first trajectory of a first actor; generating, by the first agent, a second trajectory for the first actor based on the first observation of the observed environment.
[0078] In this way, a second trajectory is generated by the first agent based on observations of the environment, e.g., the ego-vehicle, a set of actors including or excluding the first actor, and optionally a set of objects including the first object, such that the second trajectory of the first actor, e.g., used in another scenario, is an informed, rather than random or systematic, perturbation or modification of the first trajectory, e.g., a maximally informed adversarial perturbation. In this way, the method generates trajectories more efficiently, and because the generation is informed, the trajectories explore the environment more efficiently, thereby improving the detection of defects in the ego-vehicle and the corresponding vehicle's control software. For example, the trajectories may be generated by learning, heuristics, extracted from driving statistics data and / or its complement. For example, as described in more detail below, the trajectories may be generated by rejection sampling, thereby sampling trajectories other than normal or expected scenarios (i.e., normal space or complement of (1-N)). In this way, a scenario with usefully generated, e.g., modified, trajectories may be recreated. Improving detection of defects in the control software of the ego vehicle and corresponding vehicles improves the safety of the control software, thereby improving the safety of the corresponding vehicles and / or their occupants. In contrast, conventional trajectory generation methods randomly or systematically explore the environment, thereby extending runtime and / or requiring increased computational resources, while potentially failing to detect defects.
[0079] In one example, generating a second trajectory for the first actor by the first agent based on the first observations of the observed environment includes exploring outside of the normal space (i.e., the normal or expected scenario) by the first agent, for example, as described below for points E, I, and F.
[0080] In other words, rather than identifying initial scenarios through road testing, the method is used to generate low probability events, thereby significantly reducing the miles of driving required for validation, validation, etc. Similarly, rather than randomly perturbing the trajectories of actors in scenarios, the method generates these trajectories from a trained adversarial model that can, for example, simulatedly interact with the environment and react to the actions of the AV. In this way, the volume of difficult, low probability scenarios generated per simulated mile driven and per unit time is increased.
[0081] Thus, the trained adversarial agent generates dynamic actor (e.g., vehicle / pedestrian / cyclist) trajectories, which are challenging for AVs. The adversarial agent learns by interacting with the (simulated) driving environment and the target AV system. Thus, over time, the adversarial agent learns potential weaknesses of the AV and efficiently generates low-probability driving scenarios in which the AV is likely to operate suboptimally. These scenarios may be used as tests of problems in the target AV system for validation and confirmation purposes, and as training data to further improve the performance of the AV system. Similarly, the method may be used for regression and / or progression testing. Similarly, the method may be used to parameterize deterministic tests.
[0082] The method is a computer-implemented method, i.e. the method is carried out by a computer comprising a processor and a memory. Suitable computers are known.
[0083] The method includes simulating a first scenario. Computer-implemented methods (i.e., in silico) that include simulating a scenario are known. In general, a scenario is a description of an operating situation including relevant actors, an environment, goals, and a sequence of events. For example, a scenario may be represented in a 2D bird's-eye view: 1. A scene or environment (e.g., roads, lanes, obstacles); 2. The vehicle and its trajectory; 3. Actors (pedestrians, other vehicles, etc.) and their individual trajectories, 4,Optionally, it consists of short sequences (a few to tens of seconds) containing the four main elements,with objects in the scene (traffic lights, stopped bicycles, and cars).
[0084] Additional context elements (actors, objects) may be added to better represent the composition of scenes and scenarios.
[0085] The scenario includes an environment having an ego vehicle, a set of actors including a first actor (i.e., at least one actor), and optionally a set of objects including a first object. As will be appreciated by those skilled in the art, the environment, also known as a scene, typically includes one or more roads with one or more lanes, and optionally includes one or more obstacles. In general, the ego vehicle is an object-connected vehicle and / or an automated vehicle, whose behavior is primarily of interest in test, trial or operational scenarios. It should be understood that the behavior of the ego vehicle is defined by its control software (also known as an AV stack). In one example, the first actor is a road user, e.g., a vehicle, a pedestrian, or a cyclist. Other road users are also known. In one example, the first object includes and / or is an infrastructure such as a traffic light or a stopped road user. In one example, the set of actors includes A actors, where A is a natural number greater than or equal to 1, such as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, or more. In one example, the set of objects includes O objects, where O is a natural number greater than or equal to 1, such as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, or more.
[0086] Simulating the first scenario includes using a first trajectory of a first actor, it being understood that the actor has an associated trajectory, the first trajectory may be described with a descriptor, as described below.
[0087] The method includes observing, by a first adversarial reinforcement learning agent (also known herein as an agent or an adversarial agent), a first observation of an environment (e.g., an ego-vehicle, a second actor in the collection, and / or a first object in the collection) in response to a first trajectory of the first actor. That is, the first trajectory of the first actor may cause a change to the environment. For example, the trajectory of the ego-vehicle and / or the trajectory of the second actor may change in response to the first trajectory of the first actor, e.g., to avoid a collision with the first actor. In one example, the first observation of the environment is an observation of the ego-vehicle. In one example, observing the first observation of the environment by the agent includes observing a first behavior of the environment by the agent, the first behavior including the first observation. In one example, the method includes providing one or more reinforcement learning agents, such as adversarial and / or non-adversarial RL agents, and cooperating and / or interacting with the first agent, the collection of actors, and / or the collection of objects.
[0088] The method includes generating, by the first agent, a second trajectory for the first actor based on first observations of the observed environment, i.e., the first agent learns from the first trajectory of the first actor and the first observations observed in response to the first trajectory, and generates a second trajectory from this learning, in other words, as previously described, the generation of the second trajectory is informed by the first observations.
[0089] In particular, the inventors identify the following conventional methods.
[0090] i,e., the system does not consider the similarity of the generated scenarios, since it can continue to exploit previously discovered weaknesses in AV behavior (or those that are very similar to already known weaknesses) without discovering new problems. Discovering diverse adversarial scenarios is key to efficient automatic problem discovery.
[0091] ii) They do not consider or evaluate how informative the scenario seeds are for each training episode. During the training process, they do not consider or evaluate how informative the generated scenarios are. Similarly, existing systems lack adequate measures to limit catastrophic forgetting while avoiding mode collapse.
[0092] iii. Adversarial scenario starting conditions are typically generated by choosing actor positions either randomly or by copying previously discovered difficult scenarios. By predicting difficult or new starting conditions for the AV stack and using this to generate scenario starting conditions in an informed and automated manner, a wide variety of scenarios can be discovered.
[0093] iv. In general, we do not attempt to output test parameter settings (e.g., regression, progress) or defect reports as one of our direct results.
[0094] v. Use a single adversarial agent (without considering multiple adversaries working together to create more complex adversarial scenarios).
[0095] vi, considers the AV as a black box and uses high-level metrics such as collisions rather than being able to exploit individual subsystems in the AV stack based on the individual performance metrics of the individual subsystems in the AV stack.
[0096] vii. Emphasis on causing a collision by any means, without regard to whether the collision is preventable. If a collision is unavoidable (e.g., when an object appears in front of the AV less than the minimum braking distance, or when a pedestrian strikes a stopped AV), the collision is not caused by the AV and does not necessarily represent a problem with the technology being used.
[0097] Thus, as described herein, the inventors improve upon conventional methods, for example:
[0098] a,Similarity and diversity of generated scenarios (to maximize coverage) - DB of scenarios and trajectory,descriptors, scenario and trajectory matcher, anomaly detection by reconstructing scenarios or,trajectory loss, DB of scenarios and trajectory,descriptors b. Informed diversification of adversarial scenario seeds and starting conditions (exploration) c, Predicted reward of policy to prevent catastrophic forgetting / mixture of policies or policy by category d. Learning to convert normal scenarios into abnormal scenarios e. Dynamic time-warping matching of scenarios and learned matching of scenarios f. Two-stage operation, i.e., coarse-to-fine: First, we efficiently reduce the search space using a trained, differentiable black-box replica of the AV stack or one or more of its (sub)components, and then perform adversarial fine-tuning with the real AV stack in a simulator. g. Problem discovery leading to actionable items - "field" bugs or defect / bug reports h. Identifying problems and deriving actionable items - Regression and progress testing parameter setting i) Recreating and utilizing real-world scenarios becomes easier: our trained encoders, generic scenario and trajectory descriptors allow existing real-world scenarios to be transformed into latent encodings and sampled in an informed manner from their surroundings, as opposed to manually recreating the scenarios.
[0099] A. Trajectory and context coding (descriptors) In one example, the method includes defining the generated second trajectory as a sequence of descriptors of individual locations, e.g., description-location pairs, the descriptors including one or more components related to the actor or agent, the ego-vehicle, other actors and the environment. For example, as described with reference to Fig. 1, the descriptors may be represented as a sequence of T*(X+N) of T time steps, XD location-encoded and ND-encoded with respect to other traffic participants, road configuration and scene context. Optionally, the descriptors may be represented in a coordinate and context normalized, agent-centric or world-centric representation.
[0100] In one example, the set of descriptors are heuristic and / or learned, i.e., the descriptors may be heuristic (e.g., different fields dedicated to specific information) or learned (e.g., latent encoding of a scene / scenario).
[0101] In one example, the method includes deriving a set of descriptors from data including physical and / or simulated data of the scenario. That is, the descriptors may be derived from both real-world (i.e. physical) data (see below for details on automatically labelling sequential data) and simulated data. This means that they can be used as both inputs to the system and outputs from the system as required. This greatly increases the compatibility of components and facilitates the storage, comparison and interoperation of real-world data, simulated data and outputs from the processes described below.
[0102] B, Labeled data In one example, the method includes labeling the data, such as by applying a recognition model to the data, and deriving a set of descriptors from the data includes deriving a set of descriptors from the labeled data. That is, data for generating the descriptors is collected and automatically labeled, such as by applying a recognition model (trained and heuristic) to existing sequential data. The recognition models may include image level semantic segmentation and object detection, optical flow, etc., laser / LiDAR semantic segmentation and object detection, radar object detection / velocity estimation, large scale scene understanding, etc. Post processing, smoothing, etc. may be performed using inertial data and vehicle sensor data, etc. Data may be augmented by applying a process with high recall and good precision.
[0103] In general, labeling data using multiple techniques, for example by combining recognition models and heuristic methods, optionally with a high-quality HD map, is preferable because it allows for independent exploitation of artifacts arising from individual techniques and more general intermediate features, whereas end-to-end techniques cannot exploit intermediate features.
[0104] In contrast to typical expectations, some noise resulting from poor performance of the applied recognition model can be beneficial when labeling data for adversarial scenarios, so that the generated scenarios reflect the distribution of recognition defects. That is, having noisy labels can be an advantage in terms of directly modeling real-world recognition. For example, pedestrian dropout in one or more frames can be beneficial for training and / or defect discovery.
[0105] For example, the localization output may be combined with a map. For example, a perception model may be used to label road edges or lane markings on one path or trajectory of a road or its lanes, and the labeling may be automatically applied to label other paths or trajectories of the road or its lanes, or another road or its lanes. It should be understood that the agent requires sufficiently accurate and / or precise positions of the ego-vehicle and actors, and the layout of the road.
[0106] In one example, the method includes identifying individual positions of the vehicles from the physical data and / or identifying individual positions of the ego-vehicle from the simulation data, and deriving the set of descriptors from the data includes deriving the set of descriptors using the identified individual positions of the vehicles and / or the identified individual positions of the ego-vehicle, i.e., localization techniques can be applied to understand the position of the ego-vehicle within the scene.
[0107] C. Avoiding mode collapse and ensuring novelty In one example, generating the second trajectory of the first actor by the first agent includes generating the second trajectory of the first actor by the first agent predictively or reactively. That is, the second trajectory may be generated predictively (known before performing the action) or reactively (known after performing the action). Generally, reactive methods will be less efficient, e.g., classifying a mode collapse after it has occurred and discarding the entire scenario or agent. However, reactive methods are easier, identifying utility after the fact and acting on it. In contrast, predictive methods are more difficult but more efficient, minimizing wasted resources and time and speeding up problem discovery.
[0108] In one example, the method includes determining a mutual similarity between a candidate trajectory of a first actor generated by a first agent and a reference trajectory, and optionally generating a second trajectory of the first actor by the first agent by modifying the candidate trajectory based on the determined mutual similarity or eliminating the candidate trajectory based on the determined mutual similarity.
[0109] It should be understood that a candidate trajectory is a candidate for a second trajectory, and a reference trajectory may be the first trajectory, or a stored trajectory that is stored, for example, in a database and selectively accessed, etc. For example, a candidate trajectory may be compared to trajectories contained in the database, and the trajectories are accessed exhaustively or as a subset based on a classification associated with the scenario.
[0110] One simple approach involves a database of trajectory and contextual descriptors (with the potential use of EU, NA, etc. databases that identify many accidents and causes). A matching process (learned and / or heuristic) can determine the similarity of the descriptors (and thus the similarity of the scenarios) and can be used to make decisions (discard a scenario, adjust a scenario, etc.).
[0111] In one example, the method includes rewarding the first agent according to a mutual dissimilarity between the first trajectory and the second trajectory, such that the first agent is rewarded for generating new trajectories.
[0112] D. Matching In one example, the method includes matching the generated second trajectory with a reference trajectory.
[0113] A set of two or more descriptors, each encoding a specific scenario or trajectory of a dynamic agent, can be matched at multiple scales, levels and granularity. This allows matching of:
[0114] Matching trajectories and scenarios that are similar in shape but captured at different time scales or different resolutions / number of time steps, and / or Matching trajectories and scenarios originating from environments or scenes with different shapes but different configurations (road structure, actor and ego-vehicle positions, positions within lanes, transitions from areas reserved for pedestrians to areas reserved for vehicles, etc.), and / or Matching or filtering of trajectories and scenarios, first based on a sub-portion of the length of the descriptor, then based on different sub-portions, etc., generating a hierarchical or tree-like family of relationships between different trajectories and scenarios.
[0115] An example of matching involves initial position matching or filtering using dynamic time warping, followed by one or more stages of matching of other parts of the descriptors based on heuristics (such as Euclidean distance), learned methods (e.g. contrast methods or margins), and / or custom combinations of learned and hard-coded rules.
[0116] In one example, matching the generated second trajectory with the reference trajectory includes matching one or more portions of the generated second trajectory with the reference trajectory.
[0117] E, Reconstruction In one example, the method includes the steps of encoding the generated second trajectory, optionally decoding the encoded second trajectory, calculating a reconstruction quality of the decoded second trajectory, and labeling the generated second trajectory according to the calculated reconstruction quality.
[0118] In one example, the method includes the steps of decoding the encoded trajectory, encoding the decoded trajectory, and calculating a reconstruction quality of the encoded trajectory.
[0119] That is, the descriptors may be obtained or encoded by a learned method, allowing for the automatic extraction and description of large scale sequential data. This is useful for a variety of reasons:
[0120] In some cases, the expressive richness of the descriptors can be expanded compared to manually created descriptor fields.
[0121] This enables automated (and often self-supervised) processing of sequential data.
[0122] This allows real-world scenarios of interest to be automatically encoded (and then sampled in an informed manner).
[0123] When used in a variational context, any probability distribution can be used to sample.
[0124] The converged trained model may be used to perform anomaly detection by measuring the reconstruction error of the input. Poor reconstruction indicates an anomaly where the scenario being tested is outside the distribution of training scenarios. Anomalies can be interpreted as novel or adversarial scenarios, among others.
[0125] That is, this allows us to determine whether the input (i.e. the generated trajectory) is from within a normal distribution or outside of a normal distribution, i.e. whether the agent is trained using the input.
[0126] Thus, generated trajectories within the normal distribution of actions (i.e., of the first actor) will be seen and correctly encoded / decoded, while generated trajectories from outside the normal distribution of actions will not be correctly encoded. There are two options for using this system:
[0127] 1. Encode the trajectory into a latent space representation, decode the latent space representation into a reconstructed trajectory, and measure the reconstruction error.
[0128] 2. Decode the latent space representation into a decoded trajectory, encode the decoded trajectory into a reconstructed latent space representation, and measure the reconstruction error.
[0129] The second option is preferable because it is self-supervised: the input and output are the only components and do not need to be labeled.
[0130] F. Seeding In one example, the method includes the steps of seeding an initial state of a first scenario and initializing the first scenario with the seeded initial state.
[0131] RL agents are generally good at exploitation, so that they will eventually find defects in, for example, an AV stack. However, RL agents are generally not good at exploration, so they make things more efficient, such as testing.
[0132] The inventors have determined that a 1RL agent may be induced to explore by providing maximal notice starting conditions, e.g., by training as described herein and rewarding exploration of new states.
[0133] More specifically, generating trajectories and scenarios is computationally inexpensive, but testing within the SIM is computationally expensive. To reduce the search space, Several methods that can be used to discard the scenario in a reactive manner after testing (using some or all of the methods in C, D, and E above); Some methods that can be used to adjust or discard scenarios when they are being tested in a predictive manner (using some or all of the methods in C, D, and E above); There are several methods and procedures that can be used (see below) to beneficially reduce the number of starting or seed conditions.
[0134] The proposed method to reduce the number of seed conditions is shown in Figure 6. A learned conditional trajectory model is trained to predict trajectories or generate (hallucinate) plausible trajectories using a combination of real-world data and / or simulation data and / or previously generated adversarial trajectories.
[0135] At test time, given a new scene layout (e.g., a previously unencountered road configuration or traffic situation or part of a map), the trained model can be used to sample both plausible starting conditions and plausible future trajectory points, given a set of previous trajectory points.
[0136] This enables large-scale informed sampling of scene configurations, scenario seeds, and starting points, and further enables informed exploration during reinforcement learning, improving coverage and minimizing the chances of catastrophic forgetting and mode collapse by balancing utilization.
[0137] In one example, seeding the initial state of the first scenario includes selecting the initial state from a plurality of initial states, i.e., the initial state is purposefully selected rather than randomly or systematically selected, e.g., to optimize the search.
[0138] G, reward In one example, the method includes rewarding the first agent depending on the novelty of the generated second trajectory, such as short-term novelty and / or long-term novelty, thus rewarding exploration.
[0139] More specifically, the first agent may be rewarded for the novelty of the states visited, one example being a voxelized grid that encodes an additional novelty reward.
[0140] Intrinsic rewards encourage RL agents to explore novel states, leading to more diverse trajectories during training. ●The reward can be a short-term (e.g., episode) reward or a long-term (across the agent's training runs) reward, or a combination of both short-term and long-term rewards, novelty balanced against each other using a scaling factor. An example of a long-term novelty measure can be obtained by Random Network Distillation (RND). RND uses two networks: a randomly initialized and untrained convolutional neural network (random network), and a predictor convolutional neural network (predictor network) trained during RL training. The predictor network aims to predict the output of the random network for states seen by the RL network. New states introduce large errors into the predictions of the predictor network. (Similar to using an encoder and reconstruction loss, but RND is trained on the observations of the RL model rather than a static dataset, so the inference error of the predictor network is specific to a given RL training run. However, this adds computational overhead to RL training, as it adds an additional network to train.)
[0141] In one example, the method includes measuring novelty, such as by using Random Network Distillation (RND).
[0142] H, mode collapse In one example, a method includes evaluating a modal collapse of a first agent and adapting the first agent based on a result of the evaluation.
[0143] Mode collapse is a major problem in deep learning, and even more so in deep reinforcement learning. In the case of adversarial agents and adversarial scenarios, this usually manifests in the form of models outputting adversarial strategies that explore flaws or loopholes in the same AV stack over and over again. Not only is this highly inefficient, but it can also severely limit the amount of problems that can be discovered (i.e., coverage). Certain strategies help to mitigate this problem to some extent (see, inter alia, C, F, and G). Some strategies mitigate mode collapse but cause catastrophic forgetting (i.e., previous useful adversarial strategies are "forgotten" in favor of new adversarial strategies).
[0144] One way to effectively mitigate this is to discretize and classify deep reinforcement learning models based on their behavior and a metric that evaluates mode collapse. Using the same matching and filtering strategy as above, we effectively measure the amount of mode collapse of the model during training, both with respect to previous outputs (i.e., low variance detectors) and with respect to the outputs of other (e.g., stored in a database) models (i.e., low global diversity detectors). Furthermore, by stopping training when mode collapse occurs and classifying and storing these models (storing their parameter settings), we can more formally demonstrate coverage for a particular class of problems.
[0145] Similarly, during the training of a particular agent / model, mode collapse metrics can be recorded. Training can be stopped when mode collapse occurs, but previous states (parameter settings) of the model may be preserved that correspond to states where the model exhibited higher variance or diversity, i.e., states where the model scored "better" on one or more mode collapse metrics.
[0146] An example of such a method is shown in FIG.
[0147] During training, clone the agent when it collapses to a single usage mode (according to one or more mode collapse metrics) and save the agent's parameter settings (current or past, desired behavior and score on the mode collapse metrics) in a database. Restart the search using a new search seed. Alternatively, restart training using the reinitialized agent. Iterate repeatedly to find different adversarial scenarios and train multiple adversarial agents for later testing.
[0148] b. During testing, the stored database of adversarial agents can be used to obtain a diverse set of adversarial scenarios for a given starting seed (agent position, road geometry, etc.). This means that we can expand the test coverage by testing the AV stack against a more diverse set of usage modes. There is a possibility to more formally classify adversarial scenarios and the behavior of adversarial agents.
[0149] Claim - combination of heuristics and learning. Train an agent to find adversarial behavior. Monitor novelty and distance in latent or description space of generated trajectories. If determine that novelty or variance starts to decrease, save current or past parameter settings in DB along with meta information to classify the type of trajectories output, then build DB of parameter settings. Effect - Terminate policy training or inference, switch to different policy, new seed, etc. and reinitialize agent. Monitor the whole thing again. Diminishing returns - bail out. Also - formally identifiable classes / clusters of these policies - can perform integration / regression testing. Mine only a part of AV stack for example. Classify a set of descriptors. Mining - search for smooth trajectories, broadly applicable to other environments. Descriptors are used as a form of exchange between real simulated data, inputs and outputs - all inputs and outputs are descriptors, parameter settings are by-products, but we are interested in parameter settings (these are the models).
[0150] I. Anomaly Style Conversion In one example, the method includes transforming data including physical data and / or simulation data of the scenario with reference to reference data.
[0151] Given one or more sets of (automatically) labeled non-anomalous trajectory data and one or more sets of (automatically) labeled, learned or generated anomalous trajectory data, a model can be trained to convert the non-anomalous trajectory data into anomalous trajectory data. Advantageously, this training is unpaired and weakly supervised, without the need to label associations between trajectories.
[0152] One example of such a method uses a Cycle-Consistency Generative Adversarial model to transform non-anomalous data such that the distribution of non-anomalous data matches the distribution of anomalous data using adversarial and prediction losses, as shown in Figure 9. In other words, the method transforms the distribution of non-adversarial trajectories to match the distribution of adversarial trajectories.
[0153] It should be understood that anomaly simply means that the distributions of the two sets are different. Set A can be transformed so that its distribution better matches the distribution of set B.
[0154] J.,Generation of defect reports In one example, the method includes outputting a defect report and, optionally, performing an action in response to the outputted defect report.
[0155] While the overall goal of the system is problem discovery, an important part is represented by the actionable items derived from the system's results, especially the failures that occur. Examples of reports include "field" bugs or bug reports / defect reports, and parameter settings for regression and progression testing (e.g., deterministic scenarios, fixed simulation scenarios).
[0156] Examples of simulation failures that may trigger a report include: Simple examples include collisions, sudden braking, approaching other actors too closely, and lane violations. ● "Abnormal behavior" for the descriptors ● Damaged ST constraints and Poor performance of any metric (e.g., prediction / tracking metrics, specific AV component metrics).
[0157] In one example, the fault report includes one or more faults in the control software of the host vehicle, i.e., the corresponding AV.
[0158] K. Reproducing the target scenario See E above.
[0159] In one example, simulating the first scenario includes simulating a target scenario.
[0160] In this way, the target scenario is used as a seed to simulate a new environment (e.g. an airport or a specific city / intersection / time / traffic / objects / actors shuttle).
[0161] L, Proxy In one example, the method includes approximating the ego-vehicle or a component thereof as a proxy, and simulating the first scenario includes simulating the first scenario using the proxy. In this manner, the ego-vehicle or a component thereof is approximated (downsampled) to accelerate exploration of a relatively reduced search space prior to exploring broad categories using the first agent to discover broad categories at lower computational cost.
[0162] More specifically, the method involves a two-stage coarse-fine operation that first efficiently reduces the search space using a learned differentiable black-box proxy of the AV stack or one or more (sub)components thereof, followed by adversarial fine-tuning with the real AV stack in a simulator.
[0163] Performing actions and observing conditions in a simulated environment (even though it is much cheaper than driving in the real world) can still be expensive and / or time consuming. This can be due to a) the slow simulator environment, b) AV stacks operating at fixed frequencies, or c) both.
[0164] Learned proxies for the AV software stack or for one or more subcomponents of the AV stack can be used to speed up operation. Two modes of operation are proposed:
[0165] 1. To address limitations arising from the original AV stack, replace the entire AV stack or one or more of its subcomponents with a learned proxy in a simulated environment (Figure 1, bottom).
[0166] 2. When action labels exist or can be obtained, differentiable learned proxies for subcomponents of the AV stack can be used to train adversarial agents with strong direct supervision (Figure 2, bottom), which addresses both types of limitations.
[0167] This is the "coarse" part of the coarse-fine approach because we subsample the search space in an approximate manner, using (imperfect) proxies: proxies are only approximators of the distribution of the actual AV stack (or subcomponents) behavior.
[0168] The "fine" part is then represented by fine-tuning an adversarial agent using the original AV stack within the subsampled search space.
[0169] ●2-step operation (coarse-fine): ■First, subset the problem space by running it using an approximation of the real component (e.g., a trained version of a tracker that is less time-constrained). ■Then, explore the points in the subset using the full simulation environment.
[0170] Using strong direct supervision, we can target specific categories of actions (again using our earlier useful trajectory and scenario descriptors). For example, if we want to train an adversarial agent to induce a specific yaw from the planner, we can do this by first training a learned proxy of the planner, freezing the proxy's parameters, and subsequently training the adversarial agent to get the planner proxy to output plans that lead to trajectories that closely match a particular "type" or descriptor.
[0171] M, Autoregression In one example, the method comprises: simulating a second scenario using the second trajectory; and Observing, by the first agent, a second observation of the environment in response to a second trajectory of the first actor; Optionally, generating, by the first agent, a third trajectory for the first actor based on a second observation of the observed environment.
[0172] In one example, a method includes generating a first trajectory for a first actor by a first agent.
[0173] That is, the method includes repeating the steps of simulating a scenario using the generated trajectories, observing the environment, and generating trajectories, such that an output of the method becomes an input of the method. In this manner, the first agent is trained.
[0174] In one example, the method includes and / or is a method of training an agent. In one example, training the agent includes establishing, by the agent, a relationship between the first trajectory and the first observation.
[0175] N, non-recoverable event In one example, the method includes a step of rewarding the first agent if a second observation of the environment in response to the second trajectory of the first actor rules out an unrecoverable event, such as an unavoidable collision between the ego-vehicle and the first actor (i.e., the ego-vehicle cannot prevent the collision due to physical constraints or laws of physics, etc.).
[0176] Existing solutions focus on causing a collision by any means, without considering whether the collision is preventable or not. If the collision is not preventable or unavoidable (e.g., when an object appears in front of the AV less than the minimum braking distance, or when a pedestrian strikes a stopped AV), the collision is not caused by the AV and therefore does not necessarily represent a problem with the technology being used.
[0177] In one example, the method includes a step of cooperating with a second agent by the first agent and / or a step of interacting with a hostile agent or a non-hostile agent by the first agent.
[0178] That is, a first agent may interact with a second agent and / or the actions of objects, i.e. the environment (non-hostile objects / agents).
[0179] Simulating the scenario According to a second aspect, a computer-implemented method for simulating a scenario includes the steps of: The method includes generating a first trajectory of a first actor of a set of actors according to a first aspect, simulating a first scenario including an environment having an ego-vehicle, a set of actors including the first actor, and optionally a set of objects including a first object, wherein simulating the first scenario includes using the generated first trajectory of the first actor, and identifying defects in the ego-vehicle in the first scenario.
[0180] In one example, the method is a method for testing an own vehicle, such as installation, assurance, validation, verification, regression and / or progression testing of its control software.
[0181] Vehicle Development According to a third aspect, a computer-implemented method for developing an own vehicle includes: simulating a scenario according to the second aspect; and repairing the identified defects of the host vehicle.
[0182] In one example, repairing the identified defect of the host vehicle includes repairing control software of the host vehicle.
[0183] Computer, computer program, and non-transitory computer-readable storage medium A computer according to a fourth aspect includes a processor and a memory configured to carry out the methods according to the first, second and / or third aspects.
[0184] A computer program according to a fifth aspect comprises instructions which, when executed by a computer comprising a processor and a memory, cause the computer to perform the methods according to the first aspect, the second aspect and / or the third aspect.
[0185] A non-transitory computer-readable storage medium according to a sixth aspect includes instructions that, when executed by a computer including a processor and a memory, cause the computer to perform a method according to the first aspect, the second aspect and / or the third aspect.
[0186] definition Throughout this specification, the term "comprising" or "comprises" means including the specified component, but does not exclude the presence of other components. The term "consisting essentially of" or "consists essentially of" means including the specified component, but excluding other components except for materials present as impurities and unavoidable materials present as a result of the process used to provide the component, and components added for purposes other than achieving the technical effect of the invention, such as colorants.
[0187] The terms "consisting essentially of" or "consists essentially of" mean the inclusion of certain components but the exclusion of other components.
[0188] Wherever appropriate, depending on the context, use of the words "comprise" or "comprising" may be interpreted as including the meaning "consisting essentially of" or "consisting essentially of" or as including the meaning "consisting of" or "consisting of."
[0189] The optional features described herein can be used individually or in combination with each other as appropriate, in particular in the combinations described in the accompanying claims. The optional features of each aspect or exemplary embodiment of the present invention described herein can also be applied to all other aspects or exemplary embodiments of the present invention as appropriate. In other words, a person skilled in the art reading this specification considers that the optional features of each aspect or exemplary embodiment of the present invention are interchangeable and combinable between different aspects and exemplary embodiments. [Brief description of the drawings]
[0190] For a better understanding of the present invention and to show how exemplary embodiments thereof may be carried into effect, reference will now be made, by way of example only, to the accompanying drawings, in which:
[0191] [Figure 1] 1 illustrates a schematic of an ego-vehicle scenario. [Diagram 2] 2 illustrates a schematic of the labeling of data captured in the scenario of FIG. 1; [Diagram 3] 2 illustrates a schematic diagram of a method for generating new descriptors from and adjusting the scenario of FIG. 1 according to one or more embodiments. [Figure 4] 4 illustrates diagrammatically a matcher for use in the method diagrammatically illustrated in FIG. 3; [Diagram 5] 1 illustrates a schematic diagram of a method for labeling trajectory data as an anomaly, according to one or more embodiments. [Figure 6] 1 illustrates diagrammatically how to train and test a fixed or recursive trajectory model, respectively. [Figure 7] 1 illustrates a schematic of a method for random network distillation. [Figure 8] 2 illustrates a schematic diagram of an example of a method for training a policy for an agent from the scenario of FIG. 1 using reinforcement learning, according to one or more embodiments. [Figure 9] 1A-1D are schematic diagrams illustrating a method for training and performing an anomaly transformation using a fixed or recursive trajectory model, respectively, in accordance with one or more embodiments; [Figure 10] 1 illustrates a schematic diagram of a method for training an anomaly transformation using a first fixed or recursive trajectory model and a second fixed or recursive trajectory model, according to one or more embodiments. [Figure 11] 1 illustrates a schematic diagram of a method for generating defect reports from reinforcement learning episodes when training an agent, according to one or more embodiments. [Figure 12] 1 illustrates a schematic diagram of a method for generating clusters of descriptors for reinforcement learning episodes when training an agent, according to one or more embodiments. [Figure 13] 1 illustrates a schematic diagram of a method for generating clusters of descriptors for reinforcement learning episodes when training an agent, according to one or more embodiments. [Figure 14] 14 illustrates a schematic diagram of a method for generating new descriptors for a descriptor space that includes the clusters of descriptors of FIGS. 12 and 13, according to one or more embodiments. [Figure 15] 1 illustrates a schematic diagram of a method for moving from multiple clusters to generate new descriptors, according to one or more embodiments. [Figure 16] 1 illustrates a schematic diagram of a method for recreating a scenario, according to one or more embodiments. [Figure 17] 1 illustrates a schematic diagram of a method for training an agent using reinforcement learning in an environment that includes a proxy for an autonomous vehicle software stack, according to one or more embodiments. [Figure 18]1 illustrates a schematic diagram of a method for training an agent using reinforcement learning in an environment that includes proxies for software stack components of an autonomous vehicle, according to one or more embodiments. [Figure 19] The above mentioned method is outlined in more detail below. [Figure 20] The above mentioned method is outlined in more detail below. [Figure 21] The above mentioned method is outlined in more detail below. [Figure 22] The above mentioned method is outlined in more detail below.
[0192] Detailed Description of the Drawings 1-22 illustrate a schematic of a method according to an exemplary embodiment. The method is a computer-implemented method for generating a trajectory of an actor, the method comprising: - simulating a first scenario including an environment having an ego-vehicle, a set of actors including a first actor, and optionally a set of objects including a first object, using a first trajectory of the first actor; Observing, by a first adversarial reinforcement learning agent, a first observation of an environment (e.g., an ego-vehicle, a second actor in the collection, and / or a first object in the collection) in response to a first trajectory of a first actor; generating, by the first agent, a second trajectory for the first actor based on the first observation of the observed environment.
[0193] A. Trajectory and context coding (descriptors) Fig. 1 illustrates in more detail a schematic diagram of a method according to an exemplary embodiment. More specifically, Fig. 1 illustrates in schematic diagram a scenario encountered by an autonomous vehicle 10, which may be an ego-vehicle 10. The scenario includes one or more actors, and in this particular scenario there are two actors. The two actors include another vehicle 12 and a pedestrian 14. The pedestrian has a trajectory T, e.g. an agent trajectory that is substantially perpendicular to the sidewalk 16 and moves from the sidewalk 16 to the road 18 along which the ego-vehicle 10 travels. In this way, the agent trajectory intersects with the trajectory of the ego-vehicle. The agent trajectory T is captured as a descriptor 20.
[0194] In other words, in this example, the method comprises defining the generated second trajectory as a set of descriptors of individual positions, e.g., description-position pairs, the description including one or more components related to the actor or agent, the ego-vehicle, other actors and the environment. For example, as described with reference to FIG. 1, the descriptor may be represented as a set of T*(X+N) for T time steps, XD position-encoded and ND-encoded with respect to other traffic participants, road configuration and scene context. Optionally, the descriptor may be represented in a coordinate and context normalized, agent-centric or world-centric representation. In this example, the set of descriptors is heuristic and / or learned. In this example, the method comprises deriving the set of descriptors from data including physical data and / or simulation data of the scenario.
[0195] The host vehicle 10 may include multiple sensors 22 and an on-board computer 24. The sensors may include sensors of various modalities, such as radar sensors, image sensors, LiDAR sensors, inertial measurement units (IMUs), odometry, etc. The computer 24 may include one or more processors and storage devices. The host vehicle may include one or more actuators, such as an engine (not shown), that move the host vehicle along a trajectory.
[0196] B. Data labeling FIG. 2 illustrates generally the method of FIG. 1 in more detail.
[0197] In this example, the method includes labeling the data, such as by applying a recognition model to the data, and deriving a set of descriptors from the data includes deriving the set of descriptors from the labeled data, i.e., data for generating the descriptors is collected and automatically labeled, such as by applying a (trained and heuristic) recognition model to existing sequential data.
[0198] In this example, the method includes identifying individual positions of the vehicles from the physical data and / or identifying an individual position of the ego-vehicle from the simulation data, and deriving the set of descriptors from the data includes deriving the set of descriptors using the identified individual positions of the vehicles and / or the identified individual position of the ego-vehicle, i.e. localization techniques can be applied to understand the position of the ego-vehicle within the scene.
[0199] In other words, unlabeled sequential data 26 is captured by one or more sensors 22 (FIG. 1). The unlabeled sequential data 26 may include image data 26_1, LiDAR data 26_2, radar data 26_3, location information 26_4, and vehicle data 26_5. Optional data 28 may also be provided. The optional data 28 may include an interior map 28_1, an exterior map 28_2, and field annotations 28_3. The data 26, 28 may be automatically labeled at 30. The result of the automatic labeling is labeled trajectory data 32.
[0200] C. Avoiding mode collapse and ensuring novelty FIG. 3 illustrates generally the method of FIG. 1 in more detail.
[0201] In this example, generating the second trajectory of the first actor by the first agent includes predictively or reactively generating the second trajectory of the first actor by the first agent.
[0202] In this example, the method includes determining a mutual similarity between a candidate trajectory of the first actor generated by the first agent and a reference trajectory, and optionally generating a second trajectory of the first actor by the first agent by modifying the candidate trajectory based on the determined mutual similarity or eliminating the candidate trajectory based on the determined mutual similarity.
[0203] It should be understood that a candidate trajectory is a candidate for a second trajectory, and a reference trajectory may be the first trajectory, or a stored trajectory that is stored, for example, in a database and selectively accessed, etc. For example, a candidate trajectory may be compared to trajectories contained in the database, and the trajectories are accessed exhaustively or as a subset based on a classification associated with the scenario.
[0204] In this example, the method includes rewarding the first agent according to the mutual dissimilarity of the first trajectory and the second trajectory, such that the first agent is rewarded for generating new trajectories.
[0205] In other words, a descriptor 20 may be generated for each point of the scenario. The points of the scenario may be time points or position points of the ego-vehicle. Each point may include the position and pose of each actor or agent, the position and pose of the ego-vehicle 10, and context information. The context information may include an internal map and an external map. There may be multiple points that make up a scenario. Therefore, there may be multiple descriptors, and each descriptor may be generated for a point. A trajectory T may be a sequence of positions and poses of an agent in a scenario.
[0206] Each descriptor 20 may be input to a matcher 34, which is described in more detail with reference to Figure 4 below. At 35, the matcher 34 compares the set of descriptors 20 to a descriptor sequence database 36 and determines the degree of similarity (e.g., distance) of the compared sequences. If the agent trajectory sequence is not similar to any in the database 36, then at 38 the sequence is stored in the database 36. If the agent trajectory sequence is similar, then at 40 the agent trajectory sequence is adjusted or discarded.
[0207] D. Matching FIG. 4 illustrates generally the method of FIG. 1 in more detail.
[0208] In this example, the method includes matching the generated second trajectory with a reference trajectory.
[0209] An example of matching involves initial position matching or filtering using dynamic time warping, followed by one or more stages of matching of other parts of the descriptors based on heuristics (such as Euclidean distance), learned methods (e.g. contrast methods or margins), and / or custom combinations of learned and hard-coded rules.
[0210] In this example, matching the generated second trajectory with the reference trajectory includes matching one or more portions of the generated second trajectory with the reference trajectory.
[0211] In other words, Fig. 4 illustrates the matcher 34 of Fig. 3 in a schematic manner. The matcher 34 may be configured to compare the similarity of two trajectories, e.g., trajectory 1 (agent trajectory T) and trajectory 2 (a trajectory stored in the database 36). The matcher may include one or more constituent matchers. The constituent matchers may include one or more of a Dynamic Time Warping (DTW) matcher 42_1, a Euclidean distance matcher 42_2, a learned distance matcher 42_3 (which may be a neural network trained to calculate the distance between two columns of points), a custom matcher 42_4 (which may be any other combination of matchers), and a context matcher 42_5.
[0212] E, Reconstruction FIG. 5 illustrates generally the method of FIG. 1 in more detail.
[0213] In this example, the method includes the steps of encoding the generated second trajectory, optionally decoding the encoded second trajectory, calculating a reconstruction quality of the decoded second trajectory, and labeling the generated second trajectory according to the calculated reconstruction quality.
[0214] In this example, the method includes the steps of decoding the encoded trajectory, encoding the decoded trajectory, and calculating a reconstruction quality of the encoded trajectory.
[0215] 5 illustrates the training and testing of an autoencoder, more specifically, a variational autoencoder (VAE). The VAE may include an encoder 44 and a decoder 46.
[0216] During training, the encoder may be configured to generate the descriptors 20 from the labeled trajectory data 48. The decoder may be configured to use the descriptors 20 to reconstruct the trajectory data 50. The encoder and decoder are trained to reduce or minimize the loss between the reconstructed trajectory data 50 and the labeled trajectory data 48.
[0217] During testing, the reconstructed trajectories are compared to the original labeled trajectories 48 and a reconstruction quality 51 is calculated. If the reconstruction quality is poor, e.g., below a threshold, at 52, the data is labeled as an anomaly, at 54. Anomalies 54 may be detected because the reconstructed trajectories are outside of the trained distribution. Such anomalies may therefore be good candidates for use in the simulator to test the AV stack.
[0218] F. Seeding FIG. 6 illustrates generally the method of FIG. 1 in more detail.
[0219] In this example, the method includes the steps of seeding an initial state of a first scenario and initializing the first scenario with the seeded initial state.
[0220] The proposed method to reduce the number of seed conditions is shown in Figure 6. A learned conditional trajectory model is trained to predict trajectories or generate plausible trajectories (hallucinations) using a combination of real-world data and / or simulation data and / or previously generated adversarial trajectories.
[0221] At test time, given a new scene layout (e.g., a previously unencountered road configuration or traffic situation or part of a map), the trained model can be used to sample both plausible starting conditions and plausible future trajectory points, given a set of previous trajectory points.
[0222] This enables large-scale informed sampling of scene configurations, scenario seeds, and starting points, and further enables informed exploration during reinforcement learning, improving coverage and minimizing the chances of catastrophic forgetting and mode collapse by balancing utilization.
[0223] In this example, seeding the initial state of the first scenario includes selecting the initial state from a plurality of initial states, i.e., the initial state is purposefully selected rather than randomly or systematically selected, e.g., to optimize the search.
[0224] In other words, the method illustrated diagrammatically in FIG. 6 is proposed to reduce the number of seed conditions required to generate possible anomalous trajectories.
[0225] A fixed or recursive trajectory model 60 may be trained in a training phase by inputting context data 62, which may include an internal map 63 and an external map 64. Optionally, trajectory seeds 66 may be input using the labeled trajectory data 48, and noise 68 may be input using a noise generator 70. A predicted trajectory 72 may be generated, and a prediction or reconstruction loss may be generated. The trajectory model 60 may include a neural network. Parameter settings of the trajectory model 60 may be optimized by minimizing the prediction or reconstruction loss.
[0226] During testing, trajectory model 60 may use context data 62 , noise 68 and trajectory seeds 66 as inputs to generate new trajectory data 74 .
[0227] G, reward FIG. 7 illustrates generally the method of FIG. 1 in more detail.
[0228] In this example, the method includes rewarding the first agent depending on the novelty of the generated second trajectories, such as short-term novelty and / or long-term novelty, thus rewarding exploration.
[0229] More specifically, the first agent may be rewarded for the novelty of the states visited, one example being a voxelized grid that encodes an additional novelty reward.
[0230] Intrinsic rewards encourage RL agents to explore novel states, leading to more diverse trajectories during training. ● The reward can be a short-term (e.g., episode) reward or a long-term (across the agent's training runs) reward or a combination of both short-term and long-term rewards, novelty balanced against each other using a scaling factor. An example of a long-term novelty measure can be obtained by Random Network Distillation (RND). RND uses two networks: a randomly initialized and untrained convolutional neural network (random network), and a predictor convolutional neural network (predictor network) trained during RL training. The predictor network aims to predict the output of the random network for states seen by the RL network. New states introduce large errors into the predictions of the predictor network. (Similar to using an encoder and reconstruction loss, but RND is trained on the observations of the RL model rather than a static dataset, so the inference error of the predictor network is specific to a given RL training run. However, this adds computational overhead to RL training, as it adds an additional network to train.)
[0231] In this example, the method includes measuring novelty, such as by using Random Network Distillation (RND).
[0232] H, mode collapse FIG. 8 illustrates generally the method of FIG. 1 in more detail.
[0233] In this example, the method includes evaluating a modal collapse of a first agent and adapting the first agent based on a result of the evaluation.
[0234] An example of such a method is shown in FIG.
[0235] During training, clone the agent when it collapses to a single utilization mode (according to one or more mode collapse metrics) and save the agent's parameter settings (current or past, desired behavior and score on the mode collapse metrics) in a database. Restart the search using a new search seed. Alternatively, restart training using a reinitialized agent. Iterate repeatedly to find different adversarial scenarios and train multiple adversarial agents for later testing.
[0236] b. During testing, the stored database of adversarial agents can be used to obtain a diverse set of adversarial scenarios for a given starting seed (agent position, road geometry, etc.). This means that we can expand the test coverage by testing the AV stack against a more diverse set of usage modes. There is a possibility to more formally classify adversarial scenarios and the behavior of adversarial agents.
[0237] In other words, Fig. 8 shows a schematic representation of an adversarial agent 76 that can convert states into actions. Each actor in a scenario may be associated with only one agent. For example, each agent may govern the movement of the actor depending on a given state. An action may be a future position to which the actor has moved, or the actor's velocity, pose, etc. The agent 76 may include a machine learning algorithm, which may be a neural network.
[0238] The AV software stack 78 may include modules including perception and control. The AV software stack may be provided to the computer 24 (FIG. 1) at run time. The AV software stack 78 may be configured to observe and perceive an environment including an actor governed by an agent 76 and control the ego-vehicle 10 according to the agent trajectory. In other words, the agent 76 generates the actor's trajectory according to changes in conditions including the AV (ego-vehicle).
[0239] The agent 76 may be trained using reinforcement learning or deep reinforcement learning in an environment including the AV software stack 78. Contextual data may also be provided in the environment. For example, there may not be a target state that the agent is trained to match depending on previous input states. Instead, rewards may be used when an episode (e.g., a sequence of states and actions) achieves a goal. For example, the goal may include an adversarial goal, such as an actor colliding with the ego-vehicle. This may occur if an episode includes an actor (e.g., a pedestrian) suddenly jumping off the sidewalk into the road and the ego-vehicle's trajectory. In this way, an adversarial event may occur. If the AV stack has a flaw that causes the ego-vehicle not to change course to avoid the actor, this may be captured as an adversarial event.
[0240] Other adversarial events may also occur, including events selected from the group including: a collision occurs between the agent (or actor) and the autonomous vehicle; the distance between the agent and the autonomous vehicle is less than a minimum distance threshold; the deceleration of the autonomous vehicle is greater than a deceleration threshold; the acceleration of the autonomous vehicle is greater than an acceleration threshold; and the jerk of the autonomous vehicle is greater than a jerk threshold.
[0241] Each episode may end with a hostile event or a failure of the AV software stack.
[0242] Observations are made and descriptors of the actor's states and actions may be generated at 80. The descriptors may be generated by an encoder. A matcher, which may include the matcher of Figure 3, may compare the descriptors to descriptors from the descriptor sequence database 36. The descriptor sequence database 36 may include a plurality of descriptors, each of which includes a descriptor of a previous episode.
[0243] A new episode can be compared by reinitializing the agent and rerunning the reinforcement learning loop which generates a new episode and multiple new descriptors.
[0244] At 82, it is determined whether there is mode collapse. Mode collapse may be determined when there is low variance between the compared episodes. Low variance may be classified as variance that is below a variance threshold or convergent variance.
[0245] If there is no mode collapse, e.g., if the agent generates a new adversarial episode, training continues. If there is a mode collapse, e.g., if the adversarial episode matches a previous adversarial episode, the agent is cloned at 84. At 86, the parameter settings (e.g., combination of weights in the network) of the agent that caused the adversarial event may be stored in a parameter database. At 88, a new search strategy or trajectory may be sampled for the cloned agent. The new search strategy may be seeded from an initial state derived from descriptors from the descriptor sequence database 36.
[0246] It is important to note that mode collapse is typically seen as a negative thing. However, mode collapse in this scenario is used to identify anomalous adversarial events, which can then be used to improve the AV stack using a simulator. In this way, the replicated adversarial agent can be used in the simulator to improve the AV software stack.
[0247] I. Anomaly Style Conversion FIG. 9 illustrates generally the method of FIG. 1 in more detail.
[0248] In this example, the method includes transforming data including physical data and / or simulation data of the scenario with reference to reference data.
[0249] One example of such a method uses a cycle-consistent generative adversarial model to transform non-anomalous data such that the distribution of non-anomalous data matches the distribution of anomalous data using adversarial and prediction losses, as shown in Figure 9. In other words, the method transforms the distribution of non-adversarial trajectories to match the distribution of adversarial trajectories.
[0250] It should be understood that anomaly simply means that the distributions of the two sets are different. Set A can be transformed so that its distribution better matches the distribution of set B.
[0251] In other words, Fig. 9 shows a schematic of how to convert non-anomalous trajectories into anomalous trajectories. For example, the non-anomalous trajectories may be trajectories that match a distribution of trained trajectories from an autoencoder. The distribution of trained trajectories may be trajectories that are not associated with adversarial events.
[0252] The fixed or recurrent trajectory model 90 may be a generative adversarial network (GAN). Input to the trajectory model 90 may include context data 62, including an internal map 63 and an external map 64. Another input includes non-anomalous labeled trajectory data 92. Optionally, noise 68 may be input using a noise generator 70. The trajectory model 90 may be configured to convert the non-anomalous data 92 into predicted anomalous trajectory data 94. To train the trajectory model 90, the predicted anomalous trajectory data 94 may be compared to actual anomaly labeled trajectory data 96, and a prediction loss 98 and an adversarial loss 100 may be generated.
[0253] During inference, the trajectory model 90 may be configured to generate predicted abnormal trajectory data 94 based on the internal map 63, the external map 64 and the labeled non-abnormal trajectory data 92.
[0254] The anomalous trajectories may then be explored in the simulator to determine whether they are associated with the occurrence of an adversarial event, for example a collision between the agent and an AV or ego vehicle.
[0255] Referring to Figure 10, a method for training an anomaly transformation using a cycle-consistent GAN or cycle-consistent generative adversarial model is provided. This model may use similar features to the method and model of Figure 9, so duplicated description is omitted for brevity.
[0256] The models may include a first model 102 (or model A), also referred to as a fixed or recursive trajectory model A, and a second model 104 (or model B), also referred to as a fixed or recursive trajectory model B. The first model 102 may be configured to generate predicted anomaly trajectory data 94 that is compared to anomaly-labeled trajectory data 96 to generate an adversarial loss 100. The predicted anomaly trajectory data 94 may be input to a second model 104 configured to generate reconstructed non-anomaly trajectory data 106. The reconstruction loss 108 and the adversarial loss 100 may be obtained by comparing the reconstructed non-anomaly trajectory data with the non-anomaly-labeled trajectory data 92. Parameter settings of the second model may be modified to reduce the reconstruction loss 108 and the adversarial loss 100.
[0257] In this manner, new anomalies or potential adversarial events can be synthesized using cycle GANs, etc. Once synthesized, new anomalies can be run through the simulator to test whether they are adversarial scenarios that could result in, for example, a failure of the AV stack 10.
[0258] J.,Generation of defect reports FIG. 11 illustrates generally the method of FIG. 1 in more detail.
[0259] In this example, the method includes outputting a defect report and, optionally, performing an action in response to the outputted defect report.
[0260] In this example, the fault report includes one or more faults in the control software of the host vehicle, i.e., the corresponding AV.
[0261] In other words, Figure 11 illustrates generally that faults may be detected at 108 (e.g., by a fault detector) within a reinforcement learning environment. The reinforcement learning environment may be within a simulator. Faults may include collisions, hard braking, driving too close to other actors, lane violations, etc. In other words, faults may be adversarial events as described herein.
[0262] At 110, the AV software stack is interrogated as to whether it has been faulty or broken. A defect report may be generated at 112. The defect report at 112 may be stored at 114 in a defect dataset.
[0263] With reference to Figure 12, a method similar to that shown in Figure 11 is provided. In Figure 12, similar features are not described, but only differences from Figure 11 are described. One such difference is the inclusion of a cluster database 116. The cluster database 116 may include clusters of adversarial events.
[0264] Multiple reinforcement learning episodes, sets of reinforcement learning episodes, or points of reinforcement learning episodes may be clustered together. The points in a cluster may be added to the cluster database 116.
[0265] Generating new latent adversarial descriptors Figure 13 shows a schematic of a method for generating and storing descriptors of adversarial events observed during reinforcement learning of an agent 76. At 80, we observe and describe the states and actions within episodes that result in violations (also called adversarial events). The descriptors 20 encoded from the actions and states are stored in a cluster database 116. As mentioned above, actions and states are clustered according to their associated episodes.
[0266] Figure 14 illustrates diagrammatically the cluster database 116, represented as a descriptor space envelope 120. Within the descriptor space envelope 120, clusters C of the descriptors 20 are provided. The clusters include those descriptors that are determined to match each other within a matching threshold. The clusters may be determined using a clustering algorithm, which may be an unsupervised clustering algorithm.
[0267] The objective of the subject matter of this disclosure is to explore the descriptor space envelope to obtain more descriptors of potential adversarial scenarios that can be tested in a simulator to learn new faults in the AV software stack. Exploring the descriptor space envelope on an AV can take a very long execution time and is processing intensive and expensive.
[0268] Alternatively, in one or more embodiments, the descriptor space envelope 120 may be explored by moving away from the currently known cluster C. There are various ways in which this can be achieved.
[0269] One such method involves determining new descriptors: a direction is determined from the centroid of a cluster, and new descriptors are generated for incremental positions moving from the centroid in that direction, which can be understood with reference to Equation A below.
[0270] Formula A: New Descriptor = (C1 + C2 + ... + CN) / N + unit_direction_away_from_super_barycenter × M
[0271] In formula A, C1 is the first descriptor, C2 is the second descriptor, CN is the Nth descriptor, and N is the total number of descriptors. This part of formula A effectively calculates the center of gravity. Also, unit_direction_away_from_super_barycenter is the direction, such as up, down, etc. Furthermore, M is the distance away from the center of gravity.
[0272] Another way to search the descriptor space envelope 120 is to use Equation B.
[0273] Formula B: New Descriptor = SDF + unit_direction_away_from_super_barycenter × M
[0274] In Equation B, SDF is a signed distance function. The other parameters are the same as those in Equation A.
[0275] Another way to search the descriptor space envelope 120 is to use Equation C:
[0276] Formula C: New Descriptor
number
number
[0277] Figure 15 shows an extension of the idea of exploring the descriptor space envelope from a single cluster shown in Figure 14. There are three clusters in Figure 15. The step of moving from a cluster is to find the union (C 1 U.C. 2 U.C. 3 ), determining the difference between the cluster space C and the union using formula D, determining the centroid of the difference, and generating a new descriptor as the descriptor at the centroid of the difference, to move from the multiple clusters.
[0278] Formula D:C\(C 1 U.C. 2 U.C. 3 )
[0279] The advantage of this approach is that it reduces the chances of finding another cluster within the descriptor space envelope.
[0280] At a high level, the framework can be described algorithmically as follows:
[0281] Initialize the set of solution clusters C={} For N meta-episodes: Initialize the policy probabilistic policy P with the convergence temperature α and an empty replay buffer D (for invalidation policies) Initialize the violation buffer B={} Run the episode until convergence of P (i.e., policy collapse), which is detected via α. ■Until the episode end condition (policy collapse) is met: Observe state s, perform action a, receive reward r, and observe new state s ●Store the transition (s, a, r, s') in D ■ Derive a policy to move away from solutions barycentres in C (if C is nonempty) ■ Optimize policy P based on transitions uniformly sampled from D ■ Each episode that results in a violation is stored in B. Cluster new solutions (e.g., descriptors) of B while cross-checking them with existing solutions C ○When a new solution is discovered, add it to C
[0282] where C is a cluster, N is the number of metaepisodes, P is the agent's policy, α is the convergence temperature or convergence variance, D is the replay buffer, s is the state input to the agent, a is the action output by the agent, r is the reward given to the agent, and s' is the new state generated by the AV software stack (or subcomponent) or proxy (or subcomponent).
[0283] K. Reproducing the target scenario Figure 16 illustrates in more detail the method of Figure 1 in schematic form. See also Figure 6.
[0284] In this example, simulating the first scenario includes simulating a target scenario.
[0285] Referring to FIG. 13, a method is provided for generating new trajectory data.
[0286] In the method, target scenario context data 118 may include an internal map 63 and an external map 64. The context data 118 may be input to a fixed or recursive trajectory model 119. Optional trajectory seeds 120 may be input to the model 119 from target scenario trajectory data 122. Optional noise 68 may also be input to the model 119 from a noise generator 70. The model 119 may be configured to output new trajectory data 124.
[0287] L, Proxy Figures 17 and 18 show in more detail the method of Figure 1. See also Figure 21, in which the AV stack proxy is labelled as Stack-Lite.
[0288] In this example, the method includes approximating the ego-vehicle or a component thereof as a proxy, and simulating the first scenario includes simulating the first scenario using the proxy. In this manner, the ego-vehicle or a component thereof is approximated (downsampled) to accelerate exploration of a relatively reduced search space to discover broad categories at lower computational cost, prior to exploring broad categories using the first agent.
[0289] More specifically, the method involves a two-stage coarse-fine operation that first efficiently reduces the search space using a learned differentiable black-box proxy of the AV stack or one or more (sub)components thereof, followed by adversarial fine-tuning with the real AV stack in a simulator.
[0290] Performing actions and observing conditions in a simulated environment (even though it is much cheaper than driving in the real world) can still be expensive and / or time consuming. This can be due to a) the slow simulator environment, b) AV stacks operating at fixed frequencies, or c) both.
[0291] Learned proxies for the AV software stack or for one or more subcomponents of the AV stack can be used to speed up operation. Two modes of operation are proposed:
[0292] 1. To address limitations arising from the original AV stack, replace the entire AV stack or one or more of its subcomponents with a learned proxy in a simulated environment (Figure 1, bottom).
[0293] 2. When action labels exist or can be obtained, differentiable learned proxies for subcomponents of the AV stack can be used to train adversarial agents with strong direct supervision (Figure 2, bottom), which addresses both types of limitations.
[0294] This is the "coarse" part of the coarse-fine approach because we subsample the search space in an approximate manner, using (imperfect) proxies: proxies are only approximators of the distribution of the actual AV stack (or subcomponents) behavior.
[0295] The "fine" part is then represented by fine-tuning an adversarial agent using the original AV stack within the subsampled search space.
[0296] ●2-step operation (coarse-fine): ■First, subset the problem space by running it using an approximation of the real component (e.g., a trained version of a tracker that is less time-constrained). ■Then, explore the points in the subset using the full simulation environment.
[0297] Using strong direct supervision, we can target specific categories of actions (again using our earlier useful trajectory and scenario descriptors). For example, if we want to train an adversarial agent to induce a specific yaw from the planner, we can do this by first training a learned proxy of the planner, freezing the proxy's parameters, and subsequently training the adversarial agent to get the planner proxy to output plans that lead to trajectories that closely match a particular "type" or descriptor.
[0298] In other words, Figure 17 shows four different methods. The first method is the reinforcement learning method of the agent 76 introduced in Figure 8.
[0299] Using the first method, a set of observations 130 observed by the AV software stack 78 and a set of actions 132 performed by the AV stack 130 in response to the observations are generated in a second manner.
[0300] In the third method, an AV stack proxy 134 is used instead of the AV software stack 78. The AV stack proxy may be a machine learning model, such as a neural network. The neural network may be a convolutional neural network (CNN).
[0301] The AV stack proxy 134 may be trained according to a third method. The AV stack proxy 134 may be trained by generating predicted actions 136 based on input observations 130. A loss 138 between the predicted actions 136 and the actions generated by the second method may be obtained. Parameter settings of the AV stack proxy may be optimized to reduce or minimize the loss 138.
[0302] In the fourth method, reinforcement learning of the agent 76 is performed using states and rewards generated by the AV stack proxy 134 in the simulator.
[0303] Because the AV stack proxy is smaller than the entire AV software stack, anomalies and adversarial scenarios can be determined more quickly. It should be understood that anomalies discovered using the AV stack proxy 134 may be considered approximations. To determine whether a scenario is actually adversarial, a first method may be used to verify the anomaly as an adversarial scenario in which the AV software stack 78 has failed.
[0304] The approximations of the adversarial events may form clusters in the manner shown in Figure 15, and each cluster includes a centroid. Once the clusters have been discovered using the coarse approximations by the AV stack proxy 134, the method according to Figure 16 (and Figure 14) may be used to explore the descriptor space to discover new potential adversarial scenarios that can be tested using the full AV software stack 78 on a simulator. This approach is computationally more efficient and reduces the time required to explore the descriptor space.
[0305] The same technique can be used with subcomponents 140 of the AV software stack, such as semantic segmentation or object recognition.
[0306] With reference to Fig. 18, methods are provided for obtaining approximate failures of subcomponents 140 of an AV software stack. Fig. 17 shows three methods in schematic form.
[0307] In the first method, observations 130 are input to an AV software stack subcomponent 140, which generates actions 132 in response.
[0308] In a second method, the observations 130 and the actions 132 form collected training data. The AV stack subcomponent proxy 142 is trained using the collected training data. Specifically, the AV stack subcomponent proxy 142 uses the observations 130 to generate predicted actions. A loss between the predicted actions 136 and the actions 132 is determined. Parameter settings of the AV stack subcomponent proxy 142 are trained to reduce or minimize the loss 138. The AV stack subcomponent proxy 142 may be or include a machine learning model, such as a neural network. The neural network may be a convolutional neural network (CNN).
[0309] A third method may be a supervised training method with learned subcomponent proxies 142 .
[0310] The learned subcomponent proxy 142 may generate actions based on actions 148 from the agent 76. An action loss 144 and an action classification loss 146 may be computed to train the agent 76.
[0311] Figure 19 shows in more detail the method of Figure 1. In particular, Figure 18 shows nine scenarios that were simulated using a seed to explore the response of the ego vehicle.
[0312] Fig. 20 shows a more detailed schematic of the method of Fig. 1. In particular, Fig. 20 shows a scenario involving multiple candidate trajectories for a first actor (pedestrian). However, the starting points of each of the multiple candidate trajectories are the same starting point, so the first agent is rewarded to change their starting points while excluding unavoidable collisions between the ego-vehicle and the first actor at points such as in front of the truck.
[0313] Figure 21 illustrates in more detail the method of Figure 1. In Figure 21, a stack light may correspond to an AV software stack proxy or an AV software stack subcomponent proxy.
[0314] Figure 22 is a graph of the number of events (trajectories) generated as a function of time according to the method of Figure 1. In particular, the method generates over 300 events in about 13 minutes, thereby improving the detection of defects in the host vehicle and in the corresponding vehicle control software.
[0315] While preferred embodiments have been shown and described, it should be understood by those skilled in the art that various changes and modifications can be made therein without departing from the scope of the invention as defined in the appended claims and as set forth above.
[0316] At least some of the exemplary embodiments described herein may be partially or entirely configured using dedicated hardware. Terms such as "component," "module," or "unit" as used herein may include, but are not limited to, hardware devices such as circuits, field programmable gate arrays (FPGAs) or application specific integrated circuits (ASICs) in the form of discrete or integrated components that perform specific tasks or provide related functionality. In some embodiments, the described elements may be configured to reside on a tangible, persistent, addressable storage medium and configured to execute on one or more processors. In some embodiments, these functional elements may include components such as, by way of example, software components, object-oriented software components, class components, task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. Although the exemplary embodiments are described with reference to components, modules, and units discussed herein, such functional elements may be combined into fewer elements or separated into additional elements. Various combinations of optional features have been described herein, and the described features may be combined in any suitable combination. In particular, the features of any one exemplary embodiment may be combined as appropriate with the features of any other embodiment, unless the combinations are mutually inconsistent. Throughout this specification, the term "comprising" or "comprises" means the inclusion of the specified components but does not exclude the presence of other components.
[0317] Attention is directed to all articles and documents related to this application which have been filed contemporaneously or prior to this application and which are open to public inspection together with this application, the contents of all such articles and documents being incorporated herein by reference.
[0318] All features disclosed in this specification (including the accompanying claims, abstract and drawings), and / or all steps of any method or process so disclosed, may be combined in any combination, unless at least some of such features and / or steps are mutually inconsistent.
[0319] Each feature disclosed in this specification (including the accompanying claims, abstract and drawings), unless otherwise stated, may be replaced by alternative features serving the same, equivalent or similar purpose, and thus, unless otherwise stated, each disclosed feature is only an example of a generic series of equivalent or similar features.
[0320] The invention is not limited to the details of the foregoing embodiments, but extends to any novel feature, or any novel combination of such features, disclosed in this specification (including the accompanying claims, abstract and drawings), or to any novel or any novel combination of method or process steps so disclosed.
[0321] The subject matter of the present disclosure may be expressed by the following:
[0322] 1. A computer-implemented method for generating an actor trajectory, comprising: simulating a first scenario including an environment having an ego-vehicle, a set of actors including a first actor, and optionally a set of objects including a first object, using a first trajectory of the first actor; Observing, by a first adversarial reinforcement learning agent, a first observation of an environment (e.g., an ego-vehicle, a second actor in the collection, and / or a first object in the collection) in response to a first trajectory of a first actor; generating, by the first agent, a second trajectory for the first actor based on a first observation of the observed environment.
[0323] 2. A method according to any of the preceding items, comprising the step of defining the generated second trajectories as a set of descriptors for each location, e.g. as pairs of description and location.
[0324] 3. The method according to claim 2, wherein the set of descriptors is heuristic and / or learned.
[0325] 4. The method according to any one of claims 2 to 3, comprising deriving a set of descriptors from data including physical data and / or simulation data of the scenario.
[0326] 5. The method of claim 4, further comprising labeling the data, such as by applying a recognition model to the data, and deriving a set of descriptors from the data comprises deriving a set of descriptors from the labeled data.
[0327] 6. The method according to any one of claims 4 to 5, comprising identifying individual positions of the vehicle from the physical data and / or identifying an individual position of the ego-vehicle from the simulation data, and wherein deriving the set of descriptors from the data comprises deriving the set of descriptors using the identified individual positions of the vehicle and / or the identified individual position of the ego-vehicle.
[0328] 7. The method according to any one of the preceding claims, wherein the step of generating the second trajectory of the first actor by the first agent comprises the step of predictively or reactively generating the second trajectory of the first actor by the first agent.
[0329] 8. The method of item 7, further comprising a step of determining a mutual similarity between a candidate trajectory of the first actor generated by the first agent and a reference trajectory, and optionally a step of generating a second trajectory of the first actor by the first agent by modifying the candidate trajectory based on the determined mutual similarity, or a step of eliminating the candidate trajectory based on the determined mutual similarity.
[0330] 9. The method according to any one of items 7 to 8, comprising the step of rewarding the first agent according to the mutual dissimilarity between the first trajectory and the second trajectory.
[0331] 10. The method according to any one of the preceding claims, further comprising matching the generated second trajectory with a reference trajectory.
[0332] 11. The method of item 10, wherein the step of matching the generated second trajectory with the reference trajectory includes a step of matching one or more portions of the generated second trajectory with the reference trajectory.
[0333] 12. The method according to any one of the preceding claims, comprising the steps of encoding the generated second trajectory, and optionally decoding the encoded second trajectory, calculating a reconstruction quality of the decoded second trajectory, and labelling the generated second trajectory according to the calculated reconstruction quality.
[0334] 13. A method according to any one of the preceding claims, comprising the steps of decoding the encoded trajectory, encoding the decoded trajectory, and calculating a reconstruction quality of the encoded trajectory.
[0335] 14. The method of any one of the preceding, further comprising: seeding an initial state of the first scenario; and initializing the first scenario with the seeded initial state.
[0336] 15. The method of claim 14, wherein the step of seeding an initial state of the first scenario includes the step of selecting an initial state from a plurality of initial states.
[0337] 16. The method of any one of the preceding claims, comprising the step of rewarding the first agent depending on the novelty of the generated second trajectory, such as short-term novelty and / or long-term novelty.
[0338] 17. The method according to item 16, comprising measuring novelty, such as by using random network distillation (RND).
[0339] 18. The method of any one of the preceding claims, comprising the steps of evaluating a mode collapse of the first agent and adapting the first agent based on the results of the evaluation.
[0340] 19. A method according to any one of the preceding claims, comprising the step of transforming data including physical data and / or simulation data of the scenario by reference to reference data.
[0341] 20. The method of any one of the preceding claims, comprising the steps of outputting a defect report, and optionally performing an action in response to the output defect report.
[0342] 21. A method according to any one of the preceding claims, comprising approximating an ego-vehicle or a component thereof as a proxy, and simulating the first scenario comprises simulating the first scenario using the proxy.
[0343] 22. Generating a first trajectory of a first actor by a first agent; and / or simulating a second scenario using the second trajectory; Observing, by the first agent, a second observation of the environment in response to a second trajectory of the first actor; 10. The method of any one of the preceding claims, optionally comprising generating, by the first agent, a third trajectory for the first actor based on a second observation of the observed environment.
[0344] 23. The method of item 22, further comprising a step of rewarding the first agent if a second observation of the environment in response to the second trajectory of the first actor rules out an unrecoverable event, for example an unavoidable collision between the ego-vehicle and the first actor.
[0345] 24. The method of any one of the preceding claims, comprising the step of cooperating with a second agent by the first agent, and / or the step of interacting with a hostile or non-hostile agent by the first agent.
[0346] 25. A method according to any one of the preceding claims, wherein the step of generating by the first agent a second trajectory for the first actor based on a first observation of the observed environment includes a step of exploring outside the normal space by the first agent.
Claims
1. 1. A computer-implemented method for generating new adversarial scenarios and agents, including autonomous vehicles, comprising: performing reinforcement learning to train the agent using an autonomous vehicle software stack in a reinforcement learning environment to generate one or more episodes each representing an adversarial scenario that ends in a failure of the autonomous vehicle software stack; generating a plurality of descriptors based on the or each episode; and storing the plurality of descriptors in a database.
2. 2. The computer-implemented method of claim 1, further comprising the step of clustering a plurality of descriptors for the or each episode, and wherein storing the plurality of descriptors comprises storing clusters of descriptors in the database.
3. The computer-implemented method of claim 2 , further comprising generating new descriptors by moving from the clusters of descriptors in a descriptor space.
4. The step of moving from the cluster of descriptors in the descriptor space comprises: identifying cluster centroids; moving a unit amount in a unit direction from the centroid to a new descriptor position; and generating the new descriptor as a descriptor at the new descriptor location.
5. The step of moving from the cluster of descriptors in the descriptor space comprises: identifying established boundaries of clusters; moving a unit amount in a unit direction from the boundary to a new descriptor location; and generating the new descriptor as a descriptor at the new descriptor location.
6. The step of moving from the cluster of descriptors in the descriptor space comprises: identifying established boundaries of clusters; moving a unit amount from the boundary in a local normal direction to a new descriptor location; and generating the new descriptor as a descriptor at the new descriptor location.
7. 7. A computer-implemented method according to claim 5 or 6, wherein the established boundaries are identified using a signed distance function.
8. The one or more episodes include a plurality of episodes, and clustering the plurality of episodes includes generating a plurality of clusters, storing the clusters includes storing the plurality of clusters in the database, and moving from a cluster includes: determining a union between each cluster; determining the difference between the cluster space and the union; determining the centroid of the differences; 4. The computer-implemented method of claim 3, further comprising the step of: generating the new descriptor as a descriptor at the centroid of the differences; and moving from the plurality of clusters by:
9. generating a seed state from the new descriptor; The computer-implemented method of claim 3 , further comprising: re-running reinforcement learning using the seed state, generating the plurality of descriptors, and storing the plurality of descriptors.
10. reinitializing the agent; 10. The computer-implemented method of claim 1, further comprising: re-performing reinforcement learning using a reinitialized agent, generating the plurality of descriptors, and storing the plurality of descriptors.
11. The computer-implemented method of any preceding claim, wherein the environment further comprises context data.
12. The computer-implemented method of claim 11 , wherein the contextual data includes one or more internal maps and / or one or more external maps.
13. modifying the context data of an environment; 13. The computer-implemented method of claim 11 or 12, further comprising: re-performing reinforcement learning using the modified context data, generating the plurality of descriptors, and storing the plurality of descriptors.
14. The computer-implemented method of any one of claims 1 to 13, wherein the episode comprises a number of points, each point comprising a state output by an environment and an action output by the agent.
15. The computer-implemented method of claim 14 , wherein generating the plurality of descriptors comprises encoding each of the plurality of points into a latent space.
16. 16. The computer-implemented method of any one of claims 1 to 15, wherein the fault comprises an event selected from the group including: a collision between the agent and the autonomous vehicle software stack has occurred; a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold; a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold; an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold; and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
17. 1. A computer-implemented method for generating agents from a scenario involving an autonomous vehicle, comprising: performing reinforcement learning to train the agent using an autonomous vehicle software stack in a reinforcement learning environment to generate one or more episodes, each representing an adversarial scenario, terminating in a failure of the autonomous vehicle software stack; re-running reinforcement learning of the agent to generate a new episode; and comparing the new episode to the one or more episodes. generating an agent by replicating the trained agent using reinforcement learning based on the comparison.
18. 20. The computer-implemented method of claim 17, wherein the fault includes an event selected from the group including: a collision between the agent and the autonomous vehicle software stack has occurred; a distance between the agent and the autonomous vehicle software stack is less than a minimum distance threshold; a deceleration of the autonomous vehicle software stack is greater than a deceleration threshold; an acceleration of the autonomous vehicle software stack is greater than an acceleration threshold; and a jerk of the autonomous vehicle software stack is greater than a jerk threshold.
19. 19. A computer-implemented method according to claim 17 or 18, wherein the environment further comprises context data.
20. 20. The computer-implemented method of claim 19, wherein the contextual data includes one or more internal maps and / or one or more external maps.
21. The computer-implemented method of any one of claims 17 to 20, wherein the episode includes a plurality of points, each point including a state output by an environment and an action output by the agent.
22. 22. The computer-implemented method of any one of claims 17 to 21, wherein comparing the new episode to the one or more episodes comprises determining a variance between the new episode and the one or more episodes, and generating an agent by replicating an agent trained using reinforcement learning based on the comparison comprises replicating an agent trained using reinforcement learning if the variance is less than a variance threshold.
23. A transitory or non-transitory computer readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform the method of any one of claims 1 to 22.
Citation Information
Patent Citations
Error modeling framework
US20210094540A1
Cited By
Information processing system, information processing method, and program
WO2026141048A1
