                                        CLARIFY: Contrastive Preference RL for Untangling Ambiguous Queries


                                                   1.0                                                                                                                               1.0
        1.0                                                                                      1.0                                       1.0


        0.8                                        0.8                                           0.8                                       0.8                                       0.8




                                                                                                                                                                                           Normalized Return
        0.6                                        0.6                                           0.6                                       0.6                                       0.6


        0.4                                        0.4                                           0.4                                       0.4                                       0.4


        0.2                                        0.2                                           0.2                                       0.2
                                                                                                                                                                                     0.2

        0.0                                        0.0                                           0.0                                       0.0
                                                                                                                                                                                     0.0
              0.0   0.2   0.4   0.6   0.8   1.0          0.0   0.2   0.4   0.6   0.8   1.0             0.0   0.2   0.4   0.6   0.8   1.0         0.0   0.2   0.4   0.6   0.8   1.0



                    (a) dial-turn                          (b) drawer-open                                   (c) hammer                                (d) walker-walk
Figure 3: Visualizations of the learned embedding spaces under ϵ = 0.5, where segments with high returns (bright color)
and low returns (dark color) are clearly separated into distinct clusters, with a smooth transition between their centers.

In effect, CLARIFY’s objective Lamb provably carves out a                                        sis to explain, available in Appendix A.3. Overall, CLAR-
uniform buffer δ around all distinguishable trajectory pairs,                                    IFY’s framework combines three principles: 1) Margin max-
endowing the learned embedding space with a nontrivial                                           imization for query disambiguation, 2) Convex geometric
geometric margin that enhances robustness and separability.                                      separation for reliable hyperplane decisions, 3) Dynami-
                                                                                                 cally balanced contrastive gradients for stable embedding
Convex geometry of preference signals. The second propo-
                                                                                                 learning. Together, these properties ensure that the learned
sition characterizes how Lquad induces convex separability
                                                                                                 representation is both geometrically meaningful (aligned
in the embedding space. We show that minimizing this loss
                                                                                                 with trajectory values) and algorithmically useful (enabling
directly translates to constructing a robust decision boundary
                                                                                                 efficient query selection).
between preferred and non-preferred trajectories:
Proposition 5.2 (Convex Separability). Assume the positive
and negative samples are distributed in two convex sets C +
                                                                                                 6. Experiments
and C − in the embedding space. Let µ+ = E[z + ] and µ− =                                        We designed our experiments to answer the following ques-
E[z − ] denote the class centroids. If Lquad is minimized with                                   tions: Q1: How does CLARIFY compare to other state-of-
a margin η > 0, then there exists a hyperplane H defined                                         the-art methods under non-ideal teachers? Q2: Can CLAR-
by:                                                                                              IFY improve label efficiency by query selection? Q3: Can
               H = {z ∈ Rd | wT z + b = 0}                                                       CLARIFY learn a meaningful embedding space for trajec-
such that for all z + ∈ C + and z − ∈ C − ,                                                      tory representation? Q4: What is the contribution of each
                                                                                                 of the proposed techniques in CLARIFY?
              ˜ + , H) ≥ η
              d(z                               ˜ − , H) ≤ −η
                                            and d(z
                                                                                                 6.1. Setups
        ˜ H) = (w⊤ b + z)/||w|| denotes the signed dis-
where d(z,
tance from z to H.                                                                               Dataset and tasks. Previous offline PbRL studies often use
                                                                                                 D4RL (Fu et al., 2020) for evaluation, but D4RL is shown
                                                                                                 to be insensitive to reward learning due to the “survival in-
Proof. Please refer to Appendix A.2 for detailed proof.
                                                                                                 stinct” (Li et al., 2023), where performance can remain high
The second proposition characterizes the separability                                            even with wrong rewards (Shin et al., 2023). To address this,
achieved in the embedding space. The centroid separation                                         we use the offline dataset presented by Choi et al. (2024)
µ+ − µ− acts as a global discriminator, while the margin                                         with Metaworld (Yu et al., 2020) and DMControl (Tassa
η ensures local robustness against ambiguous samples near                                        et al., 2018), which has been proven to be suitable for re-
decision boundaries. This result has two key implications:                                       ward learning (Choi et al., 2024). Specifically, we choose
1) The existence of a separating hyperplane H guarantees                                         7 complex Metaworld tasks: box-close, dial-turn, drawer-
linear separability of preferences, enabling simple query                                        open, handle-pull-side, hammer, peg-insert-side, sweep-into,
selection policies (e.g., margin-based sampling) to achieve                                      and 2 complex DMControl tasks: cheetah-run, walker-walk.
high labeling efficiency. 2) The margin η directly quan-                                         Task details are provided in Appendix C.1.
tifies the “safety gap” against ambiguous queries, where                                         Baselines. We compare CLARIFY with several state-of-
any query pair within 2η distance would be automatically                                         the-art methods, including Markovian Reward (MR), Pref-
filtered out as unreliable. This mathematically substantiates                                    erence Transformer (PT) (Kim et al., 2022), OPRL (Shin
our method’s ability to actively avoid ambiguous queries                                         et al., 2023), OPPO (Kang et al., 2023), and LiRE (Choi
during human feedback collection.                                                                et al., 2024). MR is based on a Markovian reward model
To better illustrate the dynamics of the embedding space                                         using MLP layers, serving as the baseline in PT, which uses
of the proposed losses, we provide a gradient-based analy-                                       a Transformer for reward modeling. OPRL leverages reward

                                                                                             6
