arXiv:2610.07475cs.LGOct 2026

Manuscript Offprint

arXiv:2610.07475

Adapting to Changes in Agent Behavior via Finite-Depth Policy Sensitivity

Lan Shi, Daigo Shishika, Xuan Wang

Lan Shi, Daigo Shishika, and Xuan Wang

Abstract—Adapting a reinforcement learning policy to changes in another agent's behavior typically requires a large amount of new interaction data. Policy sensitivity provides a first-order prediction of how a locally optimal policy changes with a behavioral parameter, but its computation requires second-order derivatives whose effects propagate across future interactions. We develop a finite-depth framework to estimate this sensitivity by approximating the policy Hessian and mixed derivative using information from a reference environment. The method features an adjustable propagation depth which determines where derivative propagation along the trajectory is truncated. We characterize the derivative contributions omitted by finite-depth propagation and derive truncation-error bounds for the approximated derivatives and resulting policy sensitivity. The bounds are nonincreasing with propagation depth and vanish at full-horizon propagation. Using a belief-driven pursuit–evasion game as a validation scenario, the proposed method generally achieves lower derivative-estimation errors as the propagation depth increases and outperforms the baseline methods in both estimation accuracy and policy adaptation. The sensitivity-based initialization improves zero-shot return over direct transfer, and also shows advantages for the subsequent fine-tuning in the target environment.

I. INTRODUCTION

Reinforcement-learning policies deployed in interactive environments often need to operate with agents exhibiting different behaviors [1]. For example, an autonomous vehicle may encounter drivers with different levels of aggressiveness, while a robotic agent may interact with teammates or opponents following different decision strategies. Because the behavior of an interactive agent may be unknown before deployment, a policy optimized for one behavior may not perform well against another. On the other hand, retraining a policy from scratch for every newly encountered agent can be costly. One approach to efficient policy adaptation is sensitivity-based adaptation, which characterizes how a locally optimal policy changes with respect to a problem parameter. The resulting sensitivity can be used in a first-order prediction to adapt a previously learned policy to a nearby target environment without learning from scratch. However, computing this sensitivity generally requires higher-order derivatives of the expected payoff.

In our setting, rather than directly parameterizing physical dynamics or reward [2], [3], the environmental variation is induced by a change in another decision-making agent's policy. The behavioral parameter therefore affects the transition dynamics experienced by the learning agent through the interactive agent's decisions. Because this effect propagates through subsequent states and the coupled decisions of both agents, a change in the interactive agent can influence the

Figure

Fig. 1: Adaptation to changes in an interactive agent's behavior by finite-depth policy sensitivity estimation.

entire future trajectory. Consequently, estimating these effects from full trajectories can require substantial data, while propagating them through a transition model over the full horizon can be computationally expensive. This motivates the problem studied in this paper: how to efficiently estimate policy sensitivity to changes in an interactive agent's behavior while providing theoretical guarantees on the resulting approximation. Figure 1 illustrates the interaction structure.

Literature review: Existing approaches to policy adaptation under environmental variation include robust reinforcement learning and domain randomization, which train a common policy across a prescribed range of environments or disturbances [4]–[6], and meta-reinforcement learning, which learns an adaptation mechanism from a distribution of related tasks [7], [8]. These approaches rely on training in multiple environments or task variations. In contrast, we consider a policy optimized for a single reference environment and how to adapt it to a particular change in the interactive agent.

Our formulation is closely related to sensitivity analysis and implicit differentiation for parameterized optimization [9], [10]. Differentiable optimization and bilevel-learning methods characterize how an optimizer varies with problem parameters by differentiating its optimality conditions [11]–[13]. Related ideas have also been studied in reinforcement learning. For example, sensitivity arguments have been used to analyze policy-gradient methods [2], [14], while implicit differentiation has been applied in model-based reinforcement learning to differentiate Bellman-optimal value functions with respect to model parameters [15]. Differentiation-based ideas also appear in meta-gradient reinforcement learning, where meta-parameters for training are optimized according to their effect on subsequent performance [16], [17]. In our setting, implicit differentiation characterizes how a locally optimal policy changes with the behavioral parameter of the interactive agent.

Computing this policy sensitivity requires both the policy Hessian and the mixed derivative between the learner's policy parameter and the interactive agent's behavioral parameter. Prior work in reinforcement learning has primarily studied the computation or approximation of policy Hessians for policy optimization [18]. Policy Hessians can be

The authors are with George Mason University, USA.

expressed in terms of trajectory-likelihood derivatives and estimated from sampled trajectories [19]. Higher-order score-function estimators, including DiCE-type methods, provide another trajectory-based route to estimating higher-order derivatives [20]. The work [21] also shows that Hessian-vector products can be estimated from trajectories without explicitly forming the full matrix. Alternatively, when a differentiable transition model is available, second-order derivatives can be obtained by differentiating through the model and propagating derivative information along the state-transition dynamics [13]. These approaches provide two complementary routes: trajectory-based estimation avoids full model propagation but can require many samples, whereas model-based differentiation propagates derivative information through the model but may require propagation over the full horizon. This motivates a finite-depth approximation that combines reference-environment sampling with local model-based derivative propagation. While temporal truncation has also been used in approximate dynamic programming to reduce planning-horizon computation [22], our method retains the boundary value while truncating its parameter-derivative propagation.

Contributions of this paper include: (i) Finite-depth sensitivity estimation. By combining state sampling with local state-transition propagation, we develop a Bellman-based derivative decomposition and a finite-depth approximation of the policy Hessian and mixed derivative. An adjustable derivative-propagation depth T controls how far parameter-derivative effects are propagated through future interactions. (ii) Truncation-error guarantees. We characterize the derivative contributions omitted by finite-depth propagation and derive error bounds for the approximated derivatives and resulting policy sensitivity. The bounds quantify the depth-accuracy tradeoff. They are nonincreasing with propagation depth, and vanish at full-horizon propagation. (iii) Validation. We evaluate the proposed framework in a representative example (a pursuit-evasion game with a behavior-parameterized defender) through numerical studies, including sensitivity-estimation accuracy and adaptation performance.

References (24)