Difference between revisions of "AI Surrogate Models LDRD"

From epsciwiki
Jump to navigation Jump to search
Line 4: Line 4:
 
=== Project Description ===
 
=== Project Description ===
  
We propose to develop tools to automatically generate machine learning surrogate models from existing software so that they may utilize modern heterogeneous hardware. A hypothetical future high performance data facility would make extensive use of heterogeneous hardware such as GPUs and FPGAs, but many legacy codes will need to be heavily modified in order to take advantage of this hardware. Surrogate models replace a piece of code which is expensive to run with an approximate model; when the underlying model is a neural net, it runs efficiently on heterogeneous hardware. Thus, they are a promising technique for offloading computation to such hardware while minimizing the necessary changes to the original code. The tools developed during this project would make it substantially simpler to implement a surrogate model, enabling legacy code to access heterogeneous hardware, saving users' time and effort, and eliminating redundant work. Lowering these barriers should enable faster development iterations and make it easier to bring machine learning research code into production. This project includes a proof of principle of a new kind of code analysis tool which could be useful for an even broader variety of problems in high performance computing. Several of the milestones open up opportunities for future research into neural differential equations and automatic identification of functions to surrogate.
+
PHASM ("Parallel Hardware viA Surrogate Models") is a software toolkit, currently under development, for creating AI-based surrogate models of scientific code. AI-based surrogate models are widely used for creating fast and inverse simulations. The project anticipates an additional, future use case: adapting legacy code to modern hardware. Data centers are investing in heterogeneous hardware such as GPUs and FPGAs; meanwhile, many important codebases are unable to take advantage of this hardware's superior parallelism without undergoing a costly rewrite. An alternative is to train a neural net surrogate model to mimic the computationally intensive functions in the code, and deploy the surrogate on the exotic hardware instead. PHASM addresses three specific challenges: (1) systematically discovering which functions can be effectively replaced with a surrogate, (2) automatically identifying, for a given function, the true space of inputs and outputs including those not apparent from the type signature, and (3) integrating a machine learning model into a legacy codebase cleanly and with a high level of abstraction. In the first year of development, a proof of concept has been developed for each challenge. A surrogate API makes it easy to bring PyTorch models into the C++ ecosystem and uses profunctor optics to establish a two-way data binding between C++ datatypes and tensors. A model variable discovery tool performs a dynamic binary analysis using Intel PIN in order to identify a target function's model variable space, including types, shapes, and ranges, and generate the optics code necessary to bind the model to the function. Future work may include exploring the limits of surrogate models for functions of increasing size and complexity, and adaptively generating synthetic training data based on uncertainty estimates.
  
 
=== General Resources ===
 
=== General Resources ===

Revision as of 20:35, 25 August 2022

Running Legacy Code on Heterogeneous Hardware via Surrogate Models

Project Description

PHASM ("Parallel Hardware viA Surrogate Models") is a software toolkit, currently under development, for creating AI-based surrogate models of scientific code. AI-based surrogate models are widely used for creating fast and inverse simulations. The project anticipates an additional, future use case: adapting legacy code to modern hardware. Data centers are investing in heterogeneous hardware such as GPUs and FPGAs; meanwhile, many important codebases are unable to take advantage of this hardware's superior parallelism without undergoing a costly rewrite. An alternative is to train a neural net surrogate model to mimic the computationally intensive functions in the code, and deploy the surrogate on the exotic hardware instead. PHASM addresses three specific challenges: (1) systematically discovering which functions can be effectively replaced with a surrogate, (2) automatically identifying, for a given function, the true space of inputs and outputs including those not apparent from the type signature, and (3) integrating a machine learning model into a legacy codebase cleanly and with a high level of abstraction. In the first year of development, a proof of concept has been developed for each challenge. A surrogate API makes it easy to bring PyTorch models into the C++ ecosystem and uses profunctor optics to establish a two-way data binding between C++ datatypes and tensors. A model variable discovery tool performs a dynamic binary analysis using Intel PIN in order to identify a target function's model variable space, including types, shapes, and ranges, and generate the optics code necessary to bind the model to the function. Future work may include exploring the limits of surrogate models for functions of increasing size and complexity, and adaptively generating synthetic training data based on uncertainty estimates.

General Resources

Meetings

Thursday 2-3pm, bi-weekly. Teams.

Meeting ID: 281 724 015 543

Passcode: cWidgE

Minutes from the 25 August 2022 meeting


Documents

Proposals

Presentations

Date Event Presenter Slides
2022-06-27 SRGS 2022 Nathan Brei, David Lawrence PDF
2022-08-24 W&M collab Nathan Brei PDF

Publications

Date Journal Title
ccc aaa bbb


Notes


Useful Links