Categories
Offsites

PAIRED: A New Multi-agent Approach for Adversarial Environment Generation

The effectiveness of any machine learning method is critically dependent on its training data. In the case of reinforcement learning (RL), one can rely either on limited data collected by an agent interacting with the real world, or a simulated training environment that can be used to collect as much data as needed. This latter method of training in simulation is increasingly popular, but it has a problem — the RL agent can learn what is built into the simulator, but tends to be bad at generalizing to tasks that are even slightly different than the ones simulated. And obviously building a simulator that covers all the complexity of the real-world is extremely challenging.

An approach to address this is to automatically create more diverse training environments by randomizing all the parameters of the simulator, a process called domain randomization (DR). However, DR can fail even in very simple environments. For example, in the animation below, the blue agent is trying to navigate to the green goal. The left panel shows an environment created with DR where the positions of the obstacles and goal have been randomized. Many of these DR environments were used to train the agent, which was then transferred to the simple Four Rooms environment in the middle panel. Notice that the agent can’t find the goal. This is because it has not learned to walk around walls. Even though the wall configuration from the Four Rooms example could have been generated randomly in the DR training phase, it’s unlikely. As a result, the agent has not spent enough time training on walls similar to the Four Rooms structure, and is unable to reach the goal.

Domain randomization (left) does not effectively prepare an agent to transfer to previously unseen environments, such as the Four Rooms scenario (middle). To address this, a minimax adversary is used to construct previously unseen environments (right), but can result in creating situations that are impossible to solve.

Instead of just randomizing the environment parameters, one could train a second RL agent to learn how to set the environment parameters. This minimax adversary can be trained to minimize the performance of the first RL agent by finding and exploiting weaknesses in its policy, e.g. building wall configurations it has not encountered before. But again there is a problem. The right panel shows an environment built by a minimax adversary in which it is actually impossible for the agent to reach the goal. While the minimax adversary has succeeded in its task — it has minimized the performance of the original agent — it provides no opportunity for the agent to learn. Using a purely adversarial objective is not well suited to generating training environments, either.

In collaboration with UC Berkeley, we propose a new multi-agent approach for training the adversary in “Emergent Complexity and Zero-shot Transfer via Unsupervised Environment Design”, a publication recently presented at NeurIPS 2020. In this work we present an algorithm, Protagonist Antagonist Induced Regret Environment Design (PAIRED), that is based on minimax regret and prevents the adversary from creating impossible environments, while still enabling it to correct weaknesses in the agent’s policy. PAIRED incentivizes the adversary to tune the difficulty of the generated environments to be just outside the agent’s current abilities, leading to an automatic curriculum of increasingly challenging training tasks. We show that agents trained with PAIRED learn more complex behavior and generalize better to unknown test tasks. We have released open-source code for PAIRED on our GitHub repo.

PAIRED
To flexibly constrain the adversary, PAIRED introduces a third RL agent, which we call the antagonist agent, because it is allied with the adversarial agent, i.e., the one designing the environment. We rename our initial agent, the one navigating the environment, the protagonist. Once the adversary generates an environment, both the protagonist and antagonist play through that environment.

The adversary’s job is to maximize the antagonist’s reward while minimizing the protagonist’s reward. This means it must create environments that are feasible (because the antagonist can solve them and get a high score), but challenging to the protagonist (exploit weaknesses in its current policy). The gap between the two rewards is the regret — the adversary tries to maximize the regret, while the protagonist competes to minimize it.

The methods discussed above (domain randomization, minimax regret and PAIRED) can be analyzed using the same theoretical framework, unsupervised environment design (UED), which we describe in detail in the paper. UED draws a connection between environment design and decision theory, enabling us to show that domain randomization is equivalent to the Principle of Insufficient Reason, the minimax adversary follows the Maximin Principle, and PAIRED is optimizing minimax regret. This formalism enables us to use tools from decision theory to understand the benefits and drawbacks of each method. Below, we show how each of these ideas works for environment design:

Domain randomization (a) generates unstructured environments that aren’t tailored to the agent’s learning progress. The minimax adversary (b) may create impossible environments. PAIRED (c) can generate challenging, structured environments, which are still possible for the agent to complete.

Curriculum Generation
What’s interesting about minimax regret is that it incentivizes the adversary to generate a curriculum of initially easy, then increasingly challenging environments. In most RL environments, the reward function will give a higher score for completing the task more efficiently, or in fewer timesteps. When this is true, we can show that regret incentivizes the adversary to create the easiest possible environment the protagonist can’t solve yet. To see this, let’s assume the antagonist is perfect, and always gets the highest score that it possibly can. Meanwhile, the protagonist is terrible, and gets a score of zero on everything. In that case, the regret just depends on the difficulty of the environment. Since easier environments can be completed in fewer timesteps, they allow the antagonist to get a higher score. Therefore, the regret of failing at an easy environment is greater than the regret of failing on a hard environment:

So, by maximizing regret the adversary is searching for easy environments that the protagonist fails to do. Once the protagonist learns to solve each environment, the adversary must move on to finding a slightly harder environment that the protagonist can’t solve. Thus, the adversary generates a curriculum of increasingly difficult tasks.

Results
We can see the curriculum emerging in the learning curves below, which plot the shortest path length of a maze the agents have successfully solved. Unlike minimax or domain randomization, the PAIRED adversary creates a curriculum of increasingly longer, but possible, mazes, enabling PAIRED agents to learn more complex behavior.

But can these different training schemes help an agent generalize better to unknown test tasks? Below, we see the zero-shot transfer performance of each algorithm on a series of challenging test tasks. As the complexity of the transfer environment increases, the performance gap between PAIRED and the baselines widens. For extremely difficult tasks like Labyrinth and Maze, PAIRED is the only method that can occasionally solve the task. These results provide promising evidence that PAIRED can be used to improve generalization for deep RL.

Admittedly, these simple gridworlds do not reflect the complexities of the real world tasks that many RL methods are attempting to solve. We address this in “Adversarial Environment Generation for Learning to Navigate the Web”, which examines the performance of PAIRED when applied to more complex problems, such as teaching RL agents to navigate web pages. We propose an improved version of PAIRED, and show how it can be used to train an adversary to generate a curriculum of increasingly challenging websites:

Above, you can see websites built by the adversary in the early, middle, and late training stages, which progress from using very few elements per page to many simultaneous elements, making the tasks progressively harder. We test whether agents trained on this curriculum can generalize to standardized web navigation tasks, and achieve a 75% success rate, with a 4x improvement over the strongest curriculum learning baseline:

Conclusions
Deep RL is very good at fitting a simulated training environment, but how can we build simulations that cover the complexity of the real world? One solution is to automate this process. We propose Unsupervised Environment Design (UED) as a framework that describes different methods for automatically creating a distribution of training environments, and show that UED subsumes prior work like domain randomization and minimax adversarial training. We think PAIRED is a good approach for UED, because regret maximization leads to a curriculum of increasingly challenging tasks, and prepares agents to transfer successfully to unknown test tasks.

Acknowledgements
We would like to recognize the co-authors of “Emergent Complexity and Zero-shot Transfer via Unsupervised Environment Design”: Michael Dennis, Natasha Jaques, Eugene Vinitsky, Alexandre Bayen, Stuart Russell, Andrew Critch, and Sergey Levine, as well as the co-authors of Adversarial Environment Generation for Learning to Navigate the Web: Izzeddin Gur, Natasha Jaques, Yingjie Miao, Jongwook Choi, Kevin Malta, Manoj Tiwari, Honglak Lee, Aleksandra Faust. In addition, we thank Michael Chang, Marvin Zhang, Dale Schuurmans, Aleksandra Faust, Chase Kew, Jie Tan, Dennis Lee, Kelvin Xu, Abhishek Gupta, Adam Gleave, Rohin Shah, Daniel Filan, Lawrence Chan, Sam Toyer, Tyler Westenbroek, Igor Mordatch, Shane Gu, DJ Strouse, and Max Kleiman-Weiner for discussions that contributed to this work.

Categories
Misc

What Is a Cluster? What Is a Pod?

Everything we do on the internet — which is just about everything we do these days — depends on the work of clusters, which are also called pods. When we stream a hot new TV show, order a pair of jeans or Zoom with grandma, we use clusters. You’re reading this story thanks to pods. Read article >

The post What Is a Cluster? What Is a Pod? appeared first on The Official NVIDIA Blog.

Categories
Misc

Juicing AI: University of Florida Taps Computer Vision to Combat Citrus Disease

Florida orange juice is getting a taste of AI. With the Sunshine State’s $9 billion annual citrus crops plagued by a fruit-souring disease, researchers and businesses are tapping AI to help rescue the nation’s largest producer of orange juice. University of Florida researchers are developing AI applications for agriculture. And the technology — computer vision Read article >

The post Juicing AI: University of Florida Taps Computer Vision to Combat Citrus Disease appeared first on The Official NVIDIA Blog.

Categories
Misc

Save TensorFlow subclass model

Hello,

I am working on an image caption model but I faced a problem with saving the model as tflite or HDF5. I tried a lot of things but does not work.

My model is a subclass model and similar to this work :

https://tensorflow.google.cn/tutorials/text/image_captioning?hl=en

Can anyone help me?

submitted by /u/Rama_AI
[visit reddit] [comments]

Categories
Misc

Supercomputing Demystifies How Metals Crystallize at Atomic Scale

Simulations by Lawrence Livermore National Laboratory researchers have uncovered a new mechanism for freezing in metals, advancing scientists’ understanding of nucleation.

Simulations by Lawrence Livermore National Laboratory researchers have uncovered a new mechanism for freezing in metals, advancing scientists’ understanding of nucleation, the process of gases or liquids cooling into crystalline solids. 

Run on 256 NVIDIA Tensor Core GPUs on the Lassen supercomputer, the simulations modeled how heated copper solidifies, providing atomic-scale insights into the Ostwald step rule — a nearly 150-year-old discovery that liquids first freeze into a metastable structure before stabilizing into a final solid stage. 

In a research article published in the Proceedings of the National Academy of Sciences, researchers Babak Sadigh, Luis Zepeda-Ruiz, and Jon Belof share findings revealing that this metastable phase can be kinetically stabilized by temperature.

”Using modern simulation methods, we have tried to provide a framework for predicting how process conditions can be manipulated to design completely new materials using both a modern laser platform as well as classical heating in furnaces,” said Sadigh. 

The powerful supercomputing resources allowed the scientists to for the first time simulate with dynamic experiments how nucleation occurs in liquids compressed to a high density, such as in Earth’s metal core, which has a liquid outer layer around a solid center. The findings were surprising, revealing that nucleation first occurs through a body-centered cubic phase that is unstable.

“Under these extreme conditions, such as in the center of Earth, the thermodynamic phase diagram sort of goes out the window in terms of predictive capability and one needs to turn to kinetic phase maps,” said Belof, the project principal investigator for phase transition kinetics and program leader for the Equation of State program at LLNL.

In the visualization below, the team simulated 0.5 nanoseconds of the solidification of copper at a very high pressure, showing fluctuations as the molecules nucleate:

The findings led to a modification of classical nucleation theory, with a new nucleation model now incorporated into the SAMSA hydrodynamics code for modeling the transition between phases of matter. 

Read more from Lawrence Livermore National Laboratory

The full article is available from PNAS: “Metastable-solid phase diagrams derived from polymorphic solidification kinetics.”

Categories
Misc

New on NGC Catalog: Samsung SDS Brightrics, an AI Accelerator for Automating and Accelerating Deep Learning Training

The Kubernetes-based, containerized application, is now available on the NVIDIA NGC Catalog – a GPU-optimized hub for AI and HPC containers.

Training AI models is an extremely time-consuming process. Without proper insight into a feasible alternative to time-consuming development and migration of model training to exploit the power of large, distributed clusters, training projects remain considerably long lasting. To address these issues, Samsung SDS developed the Brightics AI Accelerator. The Kubernetes-based, containerized application, is now available on the NVIDIA NGC catalog – a GPU-optimized hub for AI and HPC containers, pre-trained models, industry SDKs, and Helm charts that helps simplify and accelerate AI development and deployment processes.  

The Samsung SDS Brightics AI Accelerator application automates machine learning, speeds up model training and improves model accuracy with key features such as automated feature engineering, model selection, and hyper-parameter tuning without requiring infrastructure development and deployment expertise. Brightics AI Accelerator can be used in many industries such as healthcare, manufacturing, retail, automotive and across different use cases spanning computer vision, natural language processing and more.  

Key Features and Benefits: 

  • Is case agnostic and covers training all AI models by applying autoML to tabular, CSV, time-series, image or natural language data to enable analytics; image classification, detection, and segmentation; and NLP use cases. 
  • Offers model portability between cloud and on-prem data centers and provides a unified interface for orchestrating large, distributed clusters to train deep learning models using Tensorflow, Keras and PyTorch frameworks as well as autoML using SciKit-Learn.
  • AutoML software automates and accelerates model training on tabular data by using automated model selection from Scikit-Learn, automated feature synthesis, and hyper-parameter search optimization. 
  • Automated Deep Learning (AutoDL) software automates and accelerates deep learning model training using data-parallel, distributed synchronous Horovod Ring-All-Reduce Keras, TensorFlow, and PyTorch frameworks with minimal code. AutoDL exploits up to 512 NVIDIA GPUs per training job to produce a model in 1 hour versus 3 weeks using traditional methods. 
Figure 1. The amount of time it takes to train 1 iteration of a ResNet 50 image classification model using a normal 8 GPU machine is about 504 hours. Using the enhanced inter-GPU communication of Brightics AI Accelerator lowers this to about 4 hours using 128 GPUs. In total, this represents a speed improvement of 126 times.

Get started by pulling Samsung’s Brightics AI Accelerator container from the NGC catalog.

Categories
Misc

GFN Thursday — 21 Games Coming to GeForce NOW in March

Guess what’s back? Back again? GFN Thursday. Tell a friend. Check out this month’s list of all the exciting new titles and classic games coming to GeForce NOW in March. First, let’s get into what’s coming today. Don’t Hesitate It wouldn’t be GFN Thursday if members didn’t have new games to play. Here’s what’s new Read article >

The post GFN Thursday — 21 Games Coming to GeForce NOW in March appeared first on The Official NVIDIA Blog.

Categories
Misc

Guide to Abstract Meaning Representation(AMR) to text with TensorFlow – Analytics India Magazine

Guide to Abstract Meaning Representation(AMR) to text with TensorFlow - Analytics India Magazine submitted by /u/analyticsindiam
[visit reddit] [comments]
Categories
Misc

Jetson Project of the Month: OpenDog, a Gesture Controlled Robot

The project uses the NVIDIA Jetson Nano Developer Kit to recognize hand gestures and control a robot dog without a controller.

James Bruton of XRobots was awarded the ‘Jetson Project of the Month’ for OpenDog V2. This project uses the NVIDIA Jetson Nano Developer Kit to recognize hand gestures and control a robot dog without a controller. 

James, a robot inventor, thought it’d be nice if his OpenDog robot responded to hand gestures. To make this happen, he used transfer learning to retrain an existing SSD-Mobilenet object detection model using PyTorch. During the training process, he identified five hand gestures for the robot to move forward, backward, left, right and to jump. Using the camera capture tool, he captured these gestures and assigned them to the appropriate class. 

Capturing and labeling hand gesture data

He ensured that these images were captured at a specific distance from the camera to make sure the OpenDog doesn’t get distracted by hand gestures or similar patterns in the background.

James notes that the project can be improved by adding more training data which includes gestures in different indoor and outdoor backgrounds and from different users. Furthermore, he plans to convert OpenDog to a ROS robot similar to his Really Useful AI Robot. He created a series of videos to show his journey of building this project and the code is available on GitHub.

Categories
Misc

The Human Genome Center at University of Tokyo Adopts NVIDIA Clara Parabricks for Rapid Genomic Analysis

NVIDIA Clara Parabricks will be available on SHIROKANE, HGC’s fastest supercomputer for life sciences in Japan.

The Human Genome Center (HGC) at University of Tokyo announced a new genomics platform to accelerate genomic analysis by 40X, utilizing NVIDIA Clara Parabricks Pipelines genomics software powered by NVIDIA DGX A100 GPUs. The platform operates on SHIROKANE, HGC’s fastest supercomputer for life sciences in Japan, and will be available to users on April 1, 2021. SHIROKANE helps researchers quickly process massive amounts of genomic data and is incredibly powerful with many nodes, a capacity of over 400 TFLOPS, and a storage capacity of over 12PB. The ultimate goal of analyzing so much genomic data is to glean insights about germline and somatic variants to move closer to precision medicine.

Today, patients are prescribed medicines that work for the majority of people, but are often ineffective as they are not tailored to a specific patient’s genetic profile. Precision medicine aims to provide more specific therapeutics for patients, utilizing information from whole genome sequencing and other clinical data. As a national strategy, Japan’s Ministry of Health, Labor and Welfare formulated the Execution Plan for Whole Genome Analysis in December 2019, to focus on the areas of cancer and intractable diseases. The plan will take up to 3 years, aims to sequence 92,000 patients, and will ultimately help create a database that will be utilized by research institutions, pharmaceutical companies, and university hospitals for drug development and disease prevention. 

Whole genome sequencing (WGS) has been widely recognized for its comprehensive analysis, and its increasing usefulness in areas such as infectious diseases and cancer. WGS examines the complete DNA of an organism while exome sequencing examines the protein coding regions or genes, which make up about 1.5% of the human genome. WGS requires several times the sequence depth and can be done quickly with accelerated genomic analysis, like with NVIDIA CLARA Parabricks Pipelines.

Professor Kiyoya Imoto, Director of HGC said, “The Institute of Medical Science at the Human Genome Analysis Center has been working on refining whole-genome data analysis and shortening the analysis time in cancer genomic medicine. This time, we evaluated Parabricks for implementation on all GPU servers on SHIROKANE. Its high speed and functions are indispensable for the future of large-scale whole-genome analysis. The whole-genome data analysis capability is equivalent to hundreds of conventional CPU servers and was implemented on the GPU server. We will realize a state-of-the-art high-speed whole-genome data analysis environment that greatly accelerates genome research for SHIROKANE users.”

Clara Parabricks Pipelines’ accelerates genomic analysis by utilizing the parallel computing performance of GPUs. Many germline and somatic callers have been accelerated in Clara Parabricks Pipelines including Google’s DeepVariant, which identifies genome variants in sequencing data using convolutional neural networks (CNN). Previously, whole genome analysis typically would take 20 hours or more per sample in a general CPU environment, however on SHIROKANE, powered by NVIDIA DGX A100s GPUs, the analysis takes less than 30 minutes. HGC put Parabricks Pipelines in production on 16 of the 80xNVIDIA V100 GPUs installed on SHIROKANE in February 2020 and is open to users from life science companies. 

The genomic analysis proved to be faster than expected, and with the increasing number of users accessing SHIROKANE, there was a need to further super power SHIROKANE. Eight NVIDIA DGX A100 systems were recently added in 2021 to SHIROKANE, for a total of 88xGPU servers coupled with Parabricks Pipelines to accelerate large-scale genomic workloads. In addition, SHIROKANE provides free access to researchers working on SARS-CoV-2, in an effort to expedite insights about the virus and those infected by the virus. A joint research group called “The Corona Suppression Task Force” formulated at HGC will consist of experts from seven universities and research institutions to focus on various new coronavirus infections.

The Human Genome Center (HGC) SHIROKANE is the fastest supercomputer in the life-science research sector in Japan.

NVIDIA DGX A100 is the universal system for all AI workloads, offering unprecedented compute density, performance, and flexibility in the world’s first 5 petaFLOPS AI system. It features NVIDIA A100 Tensor Core GPUs, enabling customers to consolidate training, inference and analytics into a unified, easy to deploy infrastructure.

“NVIDIA has been investing for several years in anticipation of the coming era of large-scale whole-genome analysis,” commented Masataka Osaki, NVIDIA Japan Country Manager and VP Corporate Sales. “The greatest achievement, Parabricks, along with the latest DGX A100 system, is greatly helping Japan’s premier cancer genome research center. NVIDIA’s platform will be the foundation that supports whole-genome research in Japan, and it is expected that the elucidation of genes associated with cancer and intractable diseases will progress dramatically.”

Seiya IMOTO, Director of the Institute of Medical Science at the University of Tokyo, is presenting a talk titled “Realization of Genomic Medicine Based on Whole Genome Information” at the GTC21 conference April 12-16, which is free this year. Register here.