Guaranteed Approximation Bounds for Mixed-Precision Neural Operators

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tu, Renbo, White, Colin, Kossaifi, Jean, Bonev, Boris, Kovachki, Nikola, Pekhimenko, Gennady, Azizzadenesheli, Kamyar, Anandkumar, Anima
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909188855169024
author Tu, Renbo
White, Colin
Kossaifi, Jean
Bonev, Boris
Kovachki, Nikola
Pekhimenko, Gennady
Azizzadenesheli, Kamyar
Anandkumar, Anima
author_facet Tu, Renbo
White, Colin
Kossaifi, Jean
Bonev, Boris
Kovachki, Nikola
Pekhimenko, Gennady
Azizzadenesheli, Kamyar
Anandkumar, Anima
contents Neural operators, such as Fourier Neural Operators (FNO), form a principled approach for learning solution operators for PDEs and other mappings between function spaces. However, many real-world problems require high-resolution training data, and the training time and limited GPU memory pose big barriers. One solution is to train neural operators in mixed precision to reduce the memory requirement and increase training speed. However, existing mixed-precision training techniques are designed for standard neural networks, and we find that their direct application to FNO leads to numerical overflow and poor memory efficiency. Further, at first glance, it may appear that mixed precision in FNO will lead to drastic accuracy degradation since reducing the precision of the Fourier transform yields poor results in classical numerical solvers. We show that this is not the case; in fact, we prove that reducing the precision in FNO still guarantees a good approximation bound, when done in a targeted manner. Specifically, we build on the intuition that neural operator learning inherently induces an approximation error, arising from discretizing the infinite-dimensional ground-truth input function, implying that training in full precision is not needed. We formalize this intuition by rigorously characterizing the approximation and precision errors of FNO and bounding these errors for general input functions. We prove that the precision error is asymptotically comparable to the approximation error. Based on this, we design a simple method to optimize the memory-intensive half-precision tensor contractions by greedily finding the optimal contraction order. Through extensive experiments on different state-of-the-art neural operators, datasets, and GPUs, we demonstrate that our approach reduces GPU memory usage by up to 50% and improves throughput by 58% with little or no reduction in accuracy.
format Preprint
id arxiv_https___arxiv_org_abs_2307_15034
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Guaranteed Approximation Bounds for Mixed-Precision Neural Operators
Tu, Renbo
White, Colin
Kossaifi, Jean
Bonev, Boris
Kovachki, Nikola
Pekhimenko, Gennady
Azizzadenesheli, Kamyar
Anandkumar, Anima
Machine Learning
Numerical Analysis
Neural operators, such as Fourier Neural Operators (FNO), form a principled approach for learning solution operators for PDEs and other mappings between function spaces. However, many real-world problems require high-resolution training data, and the training time and limited GPU memory pose big barriers. One solution is to train neural operators in mixed precision to reduce the memory requirement and increase training speed. However, existing mixed-precision training techniques are designed for standard neural networks, and we find that their direct application to FNO leads to numerical overflow and poor memory efficiency. Further, at first glance, it may appear that mixed precision in FNO will lead to drastic accuracy degradation since reducing the precision of the Fourier transform yields poor results in classical numerical solvers. We show that this is not the case; in fact, we prove that reducing the precision in FNO still guarantees a good approximation bound, when done in a targeted manner. Specifically, we build on the intuition that neural operator learning inherently induces an approximation error, arising from discretizing the infinite-dimensional ground-truth input function, implying that training in full precision is not needed. We formalize this intuition by rigorously characterizing the approximation and precision errors of FNO and bounding these errors for general input functions. We prove that the precision error is asymptotically comparable to the approximation error. Based on this, we design a simple method to optimize the memory-intensive half-precision tensor contractions by greedily finding the optimal contraction order. Through extensive experiments on different state-of-the-art neural operators, datasets, and GPUs, we demonstrate that our approach reduces GPU memory usage by up to 50% and improves throughput by 58% with little or no reduction in accuracy.
title Guaranteed Approximation Bounds for Mixed-Precision Neural Operators
topic Machine Learning
Numerical Analysis
url https://arxiv.org/abs/2307.15034