-
Notifications
You must be signed in to change notification settings - Fork 16
/
nonlinear-solver-spec.json
740 lines (740 loc) · 19.9 KB
/
nonlinear-solver-spec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
[{
"pointer": "/",
"default": null,
"type": "object",
"optional": [
"solver",
"x_delta",
"grad_norm",
"first_grad_norm_tol",
"max_iterations",
"iterations_per_strategy",
"line_search",
"allow_out_of_iterations",
"L-BFGS",
"L-BFGS-B",
"Newton",
"ADAM",
"StochasticADAM",
"StochasticGradientDescent",
"box_constraints",
"advanced"
],
"doc": "Settings for nonlinear solver. Interior-loop linear solver settings are defined in the solver/linear section."
},
{
"pointer": "/solver",
"default": "Newton",
"type": "string",
"options": [
"Newton",
"DenseNewton",
"GradientDescent",
"ADAM",
"StochasticADAM",
"StochasticGradientDescent",
"L-BFGS",
"BFGS",
"L-BFGS-B",
"MMA"
],
"doc": "Nonlinear solver type"
},
{
"pointer": "/x_delta",
"default": 0,
"type": "float",
"min": 0,
"doc": "Stopping criterion: minimal change of the variables x for the iterations to continue. Computed as the L2 norm of x divide by the time step."
},
{
"pointer": "/grad_norm",
"default": 1e-08,
"type": "float",
"min": 0,
"doc": "Stopping criterion: Minimal gradient norm for the iterations to continue."
},
{
"pointer": "/first_grad_norm_tol",
"default": 1e-10,
"type": "float",
"doc": "Minimal gradient norm for the iterations to not start, assume we already are at a minimum."
},
{
"pointer": "/max_iterations",
"default": 500,
"type": "int",
"doc": "Maximum number of iterations for a nonlinear solve."
},
{
"pointer": "/iterations_per_strategy",
"default": 5,
"type": "int",
"doc": "Number of iterations for every substrategy before reset."
},
{
"pointer": "/iterations_per_strategy",
"type": "list",
"doc": "Number of iterations for every substrategy before reset."
},
{
"pointer": "/iterations_per_strategy/*",
"default": 5,
"type": "int",
"doc": "Number of iterations for every substrategy before reset."
},
{
"pointer": "/allow_out_of_iterations",
"default": false,
"type": "bool",
"doc": "If false (default), an exception will be thrown when the nonlinear solver reaches the maximum number of iterations."
},
{
"pointer": "/L-BFGS",
"default": null,
"type": "object",
"optional": [
"history_size"
],
"doc": "Options for LBFGS."
},
{
"pointer": "/L-BFGS/history_size",
"default": 6,
"type": "int",
"doc": "The number of corrections to approximate the inverse Hessian matrix."
},
{
"pointer": "/L-BFGS-B",
"default": null,
"type": "object",
"optional": [
"history_size"
],
"doc": "Options for the boxed L-BFGS."
},
{
"pointer": "/L-BFGS-B/history_size",
"default": 6,
"type": "int",
"doc": "The number of corrections to approximate the inverse Hessian matrix."
},
{
"pointer": "/Newton",
"default": null,
"type": "object",
"optional": [
"residual_tolerance",
"reg_weight_min",
"reg_weight_max",
"reg_weight_inc",
"force_psd_projection",
"use_psd_projection",
"use_psd_projection_in_regularized"
],
"doc": "Options for Newton."
},
{
"pointer": "/Newton/residual_tolerance",
"default": 1e-5,
"type": "float",
"doc": "Tolerance of the linear system residual. If residual is above, the direction is rejected."
},
{
"pointer": "/Newton/reg_weight_min",
"default": 1e-8,
"type": "float",
"doc": "Minimum regulariztion weight."
},
{
"pointer": "/Newton/reg_weight_max",
"default": 1e8,
"type": "float",
"doc": "Maximum regulariztion weight."
},
{
"pointer": "/Newton/reg_weight_inc",
"default": 10,
"type": "float",
"doc": "Regulariztion weight increment."
},
{
"pointer": "/Newton/force_psd_projection",
"default": false,
"type": "bool",
"doc": "Force the Hessian to be PSD when using second order solvers (i.e., Newton's method)."
},
{
"pointer": "/Newton/use_psd_projection",
"default": true,
"type": "bool",
"doc": "Use PSD as fallback using second order solvers (i.e., Newton's method)."
},
{
"pointer": "/Newton/use_psd_projection_in_regularized",
"default": true,
"type": "bool",
"doc": "Use PSD in regularized Newton."
},
{
"pointer": "/ADAM",
"default": null,
"type": "object",
"optional": [
"alpha",
"beta_1",
"beta_2",
"epsilon"
],
"doc": "Options for ADAM."
},
{
"pointer": "/ADAM/alpha",
"default": 0.001,
"type": "float",
"doc": "Parameter alpha for ADAM."
},
{
"pointer": "/ADAM/beta_1",
"default": 0.9,
"type": "float",
"doc": "Parameter beta_1 for ADAM."
},
{
"pointer": "/ADAM/beta_2",
"default": 0.999,
"type": "float",
"doc": "Parameter beta_2 for ADAM."
},
{
"pointer": "/ADAM/epsilon",
"default": 1e-8,
"type": "float",
"doc": "Parameter epsilon for ADAM."
},
{
"pointer": "/StochasticADAM",
"default": null,
"type": "object",
"optional": [
"alpha",
"beta_1",
"beta_2",
"epsilon",
"erase_component_probability"
],
"doc": "Options for ADAM."
},
{
"pointer": "/StochasticADAM/alpha",
"default": 0.001,
"type": "float",
"doc": "Parameter alpha for ADAM."
},
{
"pointer": "/StochasticADAM/beta_1",
"default": 0.9,
"type": "float",
"doc": "Parameter beta_1 for ADAM."
},
{
"pointer": "/StochasticADAM/beta_2",
"default": 0.999,
"type": "float",
"doc": "Parameter beta_2 for ADAM."
},
{
"pointer": "/StochasticADAM/epsilon",
"default": 1e-8,
"type": "float",
"doc": "Parameter epsilon for ADAM."
},
{
"pointer": "/StochasticADAM/erase_component_probability",
"default": 0.3,
"type": "float",
"doc": "Probability of erasing a component on the gradient for ADAM."
},
{
"pointer": "/StochasticGradientDescent",
"default": null,
"type": "object",
"optional": [
"erase_component_probability"
],
"doc": "Options for Stochastic Gradient Descent."
},
{
"pointer": "/StochasticGradientDescent/erase_component_probability",
"default": 0.3,
"type": "float",
"doc": "Probability of erasing a component on the gradient for StochasticGradientDescent."
},
{
"pointer": "/solver",
"type": "list",
"doc": "List of solvers for ballback. Eg, [{'type':'Newton'}, {'type':'L-BFGS'}, {'type':'GradientDescent'}] will solve using Newton, in case of failure will fallback to L-BFGS and eventually to GradientDescent"
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "Newton",
"required": [
"type"
],
"optional": [
"residual_tolerance"
],
"doc": "Options for Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "ProjectedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance"
],
"doc": "Options for projected Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "RegularizedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance",
"reg_weight_min",
"reg_weight_max",
"reg_weight_inc"
],
"doc": "Options for regularized Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "RegularizedProjectedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance",
"reg_weight_min",
"reg_weight_max",
"reg_weight_inc"
],
"doc": "Options for regularized projected Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "DenseNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance"
],
"doc": "Options for Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "DenseProjectedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance"
],
"doc": "Options for projected Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "DenseRegularizedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance",
"reg_weight_min",
"reg_weight_max",
"reg_weight_inc"
],
"doc": "Options for regularized Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "DenseRegularizedProjectedNewton",
"required": [
"type"
],
"optional": [
"residual_tolerance",
"reg_weight_min",
"reg_weight_max",
"reg_weight_inc"
],
"doc": "Options for projected regularized Newton."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "GradientDescent",
"required": [
"type"
],
"doc": "Options for Gradient Descent."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "StochasticGradientDescent",
"required": [
"type"
],
"optional": [
"erase_component_probability"
],
"doc": "Options for Stochastic Gradient Descent."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "L-BFGS",
"required": [
"type"
],
"optional": [
"history_size"
],
"doc": "Options for L-BFGS."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "BFGS",
"required": [
"type"
],
"doc": "Options for BFGS."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "ADAM",
"required": [
"type"
],
"optional": [
"alpha",
"beta_1",
"beta_2",
"epsilon"
],
"doc": "Options for ADAM."
},
{
"pointer": "/solver/*",
"type": "object",
"type_name": "StochasticADAM",
"required": [
"type"
],
"optional": [
"alpha",
"beta_1",
"beta_2",
"epsilon",
"erase_component_probability"
],
"doc": "Options for ADAM."
},
{
"pointer": "/solver/*/type",
"type": "string",
"options": [
"Newton",
"DenseNewton",
"ProjectedNewton",
"DenseProjectedNewton",
"RegularizedNewton",
"DenseRegularizedNewton",
"RegularizedProjectedNewton",
"DenseRegularizedProjectedNewton",
"GradientDescent",
"StochasticGradientDescent",
"ADAM",
"StochasticADAM",
"L-BFGS",
"BFGS"
],
"doc": "Nonlinear solver type"
},
{
"pointer": "/solver/*/residual_tolerance",
"default": 1e-5,
"type": "float",
"doc": "Tolerance of the linear system residual. If residual is above, the direction is rejected."
},
{
"pointer": "/solver/*/reg_weight_min",
"default": 1e-8,
"type": "float",
"doc": "Minimum regulariztion weight."
},
{
"pointer": "/solver/*/reg_weight_max",
"default": 1e8,
"type": "float",
"doc": "Maximum regulariztion weight."
},
{
"pointer": "/solver/*/reg_weight_inc",
"default": 10,
"type": "float",
"doc": "Regulariztion weight increment."
},
{
"pointer": "/solver/*/erase_component_probability",
"default": 0.3,
"type": "float",
"doc": "Probability of erasing a component on the gradient for stochastic solvers."
},
{
"pointer": "/solver/*/history_size",
"default": 6,
"type": "int",
"doc": "The number of corrections to approximate the inverse Hessian matrix."
},
{
"pointer": "/solver/*/alpha",
"default": 0.001,
"type": "float",
"doc": "Parameter alpha for ADAM."
},
{
"pointer": "/solver/*/beta_1",
"default": 0.9,
"type": "float",
"doc": "Parameter beta_1 for ADAM."
},
{
"pointer": "/solver/*/beta_2",
"default": 0.999,
"type": "float",
"doc": "Parameter beta_2 for ADAM."
},
{
"pointer": "/solver/*/epsilon",
"default": 1e-8,
"type": "float",
"doc": "Parameter epsilon for ADAM."
},
{
"pointer": "/line_search",
"default": null,
"type": "object",
"optional": [
"method",
"use_grad_norm_tol",
"min_step_size",
"max_step_size_iter",
"min_step_size_final",
"max_step_size_iter_final",
"default_init_step_size",
"step_ratio",
"Armijo",
"RobustArmijo"
],
"doc": "Settings for line-search in the nonlinear solver"
},
{
"pointer": "/line_search/method",
"default": "RobustArmijo",
"type": "string",
"options": [
"Armijo",
"RobustArmijo",
"Backtracking",
"None"
],
"doc": "Line-search type"
},
{
"pointer": "/line_search/use_grad_norm_tol",
"default": 1e-6,
"type": "float",
"doc": "When the energy is smaller than use_grad_norm_tol, line-search uses norm of gradient instead of energy"
},
{
"pointer": "/line_search/min_step_size",
"default": 1e-10,
"type": "float",
"doc": "Mimimum step size"
},
{
"pointer": "/line_search/max_step_size_iter",
"default": 30,
"type": "int",
"doc": "Number of iterations"
},
{
"pointer": "/line_search/min_step_size_final",
"default": 1e-20,
"type": "float",
"doc": "Mimimum step size for last descent strategy"
},
{
"pointer": "/line_search/max_step_size_iter_final",
"default": 100,
"type": "int",
"doc": "Number of iterations for last descent strategy"
},
{
"pointer": "/line_search/default_init_step_size",
"default": 1,
"type": "float",
"doc": "Initial step size"
},
{
"pointer": "/line_search/step_ratio",
"default": 0.5,
"type": "float",
"doc": "Ratio used to decrease the step"
},
{
"pointer": "/line_search/Armijo",
"default": null,
"type": "object",
"optional": [
"c"
],
"doc": "Options for Armijo."
},
{
"pointer": "/line_search/Armijo/c",
"default": 1e-4,
"type": "float",
"min_value": 0,
"doc": "Armijo c parameter."
},
{
"pointer": "/line_search/RobustArmijo",
"default": null,
"type": "object",
"optional": [
"delta_relative_tolerance"
],
"doc": "Options for RobustArmijo."
},
{
"pointer": "/line_search/RobustArmijo/delta_relative_tolerance",
"default": 0.1,
"type": "float",
"min_value": 0,
"doc": "Relative tolerance on E to switch to approximate."
},
{
"pointer": "/box_constraints",
"type": "object",
"optional": [
"bounds",
"max_change"
],
"default": null
},
{
"pointer": "/box_constraints/bounds",
"default": [],
"type": "list",
"doc": "Box constraints on optimization variables."
},
{
"pointer": "/box_constraints/bounds/*",
"type": "list",
"doc": "Box constraint values on optimization variables."
},
{
"pointer": "/box_constraints/bounds/*/*",
"type": "float",
"doc": "Box constraint values on optimization variables."
},
{
"pointer": "/box_constraints/bounds/*",
"type": "float",
"doc": "Box constraint values on optimization variables."
},
{
"pointer": "/box_constraints/max_change",
"default": -1,
"type": "float",
"doc": "Maximum change of optimization variables in one iteration, only for solvers with box constraints. Negative value to disable this constraint."
},
{
"pointer": "/box_constraints/max_change",
"type": "list",
"doc": "Maximum change of optimization variables in one iteration, only for solvers with box constraints."
},
{
"pointer": "/box_constraints/max_change/*",
"type": "float",
"doc": "Maximum change of every optimization variable in one iteration, only for solvers with box constraints."
},
{
"pointer": "/advanced",
"default": null,
"type": "object",
"optional": [
"f_delta",
"f_delta_step_tol",
"derivative_along_delta_x_tol",
"apply_gradient_fd",
"gradient_fd_eps"
],
"doc": "Nonlinear solver advanced options"
},
{
"pointer": "/advanced/f_delta",
"default": 0,
"min": 0,
"type": "float",
"doc": "Dangerous Option: Quit the optimization if the solver reduces the energy by less than f_delta for consecutive f_delta_step_tol steps."
},
{
"pointer": "/advanced/f_delta_step_tol",
"default": 100,
"type": "int",
"doc": "Dangerous Option: Quit the optimization if the solver reduces the energy by less than f_delta for consecutive f_delta_step_tol steps."
},
{
"pointer": "/advanced/derivative_along_delta_x_tol",
"default": 0,
"min": 0,
"type": "float",
"doc": "Quit the optimization if the directional derivative along the descent direction is smaller than this tolerance."
},
{
"pointer": "/advanced/apply_gradient_fd",
"default": "None",
"type": "string",
"options": [
"None",
"DirectionalDerivative",
"FullFiniteDiff"
],
"doc": "Expensive Option: For every iteration of the nonlinear solver, run finite difference to verify gradient of energy."
},
{
"pointer": "/advanced/gradient_fd_eps",
"default": 1e-7,
"type": "float",
"doc": "Expensive Option: Eps for finite difference to verify gradient of energy."
}
]