Manuscript Offprint
arXiv:2611.09139CARGO: Causal Attribution and Responsibility-Guided Preventive Safe Multi-Agent Reinforcement Learning for Cooperative Driving
ARTICLE INFO
Keywords:
Cooperative autonomous driving
Multi-agent learning
Causal inference
Counterfactual risk attribution
Preventive policy optimization
ABSTRACT
This study presents Causal Attribution and Responsibility-Guided Optimization (CARGO), a multi-agent reinforcement learning framework for cooperative on-ramp merging in mixed traffic. A shared latent-context posterior and an action-conditioned response model estimate directed behavioral influence, with posterior uncertainty propagated into interaction-edge selection. Complementary attribution mechanisms couple signed influence with marginal team utility for cooperative reward shaping and assign responsibility from positive excess tail risk relative to a safe reference policy. Conditional diffusion generates future responses for action-dependent risk estimation. Responsibility-guided preventive optimization calibrates agent-specific risk-reduction requirements to local capacity within a policy trust region, using reserved safety margins, adaptive requirement scaling, and joint feasibility verification. Theoretical analysis establishes risk monotonicity and sufficient local conditions for non-decreasing environmental return under explicit assumptions. Experiments in highway-env across three traffic densities, together with controlled graph-recovery and attribution studies, support the effectiveness of the framework. Under high-density traffic, CARGO increases the success rate by 66.04% and reduces the crash rate by 56.23% relative to the best evaluated baseline for each metric.
1.1. Background and Related Work
Multi-agent reinforcement learning (MARL) supports cooperative driving by learning coordinated vehicle behavior through interaction [1, 2]. In mixed-traffic on-ramp merging, connected and automated vehicles (CAVs) must coordinate with human-driven vehicles (HDVs) under partial observability. A vehicle may decelerate to yield or because of shared downstream congestion, while the vehicle exposed to collision risk need not be its source. Reliable learning therefore requires distinguishing behavioral influence from shared responses, attributing cooperative gains and avoidable risks, and translating attribution into jointly feasible policy corrections.
Interaction modeling. Directed prediction models and learned coordination graphs represent vehicle dependencies and support cooperative decisions [3, 4, 5, 6]. Counterfactual action comparisons and conditional mutual information quantify behavioral influence [7, 8]. Latent-variable inference addresses unobserved factors [9], while multi-head counterfactual estimation supports uncertainty-aware communication graphs [10]. These approaches motivate accounting for both shared context and the reliability of inferred interactions. CARGO propagates uncertainty in a history-inferred shared latent context into directed influence estimates and selects edges using a posterior confidence criterion.
Contribution and responsibility. Counterfactual credit assignment evaluates individual actions against alternative actions or model-generated trajectories [11, 12]. Agent-specific effects and effect decomposition further analyze causal propagation [13, 14]. Influence-based reward shaping can credit an agent for teammates' contributions [15], whereas counterfactual responsibility identifies sources of safety violations or evaluates alternative driving motions [16, 17]. Influence strength alone does not determine team benefit, and incurred cost does not identify avoidable risk caused by an action. CARGO couples signed behavioral influence with marginal team utility and separately attributes positive excess tail risk relative to a safe reference policy.
Safe policy optimization. Shielding and action projection modify behavior before execution [18, 19, 20], while constrained policy optimization regulates learning updates [21, 2, 22]. Safety-aware trust-region geometry and finite-horizon constraint estimation support preventive updates [23, 24]; proactive penalties provide another constraint-handling mechanism [25]. Responsibility-aware controllers allocate collision avoidance or behavioral adjustments
*Corresponding author.
Teng et al.: Preprint
Page 1 of 21
[26, 27, 28], and SafeDiSTL decomposes shared violation costs using temporal-logic robustness and action sensitivities [29]. However, attribution alone does not ensure that differentiated corrections are jointly achievable. CARGO calibrates responsibility requirements to local reduction capacity, then verifies them together with all agents' surrogate safety constraints.
1.2. Contributions
As illustrated in Fig. 1, CARGO connects interaction modeling, complementary attribution, and preventive optimization. Its contributions are:
An uncertainty-aware interaction model that propagates a shared latent-context posterior into influence estimates and confidence-based edge selection.
-
Complementary attribution of cooperative contribution and safety responsibility: signed influence is weighted by marginal team utility, while diffusion-generated responses estimate positive excess tail risk relative to a safe reference policy.
-
Responsibility-guided preventive optimization that calibrates agent-specific risk-reduction requirements to trust-region capacity and coordinates corrections through adaptive scaling and joint feasibility verification.
The analysis establishes risk monotonicity and sufficient local conditions for environmental-return preservation. Evaluation focuses on highway-env merging across three traffic densities, with targeted tests of graph recovery, contribution incentives, responsibility attribution, and policy correction.
2. Problem Formulation and Overall Framework
2.1. Problem Formulation
We model the heterogeneous on-ramp merging task as a Constrained Decentralized Partially Observable Markov Decision Process (Constrained Dec-POMDP), defined by the tuple . Let denote the set of all vehicles, including both CAVs and HDVs, and let denote the set of controllable CAV agents. The global state space is defined as the Cartesian product of individual vehicle state spaces, i.e., , while the joint action space is defined only over CAV agents as . HDVs are not modeled as learning agents. Instead, they are treated as non-controllable environmental participants whose states are included in the global state and whose motions affect the transition dynamics. The transition probability distribution is denoted by , where denotes the joint action of all CAV agents. Moreover, denotes the joint observation space. The set of local observation functions is defined as , where denotes the local observation probability distribution of agent . The reward function is constructed from agent-wise rewards, and the team reward is given by the sum of all CAV rewards. denotes the set of agent-wise cost functions, and denote the reward and cost discount factors, respectively.
State Space, Action Space and Observation Space. The state of vehicle is denoted as , where and denote the longitudinal and lateral positions, respectively, and and denote the corresponding longitudinal and lateral velocities. Each CAV agent is assumed to perceive only a localized traffic region. The neighboring vehicle set contains up to four nearest vehicles within a 150 m longitudinal range [30]. Their observations are ordered by increasing distance from the ego vehicle, with unused slots zero-padded when fewer than four neighbors are available, yielding a fixed-dimensional observation vector. The observation of CAV agent consists of its own state and the relative observations of its neighboring vehicles and is expressed as . For neighboring vehicle , the relative observation is defined as . Each CAV agent selects an action from the discrete action space defined as , where , and denote lane change left, lane change right, accelerating, decelerating, and maintaining speed, respectively.
Reward Function. It is designed to promote safe and efficient cooperative merging through four weighted components that encourage collision avoidance, speed maintenance, appropriate headway, and timely merging. Specifically, the environment reward of CAV agent i at time step t is defined as:

Fig. 1: Overview of CARGO. Interaction histories are encoded into a shared latent posterior. Multiple posterior samples support uncertainty-aware influence estimation and dynamic causal graph construction. Causal contribution combines behavioral influence with team utility to shape cooperative rewards, while causal responsibility quantifies avoidable tail risk and determines policy correction intensity and direction. An intermediate policy is accepted if its estimated costs preserve the reserved safety margins; otherwise, preventive projection enforces safety constraints and feasible responsibility-based risk-reduction requirements.
where , , , and denote the collision penalty, velocity reward, time-headway reward, and late-merging penalty, respectively, and , , , and are the corresponding positive weights. Specifically, if a collision occurs and 0 otherwise.
The velocity reward is defined as , where .
The time-headway reward is defined as , where denotes the distance headway of agent i. is a constant denoting the time-headway threshold. is a small positive constant for numerical stability. The time-headway reward is set to zero when no front vehicle is available.
To encourage ramp vehicles to merge into the mainline early, we define the late-merging penalty as , where denotes the traveled distance along the ramp, denotes the ramp entrance position, is the ramp length, and is a positive scaling parameter. The late-merging penalty is applied only to ramp vehicles before merging completion.
Cost Function. It is designed to quantify safety violations and potential collision risks during vehicle interactions. It combines a collision cost with a time-to-collision (TTC)-based interaction cost that considers both front and rear neighboring vehicles. Specifically, the cost of CAV agent i at time step t is defined as:
(2) where and are the weighting coefficients for the collision cost and the TTC-based interaction cost, respectively. The collision cost equals 1 if a collision occurs and 0 otherwise. Considering the TTC risk with respect to both the nearest front and rear neighboring vehicles, the TTC-based cost is given by:
where indexes the front and rear directions with an available neighboring vehicle; directions without one contribute zero cost, and denotes the nearest neighboring vehicle of agent in direction . is the corresponding longitudinal headway between ego vehicle and vehicle , and indicates the approaching relative speed. Specifically, for the front direction, where denotes the speed of the front neighboring vehicle . for the rear direction, where denotes the speed of the rear neighboring vehicle . indicates that agent and the neighboring vehicle in direction are approaching each other. The function is the indicator function, and are small constants used to avoid division by zero, is the TTC clipping threshold, and is the directional risk weight.
Optimization Objective. The objective is to learn decentralized policies for CAV agents that maximize the expected discounted team return. Meanwhile, the expected discounted cost of each agent must remain within the safety limit. The resulting constrained policy optimization problem is formulated as:
where denotes the joint policy. Under conditionally independent action selection, the joint action distribution is factorized as , where and . Each decentralized policy selects actions based on its local observation, and denotes the episode horizon. and denote the environmental reward and safety cost of agent at time step , respectively. The environmental rewards define the original cooperative objective and characterize task performance. is the upper limit on the expected discounted cumulative safety cost of agent .
2.2. Overall Framework
Fig. 1 connects three training modules: shared-context inference selects reliable interaction edges; contribution and responsibility attribution provide cooperative incentives and risk-correction signals; preventive optimization verifies policy updates against reserved safety margins and capacity-calibrated responsibility requirements. An intermediate cooperative policy is accepted if it satisfies the surrogate constraints; otherwise, projection seeks a verified correction. Deployment uses decentralized policies without the auxiliary causal and risk models.
3. Latent-Context Causal Graph Inference
Shared environmental factors can induce correlated behavior without direct influence. We infer shared context from interaction histories and compare action-dependent responses across posterior samples; influence strength and posterior confidence then determine the retained edges.
3.1. Uncertainty-Aware Causal Graph Inference
Latent Context Representation. Let contain joint observations and actions before the current decision, excluding the current source action. A shared MLP encodes each observation–action pair; mean pooling across the agents gives , and a GRU summarizes this sequence as :
The encoder parameterized by defines a diagonal-Gaussian posterior over the -dimensional shared context:
Here and are the posterior mean and standard-deviation heads. Multiple samples represent uncertainty about context not uniquely determined by the finite history.
Influence Score Computation. To quantify directed behavioral influence, we compare the target agent's predicted next-action distribution under the source agent's factual action with an action-averaged reference. This reference averages the predicted responses over all candidate source actions, avoiding reliance on an arbitrarily selected counterfactual action. The resulting distributional deviation is measured by the KL divergence to obtain an action-specific influence score. Its causal interpretation assumes conditional independence between the target agent's potential next-action response and the source action given the target observation and latent context, together with consistency and sufficient action support. Under these assumptions, the estimated influence reflects intervention-induced behavioral changes.
To account for uncertainty in the inferred latent context, we evaluate this influence across posterior samples drawn from . The target observation and the same latent sample are held fixed across all source-action evaluations; the latent context is not re-estimated when the source action is replaced. To distinguish different source-target agent pairs, we incorporate agent identity embeddings into the conditional response model. Specifically, the distribution conditioned on the factual action is defined as:
where denotes the predicted next-action distribution of agent j conditioned on the factual action of agent k, and converts the network outputs into probabilities over the target action space . and denote the learnable identity embeddings of the source and target agents, respectively. To construct the reference distribution, we replace with each possible source action and uniformly average the resulting predictions while keeping the remaining conditioning inputs fixed:
where denotes the action-averaged reference distribution. is the action space of agent and denotes a candidate action of agent used to construct the action-averaged reference distribution. We then quantify the influence for each latent sample using the Kullback–Leibler (KL) divergence:
where is the influence score from k to j under the m-th latent sample and denotes the KL divergence.
Posterior-Uncertainty-Aware Graph Construction. To construct a dynamic graph that accounts for uncertainty in the inferred environmental context, we aggregate the influence scores across latent posterior samples to estimate both influence strength and variability. These statistics are subsequently used to evaluate posterior confidence and determine the retained interaction edges. A single latent sample cannot capture how the estimated influence varies across plausible contexts. We therefore draw M samples from the latent posterior and compute the edge score for each sample. The influence strength from agent k to agent j is estimated as the sample mean of the resulting influence scores:
(10) where denotes the estimated influence strength averaged over the M latent posterior samples. The corresponding uncertainty is quantified by the sample standard deviation:
where characterizes the variability of the estimated influence across latent posterior samples, reflecting its sensitivity to uncertainty in the inferred environmental context. To assess the relative importance of each interaction within the current traffic context, we normalize both the influence strength and its uncertainty by the mean influence strength across all ordered pairs of distinct agents:
where and are the normalized influence strength and uncertainty, respectively. is a small constant for numerical stability. Under a Gaussian approximation of the normalized influence-score distribution induced by the latent posterior, we estimate the edge confidence as the probability that the normalized influence score exceeds a reference threshold:
where denotes the Gaussian-approximated posterior exceedance probability. is the standard Gaussian cumulative distribution function. is the reference threshold and is a small constant for numerical stability. Finally, we retain an edge only when both its normalized strength and confidence exceed the corresponding thresholds:
where is the binary adjacency indicator for the directed edge from agent k to agent j at time step t. denotes the relative influence strength threshold, and is the confidence threshold. Under the adopted settings and , the confidence criterion implies the strength criterion. Consequently, edge retention is effectively determined by the posterior confidence, which jointly reflects the estimated relative influence strength and its uncertainty.
3.2. Latent-Context Learning Objectives
The latent encoder and prediction networks are jointly trained using
Separate MLPs predict the next joint observation and current reward vector from . For a batch of B samples,
Here weights reward prediction. The conditional response model is supervised by observed next actions:
Latent samples use reparameterization so both prediction objectives update the posterior encoder; regularizes it toward a standard Gaussian.
4. Contribution and Responsibility Attribution
In this section, we exploit the identified causal relationships to determine which agents contribute to cooperative gains or induce avoidable safety risks based on the inferred dynamic causal graph in Section 3. To this end, we formulate causal contribution and causal responsibility to guide cooperative incentives and policy updates, respectively.
Definition 1 (Causal Contribution). Causal contribution characterizes the assistive role of agent k in shaping team outcomes through its causal influence on the actions of another agent j, where . Agent k makes a positive contribution if its action facilitates team-beneficial actions by agent j or suppresses team-harmful actions, and should therefore be rewarded. Conversely, agent k makes a negative contribution if its action hinders team-beneficial actions or facilitates team-harmful actions, and should therefore be penalized.
Definition 2 (Causal Responsibility). Causal responsibility characterizes the extent to which an agent's actual action exposes itself or other agents to risk that could have been reduced by acting more safely. An agent bears responsibility for this avoidable risk when its actual action induces a higher risk than a safer alternative. The greater the risk that could have been avoided, the greater the agent's causal responsibility.
4.1. Causal Contribution-Based Incentive
To promote cooperation through the inferred causal relationships, we introduce causal contribution to quantify an agent's assistance to the team. This measure combines the agent's influence on others' actions with the marginal team utility of those actions and serves as an agent-specific intrinsic reward. This intrinsic reward is employed as an auxiliary training incentive, whereas the original cooperative task objective remains defined by environmental rewards.
Causal Influence Assessment. To assess the directed influence of agent k on agent j's next action, we compare the predicted behavioral responses under different source actions while holding the target observation and inferred latent context fixed. Unlike the nonnegative KL divergence used for graph construction, a signed log-likelihood ratio is adopted to distinguish whether the factual source action increases or decreases the predicted probability of the target agent's realized next action. The causal influence of agent k on agent j's next action can be defined as:
where is the influence score, is the learned conditional response distribution, and is the posterior mean of the shared latent context. The action-averaged reference is defined as
where denotes the action-averaged reference distribution evaluated at the posterior mean , and is a candidate action of agent . A positive indicates that agent 's factual action increases the model-predicted probability of agent 's realized next action relative to the action-averaged reference, whereas a negative value indicates a decrease in that probability.
Team Utility Assessment. We evaluate the marginal team utility of agent j's realized action by comparing its team value with a policy-averaged baseline while holding the other agents' actions fixed:
where denotes the actions of all agents except agent . The joint action notation represents the original joint action, while denotes the joint action obtained by replacing only agent 's action with . In both cases, the original agent ordering is preserved. is the centralized team action-value function computed using environmental rewards and implemented by a network that maps the joint observation and joint action to a scalar value through three fully connected hidden layers with ReLU activation and a linear output layer. denotes the trainable parameters of the centralized team critic. measures the marginal team utility of for attribution to agent 's action at time . A positive indicates that the realized action is more beneficial to the team than its policy-averaged baseline, whereas a negative value indicates the opposite.
Causal Contribution. Combining the causal facilitation effect and team utility effect, the causal contribution of agent k is defined as:
where denotes the causal contribution of agent k, and is the confidence-weighted interaction coefficient from agent k to agent j. The causal contribution reward is computed only when the next joint action is available. For terminal transitions, the causal contribution reward is set to zero. The shaped reward used for policy training is defined as:
where and represent the shaped training reward and the environment reward, respectively. is the causal contribution coefficient. For policy training, we incorporate the shaped reward into the reward objective of (4) to construct an auxiliary training surrogate that encourages agents to facilitate beneficial actions and discourage harmful ones. The original constrained task remains defined by the environmental rewards and the original safety-cost limits; reward shaping does not alter these constraints.
4.2. Causal Responsibility
To guide safety-oriented policy updates, we define causal responsibility as the avoidable risk of an agent's factual action relative to the expected risk under a safe reference policy. Responsibility determines the correction intensity, while risk advantage guides the correction direction, jointly steering policy updates toward lower-risk actions.
4.2.1. Tail-Risk Estimation
To assess the risk induced by an agent's action, we use a conditional diffusion model to predict its own future observations and those of other agents under alternative actions.
Diffusion-based Future Response Generation. For source agent and recipient agent , the conditioning representation under candidate action is defined as
where is the current joint observation, and is the posterior mean of the shared latent context. is the interaction-weight vector for source agent , where and for . Here denotes the time index of the most recent completed graph update available before the current action decision. Accordingly, the interaction weights are determined before evaluating the current candidate actions and remain fixed across all candidate-action evaluations. OneHot( ) encodes the candidate action, while and are learnable embeddings of the source and recipient identities, respectively. The conditioning MLP is jointly optimized with the denoising network through the diffusion noise-prediction loss.
Conditioned on , we generate possible future responses through denoising diffusion implicit model (DDIM) sampling:
where is the l-th predicted observation sequence of agent j under source action a, and is the prediction horizon. L denotes the number of generated future response samples. denotes DDIM sampling using the exponential moving average (EMA) parameters of a conditional denoising network. The denoising network takes the noisy sequence, diffusion-step embedding, and conditioning representation as inputs. The initial Gaussian noise samples are independent across l and shared across candidate actions for the same source–recipient pair. denotes the standard multivariate Gaussian distribution, where I is the identity matrix.
Conditional Diffusion Training. Observed future sequences are conditioned on factual source actions. At diffusion step , set , where is the cumulative signal-retention coefficient and . The masked noise-prediction objective is
where masks missing future observations and stabilizes the denominator. During action comparison, only is replaced by the candidate action ; all other conditioning inputs remain fixed.
Tail-Risk Estimation. To evaluate the safety risk of the generated future responses, we use a separate cost predictor to estimate safety costs from predicted local observations. During risk evaluation, the cost predictor and diffusion model use their EMA parameters and , respectively. Risk evaluation is performed only when the complete prediction horizon of length is valid. For each generated response, we compute the discounted cumulative cost:
where is the predicted observation of recipient agent at time , is the cost discount factor, and clips predicted costs to nonnegative values. The recipient's tail risk is estimated by averaging the largest cumulative costs among the generated responses:
where denotes the predicted tail risk for agent under source agent 's candidate action , and is the -th largest cumulative cost among the generated responses. is the confidence level, and is the number of retained upper-tail samples.
To evaluate each candidate action from the source agent's perspective, we combine its own tail risk with those of other agents, weighted by their causal relations:
where is the aggregated tail-risk score, is the source agent's own tail risk, and is the interaction weight obtained from the latest pre-decision graph. The source agent's own risk is assigned a unit weight, i.e., .
Cost Predictor Training. The cost predictor is trained by supervised regression using post-transition local observations and their corresponding instantaneous safety costs. These observations contain the neighboring-vehicle information required to evaluate the TTC-based interaction cost. The training objective is
where denotes the collected interaction data, is agent 's local observation after the transition from time to , and is the corresponding instantaneous safety cost returned by the environment. The predictor , parameterized by , comprises two ReLU-activated hidden layers followed by a scalar linear output layer. Its EMA parameters are used for the tail-risk estimation described above.
4.2.2. Responsibility Attribution
To quantify the risk that could have been avoided by changing the factual action, we construct a safe reference policy that favors lower-risk actions while remaining close to the current behavior policy. For , this policy is obtained by solving the following KL-regularized risk minimization problem:
(30) where and denote the safe reference policy and current behavior policy, respectively. denotes the candidate action distribution, and is the probability simplex over agent 's available actions. The risk-sensitivity coefficient balances risk reduction against deviation from the behavior policy. Its normalized exponential form is
This follows by differentiating the objective with a multiplier for probability normalization and normalizing the resulting weights. The safe reference policy is constructed during training using the context-dependent risk estimates .
Causal Responsibility. We quantify agent k's responsibility by the excess tail risk of its factual action relative to the safe reference policy. The positive excess risks are weighted by the corresponding causal relations and averaged over the episode to obtain:
where denotes agent 's causal responsibility, and is the responsibility discount factor. is the tail risk for agent under agent 's factual action . The operator retains only positive excess risks. The positive-part operation is applied before aggregation so that excess risk to one affected agent is not offset by risk reductions experienced by other agents. We note that temporal summations are taken over valid decision steps for which the required tail-risk estimates are available.
5. Responsibility-Guided Preventive Policy Optimization
In this section, we incorporate causal responsibility into preventive policy optimization. Specifically, starting from the current behavior policy , we optimize an intermediate policy within a KL trust region and evaluate it against surrogate safety constraints with reserved margins. If these constraints are satisfied, the intermediate policy is accepted directly. Otherwise, a constrained projection seeks a corrected policy that remains close to the intermediate policy while satisfying the surrogate safety constraints and responsibility-based risk-reduction requirements, as illustrated in Fig. 2.
5.1. Responsibility-guided Risk Constraint Formulation
To translate causal responsibility in (32) into actionable policy constraints, we determine both the strength and direction of correction for each source agent. We then combine these signals with the reduction capacity permitted by the policy trust region to specify individual risk-reduction requirements, which are imposed as constraints on the candidate policy.
Policy Correction Intensity. To assign stronger corrections to agents with greater causal responsibility, we map to the policy correction intensity:
where denotes the policy correction intensity for agent , is its upper bound, and controls the responsibility scale. When , ; as increases, approaches , assigning stronger corrections to agents with greater causal responsibility.
Responsibility Gradient. To guide policy correction toward lower-risk actions, we define the risk advantage function of each action relative to the average risk under the current behavior policy:
where denotes the risk advantage of action a for agent k. A positive value indicates that the action has lower risk than the behavior-policy average, whereas a negative value indicates higher risk. Using the parameterized policy
, we compute the corresponding responsibility gradient:
where denotes the gradient of the local risk-advantage surrogate, evaluated at the parameter values of the current behavior policy while holding the risk estimates and behavior-policy baseline fixed. A local update along this gradient increases the surrogate and reduces the predicted expected risk to first order.
Risk-Reduction Requirement. The correction intensity determines the requested reduction , while the responsibility gradient identifies a local direction for reducing risk. To determine how much reduction the policy update can support, we maximize the first-order risk reduction within the local trust region:
where denotes a local variation in the joint-policy parameters, is the regularized Fisher information matrix at the current behavior policy, and is the trust-region radius. The optimal value is , by Cauchy–Schwarz after substituting ; equality is attained along when the gradient is nonzero.
We cap the responsibility-driven request at a fraction of this capacity, yielding
where specifies the reduction scale and is the reduction-capacity scaling coefficient. The resulting requirement accounts for both attributed responsibility and local reduction capacity.
Responsibility-guided Risk Constraint. Imposing uniform risk-reduction requirements without accounting for individual agents' risk responsibility may lead to excessive correction of agents with limited responsibility and insufficient correction of the primary risk sources. To align policy correction with attributed responsibility, we introduce responsibility-guided risk constraints that translate each agent's reduction requirement into an explicit constraint on its candidate policy. Since the candidate-policy expectation of measures the predicted risk reduction relative to the behavior policy at the same observation, we require its discounted cumulative value to satisfy:
where is agent 's component of the candidate joint policy, is the active correction set, and scales the requested reductions. Constraint (38) translates the responsibility-dependent correction intensity into a minimum improvement that the candidate policy must achieve. Its left-hand side evaluates the candidate's preference for lower-risk actions, while its right-hand side specifies the required reduction through . Thus, responsibility determines the correction requirement, and the risk advantage determines how changes in action selection satisfy it.
5.2. Preventive Policy Optimization
Building on the responsibility-guided risk constraints formulated above, we integrate cooperative policy improvement, safety-cost estimation, and responsibility-guided projection into a preventive update procedure. An intermediate policy is accepted if its estimated safety costs satisfy the reserved margins; otherwise, it is corrected under the safety and responsibility constraints. Starting from the current policy , the joint policy is factorized as , and the intermediate policy is obtained by optimizing within a KL trust region:
(39)

(a) : Direct Policy Acceptance
(b) : Responsibility-Constrained Policy Projection
Fig. 2: Responsibility-guided preventive policy optimization. An intermediate policy is obtained by maximizing the shaped reward within a KL trust region. (a) The policy is accepted if its allowance-adjusted surrogate safety costs satisfy the reserved margins. (b) Otherwise, responsibility-based risk-reduction requirements are imposed during policy projection.
where is the intermediate policy and is the trust-region radius.
Cost Estimation. To assess the cost of the policy generated during projection, we first formulate a common safety-cost estimator for a generic candidate policy . Rather than evaluating this cost directly, we construct a local surrogate relative to the behavior-policy cost. Specifically, we estimate the cost advantage of each joint action under and average these advantages according to at observations collected under the behavior policy. The resulting cost is added to the behavior-policy cost to estimate the candidate policy's safety cost. Specifically, for each agent k, the cost advantage under the behavior policy is defined as:
where is the cost action-value function. measures how much the safety cost of agent k under joint action a exceeds the average over joint actions under the behavior policy. A positive value indicates a higher predicted safety cost than the behavior-policy average, whereas a negative value indicates a lower predicted safety cost. Then, based on the advantage , we construct a local surrogate for the safety cost of the candidate policy :
where is the discounted safety cost under the behavior policy. is the evaluated safety cost of the candidate policy. denotes a trajectory generated under the current behavior policy .
Surrogate Safety Constraint. We obtain an estimate of the safety cost for the candidate policy via (41); however, approximation errors in the cost action-value function and shifts in the policy distribution may lead to an underestimation of this cost. To account for this uncertainty, we introduce a non-negative margin for each agent and impose the surrogate safety constraint:
where is the estimated safety cost under the candidate policy and is the corresponding allowance-adjusted cost. is selected empirically to compensate for cost underestimation. is the safety-cost limit, and is the reserved safety margin. The intermediate policy is accepted when for every agent; otherwise, preventive projection is activated. Algorithm 1 summarizes candidate verification and fallback.
Let denote the set of policies satisfying the KL constraint in (39).
Algorithm 1 Responsibility-Guided Preventive Policy Optimization
Input: Behavior policy , trajectory batch , cost critics , cost limits , reserved margins , KL radius , and candidate scales .
Output: A verified candidate, or if the update is rejected.
1: Obtain using (39).
2: Evaluate using (41) and (42).
3: If and , return .
4: Compute using (37); set .
5: If , examine in descending order:
a. Solve the local approximation of (43) at scale to obtain a candidate .
b. If the candidate satisfies all original surrogate safety-cost, responsibility, and KL constraints, set and return .
6: Attempt projection without responsibility constraints.
7: If its candidate satisfies the original surrogate safety-cost and KL constraints, return that candidate; otherwise return .
Preventive Safety Projection Problem. Combining the surrogate safety constraint and responsibility-guided risk constraint, the final preventive safety projection problem can be formulated as:
where , , and collect the allowance-adjusted safety costs, cost limits, and reserved safety margins, respectively. The objective in (43) preserves the intermediate cooperative policy by minimizing policy divergence. Constraint (42) enforces the reserved margins in the safety costs, while (38) requires the responsibility-guided risk reductions. For each , a local approximation of (43) is solved, and the candidate is verified against the surrogate safety-cost, responsibility, and KL constraints in the original formulation. The first scale yielding a verified candidate is denoted by . If no scale yields a verified candidate, the responsibility constraints are removed and only the safety-cost constraints are retained within the same trust region. If this fallback also fails verification, the update is rejected and is retained. Algorithm 1 summarizes the process.
6. Theoretical Analysis
This section establishes monotonicity of the safe reference policy's predicted risk and sufficient local conditions for non-degrading environmental return.
Assumption 1 (Policy and Risk Regularity). For each agent and decision step , the action set is finite, the behavior policy has full support, , and the aggregated tail risk is finite for every .
Definition 3 (Expected Risk). For each agent , decision step , and risk-sensitivity coefficient , define the expected aggregated tail risk under the safety reference policy in (30) as . In particular, when , the safe reference policy reduces to the current behavior policy , and thus . In addition, define the partition function as .
Proposition 1 (Risk Monotonicity). Under Assumption 1, the expected aggregated tail risk is non-increasing with respect to the risk-sensitivity coefficient . In particular,
Moreover, the inequality is strict whenever is nonconstant over the support of .
Proof: From Definition 3, the log-partition function satisfies
Therefore, equals the negative risk variance and is nonpositive, with strict inequality whenever the variance is positive.
These statements concern predicted aggregated tail risk with the fitted risk estimates held fixed. They do not imply monotonic improvement of realized safety costs as increases.
Assumption 2 (Local Projection and Certification Regularity). For a fixed policy update, let denote the local policy parameters and let be a fixed regularized Fisher information matrix, with . The trust-region radius satisfies , and for every agent . On a nonempty interval , the local quadratic projection is feasible, its active affine constraints remain unchanged and have linearly independent gradients, and the Fisher trust-region boundary is inactive. The environmental team return is -Lipschitz under the Fisher norm on a neighborhood containing the intermediate policy and the projected policies considered below, with . The intermediate policy satisfies , where is the estimated environmental-return improvement and is its one-sided approximation-error allowance. For safety certification, let denote the event on which holds simultaneously for every agent and every candidate policy that may be selected during the update.
Proposition 2 (Responsibility-Induced Improvement Bound). Under Assumption 2, consider and the local Fisher-quadratic projection with fixed affine active constraints. Writing its solution as and denoting the intermediate policy parameters by , define , , and . Then the local squared displacement is . The original environmental-return improvement obeys
Here is an assumed valid lower bound on the nominal environmental return improvement. The coefficients describe only the fixed-active-set local Fisher approximation; the inequality is not an unconditional global performance guarantee.
Proof: Write the fixed active constraints as , with full-row-rank . Since the trust-region boundary is inactive, stationarity of the Fisher-quadratic projection gives
The solution is affine in . Expanding its squared Fisher distance from gives . The Lipschitz assumption bounds the return change from to below by minus times this distance. Adding the assumed bound proves the result.
Theorem 1 (Sufficient Local Range for Responsibility Enforcement). Under Assumption 2, consider a local enforcement interval satisfying the intervention geometry established in Proposition 2. If , , and , then the responsibility enforcement parameter has the following sufficient non-degradation range within the local interval . Define ; then
For each , let be the policy corresponding to the local quadratic projection solution characterized in Proposition 2. Its environmental return is non-degrading: . If this policy also passes verification of the original surrogate safety-cost constraints, for every agent , then, on , it satisfies . If , this safety implication holds with probability at least for the considered update.
Proof: By Proposition 2, non-degradation holds if . The stated conditions make its nonnegative root . Intersecting the resulting range with and gives the claim. For a verified candidate, on . The probability statement follows from the assumed bound on . No safety guarantee is asserted for an unverified fallback policy.
Remark 1. Responsibility enforcement balances source-specific risk reduction with preservation of environmental return. The derived bound quantifies this trade-off through the projection geometry and reward sensitivity, while provides a sufficient upper limit on enforcement strength within the local validity interval.
The range above is a sufficient theoretical condition, not an upper bound computed by Algorithm 1. The empirical allowance does not itself establish the event or its probability.
7. Experiment Setup
7.1. Simulation Settings
The simulation environment is implemented using a modified version of the highway-env simulator [31]. The main road is 520 m long, with a 100 m merging section beginning 320 m downstream from the origin. Further details of the simulation scenario can be found in [32]. Vehicle motion is simulated using a kinematic bicycle model [33], and all vehicles are 5.0 m long and 2.0 m wide. For HDVs, longitudinal motion and lane-changing behavior are modeled by the Intelligent Driver Model [34] and the Minimizing Overall Braking Induced by Lane Changes model [35], respectively. To emulate variability in human driving behavior, 5% random perturbations are added to their acceleration and steering commands. For CAVs, high-level decisions are generated by the learned policy and executed by low-level PID controllers at 5 Hz. At the beginning of each episode, CAVs and HDVs are randomly assigned to predefined spawn points within the upstream 0–220 m region of the main road and ramp, with equal numbers of vehicles initialized on each. Initial positions are perturbed by uniformly distributed noise within m, and initial speeds are sampled uniformly from 20 to 30 m/s. To evaluate the robustness of the proposed method under varying traffic densities, experiments are conducted at three density levels: Low, with 2–3 CAVs and 2–3 HDVs; Medium, with 3–4 CAVs and 3–4 HDVs; and High, with 4–5 CAVs and 4–5 HDVs.
7.2. Implementation Details
To thoroughly evaluate the proposed framework, we compare CARGO against representative baselines spanning four categories: causal-aware MARL, ramp-merging-specific algorithms, general MARL, and traditional methods. Specifically, the causal-aware methods include Situation-dependent Causal Influence-based Cooperative multi-agent reinforcement learning (SCIC) [8] and Causality Aware [36]. The ramp-merging-specific algorithms include Safe Multi-Agent Advantage Actor-Critic (Safe-MAA2C) [1] and Multi-Agent Proximal Policy Optimization with Prior Intent Sharing (MAPPO-PIS) [37]. The general MARL baselines comprise Multi-Agent Proximal Policy Optimization (MAPPO) [38] and Multi-Agent Actor-Critic using Kronecker-factored Trust Region (MAACKTR) [39]. Additionally, Model Predictive Control (MPC) [40] serves as a traditional baseline. All learning-based methods use the same base observation and action spaces, environment reward, and safety cost definitions, while preserving their algorithm-specific mechanisms. All methods, including MPC, are evaluated on the same test scenarios with identical traffic demand, vehicle initialization, and episode termination rules.
The evaluation metrics include: 1) Success Rate, defined as the proportion of collision-free episodes in which all initial ramp vehicles complete merging; 2) Crash Rate, the proportion of episodes with any collision; 3) Merging Time, the time from the first ramp vehicle entering the acceleration lane to the last completing its merge, measured only in successful episodes; 4) Average Velocity, the mean speed across all vehicles and time steps; 5) Min TTC, the episode minimum TTC across longitudinal and lateral conflicts, averaged over episodes; and 6) TTC Violation Rate, the proportion of decision steps with TTC below the corresponding safety threshold.
All learning-based methods are trained for environment steps with a common initial learning rate of . Training is repeated across three independent random seeds. In all training plots, curves show the mean across the three runs, and shaded regions indicate standard deviation. Reported rewards are environmental rewards and exclude auxiliary intrinsic rewards. For testing, each traffic-density setting is evaluated using three independent random seeds, with 100 distinct test episodes per seed. All experiments are conducted on a workstation equipped with an Intel Core i9-13900HX CPU. For latent-context inference and causal graph construction, the history window is set to ,

Fig. 3: Comparative study under low-, medium-, and high-density traffic. CARGO achieves higher or comparable rewards while generally maintaining lower costs than the baselines, demonstrating a favorable balance between task performance and safety.
the latent dimension to , and the posterior sample size to , with the normalized strength and confidence thresholds fixed at 0.5 and 0.8, respectively. For tail-risk estimation, the diffusion model predicts 5 future steps using 100 diffusion steps and 10 DDIM sampling steps. CVaR is estimated from response samples at a confidence level of . For causal contribution and responsibility assessment, we set the causal contribution reward weight to , the risk sensitivity coefficient to , the responsibility scaling parameter to , and the discount factor to . For responsibility-guided correction, we set the maximum intensity to , the risk-reduction scale to , and the capacity scaling coefficient to , with candidate scales . For preventive safety optimization, we use a safety-cost limit of , an approximation-error allowance of , and a reserved safety margin of for all agents, with a KL trust-region radius of .
8. Experimental Results and Analysis
8.1. Comparative Study
Table 1 compares performance across three traffic densities. CARGO achieves the highest success rate, lowest crash rate, and largest minimum TTC in each setting. Relative to the strongest baseline for each metric, crash rates decrease by 14.16%, 52.91%, and 56.23% under low-, medium-, and high-density traffic. High-density success increases from 18.67% to 31.00%, a relative improvement of 66.04%. Many high-density episodes terminate without a collision but without successful merging, so crash rate and success rate describe distinct outcomes. CARGO also achieves the highest average velocity and shortest merging time at low and high density; medium-density efficiency remains competitive.
Fig. 3 shows the corresponding learning curves. CARGO maintains competitive environmental rewards with comparatively low late-training costs, particularly as traffic density increases. The evaluation therefore considers task completion and efficiency together with collision avoidance.
8.2. Ablation Study
We conduct an ablation study to evaluate the roles of causal interaction modeling, contribution-based incentives, and responsibility-guided preventive optimization. Four variants are considered: (i) w/o CC removes the causal contribution incentive; (ii) w/o CG replaces the inferred causal graph with a fully connected interaction graph, without
Table 1 Comparative study under different traffic densities.
| Traffic Density | Method | Success Rate (%) ↑ | Crash Rate (%) ↓ | Merging Time (s) ↓ | Average Velocity (m/s) ↑ | Min TTC (s) ↑ | TTC Violation Rate (%) ↓ |
|---|---|---|---|---|---|---|---|
| Low-density Traffic | SCIC [8] | 60 ± 1.73 | 22.67 ± 4.04 | 10.83 ± 0.66 | 21.96 ± 0.22 | 1.86 ± 0.11 | 3.99 ± 0.43 |
| Causality Aware [36] | 79.33 ± 3.21 | 15.67 ± 3.51 | 9.53 ± 0.06 | 24.80 ± 0.25 | 3.33 ± 0.24 | 0.60 ± 0.23 | |
| MAACKTR [39] | 58.67 ± 4.04 | 30.67 ± 3.21 | 11.26 ± 0.25 | 23.47 ± 0.11 | 1.89 ± 0.04 | 5.90 ± 0.58 | |
| MAPPO [38] | 78.67 ± 3.06 | 10.67 ± 3.06 | 10.57 ± 0.23 | 23.22 ± 0.19 | 2.99 ± 0.11 | 1.67 ± 2.05 | |
| Safe-MAA2C [1] | 83.33 ± 3.51 | 2.33 ± 1.53 | 10.08 ± 0.12 | 23.99 ± 0.10 | 2.90 ± 0.12 | 1.44 ± 0.23 | |
| MAPPO-PIS [37] | 58.67 ± 5.51 | 30.67 ± 9.07 | 10.55 ± 0.41 | 23.98 ± 0.18 | 2.08 ± 0.23 | 5.74 ± 1.47 | |
| MPC [40] | 73.67 ± 8.62 | 16.67 ± 5.86 | 10.11 ± 0.10 | 24.75 ± 0.16 | 2.32 ± 0.07 | 4.98 ± 1.24 | |
| CARGO (ours) | 88.00 ± 1.00 | 2.00 ± 1.00 | 9.47 ± 0.21 | 24.85 ± 0.08 | 3.70 ± 0.22 | 0.48 ± 0.05 | |
| Medium-density Traffic | SCIC [8] | 20.00 ± 1.73 | 15.67 ± 2.52 | 12.11 ± 0.22 | 18.83 ± 0.11 | 0.50 ± 0.12 | 4.32 ± 0.16 |
| Causality Aware [36] | 28.00 ± 1.00 | 5.67 ± 1.53 | 12.86 ± 0.69 | 18.11 ± 0.02 | 2.24 ± 0.17 | 2.73 ± 0.61 | |
| MAACKTR [39] | 13.67 ± 1.53 | 56.67 ± 3.21 | 12.05 ± 0.33 | 21.47 ± 0.14 | 0.75 ± 0.12 | 12.15 ± 1.48 | |
| MAPPO [38] | 48.33 ± 1.15 | 13.33 ± 4.51 | 11.87 ± 0.01 | 21.42 ± 0.05 | 2.13 ± 0.08 | 3.10 ± 0.34 | |
| Safe-MAA2C [1] | 36.00 ± 3.46 | 8.00 ± 2.65 | 11.19 ± 0.26 | 22.54 ± 0.07 | 1.66 ± 0.17 | 3.46 ± 0.36 | |
| MAPPO-PIS [37] | 23.67 ± 5.03 | 56.00 ± 7.00 | 11.31 ± 0.41 | 22.64 ± 0.10 | 1.02 ± 0.16 | 10.69 ± 0.57 | |
| MPC [40] | 23.00 ± 5.29 | 34.00 ± 10.00 | 11.41 ± 0.34 | 23.79 ± 0.18 | 1.01 ± 0.03 | 8.98 ± 0.82 | |
| CARGO (ours) | 50.67 ± 1.53 | 2.67 ± 0.58 | 11.24 ± 0.32 | 22.83 ± 0.10 | 2.47 ± 0.16 | 1.38 ± 0.43 | |
| High-density Traffic | SCIC [8] | 12.33 ± 0.58 | 39.33 ± 4.16 | 13.53 ± 1.24 | 19.03 ± 0.08 | 1.14 ± 0.03 | 6.61 ± 0.27 |
| Causality Aware [36] | 12.67 ± 2.08 | 33.33 ± 2.31 | 13.08 ± 1.89 | 17.12 ± 0.12 | 1.16 ± 0.11 | 5.32 ± 0.21 | |
| MAACKTR [39] | 11.33 ± 1.15 | 73.00 ± 4.58 | 12.90 ± 3.63 | 20.34 ± 0.06 | 0.31 ± 0.06 | 15.82 ± 0.93 | |
| MAPPO [38] | 12.33 ± 2.89 | 11.00 ± 2.00 | 12.95 ± 0.97 | 18.69 ± 0.05 | 1.59 ± 0.11 | 2.92 ± 0.18 | |
| Safe-MAA2C [1] | 18.00 ± 3.46 | 10.67 ± 2.31 | 13.64 ± 0.37 | 21.09 ± 0.07 | 1.15 ± 0.02 | 5.09 ± 0.21 | |
| MAPPO-PIS [37] | 15.33 ± 3.21 | 41.67 ± 5.51 | 12.76 ± 0.63 | 20.16 ± 0.03 | 1.10 ± 0.16 | 7.63 ± 0.96 | |
| MPC [40] | 18.67 ± 2.08 | 45.00 ± 1.73 | 14.03 ± 1.08 | 21.80 ± 0.01 | 0.63 ± 0.05 | 10.65 ± 0.79 | |
| CARGO (ours) | 31.00 ± 3.61 | 4.67 ± 2.89 | 12.74 ± 0.81 | 21.97 ± 0.14 | 1.89 ± 0.03 | 2.37 ± 0.11 |
Note: The best and second-best results for each metric are highlighted in bold and underlined, respectively.
identifying causal relationships; (iii) w/o CR replaces causal responsibility allocation with uniform responsibility allocation across agents while retaining preventive optimization; and (iv) w/o CR-PO removes both causal responsibility and preventive optimization while retaining the causal graph and causal contribution incentive. These comparisons examine the incremental benefit of responsibility-based allocation within the same preventive optimization framework and the role of preventive optimization under uniform allocation.
Table 2 shows complementary benefits from the three components across all densities. At medium density, removing the causal graph reduces success from 50.67% to 23.00% and increases crashes from 2.67% to 16.00%. At high density, removing the contribution incentive reduces success from 31.00% to 2.33%. Uniform responsibility allocation reduces average velocity from 21.97 to 13.90 m/s, while removing both responsibility and preventive optimization increases crashes from 4.67% to 14.33%. These comparisons support contribution-based cooperation and differentiated preventive correction within the evaluated framework.
8.3. Analysis of Component Effectiveness
We test graph recovery under shared latent confounding, the combination of influence and utility, responsibility-source identification, and the effect of responsibility-guided correction. Constraint-handling alternatives are compared within the same framework.
8.3.1. Causal Graph Recovery under Latent Confounding
To evaluate causal graph recovery under shared latent confounding, we construct a controlled experiment involving three vehicles, denoted A, B, and C, in highway-env. The ground-truth graph contains two one-step direct dependencies: B's next action depends on A's current action, and C's next action depends on B's current action; all other non-self directed pairs are non-edges. A shared hidden preference U is sampled uniformly from five actions (lane change left, maintain, lane change right, accelerate, and decelerate) and held fixed within each trajectory. At each time step, all three vehicles generate their next actions simultaneously. Vehicle A follows U with probability 0.6 and selects an
Table 2 Ablation study under different traffic densities.
| Traffic Density | Algorithm | Success Rate (%) ↑ | Crash Rate (%) ↓ | Merging Time (s) ↓ | Average Velocity (m/s) ↑ | Min TTC (s) ↑ | TTC Violation Rate (%) ↓ |
|---|---|---|---|---|---|---|---|
| Low-density Traffic | CARGO w/o CC | 68.00 ± 4.00 | 9.67 ± 2.89 | 10.58 ± 0.05 | 22.77 ± 0.20 | 2.77 ± 0.19 | 2.53 ± 0.71 |
| CARGO w/o CG | 57.67 ± 4.16 | 5.33 ± 2.08 | 12.46 ± 0.24 | 21.58 ± 0.12 | 3.06 ± 0.11 | 0.71 ± 0.32 | |
| CARGO w/o CR | 59.33 ± 1.53 | 7.00 ± 1.00 | 11.96 ± 1.43 | 16.17 ± 0.17 | 2.83 ± 0.30 | 1.89 ± 0.60 | |
| CARGO w/o CR-PO | 86.00 ± 4.58 | 7.67 ± 4.51 | 11.09 ± 0.20 | 23.00 ± 0.10 | 3.19 ± 0.13 | 1.65 ± 0.30 | |
| MAPPO | 78.67 ± 3.06 | 10.67 ± 3.06 | 10.57 ± 0.23 | 23.22 ± 0.19 | 2.99 ± 0.11 | 1.67 ± 2.05 | |
| CARGO | 88.00 ± 1.00 | 2.00 ± 1.00 | 9.47 ± 0.21 | 24.85 ± 0.08 | 3.70 ± 0.22 | 0.48 ± 0.05 | |
| Medium-density Traffic | CARGO w/o CC | 41.33 ± 5.51 | 9.67 ± 2.89 | 11.33 ± 0.16 | 22.74 ± 0.14 | 1.62 ± 0.11 | 3.76 ± 0.09 |
| CARGO w/o CG | 23.00 ± 5.00 | 16.00 ± 4.00 | 12.04 ± 0.36 | 19.86 ± 0.09 | 2.41 ± 0.22 | 2.42 ± 0.86 | |
| CARGO w/o CR | 49.67 ± 4.04 | 5.33 ± 2.31 | 12.36 ± 0.43 | 16.73 ± 0.18 | 2.46 ± 0.07 | 1.71 ± 0.03 | |
| CARGO w/o CR-PO | 44.33 ± 7.77 | 6.67 ± 3.21 | 12.63 ± 1.46 | 18.96 ± 0.11 | 2.33 ± 0.06 | 1.43 ± 0.13 | |
| MAPPO | 48.33 ± 1.15 | 13.33 ± 4.51 | 11.87 ± 0.01 | 21.42 ± 0.05 | 2.13 ± 0.08 | 3.10 ± 0.34 | |
| CARGO | 50.67 ± 1.53 | 2.67 ± 0.58 | 11.24 ± 0.32 | 22.83 ± 0.10 | 2.47 ± 0.16 | 1.38 ± 0.43 | |
| High-density Traffic | CARGO w/o CC | 2.33 ± 1.15 | 19.33 ± 1.53 | 14.58 ± 0.55 | 20.49 ± 0.22 | 1.27 ± 0.13 | 4.68 ± 0.97 |
| CARGO w/o CG | 14.33 ± 6.11 | 5.67 ± 1.53 | 14.11 ± 0.05 | 19.19 ± 0.18 | 1.45 ± 0.06 | 2.51 ± 0.08 | |
| CARGO w/o CR | 13.00 ± 1.73 | 6.67 ± 1.15 | 13.63 ± 1.09 | 13.90 ± 0.11 | 1.78 ± 0.11 | 2.73 ± 0.19 | |
| CARGO w/o CR-PO | 11.00 ± 1.00 | 14.33 ± 2.52 | 12.97 ± 0.42 | 17.44 ± 0.29 | 1.61 ± 0.06 | 4.39 ± 0.54 | |
| MAPPO | 12.33 ± 2.89 | 11.00 ± 2.00 | 12.95 ± 0.97 | 18.69 ± 0.05 | 1.59 ± 0.11 | 2.92 ± 0.18 | |
| CARGO | 31.00 ± 3.61 | 4.67 ± 2.89 | 12.74 ± 0.81 | 21.97 ± 0.14 | 1.89 ± 0.03 | 2.37 ± 0.11 |
Note: CC denotes Causal Contribution, CG denotes Causal Graph, CR denotes Causal Responsibility, and PO denotes Responsibility-Guided Preventive Policy Optimization. MAPPO serves as the base algorithm for CARGO.
action uniformly at random with probability 0.4. Vehicles B and C copy the current action of A and B, respectively, with probability , follow with probability 0.6, and select an action uniformly at random with probability . This mechanism induces correlations between vehicles without introducing additional direct causal edges. We decrease to weaken direct interactions, thereby testing the method's ability to distinguish direct effects from spurious correlations. Each setting uses 1,000 training, 200 validation, and 200 independent test trajectories. We compare full CARGO with two ablation variants. No-Latent Modeling removes latent-variable modeling and replaces the latent variable with a fixed zero vector. Posterior-Mean Modeling retains latent-variable modeling but uses only the posterior mean during inference, without posterior sampling.
Fig. 4 presents the edge selection frequencies. Rows and columns represent source and target agents, respectively. Ideal recovery yields a frequency of 1 for the two true edges and 0 for the four non-edges. No-Latent Modeling frequently selects all four noncausal edges, indicating substantial misattribution of shared influences to direct interactions. At , both latent-variable methods closely recover the ground-truth structure, with CARGO retaining both true edges and limiting non-edge selection frequencies to at most 0.01. As decreases, the distinction between CARGO and Posterior-Mean Modeling becomes more pronounced. At , CARGO reduces the false-edge selection frequencies from A to C and from C to B from 0.54 and 0.32 to 0.29 and 0.19, respectively, while retaining the true edges with frequencies of 1.00 and 0.99. At , CARGO reduces the selection frequency of the false edge from A to C from 0.95 under Posterior-Mean Modeling to 0.68, and that from C to B from 0.91 to 0.57. Meanwhile, the true dependencies from A to B and from B to C are retained with selection frequencies of 0.95 and 0.91, respectively. These results support the effectiveness of shared latent-context modeling and posterior-aware graph construction in suppressing spurious edge selection while preserving most direct dependencies.
8.3.2. Causal Contribution Incentive
Under medium-density traffic, we compare the full contribution incentive with variants using only causal influence or team utility. Table 3 shows success rates of 50.67%, 34.67%, and 16.67%, respectively, with corresponding crash rates of 2.67%, 12.33%, and 17.67%. CARGO also has the highest average velocity and minimum TTC. The combined incentive thus improves cooperation and safety relative to either signal alone in this setting.

Fig. 4: Causal graph recovery under shared latent confounding, where the current actions of vehicles A and B influence the next actions of vehicles B and C, respectively. Rows denote source agents whose current actions exert influence, and columns denote target agents whose next actions are affected. Posterior-Mean Modeling learns the latent posterior but uses only its mean for graph construction, whereas No-Latent Modeling omits latent confounder representation. Entries show edge selection frequencies, ideally 1 for true edges and 0 for non-edges; gray diagonal entries are excluded. As decreases and direct interactions weaken, CARGO suppresses spurious edge selection more effectively than both variants while retaining most true dependencies.
Table 3
Validation of the causal contribution component through comparison with causal influence and team utility under medium-density traffic.
| Algorithm | Success Rate(%) ↑ | Crash Rate(%) ↓ | Merging Time(s) ↓ | Average Velocity(m/s) ↑ | Min TTC(s) ↑ | TTC Violation Rate(%) ↓ |
|---|---|---|---|---|---|---|
| Causal Influence | 34.67 ± 3.51 | 12.33 ± 6.03 | 12.04 ± 0.27 | 22.15 ± 0.26 | 1.27 ± 0.11 | 5.33 ± 1.05 |
| Team utility | 16.67 ± 1.15 | 17.67 ± 2.08 | 11.27 ± 0.03 | 19.73 ± 0.38 | 1.01 ± 0.02 | 9.10 ± 0.05 |
| CARGO | 50.67 ± 1.53 | 2.67 ± 0.58 | 11.24 ± 0.32 | 22.83 ± 0.10 | 2.47 ± 0.16 | 1.38 ± 0.43 |
8.3.3. Preventive Safety Constraints
To evaluate the proposed safety constraint mechanism, we compare three constraint-handling methods within the same CARGO framework under low-density traffic, keeping the remaining components unchanged. The alternatives are MAPPO Lagrangian [2], which incorporates safety costs into the policy objective through adaptive Lagrange multipliers, and PCPO [25], which uses policy projection to enforce safety constraints during policy updates.
Table 4 Comparison of CARGO with MAPPO-Lagrangian [2] and PCPO [25] under low-density traffic.
| Algorithm | Success Rate (%) ↑ | Crash Rate (%) ↓ | Merging Time (s) ↓ | Average Velocity (m/s) ↑ | Min TTC (s) ↑ | TTC Violation Rate (%) ↓ |
|---|---|---|---|---|---|---|
| CARGO + MAPPO-Lagrangian [2] | 30.33 ± 2.52 | 22.67 ± 3.21 | 9.81 ± 0.42 | 24.04 ± 0.07 | 1.32 ± 0.10 | 14.36 ± 0.98 |
| CARGO + PCPO [25] | 56.67 ± 4.93 | 16.67 ± 4.16 | 10.10 ± 0.33 | 23.80 ± 0.13 | 3.38 ± 0.16 | 1.72 ± 0.17 |
| CARGO | 88.00 ± 1.00 | 2.00 ± 1.00 | 9.47 ± 0.21 | 24.85 ± 0.08 | 3.70 ± 0.22 | 0.48 ± 0.05 |
Table 4 shows that CARGO improves success from 56.67% with PCPO to 88.00%, while reducing crashes from 16.67% to 2.00%. Average velocity increases from 23.80 to 24.85 m/s and minimum TTC from 3.38 to 3.70 s. The comparison supports the proposed constraint mechanism under the evaluated low-density conditions.
9. Discussion and Conclusion
This study presents CARGO for cooperative on-ramp merging in mixed traffic. Shared-context posterior uncertainty guides interaction selection; complementary contribution and responsibility signals support cooperative incentives and targeted safety correction. Capacity-calibrated risk-reduction requirements, safety margins, and joint verification coordinate preventive policy updates. Across three highway-env traffic densities, CARGO achieves the highest success rates and lowest crash rates among the evaluated methods. Under high-density traffic, success improves by 66.04% and crashes decrease by 56.23% relative to the strongest baseline for each metric. Controlled experiments further support graph recovery, responsibility attribution, and differentiated correction under the tested conditions.
The reliability of these mechanisms depends on the learned response and risk models. Longer prediction horizons can accumulate model error, and additional samples reduce sampling variability without eliminating model bias. Theoretical guarantees remain conditional on local projection assumptions and valid estimation-error control; empirical safety margins do not establish unconditional safety. Future work will address the accuracy-computation trade-off in counterfactual risk estimation and scalability to larger multi-agent systems.
References
[1] Chen, D., Hajidavalloo, M.R., Li, Z., Chen, K., Wang, Y., Jiang, L., Wang, Y., 2023. Deep multi-agent reinforcement learning for highway on-ramp merging in mixed traffic. IEEE Trans. Intell. Transp. Syst. 24, 11623–11638. [2] Gu, S., Grudzien Kuba, J., Chen, Y., Du, Y., Yang, L., Knoll, A., Yang, Y., 2023. Safe multi-agent reinforcement learning for multi-robot control. Artif. Intell. 319, 103905. [3] Sun, Q., Huang, X., Gu, J., Williams, B.C., Zhao, H., 2022. M2I: From factored marginal trajectory prediction to interactive prediction, in: Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 6543–6552. [4] Rowe, L., Ethier, M., Dykne, E.H., Czarnecki, K., 2023. FJMP: Factorized joint multi-agent motion prediction over learned directed acyclic interaction graphs, in: Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 13745–13755. [5] Duan, W., Lu, J., Xuan, J., 2025. Inferring latent temporal sparse coordination graph for multiagent reinforcement learning. IEEE Transactions on Neural Networks and Learning Systems 36, 14358–14370. [6] Zhang, X., Chen, J., Gan, M.G., Chen, H., 2025. Influence enhanced sparse coordination graphs for multi-agent reinforcement learning. Neural Networks 188, 107454. [7] Jaques, N., Lazaridou, A., Hughes, E., Gulchehre, C., Ortega, P., Strouse, D., Leibo, J.Z., De Freitas, N., 2019. Social influence as intrinsic motivation for multi-agent deep reinforcement learning, in: Proceedings of the 36th International Conference on Machine Learning, PMLR. pp. 3040–3049. [8] Du, X., Ye, Y., Zhang, P., Yang, Y., Chen, M., Wang, T., 2024. Situation-dependent causal influence-based cooperative multi-agent reinforcement learning, in: Proc. AAAI Conf. Artif. Intell., pp. 17362–17370. [9] Jiang, K., Liu, W., Wang, Y., Dong, L., Sun, C., 2024. Discovering latent variables for the tasks with confounders in multi-agent reinforcement learning. IEEE/CAA J. Autom. Sinica 11, 1591–1604. [10] Chen, Y., Luo, H., Wang, G., Yue, Z., Shi, Y., Li, X., 2026. Causal graph guided autonomous cooperation for multi-agent Defensive Counter-Air. Engineering Applications of Artificial Intelligence 181, 115693. [11] Foerster, J.N., Farquhar, G., Aforas, T., Nardelli, N., Whiteson, S., 2018. Counterfactual multi-agent policy gradients, in: Proc. AAAI Conf. Artif. Intell., pp. 2974–2982. [12] Chai, J., Fu, Y., Zhao, D., Zhu, Y., 2024. Aligning credit for multi-agent cooperation via model-based counterfactual imagination, in: Proc. 23rd Int. Conf. Auton. Agents Multiagent Syst., pp. 281–289. [13] Triantafyllou, S., Sukovic, A., Mandal, D., Radanovic, G., 2024. Agent-specific effects: A causal effect propagation analysis in multi-agent MDPs, in: Proc. 41st Int. Conf. Mach. Learn., pp. 48578–48607.
[14] Triantafyllou, S., Sukovic, A., Zolfimoselo, Y., Radanovic, G., 2025. Counterfactual effect decomposition in multi-agent sequential decision making, in: Proceedings of the 42nd International Conference on Machine Learning, PMLR. pp. 60072–60098.
[15] Gonzalez, E., Iyer, S., Tumer, K., 2025. Influence based reward shaping without a heuristic, in: Proceedings of the Adaptive and Learning Agents Workshop (ALA).
[16] Niu, L., Zhang, H., Sahabandu, D., Ramasubramanian, B., Clark, A., Poovendran, R., 2024. Who is responsible? explaining safety violations in multi-agent cyber-physical systems, in: 2024 International Conference on Assured Autonomy (ICAA), IEEE. pp. 11–20.
[17] Hsu, K.C., Leung, K., Chen, Y., Fisac, J.F., Pavone, M., 2023. Interpretable trajectory prediction for autonomous vehicles via counterfactual responsibility, in: 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), IEEE. pp. 5918–5925.
[18] Alshiekh, M., Bloem, R., Ehlers, R., Könighofer, B., Niekum, S., Topcu, U., 2018. Safe reinforcement learning via shielding, in: Proc. AAAI Conf. Artif. Intell., pp. 2669–2678.
[19] Xiao, W., Lyu, Y., Dolan, J., 2023. Model-based dynamic shielding for safe and efficient multi-agent reinforcement learning, in: Proc. Int. Conf. Auton. Agents Multiagent Syst., pp. 1587–1596.
[20] Kochdumper, N., Krasowski, H., Wang, X., Bak, S., Althoff, M., 2023. Provably safe reinforcement learning via action projection using reachability analysis and polynomial zonotopes. IEEE Open J. Control Syst. 2, 79–92.
[21] Achiam, J., Held, D., Tamar, A., Abbeel, P., 2017. Constrained policy optimization, in: Proc. 34th Int. Conf. Mach. Learn., PMLR. pp. 22–31.
[22] Zhang, L., Li, L., Wei, W., Song, H., Yang, Y., Liang, J., 2024. Scalable constrained policy optimization for safe multi-agent reinforcement learning, in: Advances in Neural Information Processing Systems, pp. 138698–138730.
[23] Milosevic, N., Müller, J., Scherf, N., 2025. Embedding safety into RL: A new take on trust region methods, in: Proceedings of the 42nd International Conference on Machine Learning, PMLR. pp. 44199–44224.
[24] Dai, J., Yang, Y., Zheng, Q., Pan, G., 2024. Safe reinforcement learning using finite-horizon gradient-based estimation, in: Proceedings of the 41st International Conference on Machine Learning, PMLR. pp. 9872–9903.
[25] Yang, N., Wang, P., Liu, G., Zhang, H., Lyu, P., Wang, J., 2026. Proactive constrained policy optimization with preemptive penalty. Proc. AAAI Conf. Artif. Intell. 40, 27583–27591.
[26] Lyu, Y., Luo, W., Dolan, J.M., 2023. Risk-aware safe control for decentralized multi-agent systems via dynamic responsibility allocation, in: 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), IEEE. pp. 9737–9744.
[27] Cosner, R.K., Chen, Y., Leung, K., Pavone, M., 2023. Learning responsibility allocations for safe human-robot interaction with applications to autonomous driving, in: 2023 IEEE International Conference on Robotics and Automation (ICRA), IEEE. pp. 9757–9763.
[28] Remy, I., Fridovich-Keil, D., Leung, K., 2025. Learning responsibility allocations for multi-agent interactions: A differentiable optimization approach with control barrier functions, in: 2025 American Control Conference (ACC), IEEE. pp. 3213–3220.
[29] Zheng, H., Singh, A., Mangharam, R., 2026. SafeDiSTL: Decomposing joint constraints for safe multi-agent reinforcement learning. arXiv:2610.13737.
[30] Yu, C., Wang, X., Xu, X., Zhang, M., Ge, H., Ren, J., Sun, L., Chen, B., Tan, G., 2020. Distributed multiagent coordinated learning for autonomous driving in highways based on dynamic coordination graphs. IEEE Trans. Intell. Transp. Syst. 21, 735–748.
[31] Leurent, E., 2018. An environment for autonomous driving decision-making. https://github.com/eleurent/highway-env.
[32] Teng, J., Li, Y., Huang, W., Wang, J., Qin, H., Hu, M., Huang, H., Li, B., 2026. Safety-regulated curriculum multi-agent reinforcement learning for cooperative on-ramp merging in heterogeneous traffic. IEEE Trans. Intell. Transp. Syst., 1–17.
[33] Polack, P., Altché, F., d'Andréa Novel, B., de La Fortelle, A., 2017. The kinematic bicycle model: A consistent model for planning feasible trajectories for autonomous vehicles?, in: Proc. IEEE Intell. Veh. Symp. (IV 2017), pp. 812–818.
[34] Treiber, M., Hennecke, A., Helbing, D., 2000. Congested traffic states in empirical observations and microscopic simulations. Phys. Rev. E 62, 1805.
[35] Ayres, T., Li, L., Schleuning, D., Young, D., 2001. Preferred time-headway of highway drivers, in: Proc. 4th IEEE Intell. Transp. Syst. Conf. (ITSC), pp. 826–829.
[36] Cao, H., Yang, T., Feng, F., Ouariachi, H.R., Du, Y., Fang, M., Huo, J., Gao, Y., 2026. Causality-aware efficient exploration for cooperative multi-agent reinforcement learning, in: Proc. AAAI Conf. Artif. Intell., pp. 19880–19888.
[37] Guo, Y., Liu, J., Yu, R., Hang, P., Sun, J., 2024. Mappo-pis: A multi-agent proximal policy optimization method with prior intent sharing for cavs' cooperative decision-making, in: Proc. Eur. Conf. Comput. Vis. Workshops (ECCV Workshops), pp. 244–263.
[38] Yu, C., Velu, A., Vinitsky, E., Wang, Y., Bayen, A., Wu, Y., 2022. The surprising effectiveness of ppo in cooperative multi-agent games. Adv. Neural Inf. Process. Syst. 35, 24611–24624.
[39] Wu, Y., Mansimov, E., Grosse, R.B., Liao, S., Ba, J., 2017. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. Adv. Neural Inform. Process. Syst. (NeurIPS) 30.
[40] Cao, W., Mukai, M., Kawabe, T., 2013. Two-dimensional merging path generation using model predictive control. Artif. Life Rob. 17, 350–356.