Skip to content

Commit 09634e1

Browse files
authored
Merge pull request #5 from sebapersson/Ko_NeurIPS2023
Add Ko_NeurIPS2023
2 parents 2e33f74 + 7638a0b commit 09634e1

14 files changed

Lines changed: 1078 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Ko_NeurIPS2023
2+
3+
A second-order inspired neural ordinary differential equation (neural ODE) model of
4+
double-pendulum dynamics [1].
5+
6+
## Implementation details
7+
8+
The implementation follows the double-pendulum benchmark from the original publication, with
9+
two differences.
10+
11+
First, a 70/30 split is used for training and validation data instead of the 50/50 split
12+
used in the original study, as the latter led to non-correlation between training and
13+
validation loss.
14+
15+
Second, the original publication scales the time span by the maximum training time. This
16+
scaling is implemented directly in the PEtab measurement tables. For example, the final
17+
training time point is 1.0.
18+
19+
## Other notes
20+
21+
Both training and validation data are provided. The corresponding PEtab-SciML problems can
22+
be built using the respective YAML files.
23+
24+
The provided nominal values do not correspond to an optimal fit, so lower loss values can be
25+
achieved when training the model.
26+
27+
## References
28+
29+
1. Ko, Joon-Hyuk, et al. "Homotopy-based training of neuralodes for accurate dynamics
30+
discovery." _Advances in Neural Information Processing Systems_ 36 (2023): 64725-64752.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
llh:
2+
training: -740.8365268083237
3+
validation: -271.75114583603334
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
targetId targetValue
2+
net1_input1 theta1
3+
net1_input2 theta2
4+
net1_input3 omega1
5+
net1_input4 omega2
6+
acceleration1 net1_output1
7+
acceleration2 net1_output2
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
petabEntityId modelEntityId
2+
net1_input1 net1.inputs[0][0]
3+
net1_input2 net1.inputs[0][1]
4+
net1_input3 net1.inputs[0][2]
5+
net1_input4 net1.inputs[0][3]
6+
net1_output1 net1.outputs[0][0]
7+
net1_output2 net1.outputs[0][1]
8+
net1_ps net1.parameters

Benchmark-Models/Ko_NeurIPS2023/measurements_train_Ko_NeurIPS2023.tsv

Lines changed: 641 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
time measurement observableId experimentId
2+
1.0058480869349409 1.3955274820327759 obs_theta1
3+
1.0116956161656157 1.374436378479004 obs_theta1
4+
1.0175437031005568 1.3463537693023682 obs_theta1
5+
1.0233917900354979 1.3110008239746094 obs_theta1
6+
1.0292398769704387 1.2681394815444946 obs_theta1
7+
1.0350874062011135 1.2155588865280151 obs_theta1
8+
1.0409354931360546 1.1567021608352661 obs_theta1
9+
1.0467835800709955 1.0888984203338623 obs_theta1
10+
1.0526316670059366 1.0130705833435059 obs_theta1
11+
1.0584797539408777 0.9287806749343872 obs_theta1
12+
1.0643272831715527 0.8399320244789124 obs_theta1
13+
1.0701753701064936 0.7503591179847717 obs_theta1
14+
1.0760234570414344 0.6587153077125549 obs_theta1
15+
1.0818715439763755 0.5700400471687317 obs_theta1
16+
1.0877190732070503 0.47981300950050354 obs_theta1
17+
1.0935671601419912 0.393218994140625 obs_theta1
18+
1.0994152470769325 0.3095436096191406 obs_theta1
19+
1.1052633340118734 0.22537502646446228 obs_theta1
20+
1.1111108632425482 0.14704465866088867 obs_theta1
21+
1.1169589501774893 0.070808544754982 obs_theta1
22+
1.1228070371124304 0.0003763038257602602 obs_theta1
23+
1.1286551240473712 -0.06519975513219833 obs_theta1
24+
1.134502653278046 -0.1219632551074028 obs_theta1
25+
1.140350740212987 -0.1703801304101944 obs_theta1
26+
1.1461988271479282 -0.21066215634346008 obs_theta1
27+
1.152046914082869 -0.23823587596416473 obs_theta1
28+
1.1578944433135439 -0.25136128067970276 obs_theta1
29+
1.169590617183426 -0.24572011828422546 obs_theta1
30+
1.175438704118367 -0.2376563996076584 obs_theta1
31+
1.1871343202839828 -0.23538285493850708 obs_theta1
32+
1.192982407218924 -0.24729450047016144 obs_theta1
33+
1.1988304941538648 -0.2710520923137665 obs_theta1
34+
1.2105261103194807 -0.33719977736473083 obs_theta1
35+
1.2163741972544218 -0.3793112337589264 obs_theta1
36+
1.2222222841893629 -0.42336797714233393 obs_theta1
37+
1.2280703711243037 -0.46997854113578796 obs_theta1
38+
1.2339179003549785 -0.5184747576713562 obs_theta1
39+
1.2397659872899196 -0.5663852691650391 obs_theta1
40+
1.2456140742248607 -0.6129918694496155 obs_theta1
41+
1.2514621611598016 -0.6587000489234924 obs_theta1
42+
1.0058480869349409 0.6502557992935181 obs_theta2
43+
1.0116956161656157 0.6677501797676088 obs_theta2
44+
1.0175437031005568 0.6888151168823242 obs_theta2
45+
1.0233917900354979 0.7106643319129944 obs_theta2
46+
1.0292398769704387 0.7384924292564392 obs_theta2
47+
1.0350874062011135 0.771457850933075 obs_theta2
48+
1.0409354931360546 0.8083378076553345 obs_theta2
49+
1.0467835800709955 0.8546672463417053 obs_theta2
50+
1.0526316670059366 0.9079772233963013 obs_theta2
51+
1.0584797539408777 0.9638202190399171 obs_theta2
52+
1.0643272831715527 1.0226212739944458 obs_theta2
53+
1.0701753701064936 1.0731475353240967 obs_theta2
54+
1.0760234570414344 1.1158406734466553 obs_theta2
55+
1.0818715439763755 1.1434367895126343 obs_theta2
56+
1.0877190732070503 1.161035180091858 obs_theta2
57+
1.0935671601419912 1.1637688875198364 obs_theta2
58+
1.0994152470769325 1.1498953104019165 obs_theta2
59+
1.1052633340118734 1.121300220489502 obs_theta2
60+
1.1111108632425482 1.077256202697754 obs_theta2
61+
1.1169589501774893 1.0186822414398193 obs_theta2
62+
1.1228070371124304 0.9398729205131531 obs_theta2
63+
1.1286551240473712 0.8525862097740173 obs_theta2
64+
1.134502653278046 0.7461720705032349 obs_theta2
65+
1.140350740212987 0.6246686577796936 obs_theta2
66+
1.1461988271479282 0.49421438574790955 obs_theta2
67+
1.152046914082869 0.33856484293937683 obs_theta2
68+
1.1578944433135439 0.16998893022537231 obs_theta2
69+
1.169590617183426 -0.2107478231191635 obs_theta2
70+
1.175438704118367 -0.40377673506736755 obs_theta2
71+
1.1871343202839828 -0.7646061778068542 obs_theta2
72+
1.192982407218924 -0.9238167405128479 obs_theta2
73+
1.1988304941538648 -1.0627219676971436 obs_theta2
74+
1.2105261103194807 -1.3072270154953003 obs_theta2
75+
1.2163741972544218 -1.4117573499679565 obs_theta2
76+
1.2222222841893629 -1.5049508810043335 obs_theta2
77+
1.2280703711243037 -1.583759069442749 obs_theta2
78+
1.2339179003549785 -1.6559492349624634 obs_theta2
79+
1.2397659872899196 -1.7164537906646729 obs_theta2
80+
1.2456140742248607 -1.7671118974685671 obs_theta2
81+
1.2514621611598016 -1.8097957372665405 obs_theta2
82+
1.0058480869349409 -1.7799358367919924 obs_omega1
83+
1.0116956161656157 -2.476639986038208 obs_omega1
84+
1.0175437031005568 -3.182115316390991 obs_omega1
85+
1.0233917900354979 -3.9596922397613525 obs_omega1
86+
1.0292398769704387 -4.747453212738037 obs_omega1
87+
1.0350874062011135 -5.556423187255859 obs_omega1
88+
1.0409354931360546 -6.367982864379882 obs_omega1
89+
1.0467835800709955 -7.171878814697266 obs_omega1
90+
1.0526316670059366 -7.936578273773193 obs_omega1
91+
1.0584797539408777 -8.50217056274414 obs_omega1
92+
1.0643272831715527 -8.871321678161621 obs_omega1
93+
1.0701753701064936 -8.986979484558105 obs_omega1
94+
1.0760234570414344 -9.005571365356445 obs_omega1
95+
1.0818715439763755 -8.931824684143066 obs_omega1
96+
1.0877190732070503 -8.751644134521484 obs_omega1
97+
1.0935671601419912 -8.59599494934082 obs_omega1
98+
1.0994152470769325 -8.333806991577148 obs_omega1
99+
1.1052633340118734 -8.073198318481445 obs_omega1
100+
1.1111108632425482 -7.729011058807373 obs_omega1
101+
1.1169589501774893 -7.278179645538329 obs_omega1
102+
1.1228070371124304 -6.740241527557373 obs_omega1
103+
1.1286551240473712 -6.047169208526611 obs_omega1
104+
1.134502653278046 -5.272572994232178 obs_omega1
105+
1.140350740212987 -4.347711563110352 obs_omega1
106+
1.1461988271479282 -3.2665178775787354 obs_omega1
107+
1.152046914082869 -2.0769646167755127 obs_omega1
108+
1.1578944433135439 -0.8575884103775024 obs_omega1
109+
1.169590617183426 0.5599427223205566 obs_omega1
110+
1.175438704118367 0.512366771697998 obs_omega1
111+
1.1871343202839828 -0.8261052370071411 obs_omega1
112+
1.192982407218924 -1.7416760921478271 obs_omega1
113+
1.1988304941538648 -2.57063889503479 obs_omega1
114+
1.2105261103194807 -3.8321850299835205 obs_omega1
115+
1.2163741972544218 -4.246762275695801 obs_omega1
116+
1.2222222841893629 -4.532172679901123 obs_omega1
117+
1.2280703711243037 -4.692549228668213 obs_omega1
118+
1.2339179003549785 -4.756544589996338 obs_omega1
119+
1.2397659872899196 -4.719601631164551 obs_omega1
120+
1.2456140742248607 -4.61875581741333 obs_omega1
121+
1.2514621611598016 -4.49127197265625 obs_omega1
122+
1.0058480869349409 1.5791871547698977 obs_omega2
123+
1.0116956161656157 1.8497785329818726 obs_omega2
124+
1.0175437031005568 2.1938741207122803 obs_omega2
125+
1.0233917900354979 2.5709261894226074 obs_omega2
126+
1.0292398769704387 2.9983882904052734 obs_omega2
127+
1.0350874062011135 3.5785112380981445 obs_omega2
128+
1.0409354931360546 4.221789360046387 obs_omega2
129+
1.0467835800709955 4.843642234802246 obs_omega2
130+
1.0526316670059366 5.377201080322266 obs_omega2
131+
1.0584797539408777 5.516046524047852 obs_omega2
132+
1.0643272831715527 5.2505412101745605 obs_omega2
133+
1.0701753701064936 4.524524688720703 obs_omega2
134+
1.0760234570414344 3.4711692333221436 obs_omega2
135+
1.0818715439763755 2.264371395111084 obs_omega2
136+
1.0877190732070503 0.8844123482704163 obs_omega2
137+
1.0935671601419912 -0.5541307330131531 obs_omega2
138+
1.0994152470769325 -2.1002635955810547 obs_omega2
139+
1.1052633340118734 -3.628121137619018 obs_omega2
140+
1.1111108632425482 -5.226626396179199 obs_omega2
141+
1.1169589501774893 -6.748114109039307 obs_omega2
142+
1.1228070371124304 -8.282645225524902 obs_omega2
143+
1.1286551240473712 -9.817280769348145 obs_omega2
144+
1.134502653278046 -11.19234561920166 obs_omega2
145+
1.140350740212987 -12.800003051757812 obs_omega2
146+
1.1461988271479282 -14.384700775146484 obs_omega2
147+
1.152046914082869 -16.057880401611328 obs_omega2
148+
1.1578944433135439 -17.646018981933594 obs_omega2
149+
1.169590617183426 -19.138973236083984 obs_omega2
150+
1.175438704118367 -18.793668746948242 obs_omega2
151+
1.1871343202839828 -16.485795974731445 obs_omega2
152+
1.192982407218924 -15.034433364868164 obs_omega2
153+
1.1988304941538648 -13.572163581848145 obs_omega2
154+
1.2105261103194807 -11.00423526763916 obs_omega2
155+
1.2163741972544218 -9.736591339111328 obs_omega2
156+
1.2222222841893629 -8.694461822509766 obs_omega2
157+
1.2280703711243037 -7.603914737701416 obs_omega2
158+
1.2339179003549785 -6.570168018341065 obs_omega2
159+
1.2397659872899196 -5.632359981536865 obs_omega2
160+
1.2456140742248607 -4.650331020355225 obs_omega2
161+
1.2514621611598016 -3.7403547763824463 obs_omega2
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sbml xmlns="http://www.sbml.org/sbml/level3/version2/core"
3+
level="3"
4+
version="2">
5+
<model id="Ko_NeurIPS2023"
6+
name="Ko_NeurIPS2023"
7+
timeUnits="second">
8+
9+
<notes>
10+
<body xmlns="http://www.w3.org/1999/xhtml">
11+
<p>
12+
Second-order neural ODE model of double-pendulum dynamics, based on
13+
Ko et al., NeurIPS 2023. The angular accelerations are supplied by
14+
the neural-network outputs through the PEtab-SciML hybridization table.
15+
</p>
16+
</body>
17+
</notes>
18+
19+
<annotation>
20+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
21+
xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
22+
<rdf:Description rdf:about="#Ko_NeurIPS2023">
23+
<bqmodel:isDescribedBy>
24+
<rdf:Bag>
25+
<rdf:li rdf:resource="https://openreview.net/forum?id=rUFckPrzXR"/>
26+
</rdf:Bag>
27+
</bqmodel:isDescribedBy>
28+
</rdf:Description>
29+
</rdf:RDF>
30+
</annotation>
31+
32+
<listOfUnitDefinitions>
33+
<unitDefinition id="per_second2" name="per second squared">
34+
<listOfUnits>
35+
<unit kind="second" exponent="-2" scale="0" multiplier="1"/>
36+
</listOfUnits>
37+
</unitDefinition>
38+
</listOfUnitDefinitions>
39+
40+
<listOfParameters>
41+
<parameter id="theta1"
42+
name="theta1"
43+
value="-1.1336150169372559"
44+
units="dimensionless"
45+
constant="false"/>
46+
47+
<parameter id="theta2"
48+
name="theta2"
49+
value="-1.3008047342300415"
50+
units="dimensionless"
51+
constant="false"/>
52+
53+
<parameter id="omega1"
54+
name="omega1"
55+
value="-0.5385388135910034"
56+
units="dimensionless"
57+
constant="false"/>
58+
59+
<parameter id="omega2"
60+
name="omega2"
61+
value="-6.1550583839416495"
62+
units="dimensionless"
63+
constant="false"/>
64+
65+
<parameter id="acceleration1"
66+
name="neural_network_angular_acceleration_1"
67+
units="per_second2"
68+
constant="true"/>
69+
70+
<parameter id="acceleration2"
71+
name="neural_network_angular_acceleration_2"
72+
units="per_second2"
73+
constant="true"/>
74+
</listOfParameters>
75+
76+
<listOfRules>
77+
<rateRule variable="theta1">
78+
<math xmlns="http://www.w3.org/1998/Math/MathML">
79+
<ci> omega1 </ci>
80+
</math>
81+
</rateRule>
82+
83+
<rateRule variable="theta2">
84+
<math xmlns="http://www.w3.org/1998/Math/MathML">
85+
<ci> omega2 </ci>
86+
</math>
87+
</rateRule>
88+
89+
<rateRule variable="omega1">
90+
<math xmlns="http://www.w3.org/1998/Math/MathML">
91+
<ci> acceleration1 </ci>
92+
</math>
93+
</rateRule>
94+
95+
<rateRule variable="omega2">
96+
<math xmlns="http://www.w3.org/1998/Math/MathML">
97+
<ci> acceleration2 </ci>
98+
</math>
99+
</rateRule>
100+
</listOfRules>
101+
</model>
102+
</sbml>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
nn_model_id: net1
2+
inputs:
3+
- input_id: input
4+
layers:
5+
- layer_id: layer1
6+
layer_type: Linear
7+
args:
8+
in_features: 4
9+
out_features: 50
10+
bias: true
11+
- layer_id: layer2
12+
layer_type: Linear
13+
args:
14+
in_features: 50
15+
out_features: 50
16+
bias: true
17+
- layer_id: layer3
18+
layer_type: Linear
19+
args:
20+
in_features: 50
21+
out_features: 2
22+
bias: true
23+
forward:
24+
- name: input_1
25+
op: placeholder
26+
target: input
27+
args: []
28+
kwargs: {}
29+
- name: layer1
30+
op: call_module
31+
target: layer1
32+
args:
33+
- input_1
34+
kwargs: {}
35+
- name: gelu
36+
op: call_function
37+
target: gelu
38+
args:
39+
- layer1
40+
kwargs:
41+
inplace: false
42+
- name: layer2
43+
op: call_module
44+
target: layer2
45+
args:
46+
- gelu
47+
kwargs: {}
48+
- name: gelu_1
49+
op: call_function
50+
target: gelu
51+
args:
52+
- layer2
53+
kwargs:
54+
inplace: false
55+
- name: layer3
56+
op: call_module
57+
target: layer3
58+
args:
59+
- gelu_1
60+
kwargs: {}
61+
- name: output
62+
op: output
63+
target: output
64+
args:
65+
- layer3
66+
kwargs: {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
observableId observableFormula noiseFormula noiseDistribution
2+
obs_theta1 theta1 1 normal
3+
obs_theta2 theta2 1 normal
4+
obs_omega1 omega1 1 normal
5+
obs_omega2 omega2 1 normal
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parameterId lowerBound upperBound nominalValue estimate
2+
net1_ps -Inf Inf array true

0 commit comments

Comments
 (0)