Data-Driven Offline Decision-Making via Invariant Representation Learning
Abstract
The goal in offline data-driven decision-making is synthesize decisions that optimize a black-box utility function, using a previously-collected static dataset, with no active interaction. These problems appear in many forms: offline reinforcement learning (RL), where we must produce actions that optimize the long-term reward, bandits from logged data, where the goal is to determine the correct arm, and offline model-based optimization (MBO) problems, where we must find the optimal design provided access to only a static dataset.
A key challenge in all these settings is distributional shift: when we optimize with respect to the input into a model trained from offline data, it is easy to produce an out-of-distribution (OOD) input that appears erroneously good.
In contrast to prior approaches that utilize pessimism or conservatism to tackle this problem, in this paper, we formulate offline data-driven decision-making as domain adaptation , where the goal is to make accurate predictions for the value of optimized decisions (“target domain”), when training only on the dataset (“source domain”).
This perspective leads to invariant objective models (I OM ), our approach for addressing distributional shift by enforcing invariance between the learned representations of the training dataset and optimized decisions.
In I OM if the optimized decisions are too different from the training dataset , the representation will be forced to lose much of the information that distinguishes good designs from bad ones, making all choices seem mediocre.
Critically, when the optimizer is aware of this representational tradeoff, it should choose not to stray too far from the training distribution, leading to a natural trade off between distributional shift and learning performance.
Introduction
Many real-world applications of machine learning involve learning how to make better decisions from data.
When we must make a sequence of decisions (e.g., control a robot), this can be formulated as offline reinforcement learning (RL) [27, 30], whereas in problems where we must synthesize only one decision (e.g., a molecule that can effectively catalyze a reaction), this can be formulated as a multiarmed bandit or a data-driven model-based optimization (also known as black-box optimization [2]). In all of these cases, an algorithm is provided with data from previous experiments consisting of ( x , y ) tuples, where x represents a decision (e.g., a bandit arm, a design such as a molecule or protein, or a sequence of actions in RL) and y represents its utility (e.g., certain property of the molecule or the long-term reward of a trajectory).
The goal is to generate the best possible decision, typically one that is better than the best one in the dataset.
All of these problem domains are united by a common challenge: in order to improve, the decisions learned by the algorithm must differ from the distribution of the designs in the training data, inducing distributional shift [23, 24], which must be carefully handled.
Current methods for solving such data-driven decision-making problems try to learn some form of a proxy model ˆ f ( · ) that maps a decision x to its objective value y via supervised learning on the static dataset, and then optimize the decision x against this learned model (in reinforcement learning, the proxy model is typically the action-value function and is learned via Bellman backups, thanks to the Markovian structure).
However, overestimation errors in the learned model will erroneously drive the optimizer towards low-value designs that “fool” the proxy into producing a high values [23].
To handle this, prior works have proposed to regularize the learned model to be conservative by penalizing its values on unseen designs [25, 44, 49, 17], or explicitly constraining the optimizer (e.g., by using density estimation [6, 23], referred to as “policy constraints” in offline RL [30]).
In this paper, we take a different perspective for the distributional shift challenges in offline datadriven decision-making, and formulate it as domain adaptation, where the “target” domain consists of the distribution of decisions that the optimization procedure finds, and the source domain corresponds to the training distribution.
Framing the problem in this way, we derive a class of methods that regulate distributional shift at the representation level , and admit effective hyperparameter tuning strategies.
The intuition behind our approach is that, if the internal representations of the learned model are made invariant to the differences between the decisions seen in the training data vs. the optimized distribution, then excessive distributional shift is naturally discouraged because excessive invariance would lead the out-of-distribution points to attain mediocre values on average.
That is, as the optimized decisions deviate more from the training data, the requirement to maintain invariance will cause the model’s representation to lose information, and will hence force the predicted value to become closer to the average y value in the dataset.
This will force the optimizer to stay within the distribution of the dataset as recall that out-of-distribution points will only appear mediocre under the learned model.
Of course, the representation cannot be perfectly invariant in general, because the optimized points are different from the training data, and hence the method must strike a balance.
In practice, one can instantiate this idea using an adversarial training procedure.
(COMs)
[44] pushes down the learned values on designs (decisions) not observed in the dataset and pushes up the learned values on designs (decisions) in the dataset, training with invariance induces the out-of-distribution designs (decisions) to attain objective values close to the average value in the train- ing dataset.
This discourages the optimizer from finding out-of-distribution designs (decisions).
Our main contribution is a new class of methods for offline data-driven decision-making, derived from a novel connection with domain adaptation.
In this paper, we instantiate this idea in the setting of offline data-driven model-based optimization (MBO) (i.e., offline data-driven bandits), leaving the sequential offline reinforcement learning setting to future work.
As discussed above, our approach, invariant objective models (I OM ), optimizes the decision – in this case, a “design” – against a learned model that admits invariant representations between optimized designs and the dataset.
This enables controlling distributional shift and also provides a way to derive effective offline hyperparameter tuning strategies that we show actually work well in practice.
I OM can be implemented simply by combining any supervised regression procedure with a regularizer that enforces invariance.
The regularizer is implemented using any discrepancy measure between two distributions, and we instantiate I OM using the χ 2 -discrepancy measure via the least-squares generative adversarial network.
This procedure trains a discriminator to discriminate between the representations on the training dataset and optimized designs, whereas the learned representations are trained to be as invariant as possible to fool the discriminator.
We theoretically derive I OM from our domain adaptation formulation of MBO and we also use this formulation to derive tuning strategies for several common hyperparameters.
Empirically, we evaluate I OM on several tasks from Design-Bench [43] and find that it outperforms the best prior methods, and additionally, admits appealing offline tuning strategies unlike the prior methods.
Preliminaries
Offline data-driven decision-making and its variants.
The goal in offline data-driven decisionmaking is to produce decisions that maximize some objective function, using experience from a provided static dataset.
Two instances of this problem are offline reinforcement learning (RL), and offline data-driven model-based optimization (MBO).
As shown in Table 1, in offline RL, the decision is a policy π that prescribes an action a for any state s , and the objective function is the
[Table]
long-term discounted reward attained by the policy π , denoted as J ( π ) . In offline MBO, the decision corresponds to a design ( x ), and the objective function is the unknown black-box utility ( f ( x ) ).
We will utilize the notation from offline MBO in this paper for simplicity, but the ideas developed in this paper can be extended to the RL setting.
Offline model-based optimization (MBO).
As mentioned above, the goal in offline model-based optimization (MBO) [43] is to produce designs that maximize some objective function f ( x ) , by only utilizing a dataset D
= { ( x i , y i ) } ni
=1 of designs x i and their corresponding objective values
y i .
No active queries to the groundtruth function are allowed.
Typically offline MBO is formulated as finding the optimal design x ⋆ .
However, we will use a slightly more general formulation, where the goal is to optimize a distribution over designs µ ( x ) .
We will use this formulation largely for convenience of analysis, where the classic case is recovered when µ ( x ) is a Dirac delta function, though we also note that optimizing distributions over designs is often studied in settings such as synthetic biology, where the goal is to explicitly diversify the designs [5].
Thus, our goal is to find a distribution over designs µ O PT ( x ) using only the static dataset D , such that it maximizes the expected value of f ( x ) (the expected value under distribution µ is referred to as J ( µ ) ).
This can be formalized as follows ( Alg refers to an algorithm):
[Equation]
Model-based optimization methods. The methods we consider in this paper fit a learned model f θ ( x ) to ( x i , y i ) pairs in the dataset via a standard supervised regression objective, with an additional regularizer.
We will assume that f θ is composed of two components: a representation ϕ ∈ R d that maps a given x into a d -dimensional vector, and a forward model, f θ that converts the representational output into a scalar objective value, i.e., f ϕ ( x ) :
= f θ ( ϕ ( x )) .
We will use the notation f θ and f ϕ interchangeably.
Given a learned model f θ ( ϕ ( x )) , one approach to obtain the optimized distribution µ O PT is by optimizing the expected value J θ ( µ ) :
=
E x ∼ µ [ f θ ( ϕ ( x ))] under the learned model.
This distribution µ O PT ( x ) can be instantiated in many ways: while some prior work [23, 6] represents µ O PT via a parametric density model over X and optimizes this density model to obtain µ O PT , other prior work [44] uses a non-parametric representation for µ O PT using a set of optimized “design particles”.
In this paper, we represent µ O PT using a set of design particles, each of which is obtained by optimizing the learned function f θ ( ϕ ( x )) with respect to the input x via grad.
ascent, starting from i.i.d.
samples from the dataset.
Formally:
[Equation]
The optimized distribution µ O PT is then given by µ O PT =
δ { x 1 T , x 2 T , · · · } .
The challenge of distributional shift in offline MBO [23, 7, 9, 44].
When the learned model f θ ( ϕ ( x )) is trained via supervised regression on the offline dataset D : arg min θ 1 n (cid:80) ni
=
( f θ ( ϕ ( x i ))
− y i ) 2 , the ERM principle states that f θ ( ϕ ( x )) will reasonably approximate f ( x ) in expectation only under the distribution of the training dataset D , i.e., µ data , however f θ ( ϕ ( x i ))
̸
= y i in general on points not in the training distribution.
Then, when optimizing the learned function, overestimation errors in the value of f θ ( ϕ ( x )) will inevitably lead the optimizer to converge to a distribution µ O PT over designs that have a high value under the learned function(i.e., high J θ ( µ O PT ) ) but not a high ground truth value J ( µ O PT ).
In general, this distribution µ O PT will be different from µ data , since the learned function is likely to be more correct in expectation under µ data .
Data-Driven Offline Model-based Optimization as Domain Adaptation
In this section, we will formulate data-driven offline MBO as domain adaptation, which will allow us to derive our method, invariant objective models (I OM ).
Instead of attempting to simply constrain the optimizer to directly avoid distributional shift, our approach modifies the representations learned by the model ˆ f θ by adding an invariance regularizer during training such that there is minimal distribution shift under the learned invariant representation during optimization.
If we can ensure that the learned model f θ is accurate on the distribution found by the optimizer, µ O PT , then we can ensure that we will obtain good designs.
Therefore, to handle the distributional shift, we can treat µ data as the “source domain” and the optimized distribution µ O PT as the “target domain”.
Just as the goal in domain adaptation is to train on the source domain and make accurate predictions on the target domain, we will aim to train f θ ( x ) on µ and with the goal of making more accurate predictions under µ O PT .
Of course, learning to make accurate predictions on any unseen distribution is impossible for any domain adaptation method [53], but in the case of MBO, the choice of the target distribution µ O PT is also made by the algorithm itself, such that invariance can be enforced both by changing the representation and changing the target distribution µ O PT .
3.1 Invariant Objective Models (I OM )
I OM controls distributional shift between the optimized distribution µ O PT and the training distribution µ data at the representational level, by regularizing the distribution of the features ϕ ( x ) under µ O PT to match that under µ data .
We will first present the intuition behind the method, and then formalize it by setting up a bi-level optimization problem that we will also analyze theoretically.
Intuition: As the optimizer deviates from the training distribution µ , the invariance regularizer forces the distribution of optimized designs to resemble the distribution over representations ϕ
( x ) under µ data , i.e., P µ O PT ( ϕ ( x ))
≈ P µ data ( ϕ ( x )) .
When µ O PT is far from the training distribution (i.e., if
D KL ( µ O PT , µ data ) is very high), it is easier to enforce invariance as it does not conflict with fitting f θ on the training distribution.
This representational invariance in turn causes the expected value of the learned function f θ under µ O PT to appear (roughly) equal to the average objective value in the training dataset, i.e., E x ∼ µ O PT [ f θ ( ϕ ( x ))]
≈ E x ∼ µ data [ f θ ( ϕ ( x ))] , if µ O PT is too far away from the training distribution.
As a result, the expected value of the learned model f θ ( ϕ ( x )) under µ O PT ,
J θ ( µ O PT ) , will be worse than the value of the best design within the training distribution (since the best design input sampled from µ data will attain a higher objective value than the average value under µ data ).
This would act as a guard to prevent the optimizer diverging too far away from the dataset, as out-of-distribution designs no longer appear promising.
Iteratively regularizing ϕ to enforce invariance between µ O PT and µ until convergence will restrict the optimizer from selecting erroneously overestimated out-of-distribution inputs.
We supplement this intuition with an illustration shown in Figure 9.
We will now present a formalization of this intuition in the form of a bi-level optimization problem that aims to maximize a lower-bound on the expected objective value attained under µ O PT , and derive the training objectives for I OM using this bi-level optimization formulation. [Table] = · · · , K do , 4:
Sample n training points
D
Run one gradient step k and ϕ k to obtain k + +1 ( · )) . Run one gradient step to optimize design parti- cles ←
+ x f
7: end for
However, do note that, our practical method does not aim to solve a bi-level optimization exactly due to computational infeasibility.
models (I OM ).
To enforce invariance at a representational level, we utilize an invariance regularizer.
Denoted as disc H ( p, q ) , our invariance regularizer is a discrepancy measure between two probability distributions p and q , w.r.t.
a certain hypothesis class H .
For example, if H is the class of all 1 -Lipschitz functions, disc H is the 1 -Wasserstein distance; if H is the class of linear functions, disc H is the maximum mean discrepancy (MMD) [13] distance.
In practice, we implement this via a generative adversarial network as we discuss in the next subsection.
In addition to training f θ via standard supervised regression on the labels in the training data, I OM trains the representation ϕ
( x ) and the model (cid:98) f ( · ) to additionally minimize the discrepancy disc H ( P µ ( ϕ ( x )) , P µ O PT ( ϕ ( x ))) between distributions of representations under the optimized distribution, µ O PT and the training distribution µ .
This objective can be formalized as:
[Equation]
where λ denotes a weighting hyperparameter.
In Section 3.2, we will describe how we can convert this bi-level optimization problem into a practical MBO algorithm that can be implemented with high capacity deep neural networks.
This is followed by a theoretical analysis to formally justify the objective in Section 3.3, and a discussion of how the hyperparameter λ can be tuned against a validation set in Section 4, without any online access to the ground truth function.
3.2 Optimizing the Bi-Level Problem and the Practical I OM Algorithm
In this section, we will describe how we can convert the abstract bi-level optimization problem above into an objective that can be trained practically and discuss some practical implementation details.
I OM alternates between solving the bi-level optimization problem with respect to the distribution µ O PT and the learned model f θ and ϕ independently.
For training the learned model and the representation f θ and ϕ , I OM solves the inner optimization by running one-step of gradient descent ( GD ), utilizing the current snapshot of µ O PT (denoted as µ t O PT ):
[Equation]
= ( f θ ( ϕ ( x i )) − y i ) 2 + λ · disc H
( P µ data ( ϕ ( x )) , P µt O PT ( ϕ ( x )))
(cid:33) .
Simultaneously, we update the design particles representing µ t O PT :
= δ { x 1 t , x 2 t , · · · } towards optimizing the learned function f θ t +1 ( ϕ t +1 ( x )) :
x it +1 ← x it + η ∇ x f θ t +1 ( ϕ t +1 ( x ))
| x
= x it , ∀ i. Pseudocode for I OM is shown in Algorithm 1.
Practical implementation details: We model the representation ϕ ( x ) and the learned function f θ ( · )
each as two-hidden layer ReLU networks with sizes 2048 and 1024, respectively.
We utilize the χ 2 -discrepancy, which be instantiated in its variational form via a least-squares generative adversarial network (LS-GAN)
[32] on the representations ϕ ( x ) .
More implementation details can be found in Appendix C.
3.3 Theoretical Analysis of Invariant Representation Learning for MBO
In this section, we will formally show that under certain standard assumptions, solving the bi-level optimization problem (Equation 3) enables us to find a better design than the dataset distribution µ data .
To show this, we will combine theoretical tools for analyzing offline RL algorithms [8, 25, 50] and domain adaptation [53].
We show that the expected value of the ground truth objective under any given distribution π ( x ) of design inputs can be lower bounded in terms of the expected value under the learned function modulo some error terms.
Then we will show that these error terms are controlled tightly when solving the bi-level problem, and finally appeal to uniform concentration to show that the performance of µ O PT is better with high probability.
Our goal isn’t to derive the tightest possible bound for I OM , but show that I OM can attain reasonable performance guarantees, and this domain adaptation perspective can tackle distributional shift.
Notation and assumptions.
Following standard assumptions [29], we will analyze the setting when the learned representation lies in some space of functions, ϕ ∈ Φ , and the learned function f θ lies in f θ ∈ F .
We will consider that the optimized distribution µ O PT belongs to a function class, µ O PT ∈ Π .
Our analysis will require that the ground truth model f is approximately realizable under some representation ϕ ∈ Φ and for some g ∈ F .
That is, we assume:
Assumption 3.1 ( ε − realizability) .
For any distribution π over designs, there exists a representation ϕ ∈ Φ and a g ∈ F such that min g max π ∈ Π E x ∼ π
[ | f ( x ) − g ( ϕ ( x )) | ] ≤ ε F , Φ .
In addition, we assume that ∀ f ∈ F , || f || ∞ < ∞ and is Lipschitz continuous with constant C :
||
f || L ≤ C .
This is true for most parameteric function classes, such as neural networks.
Then, we can lower bound the average objective value under any distribution in terms of the invariance:
Proposition 3.2 ((Informal) Lower-bounding the ground truth value under π ) .
Under Assumption 3.
and the Lipschitz continuity on the function f θ , the ground truth objective for any given π ∈ Π can be lower bounded in terms of the learned objective model f θ ∈ F and representation
ϕ ∈ Φ , with high probability ≥ 1 − δ that:
[Equation]
where C F is a uniform constant depending on the function class F and ε stat refers to statistical error that decays inversely with the dataset size, |D| .
A proof for Proposition 3.2 is in
Appendix A. The
■ term can further be lower bounded using a standard concentration error bound for ERM, and can be controlled if we train f θ ( ϕ ( · )) minimize prediction error against ground truth values of f .
Now we utilize Proposition 3.2 and a uniform concentration argument to lower-bound the value under the optimized distribution µ O PT .
Proposition 3.3 ((Informal) Performance guarantee for I OM ) .
Under Assumption 3.1, the expected value of the ground truth objective under µ O PT , J ( µ O PT ) is lower bounded by:
[Equation]
A proof of Proposition 3.3 can be found in Appendix A.
This proposition implies that as long as the optimizer finds designs that improve the learned objective function f θ ∈ F , such that ( ◦ ) is positive, and the discrepancy term ( ⋆ ) is minimized, then the distribution over designs found by I OM , µ O PT , will compete favorably against the distributions of designs in the dataset.
Of course, these bounds present the worst-case guarantees for I OM , but as we will show in our experiments, I OM does clearly improve over the best designs in the offline dataset.
In addition, this theoretical analysis also motivates the design of our scheme for performing hyperparameter tuning and model selection.
This scheme will be based directly on the result from Proposition 3.2.
We will discuss this connection when discussing tuning in Section 4.
Finally, we would like to highlight how invariance leads to “average” values if µ O PT deviates too far away from the data distribution µ .
If µ O PT deviates too far, such that disc H ( P µ data ( ϕ ) , P µ O PT ( ϕ )) ≤ ε ′ , the learned function is bounded too close to the average learned value on the data i.e., | (cid:98) J ( µ O PT ) − (cid:98) J ( µ data ) | ≤ C ′ · ε ′ .
Thus, the learned function simply reverts to “predicting the mean objective value” of the training distribution as ε ′ decreases, thereby losing any information about the identity of the optimized distribution, when the optimizer goes too far out of µ .
Offline Workflow and Tuning for I OM
A central challenge in offline model-based optimization is that of offline workflow and hyperparameter tuning: not only must an algorithm be able to produce designs using a static dataset, but it must also prescribe a fully offline workflow for tuning hyperparameters so that the produced designs are as good as possible.
This includes both explicit hyperparameters (such as the coefficient of conservatism or invariance, λ for I OM ) and implicit hyperparameters (such as the early stopping point).
The primary challenge stems from the fact that unlike supervised learning, the final performance in MBO is determined by the optimized distribution µ O PT , which is different from the training distribution, µ data , and we must reason about this performance fully offline.
In this section, we discuss how I OM admits a particularly convenient and fully offline hyperparameter tuning procedure that works well empirically.
The goal of our tuning problem is to find a tuple consisting of the learned representation ϕ λ , the learned model, f λθ , and the optimized distribution µ λ O PT , out of a given set of tuples obtained for different values of λ .
In other words, we wish to find the λ from the set of models M λ :=
( f λθ , ϕ λ , µ λµ O PT ) , such that the corresponding µ λ O PT attains the highest value under the ground truth objective.
Crucially note that this must be done fully offline.
Our key idea: The primary question we wish to answer is: how can we identify if a given tuple ( f λθ , ϕ λ , µ λ O PT ) leads to good performance?
In order for a tuple trained via I OM to perform well, we need two primary conditions: (1) it should be nearly invariant, and as a result, robust to distributional shift, and (2) the learned f λθ must attain good generalization performance within the training distribution.
Intuitively (1) guards us against distributional shift, and (2) enables us to find as good of a learned model on the dataset, that does not overfit or underfit as a result of the invariance regularizer.
This forms the basis of our tuning method.
Offline tuning of I OM :
To instantiate the idea practically, we first run I OM with a set of hyperparameters Λ = { λ 1 , λ 2 , · · · } .
Then for each run, we record the validation in-distribution error and the value of the invariance regularizer on a validation set.
We then perform tuning in two steps: first, we filter all λ values that attain near-perfect invariance under a user-specified margin ε , i.e., disc H ( P µ data ( ϕ λ ( x )) , P µ ω O PT ( ϕ λ ( x ))) ≤ ϵ , and are hence guaranteed to be robust to distributional shift.
Second, we now pick models that attain good performance within the training distribution by selecting λ values that attain the smallest validation prediction error: ( f θ ( ϕ ( x )) − y ) 2 , in addition to picking the early stopping point based on the smallest validation error.
This enables us to pick λ that gives rise to a generalizing model f λθ , ϕ λ , while being most robust to distributional shift.
This still leaves a user-defined margin ε as a free parameter, but we find that it is comparatively insensitive and can be selected heuristically, as we show in our experiments in Section 5.2.
Formally, this procedure corresponds to solving the following optimization:
[Equation]
Finally, for a more formal explanation of the soundness of this strategy, we note that applying
Equation 6 provides a tight lower bound on the ground truth objective value in Proposition 3.2.
Up to statistical error (which decays as |D| increases), the prediction error on a held-out validation set estimates ( ■ ) in Proposition 3.2, and a smaller discrepancy (i.e., disc H ≤ ε ) controls the ( ⋆ ) term in Prop. 3.2.
ε stat is statistical error, and ε F , Φ only depends on the function classes involved ( F , Φ ).
This tuning λ per Equation 6 can be justified as aiming to maximize a lower bound on J ( µ O PT ) .
The practical implementation is in in Appendix C.3.
In Section 5, we validate this offline tuning strategy, both against other alternative offline strategies for tuning I OM as well as offline strategies for tuning prior methods (COMs [44] and gradient descent [43]).
We find that our offline tuning strategy performs comparably to full online tuning without needing any online queries, whereas other strategies for I OM and other methods, lead to significantly poor performance compared to online tuning.
Experimental Evaluation
The goal of our empirical evaluation is to answer the following questions: (1) Does I OM outperform prior state-of-the-art methods for data-driven model-based optimization?
(2) Is our offline tuning strategy for I OM better than other offline tuning strategies for I OM or other prior methods?
(3) How sensitive is I OM to the choice of the hyperparameter λ ?
In this section, we will answer these questions via a comparative evaluation of I OM on several continuous data-driven design tasks from the standard tasks from the Design-Bench suite [43].
5.1 Empirical Evaluation on Benchmark Tasks
We compare I OM to a variety of prior methods for model-based optimization: CbAS [6], Autofocused CbAS [9] and MINs [23] that utilize generative models for constraining distributional shift; COMs [44] and RoMA [49] train robust models of the objective function by via conservatism and smoothness, respectively; gradient-free optimization methods such as REINFORCE [46], CMAES [15] and conventional Bayesian optimization BO-qEI [47].
We also compare the standard approach of learning a naïve model of the objective function, which is then optimized via gradient ascent.
To better understand the benefits of enforcing invariance, we also compare I OM to I OM -C, which additionally applies a conservatism term on top of invariance that pushes up the learned values of designs in the dataset.
Additionally, we add a prior method that optimizes designs against a lower-confidence bound estimate computed using a Gaussian process posterior in Appendix C.4.
Tasks.
We evaluate on four tasks with continuous-valued input space from the Design-Bench [43] benchmark for offline model-based optimization (MBO).
More details about these tasks can be found in Appendix C.
Evaluation protocol.
Following prior work [43, 44, 49, 10], for each method, we query the learned model to obtain the top performing N points, i.e., x 1 , x 2 , · · · , x N .
We report the maximum objective value among these N samples.
This protocol reasonably reflects a real-world design process, where a number of computationally produced designs are tested and the best one is used for deployment.
Hyperparameter tuning.
For fair comparison against prior methods studied in Trabucco et al.
[43], we follow the uniform tuning strategy for reporting results in this section: we run I OM on each task for a given set of λ values, and pick a single value of λ across every task.
Note that this does require access to online evaluation, but prior works do use the same protocol.
We will evaluate the efficacy of our offline tuning approach in Section 5.2 extensively.
Results.
Following the convention proposed by Trabucco et al.
[43], we evaluate all methods in terms of normalized score (higher is better).
In Figure 2 (left), we show the median and interquantile mean (IQM) [1] for the aggregated scores across all tasks.
Due to space limits, we only report the scores for the top-performing baselines (See Appendix C for the results for all baselines).
I OM significantly outperforms all of the prior methods, including state-of-the-art methods that employ conservatism, such as COMs [44].
This indicates that invariance alone (I OM ) can effectively handle distribution shifts and avoid over-estimation for out-of-distribution actions.
Additionally, a comparison between the performance of I OM and I OM with conservatism (I OM -C) suggests that adding conservatism does not improve performance further.
This further corroborates the fact that invariance is effective in preventing the optimizer from going out of distribution and conservatism is not needed.
That said, we would like to clarify that this result does not mean that invariance will always be better than conservatism on any given offline MBO problem.
In order to understand why I OM outperforms COMs on these tasks, we examine the in-distribution validation error of I OM and COMs in Appendix E and find that I OM learns less distorted functions that generalize better.
5.2 Analysis of the Offline Workflow for Tuning I OM
We will now present experiments to understand the effectiveness of our offline tuning scheme (Section 4) for tuning I OM .
It is important to highlight that, in general, offline tuning presents significant challenges for MBO.
Prior works in bandits and reinforcement learning [52] have suggested that offline tuning should not work at all and, to the best of our knowledge, no prior work in offline MBO has proposed a principled and effective offline tuning method.
In this section, we empirically validate our tuning strategy in comparison to other potential strategies, and compare results from our approach to an oracle strategy that uses online evaluation of the true function.
Comparisons.
We compare our offline tuning strategy to various offline strategies: (1).
only tunes
I OM based on validation-set prediction error, analogous to supervised learning (called “prediction error only”); (2).
a strategy that tunes I OM based on only the value of the invariance regularizer (called “invariance only”); (3).
a method that utilizes our tuning strategy for picking λ , but not for picking the checkpoint (“uniform checkpoint selection”) and two offline tuning strategies for tuning other prior methods: (a) tuning COMs [44] using validation-set prediction error (called “prediction error only”), conservatism loss (called ”conservatism loss only”) and both prediction error and conservatism loss, one by one (called “two-step tuning”); and (b) tuning an objective model trained via gradient ascent [43] using validation MSE error (“gradient ascent”).
We report the drop in performance relative to the corresponding oracle online strategy that actually computes the “groundtruth” values of optimized designs in the simulator to choose hyperparameters in hindsight, i.e., the relative drop in performance of the method (I OM , COM, grad.
ascent) when tuned offline using the particular strategy compared to oracle tuning for the same method.
Results.
We present our results in Figure 3 (right) comparing the efficacy of various tuning schemes across various methods averaged over all tasks.
While offline tuning does lead to a reduction in performance compared to oracle online tuning, we find that the drop is smallest for our offline tuning strategy applied to I OM .
All other tuning strategies based on either only prediction error or the invariance regularizer lead to worse performance.
This indicates that our tuning strategy is effective in tuning I OM .
Furthermore, offline tuning strategies that utilize a validation set with prior methods, such as COMs and gradient ascent, also lead to a significant decrease in performance relative to the oracle.
This is quite appealing as it suggests that I OM is more amenable to offline tuning strategies relative to prior offline MBO algorithms.
Even if these prior methods can perform well when provided access to online evaluations, they might start to fail in real-world MBO problems when one needs to tune them fully offline.
We discuss computational complexity of tuning the methods in Appendix E.
Ablation analyses.
Next we aim to study the sensitivity of our offline tuning strategy with respect to the non-rigorous, user-specified parameter ε in Equation 6 and checkpoint selection based on the validation prediction error.
Figure 2 (right) shows the offline tuning performance heatmap for all tasks (along their aggregated performance in the bottom row) under different choice of quantiles (where quantile x % means the top x % of the models according to the value of the invariance regularizer, and the given value of ϵ were chosen).
The color in each position of the matrix corresponds to the ratio of performance of our offline tuning strategy for a given quantile value, compared to that of uniform oracle tuning.
As shown in the bottom row, aggregated over all tasks, we can see our offline selection strategy is quite robust to the hyperparameter ϵ .
Figure 3 (left) evaluates the efficacy of our checkpoint selection strategy, we plot the objective value J ( µ O PT ) attained as a function of the number of training epochs (i.e., checkpoints), alongside the values for the prediction MSE in the validation set for the corresponding epochs.
The checkpoints selected by our early stopping scheme are shown via the vertical line.
Observe that indeed the checkpoint for the lowest validation MSE corresponds to a rather good optimized distribution µ O PT for different tasks, no matter the optimal training epochs happen at the beginning or near the end, which validates our early stopping strategy.
More detailed results showing the efficacy of early stopping for both I OM can be found in Appendix C.4.
Discussion
In this work we study offline data-driven model based optimization (MBO), where the goal is to produce optimized designs, purely using a static dataset.
We proposed to view offline MBO through the lens of domain adaptation, and proposed a method that trains a model of the objective with an additional regularizer to promote invariance between the representations learned by the model in expectation under the training data distribution and the distribution of optimized designs.
We show that this leads to a practically effective data-driven optimization method, and an appealing workflow for selecting the hyperparameters with offline data.
Our method outperforms prior approaches, which illustrates the practical benefits of invariance.
We also validate the effectiveness of the accompanying tuning strategy.
While we evaluate our method on MBO problems, our approach can in principle also be extended to contextual bandits and even to, sequential reinforcement learning.
But we admit that there might be some limitations: (1) fully data-driven offline optimization may on its own be insufficient (due to limitations of staying close to the dataset, hardness of tuning) and inevitably will require access to online evaluation.
(2) a full understanding of theoretical conditions when invariance can outperform conservatism is important, but out of the scope of this work. Acknowledgements
We thank Brandon Trabucco and Xinyang Geng for help in setting up the Design bench and COMs codebases.
We thank anonymous NeurIPS reviewers, members of the RAIL lab at UC Berkeley and
Amy Lu for informative discussions, suggestions and feedback on an early version of this paper. This research was supported by the Office of Naval Research, C3.ai and Schmidt Futures and compute resources from Google cloud. AK is supported by the Apple Scholars in AI/ML PhD fellowship. A Proofs of Theoretical Results
In this section, we will provide proofs of the various theoretical results from Section 3.3.
We will first discuss the assumptions and technical conditions we use, then prove the lower bound result from
Proposition 3.2 and finally utilize it to prove the performance guarantee for invariant representation learning (Proposition 3.3).
Before diving into the proofs, we first recall the set of assumptions and technical conditions below:
A.1 Assumptions, Technical Conditions and Lemmas
Recall that our proofs operate under the following assumptions:
• ε -realizability:
For any distribution π over designs, there exists a representation ϕ ∈ Φ and a g ∈ F such that min ϕ,g max π ∈ Π E x ∼ π [ | f ( x ) − g ( ϕ ( x )) | ] ≤ ε F , Φ .
• ∀ f ∈ F , || f
|| ∞ < ∞ .
• ∀ f ∈ F , ||
f || L ≤ C .
Additionally, we will also define statistical error that will appear in the bounds:
[Equation]
We will use some helpful Lemmas that we list below, which can be proven using standard results from empirical risk minimization and concentration inequalities [45].
Lemma A.1 (Concentration of expected function values) .
For any given f ∈ F satisfying the assumptions above, and any given distribution π over designs X , let J f ( π ) :
=
E x ∼ π [ f ( x )] .
Then, given a set of N samples, x 1 , x 2 , · · · , x N ∼ π , the empirical mean (cid:98) J f ( π ) = 1 N (cid:80) Ni =1 f ( x i ) converges to J f ( π ) such that, with high probability ≥ 1 − δ ( c 0 is a universal constant),
[Equation]
Building on Lemma A.1, we now bound the empirical risk and the population risk of a given loss function L ( f ) at the empirical risk minimizer using a standard uniform concentration argument:
Lemma A.2 (Concentration of empirical risk minimizer) .
Given any bounded, Lipschitz loss function,
L and for a given f ∈ F , let, L ( f ) :=
E x ∼ µ data
[ L ( f, x )] , and let the corresponding empirical loss function be denoted by: (cid:98) L ( f ) :
= 1 |D| (cid:80) i
L ( f, x i ) .
Then, with high probability ≥ 1 − δ ,
[Equation]
Finally, we discuss a technical condition that will be required to prove Proposition 3.2.
We consider the following “continuity” property of the function class F with respect to a loss function that is a mixture of two loss functions:
Definition A.3 (Continuity of F with respect to L λ .) .
We say that a function class F is continuous with respect to a given loss function L λ ( f ) :
=
L 1 ( f ) + λ L 2 ( f ) , where λ ∈ R
+ is a hyperparameter, when the following holds: denoting f λθ :=
inf f ∈F
L λ ( f ) , the lim λ → 0 f λθ exists, and corresponds to a minimizer of L 1 ( f ) :
[Equation]
( f ) .
Definition A.3 formalizes the intuition that an addition of the loss L 2 affects the optimal solution in a continuous manner, and does not abruptly change the solution.
We would expect such a criterion to be satisfied when optimizing smooth loss functions (e.g., squared error) over parameters dictated by a neural network, with appropriate explicit regularization (e.g., ℓ 2 regularization on parameters) or when the training procedure smoothens the solution using some form of implicit regularization.
We will assume that the function class obtained by composing F and Φ , F ◦ Φ , obeys the continuity assumption with respect to the training objective in Equation 3.
Concretely, in this case L 1 and Lare given by: L 1 ( f, ϕ ) =
E x ,y
[( f ( ϕ ( x ))
− y ) 2 ] and L 2 ( f, ϕ ) =
disc H ( P π ( ϕ ( x )) , P µ data ( ϕ ( x ))) , and both of the loss functions are smooth with respect to the functions ϕ
and f .
In our experiments, we utilized a square loss for the discrepancy disc H , and therefore, it is smooth.
Definition A.3 in this case would reduce to the following condition:
Assumption A.
(Definition A.3 applied to F ◦ Φ .) .
For any given threshold δ ∈ R such that | λ | ≤ δ , there exists a non-decreasing function ζ : R + → R + of λ such that, ζ (0) =
and ||
f λθ ◦ ϕ λθ − f ∗ ◦ ϕ ∗ || ∞ ≤ ζ ( λ ) for some ( f ∗ , ϕ ∗ ) ∈ arg inf f ∈F ,
ϕ ∈
Φ L 1 ( f, ϕ ) .
Essentially, Assumption A.4 suggests that if we can utilize an appropriately chosen value of λ , then we can roughly match the solution obtained by just minimizing L 1 , which is the prediction error in our case.
This would allow us to control the discrepancy of a solution obtained by only optimizing the prediction error.
A.2 Proof of Proposition 3.
Proposition A.5 (Lower bounding the value under π .) .
Under the assumptions and criteria listed above, the ground truth objective for any given π ∈ Π can be lower bounded in terms of the learned objective model f θ ∈ F and representation
ϕ ∈ Φ , with high probability ≥ 1 − δ as:
[Equation]
where C F and ε ′F ,ϕ are universal constants that only depend on the function class F , Φ and other universal constants associated with the loss functions, and ε stat is a statistical error term that decreases as the dataset size |D| increases.
Proof.
Our high-level strategy would be to first decompose the terms into different components, and bound these components separately.
We begin with the following decomposition:
[Equation] [Equation]
Note that term (a) exactly corresponds to the first term ■ = J ( µ data ) − J θ ( µ data ) in the expression in the proposition.
To obtain the rest of the terms, we will now lower bound the remainder ∆( π, µ data ) .
First note that we can rearrange this term into a more convenient form:
[Equation]
Term (i) in the above equation can directly be bounded to give rise to one of the terms that contributes to the discrepancy term the bound as shown below:
[Equation]
where the second step (Equation 16) follows by reparameterizing the first step (Equation 15) in terms of the representation z :
= ϕ ( x ) and applying probability density change of variables simultaneously with the change of variables for integration, which leads to a cancellation of the Jacobian terms.
P µ data ( ϕ ( x )) denotes the probability distribution of the representations ϕ
( x ) when x ∼ µ data ( x ) , and P π ( ϕ ( x )) denotes the probability distribution of the representation ϕ ( x ) when x ∼ π ( x ) .
The last step follows from the fact that the discrepancy measure, disc H ( p, q ) , which is an integral probability metric (IPM) [42], upper bounds the total-variation divergence between p and q .
Now we tackle term (ii).
First note that under the ε -realizability assumption, we note that there exists a g ∈ F , ϕ ∗ ∈
Φ such that f ( x ) ≈ g ( ϕ ∗ ( x )) in expectation under µ data and π (Assumption 3.1 holds for any distribution Π ).
That is,
[Equation]
where the second step follows from the Lipschitzness of F and the third step follows similar to
Equation 17.
Finally, we will show that for an appropriately chosen λ > 0 , disc
[Equation]
[Equation]
[Equation]
x ))) is close to disc H
( P π ( ϕ ( x )) , P µ data ( ϕ ( x ))) .
Applying Assumption A.4, we get that, for any given λ , there exists a ζ such that:
[Equation]
where the second step follows from the fact that the loss functions, L 1 and L 2 (in this case, disc H and ( · ) 2 ) are smooth functions of their arguments, and C L 2 :
=
C H is the coefficient of smoothness when L 2 = disc H .
Thus, we get that:
[Equation]
Finally, we need to bound disc H ( P π ( ϕ λ ( x )) , P µ data ( ϕ λ ( x ))) in terms of the discrepancy value for the ϕ learned during training.
Note that ϕ is obtained by minimizing the objective in Equation 3, which is the sample-based version of the objective used for obtaining f λ .
Using the uniform concentration argument from Lemma A.2, we can upper bound L ( f λ , ϕ λ ) in terms of L ( f θ , ϕ ) :
[Equation]
Now, we can use the above relationship, alongside bounding ( f θ ( x ) − y ) 2 ≤ B 0 (which holds since the function is bounded):
[Equation]
[Equation]
where ζ → 0 as λ → 0 .
Now, we can minimize the right hand side w.r.t.
λ and obtain the desired result:
[Equation]
where ε ′F , Φ = ε F , Φ + h ( B 0 , C H ) , where h ( · ) is a bias that is a property of the loss functions, the function classes F and Φ , and the discrepancy metric.
It does not depend on the learned functions f θ , ϕ learned or the distribution π .
This completes the proof.
Remark A.6 ( The interplay between λ 0 , F and Φ . ) .
In the proof above, we appeal to the continuity assumption (Assumption A.4) to enable us to bound the discrepancy measured in terms of the representation ϕ ∗ with respect to ϕ , and this requires adjusting λ .
This is unavoidable in the worst case if the function classes F and Φ are arbitrary and do not contain any solution ϕ ∗ that attains a small training error, while being somewhat invariant.
In such cases, the only way to attain a lower-bound is to not be invariant, and this is what our bound would suggest by setting λ to be on the smaller end of the spectrum.
On the other hand, if the function class is more expressive, such that there exists a tuple ( f ∗ , ϕ ∗ ) that minimizes L 1 ( f, ϕ )) while being invariant, i.e., L 2 ( f ∗ , ϕ ∗ ) is small, then we can loosen this restriction over λ .
A.3 Proof of Proposition 3.
Proposition A.7 (Performance guarantee for I OM ) .
Under Assumption 3.1, the expected value of the ground truth objective under µ O PT , J ( µ O PT ) is lower bounded by:
[Equation]
We restate the proposition above.
There is a typo in the main paper, where the term ε ′F , Φ got deleted from the bound when moving from Proposition 3.2 to 3.3.
The above restatement of Proposition 3. provides the complete statement.
Proof.
To prove this proposition, we can utilize the result from Proposition A.5, but now we need to reason about a specific π = µ O PT , where µ O PT depends on the learned f θ and ϕ .
To account for such a π , we can instead bound the improvement J ( π ) − J θ ( π ) for the worst possible π ∈ Π .
While this does not change any term from the bound in Proposition A.5 that depends on the properties of the function class F or the representation class Φ , this would still affect the statistical error, which would now require a uniform concentration argument over the policy class Π .
Therefore, the bound from
Proposition A.5 becomes:
[Equation]
where ε stat is given by:
[Equation]
The term ε 2 stat in the statement is a higher order term and is always dominated by ε stat .
Rearranging the terms completes the proof.
A.4 Extension to any re-weighting of the dataset
In this section
[Equation]
we will extend the theoretical result to compare the performace of the optimized design to the average objective value of any re-weighting of the dataset, and this by definition covers the comparison against the best design in the dataset.
To do so, note that Proposition A.5 can be restated when comparing to µ r , a distribution induced by any specific re-weighting of the training dataset.
This reformulation would give the following bound on the error:
[Equation]
Since
[Equation]
the choice of µ r is arbitrary (i
[Equation]
e.
[Equation]
it can be any arbitrary weighting of the dataset distribution µ data )
[Equation]
we can now basically compute the tighest lower bound by maximizing the RHS with respect to the choice of µ r .
This would amount to:
[Equation]
where T denotes the set of distributions that arising from all possible re-weightings of the training data.
For the special case when µ r simply corresponds to a Dirac-delta distribution centered at the best point in the training dataset, which we will denote as x best , and µ r =
δ x = x best , we can write down the bound as:
[Equation]
When converting Equation 29 to a performance guarantee, note that ε stat , which is used to bound the discrepancy disc H in Equation 29 would not decay as the size of the dataset |D| increases, as our reference point is just one single point x best in the dataset.
That said, note that as the dataset size increases, the groundtruth value of x best shall also increase which would tighten the RHS of
Equation 29 as the dataset size increases.
Therefore, our bound presents a tradeoff: when comparing J ( µ O PT ) to the average value of the dataset
J ( µ data ) , we can attain favorable guarantees that guarantee improvement as the dataset size increases because the statistical error reduces, and on the other hand, when we compare J ( µ O PT ) to f ( x best ) , the statistical error may not decay as the dataset size increases, however, the function value f ( x best ) will increase.
In summary, our bound in either case is expected to improve as the dataset size increases.
Remark: Proposition 3.3 is inspired from theoretical results in offline reinforcement learning, where it is common to lower bound the improvement of the learned policy over the behavior policy (see for example, works on “safe policy improvment” [28, 39, 25, 51, 8]).
When comparing to the best point in the dataset, or equivalently, the best in-support policy in the case of reinforcement learning, the bounds would inevitably become weaker, since it is not clear if any offline MBO or offline RL algorithm would improve over the best point in the dataset, in the worst-case problem instance.
We have added this as a limitation of the theoretical results, but would remark that this limitation is also existent in other areas where one must learn to optimize decisions from offline data.
Nevertheless, our empirical results do show that I OM does improve over the best point in the dataset, as shown in
Table 3.
B Related Work
Model-based optimization (MBO) or black-box optimization [6, 3, 41, 40, 33, 49] has been studied widely in prior works. Among these works, the central challenge is in handling the distributional shift that arises between the distribution of designs seen in the dataset and those taken by the optimizer [6, 9, 23]. For methods that learn a model, this typically manifests itself as model exploitation , where the optimizer can find out-of-distribution designs for which the model erroneously predicts good values, analogously to adversarial examples.
This distributional shift is distinct from what is studied in prior works that tackle misspecification in GPs and bandits [34, 35, 21] or methods that tackle robustness across contexts [22] in the online setting.
To address distribution shift, several recent works have proposed to be conservative.
This is majorly the case in other decision-making problems such as offline reinforcement learning (RL) [30] and contextual bandits [36], where instead of optimizing for a design, we must find the optimal action at each state.
In offline MBO, prior works have tried to be conservative in two different ways: either by constraining the optimized designs to lie close to the training designs [6, 9, 23, 37, 24] using generative models [20, 12], or by learning a conservative [44, 26, 25] or calibrated [10, 49] learned model.
While the latter class of methods has worked well in practice [43, 26], these methods can sometimes be overly conservative and are quite sensitive to hyperparameters.
Sensitivity to hyperparameters is acceptable as long as one can attain good performance using reasonable offline tuning strategies, without accessing the groundtruth function, but we find in our experiments (Section 5.2) this is not easy for conservative methods.
On the contrary, I OM not only does not require a generative model over the design space, which can be intractable with high-dimensions (e.g., 5000-d designs in
HopperController), but also attains better performance and provides a convenient tuning rule.
In this work we formulate data-driven model-based optimization as domain adaptation [4, 11], and derive algorithms for model-based optimization from this perspective.
This perspective has been used to devise decision-making methods for treatment effect estimation [18, 19, 48] and off-policy evaluation in RL [31, 29].
While these prior works do use an invariance regularizer, they primarily focus on obtaining more accurate estimations, whereas our goal is to utilize invariance to combat distributional shift during optimization.
Thus, our usage of invariant representations is tailored towards the optimizer, instead of aiming for accurate predictions everywhere like these prior works, which is impossible in general.
Furthermore, our analysis uses invariant representations to derive procedures for tuning and early stopping, while these prior works do not explore these perspectives.
C Experiment Details C.1 Tasks and Datasets
Tasks.
We provide brief description of the tasks we use for our empirical evaluation and the corresponding evaluation protocol below.
More details can be found be found at Trabucco et al.
• The Superconductor task aims at optimizing the superconducting materials which achieves high-critical temperatures.
The original features are vectors containing specific physical properties, such as the mean atomic mass of the elements.
Following prior work [43], we utilize the invertible input specification by representing different superconductors via a serialization of the chemical formula.
The objective y is the critical temperature the resulting material could achieve.
Here, we have x ∈ R 86 and y ∈ R + .
The original dataset in Design-Bench has 21263 samples in total.
However, following prior work [44, 43, 49], we remove the top 20% from the dataset to increase the difficulty and ensure the top-performing points are not visible during learning stage.
Evaluation : To evaluate the performance of any given design, we use the oracle function provided in design-bench, which trains a random forest model (with the default hyper-parameters provided in [14]) on the whole original dataset.
• The Ant and D’Kitty Morphology task aim at designing the morphology of a quadrupedal robot such that the robot could be crawl quickly in certain direction.
The Ant/D’Kitty task corresponds to the Ant/D’Kitty robot that used as the agent.
Specifically, the input is the morphology of the agent with the objective value is the average return of the agent that uses the optimal control tailored for the morphology.
More details about the controller design could be found at Trabucco et al.
For the dimension of the design/feature space, we have x ∈ R 60 and x ∈ R 56 for D’Kitty.
The original dataset contains 25009 samples for both Ant and D’Kitty.
Following prior work [44, 49], we remove the 40% of top-performing samples and use the rest as the new dataset.
Evaluation : To evaluate any given morphology, it is passed into the MuJoCo Ant or D’Kitty environment, and a pre-trained policy is used (trained using Soft Actor-Critic for 10 million steps), the sum of rewards in a trajectory is used as the final score.
• The Hopper-Controller task aims at designing a set of weights of a particular neural network policy that achieves high return for the MuJoCo Hopper-v2 environment.
Basically, the policy architecture is a three-layer neural network with 64 hidden units and 5126 weights in total with the algorithm is trained using Proximal Policy Optimization [38] (with default parameters provided in Hill et al.
Specifically, the input is a vector of flattened weight tensors, with x ∈ R 5126 , the objective is the expected return from a single roll-out using this specific policy, with y ∈ R .
In the original dataset from Design-Bench, we have 3200 data points, and we do not discard any of them due to limited size of the dataset.
Evaluation: To evaluate the design of a specific set of weight, which deploy PPO policy with this set of weight, and the sum of rewards of 1000 steps are collected using the agent, as the final score.
Dataset.
For each task, we take the training dataset from design-bench, and in addition, randomly split it into training and validation with the ratio 7:3.
The information of the original dataset is given in Table
[Table]
[Table]
C.2 Baseline Descriptions
In this section [Table] we briefly introduce the baseline methods for model-based optimization in an algorithmic level, all the implementation details for the baselines are referred to Trabucco et al.
• CbAS [6] trains a density model via variational auto-encoder (VAE).
Basically at each step, it updates the density model via a weighted ELBO objective which move towards better designs, which estimated by a pre-trained proxy model
ˆ f ( x ) ; then generating new samples from the updated distributions to serve the new dataset, and repeated this process.
• Anto.
CbAS [9] is an improved version of the CbAS.
For CbAS, it uses the fixed pre-trained proxy model
ˆ f ( x ) all the time, to guide the distribution towards the optimal one.
However, the proxy model will suffer from distributional shift as the density model changes.
Hence, Auto.
CbAS corrects the distributional shift by re-training the proxy model under the new optimized density model, via importance sample weights.
• MINs [23] learns an inverse mapping f − 1 from the objective value y to the corresponding design x .
The inverse map is trained using the conditional GAN.
Then it tries to search for the optimal y value during the optimization, and the optimized design is found by sampling from this inverse map.
• COMs [44] learns a conservative proxy model
ˆ f ( x ) .
Compared with the vanilla gradient ascent, COMs augments the regression objective with an additional regularization term which aims to penalize the over-estimation error of the out-of-distribution points.
The final optimal designed point is found by performing gradient ascent on this learned proxy model.
• RoMA [49] tries to overcome the brittleness of the deep neural networks that used in the proxy model.
Basically, the method is a two-stage process, with the first stage is to train a proxy model ˆ f with Gaussian smoothing of the inputs, and the second stage is to update the solution while simultaneously adapt the model to achieve the smoothness in the input level for the current optimized point.
• BO-qEI
[47] refers the Bayesian Optimization with quasi-Expected Improvement acquisition function.
The method tries to fit the proxy model ˆ f , and maximizing it via Gaussian process.
• CMA-ES [15] refers the covariance matrix adaptation.
The idea is to maintain a Gaussian distribution of the optimized design.
At each step, samples of designs are drawing from the Gaussian distribution, and the covariance matrix is re-fitted by the top-performing designs estimated by a pre-trained proxy model
ˆ f ( x ) .
• Grad./Grad.
Min/Grad.
Mean [44] are a family of methods that use gradient ascent to find the optimal design.
All of them require a pre-trained proxy model.
For Grad.
, the proxy model is trained by minimizing the L 2 norm of ˆ f ( x ) and the ground-truth value y .
For Grad.
Min, it learns 5 different proxy models, and use the minimum of it as the predicted value.
For Grad.
Mean, it uses the mean of the 5 models.
In the optimization stage, gradient ascent on the proxy model is used to find the optimized point.
• REINFORCE [46] pre-trains a proxy model
ˆ f ( x ) and use the policy gradient method to find the optimal design distributions that maximizes the ˆ f ( x ) .
C.3 Implementation Details
For all the baseline methods, we directly report performance numbers associated with DesignBench [43].
Below, we now discuss implementation details for the method developed in this paper,
I OM .
Our implementation builds off of the official implementation of COMs, provided by the authors Trabucco et al.
Data preprocessing.
Following prior work [44], we perform standardization for both the input x and objective value y before training the objective model (cid:98) f .
Essentially, we standardize x to ˜ x := x − µ x σ x , with µ x and σ x stands for the empirical mean and variance for x , similarly for ˜ y with ˜ y :
= y − µ y σ y .
Neural networks representing (cid:98) f and ϕ .
We parameterize the learned model (cid:98) f and the representation ϕ ( · ) ∈ R 64 using three hidden layer neural networks, that assume identical architectures for all the tasks.
The representation network, ϕ η ( x ) is a neural network with two hidden layers of size 2048, followed by Leaky ReLU (using default leak value of 0.3).
The representation is of size 128 .
In some preliminary experiments, we observed that our method, I OM was pretty robust to the dimension of the representation, so we simply chose to utilize 128 -dimensional representations for all the task, with no tuning.
For the network representing (cid:98) f , we utilize a neural network with two hidden layers of size 1024, followed by Leaky ReLU (using default leak 0.3), the output is a 1-dimensional scalar used to predict the value y . We utilize the χ 2 -discrepancy, disc H in our experiments: disc ϕ ( p, q ) : = χ 2 ([ ϕ ( x )] x ∼ p , [ ϕ ( x )] x ∼ q ) .
This divergence can be instantiated in its variational form via a least-squares generative adversarial network (LS-GAN) [32] on the representations ϕ ( x ) . Concretely, we train an LS-GAN discriminator to discriminate between the representations ϕ ( x ) under the training distribution µ ( x ) and the optimized distribution µ O PT ( x ) , whereas the feature representations under these distributions are optimized to be as invariant to each other as possible. We also evaluated a variety of discrepancy measures, including the maximum mean discrepancy (MMD) [13], but found the χ 2 -divergence to be the best performing version across the board. Hyperparameters.
We utilize identical hyperparameters for all tasks, and these hyperparameters are taken directly from the implementation of Trabucco et al.
For training the learned model f θ ( ϕ ( · )) , we use Adam optimizer with default learning rate 0 .
001 and ( β 1 , β 2 ) =
The batch size is 128 and the number of training epochs is 300.
For training the representation network, the optimizer is Adam with learning rate 0.0003 and default ( β 1 , β 2 ) =
We represent µ O PT as a non-parameteric distribution represented by 128 particles, initialized fromrandomly sampled inputs x in the dataset.
We then alternate between performing one gradient step on µ O PT and one gradient step on f θ and ϕ .
To select a value for the hyperparameter λ (weight for the invariance regularizer term), we run our method with a wide range of λ values Λ = { 0 . 1 , 0 . 5 , 1 . 0 , 2 . 0 , 5 . 0 , 10 . 0 , 100 . 0 } .
In the main experimental results we report, following the convention in prior work [43], we choose λ to be uniform across all tasks, but λ is chosen via online evaluation.
For our tuning procedure, we apply our tuning procedure where we keep the top 45% models which achieve a discriminator loss closes to 0.25, and select the one with the smallest validation prediction error among it .
We perform an ablation of this strategy and the quantile of models that are kept in Section 5.2.
For the I OM -C variant we show in our experiments, we set the initial value of the Lagrange multiplier α = 0 .
3 –and this value is taken directly from Trabucco et al.
[44]–and update it using Adam optimizer with learning rate 0.01.
Offline Hyperparameters tuning When implementing this procedure in practice, we must first select the value of ε .
For obtaining perfect invariance, the value of ε must be equal to 0.25 (when the discriminator is trained using a χ 2 -divergence least-squares GAN objective), and therefore, ε must be set close to 0.25.
However, in practice, instead of selecting ε , we can select a fraction of all possible λ values that pass the filter.
In our experiments, we sort the runs based on the absolute difference between the value of invariance regularizer (i.e., the discriminator training objective) and 0.5, and let the top 15% (top 3 out of the 7 λ values we tune on) of the runs be selected for the second step.
We release the code for our method along with additional details at the following anonymous website: https://sites.google.com/view/iom-neurips .
C.4 Overall Performance Comparisons
In Table 3, we provide the comparison of I OM and I OM -C with all baselines (including RoMA).
To understand the trend in aggregated results, please check the plots in Figure 4.
D Additional results for early stopping the optimization of µ O PT
We provide additional results for the effectiveness of our tuning strategy for early stopping.
Results for the additional two tasks are presented in Figure 5.
The top row shows the objective value of the optimized point as a function of the number of training epochs, and the bottom row shows the prediction error on the validation set.
We use the vertical line to denote the point with the smallest
MSE by our early stopping strategy.
Among all tasks, our strategy is able to find a good checkpoint and this verifies the efficacy of our approach on different domains. [Table]
D.1 Performance of I OM and I OM -C under different invariance regularizer λ
In this section [Table] we provide the final performance of I OM and I OM -C, under different values of the hyperparameter λ used for training (Equation 4).
Results for all tasks are displayed in Figure [Table]
As is the case with any other prior method for data-driven decision making that adds a regularizer, both I OM and I OM -C are also sensitive to the hyper-parameter λ , which demonstrates the necessity of our proposed tuning scheme.
And fortunately, as observed in Section 5, our tuning scheme can indeed attain good performance, for many choices of the ϵ (see Figure 3), making it easier to tune this hyperparameter λ in practice.
E Additional Results
Computational cost of tuning I OM via our offline workflow.
In order to tune I OM via our offline workflow we first run I OM with multiple different hyperparameters.
Concretely, in our experiments, we use 7 different hyperparameters, and then apply our offline tuning strategy, which only utilizes the loss values of the various runs, without incurring any significant computational cost of its own.
Thus, our hyperparameter tuning strategy does not incur additional computational cost.
When it comes to the cost of running I OM , we expect that beyond implementation differences, the cost of running I OM should not be significantly worse than COMs: the only additional component trained by
I OM is the discriminator that is used to compute the χ 2 -divergence on the representation, which in our implementation only adds 2 more fully connected layers.
COMs lead to worse training prediction error and more non-smooth functions compared to I OM .
Next we attempt to gain insights into what might explain why I OM outperforms COMs in several of our tasks.
We suspect that this is because applying a conservatism regularizer on the learned function value itself, like COMs [44], does in fact distort the learned objective function more than
I OM .
To understand if this is the case empirically, we plot two quantities: (a) the value of the training prediction error:
E x ,y ∼D (cid:104) ( (cid:98) f
θ ( x ) − y ) 2 (cid:105) for the best hyperparameter for COMs and I OM in Figure 7, and (b) the “smoothness” of the learned function w.r.t.
input, measured via the norm of the gradient of f θ with respect to x , i.e., E x ∼D (cid:2)
||∇ x f θ ( ϕ ( x ) || 22 (cid:3) in Figure 8.
Observe that in both the Ant
Morphology and Hopper Controller tasks, I OM is able to minimize the prediction error better than
COMs, and the gradient norm for COMs is strictly higher than I OM indicating that conservatism on learned function leads to more non-smooth functions and reduces the ability of the learned function to fit the offline dataset. F Intuition Behind How I OM Works