|
| 1 | +``fol.deep_neural_networks`` |
| 2 | +============================ |
| 3 | + |
| 4 | +The ``fol.deep_neural_networks`` module provides a comprehensive collection of deep learning |
| 5 | +architectures and operator-learning frameworks designed for **learning mappings between |
| 6 | +function spaces**, with a strong focus on **physics-informed modeling**, **parametric systems**, |
| 7 | +and **scientific machine learning**. |
| 8 | + |
| 9 | +This module implements state-of-the-art neural operators such as **DeepONets** and |
| 10 | +**Fourier Neural Operators (FNOs)**, together with **Conditional Neural Fields** and |
| 11 | +meta-learning strategies. The provided models enable the approximation of complex |
| 12 | +solution operators and continuous fields arising in **partial differential equations (PDEs)**, |
| 13 | +**multiphysics simulations**, and **high-dimensional parametric problems**, where classical |
| 14 | +surrogate models are often insufficient. |
| 15 | + |
| 16 | +Key capabilities of this module include: |
| 17 | + |
| 18 | +- Learning **nonlinear operators** mapping input functions, boundary conditions, or parameters |
| 19 | + to solution fields. |
| 20 | +- Supporting **data-driven**, **physics-informed**, and **hybrid** training paradigms. |
| 21 | +- Handling **explicit** and **implicit** parametric operator learning formulations. |
| 22 | +- Neural operators based on **DeepONets** and **Fourier Neural Operators** for learning |
| 23 | + mappings between infinite-dimensional spaces. |
| 24 | +- **Neural field representations** using coordinate-based MLPs, including **SIREN-style** |
| 25 | + sinusoidal networks for high-frequency signal and geometry representation. |
| 26 | +- **Conditional neural fields** that model families of functions conditioned on parameters, |
| 27 | + latent variables, or context embeddings. |
| 28 | +- **Autoencoding architectures** for learning compact latent representations of solution |
| 29 | + manifolds and parametric fields. |
| 30 | +- **Meta-learning and latent-variable methods** for fast adaptation across tasks, parameters, |
| 31 | + and operating regimes. |
| 32 | +- Efficient spectral representations and convolutions for scalable, high-dimensional problems. |
| 33 | + |
| 34 | +The module is designed to be extensible and modular, enabling seamless integration |
| 35 | +into scientific computing pipelines while leveraging modern deep learning frameworks. |
| 36 | + |
| 37 | +.. automodule:: fol.deep_neural_networks |
| 38 | +.. currentmodule:: fol.deep_neural_networks |
| 39 | + |
| 40 | +Deep network base class |
| 41 | +----------------------- |
| 42 | + |
| 43 | +.. automodule:: fol.deep_neural_networks.deep_network |
| 44 | +.. currentmodule:: fol.deep_neural_networks.deep_network |
| 45 | + |
| 46 | +.. autoclass:: DeepNetwork |
| 47 | + :members: |
| 48 | + :show-inheritance: |
| 49 | + |
| 50 | +Explicit parametric operator learning |
| 51 | +------------------------------------- |
| 52 | + |
| 53 | +This submodule implements **explicit parametric operator learning** on discretized |
| 54 | +fields, where a fixed-dimensional parametric input space (for example control |
| 55 | +variables or Fourier coefficients) is mapped directly to a fixed-dimensional |
| 56 | +discretized field such as temperature or displacement. |
| 57 | + |
| 58 | +The learning is **unsupervised or physics-informed**: no direct target fields are |
| 59 | +required. Instead, predicted fields are evaluated using physics-based loss |
| 60 | +functions (for example weighted residual- or energy-based formulations), with boundary |
| 61 | +conditions applied explicitly at the field level. |
| 62 | + |
| 63 | +.. automodule:: fol.deep_neural_networks.explicit_parametric_operator_learning |
| 64 | + :members: |
| 65 | + :undoc-members: |
| 66 | + :show-inheritance: |
| 67 | + |
| 68 | +.. currentmodule:: fol.deep_neural_networks.explicit_parametric_operator_learning |
| 69 | + |
| 70 | +Implicit parametric operator learning |
| 71 | +------------------------------------- |
| 72 | + |
| 73 | +This submodule implements **implicit parametric operator learning** using |
| 74 | +coordinate-based neural fields. A fixed-dimensional parametric input (for example |
| 75 | +control variables or parameterization features such as Fourier coefficients) |
| 76 | +conditions a neural field represented by a coordinate-based MLP (the synthesizer), |
| 77 | +with conditioning provided by a modulator network according to the coupling modes |
| 78 | +implemented by :class:`fol.deep_neural_networks.nns.HyperNetwork`. |
| 79 | + |
| 80 | +The learning is **unsupervised or physics-informed**: predicted discretized fields |
| 81 | +are evaluated using physics-based loss functionals (for example residual- or |
| 82 | +energy-based formulations), and Dirichlet boundary conditions are enforced by |
| 83 | +explicitly inserting prescribed values across the batch. |
| 84 | + |
| 85 | +Although training is typically performed on a fixed FE mesh, the coordinate-based |
| 86 | +synthesizer enables multi-resolution inference (and, in principle, multi-resolution |
| 87 | +training) by evaluating the conditioned neural field on alternative coordinate sets. |
| 88 | + |
| 89 | +.. automodule:: fol.deep_neural_networks.implicit_parametric_operator_learning |
| 90 | + :members: |
| 91 | + :undoc-members: |
| 92 | + :show-inheritance: |
| 93 | + |
| 94 | +.. currentmodule:: fol.deep_neural_networks.implicit_parametric_operator_learning |
| 95 | + |
| 96 | +Meta-implicit parametric operator learning |
| 97 | +------------------------------------------ |
| 98 | + |
| 99 | +This submodule implements **meta-implicit parametric operator learning**, which |
| 100 | +extends implicit parametric operator learning by introducing **per-sample latent |
| 101 | +adaptation**. Instead of directly conditioning the neural field with parametric |
| 102 | +inputs, latent variables are optimized in an inner loop to minimize the |
| 103 | +physics-based loss, enabling fast adaptation without updating the main network |
| 104 | +weights. |
| 105 | + |
| 106 | +The neural field is represented by a coordinate-based synthesizer MLP and is |
| 107 | +conditioned through a modulator network using the coupling modes implemented by |
| 108 | +:class:`fol.deep_neural_networks.nns.HyperNetwork`. Training remains |
| 109 | +**unsupervised or physics-informed**, with explicit boundary-condition |
| 110 | +enforcement and support for multi-resolution inference. |
| 111 | + |
| 112 | +.. automodule:: fol.deep_neural_networks.meta_implicit_parametric_operator_learning |
| 113 | + :members: |
| 114 | + :undoc-members: |
| 115 | + :show-inheritance: |
| 116 | + |
| 117 | +.. currentmodule:: fol.deep_neural_networks.meta_implicit_parametric_operator_learning |
| 118 | + |
| 119 | +Meta-alpha-meta implicit parametric operator learning |
| 120 | +----------------------------------------------------- |
| 121 | + |
| 122 | +This submodule implements **meta-alpha-meta implicit parametric operator learning**, |
| 123 | +which further extends meta-implicit parametric operator learning by introducing a |
| 124 | +**learnable latent-step size** in the inner-loop adaptation. As in the meta-implicit |
| 125 | +formulation, latent variables are optimized per sample to minimize the |
| 126 | +physics-based loss, but in this variant the magnitude of the latent update itself |
| 127 | +is learned jointly with the network parameters. |
| 128 | + |
| 129 | +The neural field is represented by a coordinate-based synthesizer MLP and is |
| 130 | +conditioned through a modulator network using the coupling modes implemented by |
| 131 | +:class:`fol.deep_neural_networks.nns.HyperNetwork`. The latent codes are adapted |
| 132 | +using gradient-based updates, while a dedicated trainable step model controls the |
| 133 | +latent update size, enabling improved robustness and adaptability across problem |
| 134 | +instances. |
| 135 | + |
| 136 | +Training remains **unsupervised or physics-informed**, with explicit enforcement |
| 137 | +of boundary conditions and preservation of the coordinate-based formulation, which |
| 138 | +allows multi-resolution inference by evaluating the conditioned neural field on |
| 139 | +alternative coordinate sets. |
| 140 | + |
| 141 | +.. automodule:: fol.deep_neural_networks.meta_alpha_meta_implicit_parametric_operator_learning |
| 142 | + :members: |
| 143 | + :undoc-members: |
| 144 | + :show-inheritance: |
| 145 | + |
| 146 | +.. currentmodule:: fol.deep_neural_networks.meta_alpha_meta_implicit_parametric_operator_learning |
| 147 | + |
| 148 | +Fourier parametric operator learning |
| 149 | +------------------------------------ |
| 150 | + |
| 151 | +This submodule implements **Fourier parametric operator learning** using a |
| 152 | +**Fourier Neural Operator (FNO)** on discretized fields. A fixed-dimensional |
| 153 | +parametric input space (for example control variables or parameterization |
| 154 | +features) is mapped to grid-aligned input channels and processed by the FNO to |
| 155 | +produce discretized field outputs such as temperature or displacement. |
| 156 | + |
| 157 | +The FNO is **not bound to a specific mesh resolution**. Once trained, the learned |
| 158 | +operator can be evaluated on different grid resolutions, as long as the mesh is |
| 159 | +structured and uniform (for example square grids in 2D or cubic grids in 3D). |
| 160 | +This enables resolution-invariant inference across compatible discretizations. |
| 161 | + |
| 162 | +The learning can be **data-driven** or **physics-informed**, depending on the |
| 163 | +chosen loss function, with boundary conditions enforced explicitly through the |
| 164 | +loss. |
| 165 | + |
| 166 | +.. automodule:: fol.deep_neural_networks.fourier_parametric_operator_learning |
| 167 | + :members: |
| 168 | + :undoc-members: |
| 169 | + :show-inheritance: |
| 170 | + |
| 171 | +.. currentmodule:: fol.deep_neural_networks.fourier_parametric_operator_learning |
| 172 | + |
| 173 | +DeepONet parametric operator learning |
| 174 | +------------------------------------- |
| 175 | + |
| 176 | +This submodule implements **DeepONet-based parametric operator learning** on |
| 177 | +discretized fields. A fixed-dimensional parametric input space conditions a |
| 178 | +DeepONet that is evaluated on FE mesh node coordinates to produce discretized |
| 179 | +field outputs such as temperature or displacement. |
| 180 | + |
| 181 | +The learning can be **data-driven** or **physics-informed**, depending on the |
| 182 | +chosen loss function, with boundary conditions enforced explicitly through the |
| 183 | +loss and inference utilities. |
| 184 | + |
| 185 | +.. automodule:: fol.deep_neural_networks.deep_o_net_parametric_operator_learning |
| 186 | + :members: |
| 187 | + :undoc-members: |
| 188 | + :show-inheritance: |
| 189 | + |
| 190 | +.. currentmodule:: fol.deep_neural_networks.deep_o_net_parametric_operator_learning |
| 191 | + |
| 192 | +Neural fields and hypernetworks |
| 193 | +------------------------------- |
| 194 | + |
| 195 | +This module provides building blocks for neural field models (e.g., SIREN-style |
| 196 | +MLPs and Fourier-feature MLPs) and DeepONets, and hypernetworks used to modulate or generate |
| 197 | +parameters for coordinate-based models. These components are commonly used in |
| 198 | +implicit neural representations, conditional neural fields, and meta-learning |
| 199 | +workflows. |
| 200 | + |
| 201 | +.. automodule:: fol.deep_neural_networks.nns |
| 202 | + :members: |
| 203 | + :undoc-members: |
| 204 | + :show-inheritance: |
| 205 | + |
| 206 | +.. currentmodule:: fol.deep_neural_networks.nns |
| 207 | + |
0 commit comments