Commit 7ac20d8
Performance & runtime improvements to info-theoretic acquisition functions (1/N)
Summary:
A series of improvements directed towards improving the performance of PES & JES, as well as their MultiObj counterparts.
## Motivation
As pointed out by SebastianAment in [this paper](https://arxiv.org/pdf/2310.20708), the BoTorch variant of JES, and to an extent PES, is brutally slow an suspiciously ill-performing. To bring them up to their potential, I've added a series of performance improvements:
**1. Improvement to get_optimal_samples and optimal_posterior_samples**: As this is an integral part of their efficiency, I've added `suggestions` (similar to `sample_around_best`) to `optimize_posterior_samples`.
Marginal runtime improvement in acquisition optimization (sampling time practically unchanged):

Substantial performance improvement: .
**2. Added initializer to acquisition funcction optimization**: Similar to KG, ES methods have sensible suggestions for acquisition function optimization in the form of the sampled optima. This drastically reduces the time of acquisition function optimization, which could on occasion take 30+ seconds when `num_restarts` was large `>4`.
Benchmarking INC
**2b. Multi-objective support for initializer**: By re-naming arguments of the multi-objective variants, we get consistency and support for MO variants.
**3. Enabled gradient-based optimization for PES**: The current implementation contains a while-loop which forces the gradients to be recursively computed. This commonly causes NaN gradients, which is why the recommended option is `"with_grad": False` in the tutorial. One `detach()` alleviates this issue, enabling gradient-based optimization.
NOTE: this has NOT been ablated, since the non-grad optimization is extremely computationally demanding.
X-link: #2748
Reviewed By: saitcakmak
Differential Revision: D69787454
Pulled By: hvarfner1 parent ee328f2 commit 7ac20d8
File tree
4 files changed
+81
-26
lines changed- botorch
- acquisition
- utils
- test
- acquisition
- utils
4 files changed
+81
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
| |||
596 | 597 | | |
597 | 598 | | |
598 | 599 | | |
599 | | - | |
| 600 | + | |
| 601 | + | |
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
| |||
625 | 627 | | |
626 | 628 | | |
627 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
628 | 636 | | |
629 | 637 | | |
630 | 638 | | |
631 | 639 | | |
632 | 640 | | |
633 | 641 | | |
634 | 642 | | |
| 643 | + | |
| 644 | + | |
635 | 645 | | |
636 | 646 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
1009 | | - | |
| 1008 | + | |
| 1009 | + | |
1010 | 1010 | | |
1011 | 1011 | | |
| 1012 | + | |
| 1013 | + | |
1012 | 1014 | | |
1013 | 1015 | | |
1014 | 1016 | | |
| |||
1017 | 1019 | | |
1018 | 1020 | | |
1019 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
1020 | 1024 | | |
| 1025 | + | |
1021 | 1026 | | |
1022 | 1027 | | |
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1026 | 1035 | | |
1027 | 1036 | | |
1028 | 1037 | | |
1029 | 1038 | | |
1030 | 1039 | | |
1031 | 1040 | | |
1032 | 1041 | | |
| 1042 | + | |
1033 | 1043 | | |
1034 | 1044 | | |
1035 | 1045 | | |
| |||
1038 | 1048 | | |
1039 | 1049 | | |
1040 | 1050 | | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | 1051 | | |
1046 | 1052 | | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1047 | 1066 | | |
1048 | | - | |
1049 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1050 | 1074 | | |
1051 | 1075 | | |
1052 | 1076 | | |
1053 | 1077 | | |
1054 | 1078 | | |
1055 | | - | |
| 1079 | + | |
1056 | 1080 | | |
1057 | 1081 | | |
1058 | 1082 | | |
| |||
1108 | 1132 | | |
1109 | 1133 | | |
1110 | 1134 | | |
| 1135 | + | |
1111 | 1136 | | |
1112 | | - | |
| 1137 | + | |
1113 | 1138 | | |
1114 | 1139 | | |
1115 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
421 | | - | |
422 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | | - | |
426 | 427 | | |
427 | 428 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | 429 | | |
432 | 430 | | |
433 | 431 | | |
| |||
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
| 443 | + | |
445 | 444 | | |
446 | 445 | | |
447 | 446 | | |
| |||
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
526 | 541 | | |
527 | 542 | | |
528 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
582 | | - | |
583 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
584 | 588 | | |
585 | 589 | | |
586 | 590 | | |
| |||
589 | 593 | | |
590 | 594 | | |
591 | 595 | | |
592 | | - | |
| 596 | + | |
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
596 | 600 | | |
597 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
598 | 604 | | |
599 | 605 | | |
600 | 606 | | |
601 | 607 | | |
| 608 | + | |
602 | 609 | | |
603 | 610 | | |
604 | 611 | | |
| |||
616 | 623 | | |
617 | 624 | | |
618 | 625 | | |
619 | | - | |
620 | | - | |
621 | 626 | | |
622 | 627 | | |
623 | 628 | | |
| |||
642 | 647 | | |
643 | 648 | | |
644 | 649 | | |
645 | | - | |
| 650 | + | |
646 | 651 | | |
647 | 652 | | |
648 | 653 | | |
| |||
0 commit comments