Using the SEKF to Transfer NN Models of Dynamical Systems with Limited Data
Authors: Joshua E. Hammond, Tyler A. Soderstrom, Brian A. Korgel, Michael Baldea
Organizations: McKetta Department of Chemical Engineering, The University of Texas at Austin, 200 East Dean Keeton St., Stop C0400, Austin, 78712, TX, United States · Energy Institute, The University of Texas at Austin, 2304 Whitis Ave., Stop C2400, Austin, 78712, TX, United States · Texas Materials Institute, The University of Texas at Austin, 204 E. Dean Keeton St., Stop C2201, Austin, 78712, TX, United States · ExxonMobil Technology and Engineering, Spring, TX, United States · Institute for Computational Engineering and Sciences, The University of Texas at Austin, 201 E. 24th St., POB 4.102, Stop C0200, Austin, 78712, TX, United States
Data-driven models of dynamical systems require extensive amounts of training data. For many practical applications, gathering sufficient data is not feasible due to cost or safety concerns. This work uses the Subset Extended Kalman Filter (SEKF) to adapt pre-trained neural network models to new, similar systems with limited data available. Experimental validation across damped spring and continuous stirred-tank reactor systems demonstrates that small parameter perturbations to the initial model capture target system dynamics while requiring as little as 1% of original training data. In addition, finetuning requires less computational cost and reduces generalization error.
Figures & tables
Source System
Target System
System Space
dtdx=fS(x,u,pS)
dtdx=fT(x,u,pT)
Data Space
DS
DT
dimDS≫dimDT
Model Space
x~k+1…k+nout=ϕS(xk,uk…k+nout−1,πS)
x~k+1…k+nout=ϕT(xk,uk…k+nout−1,πT)
ϕS and ϕT have identical structures
Table 1: Summary of source and target dynamical systems used for transfer learning experiments.
Figure 1: Example trajectory of a damped spring-mass system (solid line) given initial position (blue triangle) and velocity (black arrow). A neural network trained on noisy measurements (blue + ) makes predictions (orange × ) of future positions given the initial position and velocity. A target system with slightly different damping coefficient (dashed line) illustrates the transfer learning objective.
Metric
Purpose
Mean Squared Error (MSE)
Quantify model prediction error
Train-Test Gap
Measure overfitting and generalization
Normalized MSE
Compare target model accuracy to source model
Normalized Convergence Time
Compare training efficiency to source model
Wasserstein Distance
Quantify similarity of source and target data distributions
Cosine Similarity (CS)
Quantify similarity of source and target functional spaces and models
Table 2: Metrics to quantify similarity between source and target systems.
Figure 2: Normalized test loss versus target data size for finetuning and retraining initialization methods. (a) Damped spring system. (b) TCLab system. Error bars indicate standard error across replicates. The dashed line indicates source model performance. Finetuning achieves lower test loss, especially with limited data.
Figure 3: Train-test gap (test loss minus training loss) versus target data size, grouped by initialization method. Smaller gaps indicate better generalization. Finetuning exhibits consistently smaller train-test gaps than retraining across all data sizes in both systems. (a) Damped spring system. (b) TCLab system.
Figure 4: Distribution of cosine similarity between adapted model parameters and source model parameters. Dashed vertical lines indicate mean cosine similarity for each initialization method, with horizontal error bars showing ±1 standard deviation. (a) Damped spring system. (b) TCLab system. Finetuned models cluster tightly near 1.0, indicating that successful adaptation requires only small perturbations from the source model. Retrained models exhibit much wider spread and lower similarity, occupying different regions of parameter space.
System
Method
Optimizer
Cosine Similarity
Damped Spring
Finetune
Adam
0.9959±0.0113
L-BFGS
0.9984±0.0156
SEKF
0.9977±0.0238
Retrain
Adam
0.6519±0.1205
L-BFGS
0.6819±0.1210
SEKF
0.6047±0.2385
Table 4: Average cosine similarity between source and target parameters, broken down by system, initialization method, and optimizer.
Figure 5: Changes in model weights during transfer learning for the damped spring system when cT=0.9cS and 1,000 target examples. Each subplot shows the distribution of weight changes in a specific layer of the neural network. Contrary to common heuristics in image classification, weight changes are distributed across all layers rather than concentrated in later layers. This suggests that transfer learning for dynamical systems requires holistic parameter adjustments.
Figure 6: Normalized convergence time by optimizer and initialization method. Left: Damped spring system. Right: TCLab system. SEKF exhibits the longest convergence times, especially when retraining. Finetuning reduces convergence time across all optimizers.
Damped Spring
TCLab
Outcome
Factor
F
p
F
p
Test Loss
Data Size
8.29
2×10−4
24.88
2×10−4
Init Method
6.58
2×10−4
0.75
0.389
Optimizer
1.05
0.394
6.46
0.002
Train-Test Gap
Data Size
6.02
2×10−4
67.43
2×10−4
Init Method
4.73
2×10−4
7.87
0.007
Table 5: Summary of Permutation ANOVA results ( F -statistics and p -values) for main effects across both benchmark systems. Significant effects ( p<0.05 ) are shown in bold.
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Parameter
Value
Units
Mass, m
1.0
kg
Damping Coefficient, c
0.5
Ns/m
Spring Constant, k
1.0
N/m
Force, u
0
N
Initial Position x0
Uniform (-5, 5)
m
Initial Velocity x˙
Uniform (-5, 5)
m/s
Appendix
Table 6: Source Damped Spring-Mass System Parameters
Hyperparameter
Values
Learning Rate
10−6–10−1
Batch Size
16,32,64,128
LR Patience
10, 20, 50, 100
LR Factor
0.1 – 0.9
Maximum Epochs
1000
Num. Samples
100
Appendix
Table 7: Source Damped Spring-Mass System NN Hyperparameters
Figure 8: Example prediction trajectories for the damped spring system at the 90th, 50th, and 10th percentiles of test loss for the source model. Target system has cT=0.45 (10% reduction from source). Finetuned models (middle row) maintain accuracy comparable to the source model, while retrained models (bottom row) exhibit larger prediction errors, especially in worst-case scenarios.
Figure 9: Example prediction trajectories for the TCLab system at the 90th, 50th, and 10th percentiles of test loss for the source model. Transfer learning adapts a simulation-trained model to physical hardware using 4 hours of experimental data. Finetuned models (middle row) accurately predict both heater temperatures, while retrained models (bottom row) show degraded performance, particularly for the second heater.
Figure 10: Complete scatter plots of normalized test loss for all individual trials across both experimental systems. Each point represents a single trial, colored by initialization method (blue: finetune, orange: retrain). Panels are organized by target data size.
Figure 11: Normalized test loss broken down by target system for the damped spring experiments. Each of the 8 target systems (varying m , c , k , u by ±10% ) is shown separately to illustrate consistency of transfer learning benefits across different parameter perturbations.
Figure 12: Complete scatter plots of train-test gap (difference between training and test loss) for all trials. Lower values indicate better generalization. Finetuning consistently shows smaller gaps, particularly at low data sizes.
Figure 13: Normalized convergence time broken down by target data size for each optimizer. This visualization reveals how optimizer efficiency scales with data availability and whether the relative performance of optimizers changes across data regimes.
Effect
Coef.
Std.Err.
z
p
Intercept
1.120
0.125
8.93
4.11×10−19
L-BFGS
0.352
0.177
1.99
4.70×10−2
Retrain
1.887
0.177
10.64
1.88×10−26
50 Samples
− 0.844
0.177
− 4.76
1.94×10−6
100 Samples
− 1.005
0.177
− 5.67
1.47×10−8
500 Samples
− 1.093
0.177
− 6.17
7.00×10−10
Appendix
Table 12: GLM (Gamma) significant coefficients for normalized test loss—Damped Spring. Reference levels: Adam optimizer, Finetune initialization, 10 training samples.
Effect
Coef.
Std.Err.
z
p
Intercept
− 2.929
0.122
− 23.99
3.85×10−127
Retrain
1.077
0.173
6.24
4.50×10−10
50 Samples
− 0.366
0.173
− 2.12
3.40×10−2
100 Samples
− 0.431
0.173
− 2.49
1.27×10−2
500 Samples
− 0.475
0.173
− 2.75
6.00×10−3
1000 Samples
− 0.481
0.173
− 2.78
5.40×10−3
Appendix
Table 13: GLM (Gamma) significant coefficients for train-test gap—Damped Spring. Reference levels: Adam optimizer, Finetune initialization, 10 training samples.
Effect
Coef.
Std.Err.
z
p
Intercept
− 5.161
0.209
− 24.67
2.33×10−134
SEKF
2.138
0.296
7.23
5.01×10−13
Retrain
− 1.036
0.296
− 3.50
4.65×10−4
SEKF × Retrain
3.418
0.442
7.74
9.99×10−15
L-BFGS × 50 Samples
2.036
0.418
4.87
1.14×10−6
SEKF × 50 Samples
1.543
0.418
3.69
2.26×10−4
Appendix
Table 14: GLM (Gamma) significant coefficients for normalized convergence time—Damped Spring. Reference levels: Adam optimizer, Finetune initialization, 10 training samples.
Effect
Coef.
Std.Err.
z
p
Intercept
1.554
0.131
11.89
1.32×10−32
Retrain
0.384
0.185
2.08
3.79×10−2
12 hr
− 1.076
0.185
− 5.82
5.82×10−9
24 hr
− 1.205
0.185
− 6.52
7.00×10−11
4 hr
− 0.792
0.185
− 4.28
1.84×10−5
SEKF × 12 hr
1.081
0.261
4.13
3.57×10−5
Appendix
Table 15: GLM (Gamma) significant coefficients for normalized test loss—TCLab. Reference levels: Adam optimizer, Finetune initialization, 0.5 hr training data.
Effect
Coef.
Std.Err.
z
p
Intercept
1.210
0.091
13.35
1.19×10−40
Retrain
0.288
0.128
2.25
2.45×10−2
12 hr
− 0.657
0.128
− 5.13
2.95×10−7
24 hr
− 0.738
0.128
− 5.76
8.62×10−9
4 hr
− 0.541
0.128
− 4.22
2.42×10−5
SEKF × 12 hr
− 0.388
0.181
− 2.14
3.24×10−2
Appendix
Table 16: GLM (Gamma) significant coefficients for train-test gap—TCLab. Reference levels: Adam optimizer, Finetune initialization, 0.5 hr training data.
Effect
Coef.
Std.Err.
z
p
Intercept
− 4.168
0.449
− 9.28
1.65×10−20
SEKF
− 1.800
0.635
− 2.83
4.59×10−3
SEKF × Retrain
2.025
0.898
2.25
2.42×10−2
SEKF × 12 hr
− 2.197
0.898
− 2.45
1.44×10−2
SEKF × Retrain × 12 hr
3.106
1.270
2.45
1.45×10−2
Appendix
Table 17: GLM (Gamma) significant coefficients for normalized convergence time—TCLab. Reference levels: Adam optimizer, Finetune initialization, 0.5 hr training data.
College of Computer Science and Technology, and Key Laboratory of Symbolic Computation and Knowledge Engineering of Ministry of Education, Jilin University, China · College of Software and Key Laboratory of Symbolic Computation and Knowledge Engineering of Ministry of Education, Jilin University, China · School of Computing, Belfast, Northern Ireland, UK +1