# Software

## Software Catalog

**Integrating Nvidia’s PyTorch FORTRAN binding package with E3SM **

Most machine learning models are developed in Python. To use these machine learning models in climate models like E3SM, it's necessary to call the Python packages in FORTRAN through linkage. Our team modified the Fortran proxy library (for CXX libraries of PyTorch source) to easily integrate with any FORTRAN-based solver. We added routines to read in traced .pt (PyTorch saved model structure) files and modified the build system to account for machine dependent MPI compilers. The result allows for learning the bias correction improving the simulation of large-scale environments of E3SM at ~100 km resolution.

**DeepXDE****: **A Deep Learning Library for Solving Differential Equations

Deep learning has achieved remarkable success in diverse applications; however, its use in solving partial differential equations (PDEs) has emerged only recently. Here, we present an overview of physics-informed neural networks (PINNs), which embed a PDE into the loss of the neural network using automatic differentiation. The PINN algorithm is simple, and it can be applied to different types of PDEs, including integro- differential equations, fractional PDEs, and stochastic PDEs. Moreover, from the implementation point of view, PINNs solve inverse problems as easily as forward problems. We propose a new residual-based adaptive reﬁnement (RAR) method to improve the training efficiency of PINNs. For pedagogical reasons, we compared the PINN algorithm to a standard ﬁnite element method. We also present a Python library for PINNs, DeepXDE, which is designed to serve both as an education tool to be used in the classroom as well as a research tool for solving problems in computational science and engineering. Specifically, DeepXDE can solve forward problems with given initial and boundary conditions, as well as inverse problems when extra measurements are available. DeepXDE supports complex-geometry domains based on the technique of constructive solid geometry, and enables the user code to be compact, resembling closely the mathematical formulation. We introduce the usage of DeepXDE and its customizability, and we also demonstrate the capability of PINNs and the user-friendliness of DeepXDE for five different examples. More broadly, DeepXDE contributes to the more rapid development of the emerging Scientiﬁc Machine Learning field.

DeepXDE is a deep learning library for solving differential equations over TensorFlow. More details are documented here.

Total downloads: >400,000 as of December 2023

**Computational Hypergraph Discovery:** A Novel Method for Uncovering Unknown Functional Relationships Between Variables Within Datasets

Machine learning tasks typically involve predicting outputs Y from inputs X, a process that can be represented by X→Y. We can think of this case as a graph with two nodes and one edge. However, in many problems, there is not one input-output relationship but instead a web of interactions between the different variables. We can think of these variables as nodes of a graph. Similarly to X→Y in the machine learning case, when there exists a function taking a set of variables to another variable, we can draw an edge in our graph between these variables. Since these edges can connect more than two nodes depending on the underlying function, we call them *hyperedges* and a *hypergraph*. The nuance between a graph and a hypergraph is not essential for understanding this post, so it is safe to think of a hypergraph as a regular graph.

CHD is the source code for the paper "Computational Hypergraph Discovery: A Gaussian process framework for connecting the dots".

Please see the companion blog post for a gentle introduction to the method and the code.