-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Gradient-based protocol optimization #437
Closed
maxentile
wants to merge
20
commits into
differentiable-reweighting
from
gradient-based-protocol-optimization
Closed
[WIP] Gradient-based protocol optimization #437
maxentile
wants to merge
20
commits into
differentiable-reweighting
from
gradient-based-protocol-optimization
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
Closing for now, may revisit this approach to protocol optimization later. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proof-of-concept for gradient-based optimization of T.I. protocols that involve coordinated control of more than one parameter.
Shouldn't be merged into
main
until after #404 , but I'd like to open the PR at this stage in case feedback about how to pose the problem of protocol optimization "differentiably" should flow back up to the design in #404 , #403 , or #420 , and in case this provides any heuristic insights about how to improve handwritten protocols for distance-based decoupling in the meantime.For context, I'd like to point to a paper that influenced my approach, but that I haven't directly implemented here: [Rotskoff, Crooks, Vanden-Eijnden, 2016] "A geometric approach to optimal nonequilibrium control: Minimizing dissipation in nanomagnetic spin systems" https://arxiv.org/abs/1607.07425 .
There, the authors represent protocols as discretized paths in a high-dimensional space of control parameters, estimate the thermodynamic metric tensor at each discretized point along the current path, then perform an efficient string-method-style update of that discretized path to reduce the corresponding protocol "length".
In contrast, here I've done things a bit differently, trying to lean as heavily as possible on autodiff and generic optimization:
du_dlam
(distributed according todu_dlam(x), x ~ p(x; control_dials(lam; protocol_params))
),protocol_params
.(Also be aware of a minor notational difference: in this PR "lambda" is the scalar that governs a vector of "control parameters", but in the referenced paper, "lambda" is a vector of control parameters, in turn governed by a different scalar. Also note I sometimes refer to "control parameters" as "control dials" when it helps distinguish from other uses of "parameters".)
I'd also like to point to Chapter 2 of Levi Naden's thesis, which described a framework for T.I. protocol optimization, and showed ways to efficiently estimate the variance of
du_dlam
for new trial protocols based on previous simulation results. Again, there are quite a few implementation differences, but this did strongly influence my approach.For the toy problem constructed here, there are only two control parameters: independently controllable distance offsets for LJ and Coulomb terms. A protocol for this problem is a function specifying how these two control parameters depend on a single governing parameter "lambda."
For applied problems,
timemachine
exposes many possible control parameters, such as independently controllable distance offsets per particle, and independently interpolated parameters per force field term. (And derivatives ofU
w.r.t. each!) To take full advantage of this, we would like to be able to efficiently optimize protocols that adjust all of these controllable dials independently.