Constructing custom thermodynamics using deep learning
Li Qianxiao, National University of Singapore
Kedar Hippalgaonkar, Nayang Technological University
Abstract: We discuss some recent work on constructing stable and interpretable macroscopic thermodynamics from trajectory data using deep learning. We develop a modelling approach: instead of generic neural networks as functional approximators, we use a model-based ansatz for the dynamics following a suitable generalisation of the classical Onsager principle for non-equilibrium systems. This allows the construction of macroscopic dynamics that are physically motivated and can be readily used for subsequent analysis and control. We discuss applications in the analysis of polymer stretching in elongational flow.
Bio: Qianxiao Li is an assistant professor in the Department of Mathematics, and a principal investigator in the Institute for Functional Intelligent Materials, National University of Singapore. He graduated with a BA in mathematics from the University of Cambridge and a PhD in applied mathematics from Princeton University. His research interests include the interplay of machine learning and dynamical systems, control theory, stochastic optimisation algorithms and data-driven methods for science and engineering.
Summary:
Focus: Learning dynamics of real-world systems from data
Our microscopic scale models (e.g. quantum dynamics) are very accurate but infeasible to run due to computational complexity and lack of fine-grained data about the system’s current state (e.g. every particle)
For modeling large scale dynamics it is usually sufficient to model the dynamics of aggregate quantities (e.g. air pressure rather than states of individual particles)
Finding appropriate aggregate quantities is very challenging, usually trial and error
Can we use ML to automate this process?
Problem
Given:
Microscopic degrees of freedom
Macroscopic state of interest
Goal: model the evolution of of the macroscopic state
Aim to find:
Closure variables / aggregate quantities
Closed equation that predicts the macroscopic state from these closure/aggregate variables
Example: stretching polymers in elongation flow
Microscopic: coordinates of each molecule at time t
Macroscopic: length/extension of the polymer at time t
Dynamics:
Polymer is made up of many individual molecules
Each one transitions slowly and then there’s a transition when it stretches very quickly
Different molecules stretch at different rates
The aggregate of all these molecules stretches very gradually
Reason for heterogeneous stretching is unknown
Approaches
Data-based:
Train a universal approximator on experimental data
Add regularization to force the approximator to respect known constraints (e.g. conservation of energy)
The trained model respects the constraints but on average, not always
Model-based: (focus of this work)
Start with a known model
Generalize this model with a larger set of models but taking care to allow only the behaviors we want
Tune resulting model to fit the data as well as possible
This is less accurate but more reliable
Starting model: Onsager principle
General description of near-equilibrium dynamics
Models a system stage being pushed in some direction and then the push being dissipated over time as the system returns to the same equilibrium
Model extended to allow asymmetric motion and thermal fluctuations
This form captures many real dynamics
Langevin equation for molecular dynamics
Stochastic Poisson systems
Approximately invariant under coordinate transformation
Gives rise to stable dynamics, regardless of the training data
Model
Need to train model from microscopic to macroscopic variables
Train a PCA-ResNet Encode to create intermediate variables that reduce the dimensionality of the dynamics relative to the microscopic variables
Concatenate the macroscopic and these aggregate variables
Train the generalized Onsager model to predict the evolution of these concatenated state vectors
This is a single model, so errors in the model’s predictions get backpropagated through the whole model, allowing the system to adjust both the model and the micro-state encoding network
Applied to the polymer stretching model this approach creates a 3-dimensional model
The stretching length (macro-variable)
Neural parameter linearly related to the distance between the ends of the polymer
Neural parameter linearly related to level of foldedness of the polymer
The use of the PCA-Resnet encourages the neural parameters to be more distinct
Making them interpretable requires a fair amount of experimentation to connect them to micro-state or experimental measurements
Visualizing the energy landscape: Can map the evolution of the dynamic system in the reduced-dimension space
Can infer the equation of state and design control protocol to change the way the system evolves
Have driven this using real experiments
Microfluidic device
Inferring state of polymers from images -> 3D representation
Can predict unfolding evolution of the real polymers