A Hands-on Approach to Scientific Artificial Intelligence Programming
- ISBN: 9791370141585
- Editorial: Prensas Universitarias de Zaragoza
- Fecha de la edición: 2026
- Lugar de la edición: Zaragoza. España
- Colección: Tecnológicas
- Encuadernación: Rústica
- Medidas: 23 cm
- Nº Pág.: 312
- Idiomas: Inglés
This book brings together the teaching materials used in the courses on scientific artificial intelligence delivered by the Keysight-UZ Chair of National AI Strategy of the Ministry of Digital Transformation at the University of Zaragoza during the years of its existence, from 2024 onwards.
As will be seen, the material takes a predominantly practical approach and is designed to enable students to experiment with all the modules in the programme. This course is designed for postgraduate students. Many aspects will be better understood if students have been introduced to basic concepts of physics during their undergraduate studies, particularly mechanics, which is the focus of this book. If they have a background in scientific computing -and particularly in computational engineering- and are familiar with the finite element, finite volume, and finite difference methods, they are sure to find the content both accessible and engaging!
The field of scientific artificial intelligence is fascinating. The possibility that artificial intelligence can make predictions -whether using experimental or synthetic data, or relying solely on the differential equations that govern the phenomena under study- is, quite simply, fascinating. The challenge is for this artificial intelligence to be truly predictive in an engineering sense: that the predictions it makes can be verified and validated, so that industry can ultimately place its trust in the benefits this new discipline can bring.
It is the task of engineers, physicists, and mathematicians to turn this family of techniques into the tool that industry needs right now. The responsibility lies with us, and it begins with training a new generation of researchers in the field who will, no doubt, bring this to a successful conclusion.
ACKNOWLEDGEMENTS
1. Introduction
2. First steps: Environment Installation
2.1. Set-up of the working environment
2.1.1. The nontrivial consequences of ignoring environments
2.2. Conda environment
2.2.1. Step 1: Install Conda
2.2.2. Step 2: Create new Conda environment
2.2.3. Step 3: Install additional packages
2.2.4. Step 4: Basic environment usage
2.2.5. Exporting and recreating Conda environment
2.3. Python libraries
2.4. PyTorch: Deep Learning framework
2.5. Random seed for reproducibility
2.5.1. Key sources of randomness
2.6. Discussion and conclusions for set-up of the working environment
2.7. Instructions to set up the Conda environment locally
2.8. Setting up Python environment
2.8.1. Testing the final setup: Running a simple machine learning example
3. M.O.R.
3.1. Dataset and techniques to compare
3.2. Reduced Order Modelling (ROM)
3.2.1. Swiss-Roll dataset generation
3.3. Principal Component Analysis (PCA)
3.3.1. Singular Value Decomposition (SVD) and PCA
3.4. Kernel PCA (k-PCA)
3.4.1. The kernel trick
3.4.2. Kernel comparison on Swiss-Roll
3.4.3. Kernel PCA with scikit-learn
3.5. Proper Generalized Decomposition (PGD)
3.5.1. Core idea
3.5.2. PGD for Poisson problems
3.5.3. Example: 2D Poisson equation with homogeneous Dirichlet conditions
3.5.4. Plotting PGD solution functions
3.5.5. PGD examples
3.6. PGD for parametric problems: Moving load on a cantilever beam
3.6.1. Key differences from the Poisson example
3.6.2. Algorithm workflow
3.6.3. PGD: Key insights and limitations
3.7. Autoencoders for latent space construction in scientific machine learning
3.8. What is an Autoencoder?
3.8.1. Key architectures of an Autoencoder:
3.8.2. Key advantages of Autoencoders:
3.8.3. Latent space interpolation with autoencoders
3.8.4. Autoencoder application: Swiss-Roll
3.8.5. Representation of the latent space and reconstruction
3.8.6. Why does the latent space look disordered?
3.9. Discussion and conclusions for MOR techniques
4. From MLPs to CNNs and Autoencoders
4.1. Setup
4.1.1. Exploring the MNIST dataset
4.2. Data normalization and data loaders
4.3. MLP classifier (with plain PyTorch)
4.3.1. Manual training loop (basic PyTorch)
4.3.2. Evaluate accuracy and performance
4.4. Convolutional Neural Network (CNN)
4.4.1. Evaluate accuracy and performance
4.5. EMNIST dataset
4.6. Introducing PyTorch Lightning
4.6.1. Why use PyTorch Lightning?
4.7. Brief reminder of Autoencoders
4.8. Variational Autoencoder (VAE)
5. Hyperparameter Optimization
5.1. Sweep configuration
5.2. Training and evaluating sampled hyperparameter sets
5.2.1. Launch hyperparameter optimization
5.2.2. Final training with best hyperparameters and early stopping
5.2.3. Final test with best hyperparameters
6. Introduction to Physics Informed Neural Networks
6.1. Simple ODE: Sinusoidal velocity
6.1.1. Input data: Control points to train the models
6.2. Supervised learning: Learning from data
6.2.1. Modelling from available data when unknown ODE
6.2.2. Models theta
6.2.3. Data splitting Dtrain and Dvalid to avoid overfitting
6.2.4. Training process
6.3. Self-supervised learning: Deep learning as an ODE solver
6.3.1. Modelling from known ODE when unavailable data
6.3.2. Loss based on residuals ODE
6.3.3. Models theta
6.3.4. Training process
6.3.5. Generalization: Out of training range
6.4. Under-damped harmonic oscillator
6.5. Example 1: Data-driven approach without physics knowledge
6.6. Example 2: Self-supervised approach with physics only
6.6.1. Loss based on residuals ODE
6.7. Example 3: Hybrid approach with physics bias
6.8. Solving inverse problems with PINNs
6.8.1. Example: inverse problem
7. Introduction to thermodynamics-informed neural networks
7.1. Generalized thermodynamics
7.1.1. Poisson bracket: reversible dynamics
7.1.2. Dissipative bracket: dissipative dynamics
7.1.3. Physics with neural networks: models to compare
7.2. Example 1: Elastic pendulum
7.2.1. Initialitation
7.2.2. Synthetic data
7.2.3. Model 1: Black-box approach
7.2.4. Model 2: Thermodynamics-Informed Neural Network —Ideal System— Known L Matrix
7.2.5. Model 3: Physics-Informed Neural Network —Ideal System— Unknown L Operator
7.3. Example 2: Damped elastic pendulum
7.3.1. Model 4: Thermodynamics-Informed Neural Network —Complete System— Known L Matrix
7.3.2. Model 5: Thermodynamics-informed neural networ —Complete System—
7.4. Example 3: Double thermoelastic pendulum
7.5. Additional and related work
7.5.1. Tunning hyperparameters
7.5.2. Known L Operator in the Double Pendulum
8. Graph Neural Networks
8.1. Motivation
8.2. GNN methodology
8.2.1. Geometric structure: Graph neural networks
8.3. GNNs-Lightning Setup: Environment Configuration & Repository Installation
8.4. Solving the Poisson equation with graph neural networks
8.5. Solving the Wave equation with graph neural networks
8.5.1. Hyperbolic problem dataset
A. Appendix

