CAMMARL: Conformal Action Modeling in Multi Agent Reinforcement Learning

## Abstract

Abstract Before taking actions in an environment with more than one intelligent agent, an autonomous agent may benefit from reasoning about the other agents and utilizing a notion of a guarantee or confidence about the behavior of the system. In this article, we propose a novel multi-agent reinforcement learning ( MARL ) algorithm cammarl , which involves modeling the actions of other agents in different situations in the form of confident sets, i.e., sets containing their true actions with a high probability. We then use these estimates to inform an agent’s decision-making. For estimating such sets, we use the concept of conformal predictions, by means of which, we not only obtain an estimate of the most probable outcome but get to quantify the operable uncertainty as well. For instance, we can predict a set that provably covers the true predictions with high probabilities (e.g., 95%). Through several experiments in two fully cooperative multi-agent tasks, we show that cammarl elevates the capabilities of an autonomous agent in MARL by modeling conformal prediction sets over the behavior of other agents in the environment and utilizing such estimates to enhance its policy learning. Implementation can be found here: https://github.com/Nikunj-Gupta/conformal-agent-modelling .

## 1 Introduction

Developing systems of autonomous agents capable of effective multi-agent interactions can be very useful in modern cooperative artificial intelligence (AI). For instance, service robots, surveillance agents, and many more similar applications require profound collaboration among agents (and with humans), without prior coordination. Now, to enable complex, constructive behaviors to emerge from unsupervised interactions among agents, an essential skill for an agent to have is the ability to reason about other agents in the environment. There has been considerable research addressing this problem of agent or opponent modeling (Albrecht & Stone, ). Generally, it involves constructing models of other agents that learn useful attributes to inform its own decision-making (such as the future actions of the other agents, or their current goals and plans) from current or past interaction history (such as the previous actions taken by other agents in different situations).

Figure: Figure 1: Our proposed methodology of informing an autonomous agent’s decision-making by means of conformal predictions of action sets of other agents in the environment illustrated with two agents for simplicity. Two agents ($\mathcal{N}_{self}$, $\mathcal{N}_{other}$) receive their own partial observations from the environment ($o_{self}$, $o_{other}$) and take their actions ($a_{self}$, $a_{other}$). An independent conformal action prediction model $\mathcal{C}$ learns to output a conformal action set, $\{a^{\prime}_{other}\}$, corresponding to $\mathcal{N}_{other}$ which are then used as additional inputs for training by $\mathcal{N}_{self}$ to inform its policy and perform its action $a_{self}$.
Refer to caption: extracted/5399101/images/high-level-cam.jpg

We are interested in the particular aspect of an interactive, autonomous agent that involves learning an additional, independent model to make predictions about the actions of the other agents in the environment, supplemental to its reinforcement learning-based policy to make decisions related to its downstream task. An autonomous agent can then incorporate those estimates to inform its decision-making and optimize its interaction with the other agents. While there exist several methods for developing such models for other agents (Albrecht & Stone, ), there is currently no method or theory to the best of our knowledge that would allow an agent to consider the correctness or confidence of the predictions of the learned model.

#### Conformal Predictions.

Conformal predictions or inference is a fitting method for generating statistically accurate uncertainty sets for the predictions from machine learning classifiers. It is steadily gaining popularity owing to its explicit and non-asymptotic guarantees over the produced sets (Angelopoulos & Bates, ). In other words, we can obtain conformal sets that provably contain the true predictions with high probabilities, such as 95%, chosen in advance. This can be very useful and successful in high-risk learning settings, especially in decision-making in medical applications from diagnostic information, for instance, which demand quantifying uncertainties to avoid insufferable model failures. What if we only prefer to use the predictions when the model is confident? For example, doctors may only consider a predicted medical diagnosis when the model is at least 95% accurate, or may want to use the predicted set with high credence to consider ruling out relevant possibilities. So, in this article, we aim to enhance the capabilities of an agent in a multi-agent reinforcement learning (MARL) setting by modeling and using conformal prediction sets (or the latent representations learned in the process(^1^11More details in Appendix B.)) over the behavior of an autonomous system. In particular, we model other agents’ actions in the form of confident sets, i.e., sets that contain other agents’ true actions with a high probability. We hypothesize that these estimated conformal sets would inform our learning agent’s decision-making and elevate its performance in MARL. Figure 1 shows the high-level idea of our proposed model for learning agents in any given environment.

In this work, we aim to introduce a novel framework to train an autonomous agent that enhances its decision-making by modeling and predicting confident conformal actions of other agents in the environment — the cammarl algorithm (Section 3), and then empirically demonstrate that conformal action modeling used in cammarl indeed can help make significant improvements in cooperative policies learned by reinforcement learning agents in two multi-agent domains (Section 4).

## 2 Related Works

Decision-making without reasoning about other agents in the environment can be very challenging, for instance, due to weak or no theoretical guarantees, non-stationarity (single agent’s perspective), and inefficient coordination for a considerable coherent joint behavior (Matignon et al., ). Modeling other agents in an environment is not new and has been studied in the past (Albrecht & Stone, ; Albrecht et al., ). However, our proposal of predicting conformal sets of actions of the other agents in the environment (with high probability) is novel and has not been attempted to the best of our knowledge.

#### Learning world models.

Model-based reinforcement learning (MBRL) has certainly shown its advantages in data efficiency, generalization, exploration, counterfactual reasoning, and performance in many tasks and domains (Hafner et al., , ; Jain et al., ; Moerland et al., ; Pal & Leon, ; Polydoros & Nalpantidis, ) in single-agent RL, and now, it has also started to attract attention in MARL (Wang et al., ). However, most of the current works in model-based MARL do not yet focus on teammate or opponent modeling. Some recent works (Park et al., ; Zhang et al., ) incorporated dynamics modeling and a prediction module to estimate the actions of other agents within the construction of the environment model. However, these prediction models were trained without accessing the true trajectories from the other agents which can be problematic in several use cases.

#### Learning agent models.

A widely popular technique to reason about other agents in the environment is to learn representations of different properties of other agents. For instance, learning to reconstruct the actions of other agents from their partial observations (He et al., ; Mealing & Shapiro, ; Panella & Gmytrasiewicz, ; Albrecht & Ramamoorthy, ), modeling an agent or its policy using encoder-decoder-based architectures (Grover et al., ; Zintgraf et al., ), learning latent representations from local information with or without utilizing the modeled agent’s trajectories (Papoudakis et al., ; Xie et al., ) or modeling the forward dynamics of the system through relational reasoning using graph neural networks (Tacchetti et al., ). Theory-of-Mind Network or TomNet learned embeddings corresponding to other agents in the environment for meta-learning (Rabinowitz et al., ). Some works also constructed I-POMDPs to utilize recursive reasoning (Albrecht & Stone, ) assuming unrestricted knowledge of the observation models of other agents. Nevertheless, cammarl involves no form of reconstruction of other agent’s policy or rewards, or state models. Any of these techniques can be used with cammarl  which, however, is not the objective of this work. Also, unlike cammarl, many of these aforementioned techniques evaluate in fully-observable environments or rely upon direct access to other agents’ experience trajectories even during execution. This can be infeasible in various settings.

#### Multi-agent reinforcement learning (MARL).

Numerous deep MARL research works that focus on partial observability in fully cooperative settings indirectly involve reasoning about the intentions of teammates or opponents in an environment (Gronauer & Diepold, ). For instance, many works allow agents to communicate, enabling them to indirectly reason about the others’ intentions (Lazaridou et al., ; Foerster et al., ; Sukhbaatar et al., ; Das et al., ; Mordatch & Abbeel, ; Gupta et al., ; Zhu et al., ). On the other hand, some studied the emergence of cooperative and competitive behaviors among agents in varying environmental factors, for instance, task types or reward structures (Leibo et al., ). Recent work in hierarchical reinforcement learning also attempts to develop a hierarchical model to enable agents to strategically decide whether to cooperate or compete with others in the environment and then execute respective planning programs (Kleiman-Weiner et al., ). However, none of these works study the improvement in an autonomous agent’s decision-making via directly modeling the other agents in the environment or predicting their actions or current or future intentions.

#### Inverse reinforcement learning (IRL).

Research in the field of IRL also relates to our work because we share the key motive of inferring other agents’ intentions and then use it to learn a policy that maximizes the utility of our learning agent (Arora & Doshi, ). However, IRL addresses this by deducing the reward functions of other agents based on their behavior, assuming it to be nearly optimal. On the other hand, in cammarl  we directly model the other agent’s actions based on their observations and use these estimates to indirectly infer their goal in an online manner.

#### Conformal prediction.

Estimating well-grounded uncertainty in predictions is a difficult and unsolved problem and there have been numerous approaches for approximating it in research in supervised learning (Gawlikowski et al., ). Recent works in conformal predictions (Angelopoulos et al., ; Lei et al., ; Hechtlinger et al., ; Park et al., ; Cauchois et al., ; Messoudi et al., ) have now significantly improved upon some of the early research (Vovk et al., ; Platt et al., ; Papadopoulos et al., ), for instance in terms of predicted set sizes, improved efficiency, and providing formal guarantees. For this article, we adapt the core ideas from Regularized Adaptive Prediction Sets (RAPS) (Angelopoulos et al., ) to our setting owing to its demonstrated improved performance evaluation on classification benchmarks in supervised learning (Angelopoulos et al., ).

## 3 The cammarl Algorithm

### 3.1 Mathematical Model

Formally, we consider two agents in the environment — learning agent denoted by self and the other agent denoted by other. The partially observable Markov game (Littman, ) for our setting can then be defined using the following tuple(^2^22A tabular version can be found in Section C.1):

$$ $\langle\mathcal{N}_{i},\mathcal{S},\mathcal{A}_{i},\mathcal{O}_{i},\mathcal{T} ,\mathcal{C},\pi_{\theta_{i}},r_{i}\rangle_{i\in\{self,other_{1}\dots other_{K -1}\}}$ $$

With the set $\mathcal{S}$ describing the possible true states (or full observations) of the environment, $K$ agents, $\mathcal{N}_{self}$ and $(K-1)$
$\mathcal{N}_{other_{j}}$ ($j\in[1,K]$), observe the environment locally using their sets of observations $\mathcal{O}_{self}$ and $(K-1)$
$\mathcal{O}_{other_{j}}$ respectively, and act using their set of actions, $\mathcal{A}_{self}$ and $(K-1)$
$\mathcal{A}_{other_{j}}$. Each agent i can select an action $a_{i}\in\mathcal{A}_{i}$ using their policy $\pi_{\theta_{i}}$, and their joint action $\textbf{a}\in\mathcal{A}_{self}\times\mathcal{A}_{other_{1}}\times\dots
\mathcal{A}_{other_{K}}$ then imposes a transition to the next state in the environment according to the state transition function $\mathcal{T}$, defined as a probability distribution on the subsequent state based on current state and actions, $\mathcal{T}$: $\mathcal{S}\times\mathcal{A}_{self}\times\mathcal{A}_{other_{1}}\times\dots
\mathcal{A}_{other_{K}}\times\mathcal{S}\rightarrow[0,1]$. The agents use their individual reward function $r_{i}(s,a)$ : $\mathcal{O}_{i}\times\mathcal{A}_{i}\rightarrow\mathbb{R}$. Both agents aim to maximize their own total expected rewards $R_{i}=\sum_{t=0}^{T}\gamma^{t}r_{i}^{t}$ where $\gamma\in[0,1)$ as the discount factor and T is the time horizon.

In cammarl, at each time step t, we also use a conformal prediction model for the $j$-th agent, defined as a set-valued function, $\mathcal{C}:\mathbb{R}^{d}\rightarrow 2^{|\mathcal{A}_{other_{j}}|}$

$$ $\mathcal{C}(o^{t}_{other_{j}})\rightarrow\{A^{i}_{other_{j}}\}$ $$

which outputs a conformal action predictive set $\{A^{t}_{other_{j}}\}$ for each input of $\mathcal{N}_{other_{j}}$’s local observation $o^{t}_{other_{j}}\in\mathcal{O}_{other_{j}}$ at the time.

### 3.2 Conformal Action Modeling

Figure: Figure 2: A detailed illustration of conformal action modelling and inference in cammarl to generate prediction sets of $\mathcal{N}_{other}$’s actions using conformal predictors.
Refer to caption: extracted/5399101/images/conformal.png

Figure: Algorithm 1 Conformal action modeling in marl

Now we formally describe our proposed algorithm — Conformal Action Modeling-based Multi-Agent Reinforcement Learning or cammarl. Our objective is to inform an $\mathcal{N}_{self}$’s decision-making by modeling the other agent’s actions in the environment as conformal prediction sets that contain the true actions with a high probability (for example, 95%). More specifically, $\mathcal{N}_{self}$ uses a separate conformal action prediction model to obtain sets of $\mathcal{N}_{other_{j}}$’s actions at each timestep that contains latter’s true action in the environment at a given time step with high prespecified probabilities.

Algorithm 1 describes the complete workflow of training of agents in cammarl. We begin by initializing the actor-critic networks for both the agents in the environment, the conformal model, and the memory buffers for each of these.
Now, at the beginning of each episode in the environment, both agents receive their own partial observations (line 1). Next, the conformal model predicts the actions of all the $\mathcal{N}_{other_{j}}$’s in the form of a set, which is then provided as an additional input to $\mathcal{N}_{self}$ (lines 1-1), whereas $\mathcal{N}_{other_{j}}$ has access to only its own partial observation, $o_{other_{j}}$. Both agents now take actions in the environment and continue collecting their experiences (lines 1-1). The agents and the conformal model periodically train using their respective experience memory (lines 1-1).

Figure 2 shows a detailed illustration of our conformal action modeling that materializes internally at each time step. We use only one other agent $\mathcal{N}_{other}$ for simplicity. The conformal predictor $\mathcal{C}$ collects $\mathcal{N}_{other}$’s state-action pairs and periodically learns and updates a neural network classifier, $f(\cdot):\mathbb{R}^{d}\rightarrow\mathbb{R}^{|\mathcal{A}_{other}|}$ (where d is the number of dimensions in $\mathcal{N}_{other}$’s local observation and $|\mathcal{A}_{other}|$ is the number of possible discrete actions available for $\mathcal{N}_{other}$), to predict action from a given state. Then, we adapt RAPS conformal calibration (Angelopoulos et al., ) to our setting. Considering $\textbf{o}\in O_{other}$ as feature vectors, we use the updated f to compute action probabilities $\hat{\pi}_{o}\in\mathbbm{R}^{|\mathcal{A}_{other}|}$. The probabilities are then ordered from most probable to least probable followed by the estimation of the predictive action set for the given feature inputs. To promote small predictive sets we also add a regularization term as also proposed in RAPS. Formally, for a feature vector o and the corresponding possible prediction a, to estimate a set which includes all the actions that will be included before a, let us define the total probability mass of the set of actions that are more probable than a:

$$ $\rho_{o}(a)=\sum^{|\mathcal{A}_{other}|}_{a^{\prime}=1}\hat{\pi}_{o}(a^{\prime })\mathbbm{1}_{\{\hat{\pi}_{o}(a^{\prime})\geq\hat{\pi}_{o}(a)\}}$ $$

Also, if we define a function to rank the possible action outcomes based on their probabilities $\hat{\pi}$ as

$$ $z_{o}(a)=|\{a^{\prime}\in\mathcal{A}_{other}:\{\hat{\pi}_{o}(a^{\prime})\geq \hat{\pi}_{o}(a)\}\}|$ $$

we can then estimate a predictive action set as follows:

$$ $\mathcal{C}^{*}(\textbf{o}):=\bigl{\{}\textbf{a}:\rho_{\textbf{o}}(\textbf{a}) +\hat{\pi}_{\textbf{o}}(\textbf{a})\cdot u+\lambda\cdot(z_{\textbf{o}}(\textbf {a})-k_{reg})^{+}\leq\tau\bigr{\}}$ $$

where $(x)^{+}$ denotes the positive portion of x, and $\lambda,k_{reg}\geq 0$ are regularization hyperparameters to incentivize small set sizes. Here, $u\sim uniform$ [0, 1] (used to allow for randomized procedures) and the tuning parameter $\tau$ (the cumulative sum of the classifier scores after sorting and penalization) to control the size of the sets are identical to as used in RAPS for supervised tasks (Angelopoulos et al., ).

To summarize, in cammarl, $\mathcal{N}_{self}$ gets to use estimates of $\mathcal{N}_{other}$’s actions at each time step to make informed decisions in the environment. Instead of modeling exact actions with no uncertainty estimation, we prefer to produce an action set carrying desirable guarantees of containing $N_{other}$’s true action with high probability, integrate it into an agent’s downstream task, and enable improved decision-making and collaboration with $\mathcal{N}_{other}$.

## 4 Experiments

In this section, we discuss the cooperative tasks with multiple agents used in this study. We note here that though we work in fully cooperative settings in this article, cammarl as an idea can be generalized to competitive or mixed settings too (more on this in Appendix).

### 4.1 Environments

We focus on four cooperative multi-agent environments: Cooperative Navigation The agents learn to visit the two landmarks avoiding collisions. In Level-based Foraging, agents collect foods based on their levels. In Pressure Plate, the agents traverse a grid world and must cooperate by standing on a plate to keep a gate open while the other agents collect the main reward. Finally, we also run cammarlin Google Football, where 3 agents try to score a goal against a defender and a keeper in a game of football. Further details on these environments are in Section A.

### 4.2 Results

Figure: Figure 3: Comparison of agent performances (in terms of reward accumulation) in CN (a) and LBF (b) in different settings with varying pieces of information available to $\mathcal{N}_{self}$ during training. cammarl’s performance is very close to the upper bound, GIAM, and is considerably better than the other extreme, NOAM. It also outperforms the other defined benchmarks (TAAM, TOAM, & EAP) in both tasks, along with the benefit of uncertainty quantification of its estimates. Interestingly, in CN, cammarl can be seen to learn arguably faster, but all methods converge to similar results, whereas in LBF, it actually seems to converge to a better policy. The curves are averaged over five independent trials and smoothed using a moving window average (100 points) for readability.
Refer to caption: extracted/5399101/images/cn-res-plots.png

To show the benefits of conformal action set prediction, we compare cammarl with the performances of agents in different settings with varying pieces of information made available to $\mathcal{N}_{self}$ during training.

#### No-Other-Agent-Modeling (NOAM).

At first, we train $\mathcal{N}_{self}$ without allowing it to model $\mathcal{N}_{other}$. This baseline, as expected, underperforms when compared to any other settings (where any kind of agent modeling is allowed). It is indicative of a lower bound to the learning performance of our model where no kind of benefit from agent modeling is utilized by $\mathcal{N}_{self}$. Results are shown in Figure 3. We call this baseline — No-Other-Agent-Modeling or NOAM.

#### True-Action-Agent-Modeling (TAAM).

Advancing from the inputs available in NOAM, we implement TAAM by allowing $\mathcal{N}_{self}$ to additionally utilize $\mathcal{N}_{other}$’s true actions to train. This baseline helps us evaluate cammarl against works that estimate other agents’ actions in the environment and use those predictions to enhance the decision-making of their controlled autonomous agents. By giving the true actions as inputs, this baseline can act as an upper bound to such works(He et al., ; Grover et al., ; Zintgraf et al., ; Mealing & Shapiro, ; Panella & Gmytrasiewicz, ; Albrecht & Ramamoorthy, ). Figure 3 shows TAAM’s performance curve. Using additional information, it does reasonably better than NOAM in both tasks.

#### True-Observation-Agent-Modeling (TOAM).

As discussed in Section 2, learning world models often involves reconstructing observation as an additional task while learning task-related policies (Jain et al., ; Hafner et al., , ). Inspired by this research, we implement the TOAM baseline where we allow access to $\mathcal{N}_{other}$’s true observations to $\mathcal{N}_{self}$ during training and execution. In other words, we augment $\mathcal{N}_{self}$’s partial observations with the other agent’s local observations too. This baseline can act as an upper bound to the performances of research works that learn to reconstruct states for agents (Hafner et al., , ; Wang et al., ; Park et al., ; Zhang et al., ). As expected, $\mathcal{N}_{self}$ performs considerably better than NOAM in both environments (Figure 3). Here, the difference in returns in TOAM and TAAM can be attributed to the fact that the local observations of other agents include more information that can be useful to infer their behavior. For instance, in CN, knowing the relative positions of other agents with respect to the landmarks can be more useful to infer which landmark that agent might be approaching when compared to knowing its current (or history) actions.

#### Global-Information-Agent-Modeling (GIAM).

On the other extreme, we also implement GIAM, where $\mathcal{N}_{self}$ trains with complete access to both (1) $\mathcal{N}_{other}$’s true action trajectories ($a_{other}$), and (2) $\mathcal{N}_{other}$’s true observations ($o_{other}$) as additional information. Figure 3 shows that GIAM achieves higher returns compared to all other settings in both environments. This is intuitive because it benefits from more information. GIAM is conditioned on $\mathcal{N}_{other}$’s true experiences and consequently demands access to them even during execution. This can be infeasible in real-world scenarios, however, theoretically represents an upper bound on the performance of agents in cammarl and other settings.

#### Exact-Action-Prediction (EAP).

Building over the inputs of TOAM, we construct a stronger baseline, EAP, in which $\mathcal{N}_{self}$ uses an additional neural network classifier to model a probability distribution over $\mathcal{N}_{other}$’s actions. In other words, instead of predicting conformal sets of actions (like in cammarl), in this baseline, $\mathcal{N}_{self}$ tries to model $\mathcal{N}_{other}$’s actions from the latter’s observations without accounting for any uncertainty quantification. This baseline is inspired by works that explicitly model the other agent’s actions in the environments and utilize them to inform their controlled agent’s decision-making (for instance, (He et al., ; Grover et al., ; Zintgraf et al., )). Hence, here, a cross-entropy loss is used to train the added sub-module that predicts the $\mathcal{N}_{other}$’s actions along with a PPO loss to train $\mathcal{N}_{self}$’s policy network. Figure 3 shows that cammarl agents are able to distinctly perform better than EAP in LBF, however, interestingly, the performance curve for this baseline nearly overlaps with cammarl in CN. Also, in LBF, the curves for TOAM and EAP seem to significantly overlap. We speculate that in a complicated task like LBF, estimating the exact action of $\mathcal{N}_{other}$ can be difficult, and with unaccounted uncertainty in the predictions, $\mathcal{N}_{self}$ suffers from a lower return. In CN, which is comparatively simpler, the closeness of returns in EAP and cammarl seem reasonable as even the conformal model predictions eventually start predicting the most probable action with higher probabilities and hence a set of size one (more on this in Section 6).

#### cammarl .

Now, we implement cammarl, where the conformal action prediction model periodically trains on collected observations of $\mathcal{N}_{other}$ and predicts a corresponding conformal set of actions. $\mathcal{N}_{self}$ uses these estimates of $\mathcal{N}_{other}$’s actions along with its own observations and then decides upon its actions in the environment. Figure 3 shows that cammarl agents obtain returns that are much closer to the upper bound, GIAM, than the lower bound, NOAM. Furthermore, cammarl’s better performance compared to TOAM in both environments can be attributed to the fact that it can be difficult to predict the $\mathcal{N}_{other}$’s intentions by only using $o_{other}$ without any information pertaining to its actions in those situations. And, in TAAM, $\mathcal{N}_{self}$ is expected to implicitly encode information regarding $\mathcal{N}_{other}$’s observations from its own local observations or in the latent space and map it to $\mathcal{N}_{other}$’s true actions. We speculate that this could be a strong assumption and consequently very difficult, hence, cammarl agents outperform TAAM too. Note here that the sets output by the conformal action prediction model are of varying sizes in each iteration. Now, to be able to use these dynamically changing inputs for $\mathcal{N}_{self}$ in cammarl, we convert the output sets to a corresponding binary encoding (by firing up the bits in a zero vector at indices corresponding to the actions predicted by the model). We discuss some more ways to be able to use conformal prediction sets with dynamic sizes and compare cammarl’s performances in all variations later in the supplementary.

In summary, through experiments in two complex cooperative tasks, we show that (1) cammarl indeed works, (2) it outperforms common settings like NOAM, TOAM, and TAAM which assume the availability of other agents’ true trajectories during training and execution (generally infeasible in real-world scenarios), (3) Its performance is closest to our upper bound of performance (GIAM), (4) cammarl agents learn their policies faster than the other baselines, and (5) cammarl can be preferred over strong benchmarks such as EAP owing to its higher interpretability due to the theoretical guarantees of conformal predictions in terms of coverage (Angelopoulos et al., ) (discussed more in Section 6).

### 4.3 Results with more than 2 agents

Figure: Figure 4: Comparison of agent performances (in terms of reward accumulation) in environments with more than 2 agents: (a) Pressure Plate and (b) Google Football. Interestingly, Pressure Plate cammarl can be seen to learn arguably faster, but all methods converge to similar results, whereas in Google Football, cammarl reaches a higher reward than the baselines. In Google Football, the observations are global, so we did not include TOAM and GIAM. The curves are averaged over five independent runs.
Refer to caption: extracted/5399101/images/pressureplate.png

cammarl can be extended to problems with more than 2 agents, where the main agent uses a conformal model for each of the other agents. From Figure 4 (a) we see that although all the algorithms ultimately converge to the optimal reward, cammarl is more sample efficient and converges in roughly 10% fewer episodes compared to GIAM and TOAM. In Google Football (Figure 4 (b)) we notice a considerable improvement as well, with conformal predictions helping in much better reward accumulation. These experiments also highlight the benefit of using conformal predictions, as TAAM with accurate actions do not converge as fast as cammarl.

Figure: Figure 5: Comparison of agent performances (in terms of reward accumulation) in LBF with 2 agents (2p) and 6 foods (6f) respectively with cooperation turned off. cammarl’s performance is very close to the upper bound, GIAM, and is considerably better than the other extreme, NOAM. Interestingly, cammarl also seems to converge faster than the other baselines. The curves are averaged over five seeds.
Refer to caption: x1.png

Figure: Figure 6: Comparison of agent performances in CN with uncertainty information available to $\mathcal{N}_{self}$ during training. This graph highlights the merit of using Conformal Action Predictions over simple uncertainty estimation.
Refer to caption: extracted/5399101/images/cn_motivation.png

### 4.4 Results in Mixed Settings

For these experiments, we use the original LBF environment, but we turn off the cooperation flag. This is a slightly easier task, however, each agent here would fight for different food positions, so it is a mixed setting between cooperation and opposition. Modeling actions of other agents can also help to improve performance in this setting, although it is not as critical as in the cooperative setting.

Figure 5 highlights the training performance on LBF with 2 agents respectively. Although this is a simpler task, in which all algorithms roughly converge to the same reward, cammarl seems to be on par with our upper bound GIAM, especially in terms of faster convergence.

## 5 Motivating Conformal Predictions

Figure: Figure 7: Analysing conformal prediction in cammarl over time during the training by looking at trends in conformal sets sizes, coverage of highly probable predictions, model loss and accuracy during training of cammarl agents.
Refer to caption: extracted/5399101/images/stats/labelled/CN_size_avg.png

In Figure 3 (a) and (b), we observe the improved performance of cammarl by predicting conformal sets. One key ingredient to cammarl was the addition of uncertainty predictions to the actions of the other agents. Thus, we can attribute the increased performance of cammarl to this as well. To test this theory, we added one more baseline where similar to the action prediction baseline (EAP), we add the action prediction probabilities directly into the state space. We call this Action Prediction with Uncertainty (APU), and both APU and cammarl operate on the same information. From Figure 6, we can conclude that just adding uncertain predictions is not enough to achieve an uplift in performance that we see for cammarl and there is definite merit to using conformal predictions. Another reason for the poor performance of APU would be that the agent has to parse through the relevant information and learn from it, whereas they are readily provided in a concise manner for cammarl.

## 6 Discussion

In this section, we dig deeper and try to analyze the inner components of cammarl. In particular, we plot some observable trends during the training of cammarl’s agents in both the tasks (Figure 7) and discuss each of them here.

#### Set Sizes.

We collected the set sizes produced in cammarl throughout the training and report them in Figure 7 (a) and  7 (f). Smaller sets are preferred, as they carry specific information which can be more useful practically. The curves show a decreasing trend in the set sizes in cammarl in both CN and LBF respectively when tracked over the number of updates of the conformal prediction model during training. This is a good sign for cammarl, as it shows that the conformal predictions are becoming more precise with continued training over time.

#### Coverage.

As also discussed earlier, it is desirable for the predicted sets to provide 1 - $\alpha$ coverage for a pre-defined user-specified $\alpha$ such as 10%. Formally, to map a feature vector, $o_{other}\in\mathcal{O}_{other}$, to a subset of discrete responses, $a^{\prime}_{other}\in\mathcal{A}_{other}$, it is useful to define an uncertainty set function, $\mathcal{C}$($o_{other}$), such that $P(a^{\prime}_{other}\in C(o_{other}))\geq 1-\alpha$. Figure 7 (b) and  7 (f) shows the increasing trend of confidence coverage in cammarl.

#### Model accuracy and loss.

In Figure 7 (c) and Figure 7 (d) we show the conformal model’s accuracy and loss respectively for CN and LBF in Figure 7 (g) and Figure 7 (h). The model accuracy, as expected, increases with more data coming in to train over time and the loss correspondingly decreases.

## 7 Conclusion

In this article, we propose a novel MARL algorithm, cammarl, which calls for confident reasoning about other artificial agents in the environment and benefiting from inferences about their behavior. Through experiments in two cooperative multi-agent tasks, CN and LBF, we showed that guiding an agent’s decision-making by inferring other agents’ actions in the form of conformal sets, indeed helps in achieving better performances of the learning agents. By using conformal prediction, we were also able to ensure the estimation of predictive sets that covered the real predictions of the intentions of other agents with a very high pre-specified probability of 95%.

Limitations and Future Works: In our paper, we analyzed cammarl with two agents, however, cammarl is certainly generalizable to bigger networks or more simple classifiers, and analyzing its changing performance on varying buffer sizes can help in better comprehending its efficiency. Second, it would be interesting to investigate the cammarl’s scalability to a system of many agents (say 100 or 1000) or on more complicated multi-agent environments such as tasks requiring a higher need for coordination. Thirdly, our mathematical model in Section 3.1 makes an assumption that the state space is accessible globally which may not be the case in some problems. Finally, in this work, we restricted the agents to infer the behavior of other agents only via conformal sets; it would be interesting to study the cases where more ways of sharing information or modeling agents’ behavior are additionally allowed.

## Appendix

## Appendix A Environments

Figure: Figure 8: Multi-agent cooperative environments used in this study: (a) OpenAI MPE’s Cooperative Navigation: Agents (blue) learn to cover the two landmarks (black) avoiding collisions. The figure shows cooperative navigation with 2 agents (N=2) and 2 landmarks (L=2). and (b) Level-based foraging: Agents must collect food and learn to cooperate using sparse rewards. This is a 12 $\times$ 12 level-based foraging grid-world with 2 cooperative players and 4 food locations. (c) Pressure Plate: Agents must stand on the pressure plate to keep the gates open for one of the agents to reach the goal. This is a pressure plate environment with 4 agents.
Refer to caption: extracted/5399101/images/cooperative_navigation.png

#### Cooperative Navigation ( CN ) (Mordatch & Abbeel, 2017 ; Lowe et al., 2017 ) .

In this task, agents are expected to learn to navigate and cover all the landmarks cooperatively and without colliding.
Each agent can perceive the other agents and landmarks within its reference frame (in the form of relative positions and velocities) and can take discrete actions to move around (left, right, up, down, stay) in the environment. The agents receive a team reward (so $r_{self}$ and $r_{other}$ are the same in this case) which is calculated as the minimum of the distance of the agents’ and landmarks’ ($x_{i}$, $y_{i}$) positions in the grid world. This reward, based on their proximity (or distance) from each of the landmarks, forces the need for cooperation in order to succeed in the task. Furthermore, agents are penalized upon collisions. Formally, the reward function in this environment can be defined as

$$ $r=\left[-1*\sum_{l=1}^{L}min_{\{n\in\mathcal{N}\}}(distance(n,l))\right]-c$ $$

where $|\mathcal{N}|$ is the number of agents and L are the landmarks in the environment. Here, c is the number of collisions in an episode and the agents are penalized with -1 for each time two agents collide.

#### Level-based foraging ( LBF ) (Albrecht & Ramamoorthy, 2015 ) .

In this environment, $\mathcal{N}_{self}$ and $\mathcal{N}_{other}$ are part of a 12$\times$12 grid world which contains four randomly scattered food locations, each assigned a level. The agents also have a level of their own. They attempt to collect food which is successful only if the sum of the levels of the agents involved in loading is greater than or equal to the level of the food. This is a challenging environment, requiring agents to learn to trade off between collecting food for their own and cooperating with the other agent to acquire higher team rewards. Moreover, this environment has sparse rewards making it difficult to learn and operate independently in the environment. In particular, each agent is rewarded equal to the level of the food it managed to collect, divided by its level (its contribution).

#### Pressure Plate 3 3 3 https://github.com/uoe-agents/pressureplate

In this domain, the agents are expected to learn to co-operate in traversing the gridworld to collect the yellow treasure chest. Each agent is assigned a pressure plate that only they can activate. That agents must stand on the pressure plate to keep the corresponding doorway to open while the other agents can go through it leaving the agent behind. Each agent can only view a limited portion of the environment. If an agent is in the room with their assigned plate, their reward is the negative normalized Manhattan distance between the agent and plate’s position, else the reward is the difference between the current and desired room number.

Figure: Figure 9: Comparing the performance of agents when trained with different variants of cammarl.
Refer to caption: extracted/5399101/images/conformal-ablation-cn.png

#### Google Football (Kurach et al., 2020 )

For our task, we use the 3 vs 1 with keeper game which is one of the 5 domains in the Football Academy of Google Research Football domain. The main agent controls 3 agents whose objective is to score a goal. The opponent, consisting of 1 defender and a keeper will try to prevent scoring the goal. This environment requires cooperation among the 3 players to score, including skills like passing the ball. The agents receive a reward when it successfully scores a goal past the opponent.

## Appendix B Variations of the cammarl algorithm

As noted earlier, the output of the conformal prediction model, i.e., the conformal sets, are of varying sizes in different situations. So, we came up with numerous ways to be able to use them to implement cammarl. In this section, we discuss and compare them and speculate some pros and cons for each of them.

#### cam-padding .

The conformal model outputs a set containing the action predictions in the decreasing order of their probability of being the true actions. In other words, the first element in the set is the highest probable action, the next is second highest probable, and so on. The maximum set size being $|\mathcal{A}_{other}|$, we try padding the set with zeros to fix its size when used as input in cammarl. We hypothesise that in this way, $\mathcal{N}_{self}$ must be able to learn to infer the information about the actions along with the notion of their importance. Figure 9 also supports this hypothesis by showing the reasonable performance of this version of cammarl(green curve). Nevertheless, such padding can be undesirable, particularly because zeros need not necessarily mean “no information”, and we try to remove it in the versions discussed next.

#### cam-binary .

In this method (also discussed earlier in Section 4), we encode the conformal sets into binary strings. We start with a vector of zeros of size $|\mathcal{A}_{other}|$ and fire up the bits corresponding to the output actions in the sets. The orange curve in Figure 9 shows that this version of cammarl outperforms all the other versions.

#### cam-penultimate .

Here, we modify cammarl to now share the embedding (representations) learned in the conformal prediction model as input to $\mathcal{N}_{self}$. The size of embedding is fixed and this way, padding of conformal action sets in cammarl can be avoided. As shown in Figure 9 (blue curve), cammarl with representations also manages to obtain returns close to binary-cammarl and padded-cammarl. We also note here that, binary-cammarl and padded-cammarl still performs slightly better than cammarl with representations.

Interestingly, all versions perform almost equivalently for the use-cases tested in this article. Any method can be used depending on the application at hand. For instance in medical use-cases, the knowledge of ranks of conformal actions is critical, and so cp-padding can be used. In this article, we choose cp-binary. It is a simple way to ensure fixed-sized inputs for $\mathcal{N}_{self}$ in cammarl and empirically works very well, and hence we propose this as a generic solution. We note here that, the embeddings here are not being passed in addition to the set of predictions.

## Appendix C MARL agents: Implementation details

### C.1 Partially observable MDP

The partially observable MDP defined and used in this study has numerous parameters as defined previously. Here is a table for quick reference (Table 1).

**Table 1: Parameters in our POMDP**
| Symbol | Description |
| --- | --- |
| i | self or other |
| $N_{i}$ | Agent i |
| S | Set of possible states of the environment |
| $A_{i}$ | Set of available actions for agent i |
| $O_{i}$ | Set of local observations of agent i |
| T | State transition function |
| C | Conformal Prediction model |
| $\pi_{\theta_{i}}$ | Agent i’s decision policy |
| $r_{i}$ | Reward function for agent i |
| $\gamma$ | Discount factor |
| T | Time horizon (length of an episode) |

We use proximal policy optimization (PPO) (Schulman et al., ) to update the decision-making policy for both the RL agents, however, any other RL algorithm could be used alternatively. For the individual actor and critic networks, we used 2 fully-connected multi-layer perceptron (MLP) layers. For the conformal prediction model $\mathcal{C}$, we use another fully-connected MLP with 2 layers each with 64 hidden nodes. All the agents and the model $\mathcal{C}$ collect their individual experiences and train their own policies independently.

We add regularization to the conformal model to encourage small set sizes. This regularization is controlled by two hyper-parameters $\lambda$ and $k_{reg}$. Each time the conformal model is trained, we choose the $\lambda$ and $k_{reg}$ parameters from a set that optimizes for small sizes of the action set. The $k_{reg}$ values are dependent on the logits, however, the $\lambda$ values are in a set $[0.001,0.01,0.1,0.2,0.5]$.

## Appendix D Visualization of Learned Policy

In this section, we visualize the learned policy in Pressure Plate with cammarl demonstrating cooperation between the 4 agents.

Figure: Figure 10: Visualization of the policy learned by cammarl in Pressure Plate with 4 agents
Refer to caption: extracted/5399101/images/cammarl-4p-1.jpg

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: I would like some more information on why the conformal predictions outperform other approaches based on predictions that include uncertainty. The authors test this in Section 5, but they do not really give enough information on the alternative approach (APU) for me to understand. I have trouble following the arguments in the paragraph starting on line 469, and I would appreciate additional information/clarifications to better follow these arguments.
Related to this: I have difficulties following the sentence in line 423ff: “(5) CAMMARL can be preferred over strong benchmarks such as EAP owing to its higher interpretability due to the theoretical guarantees of conformal predictions in terms of coverage (Angelopoulos et al., 2020) (discussed more in Section 6).” – I am not sure that there is enough evidence for claiming that the theoretical guarantees of conformal predictions are the reason for the better performance. Firstly, these theoretical guarantees are only valid under certain assumptions, and I am not sure they are fulfilled in this case. Secondly, my intuition would be that the reason is that (a) uncertainty information does help and (b) maybe the specific format provided by the conformal predictions is easier to handle than other uncertainty predictions. In any case, the sentence should be weakened and some additional discussion in Section 5 would be appreciated. 
In this context, the reference to Section 6 is also unclear, maybe you mean Section 5?
soundness: 3
strengths: The main novel idea is original and seemingly effective. The approach is presented clearly, and the experiments are well-designed. This is a convincing paper.
summary: The paper proposes to extend MARL by providing agents with conformal predictions of other agents’ actions. By numerical experiments, the authors demonstrate convincingly that the approach can lead to faster convergence and better policies. They also demonstrate that the conformal prediction outperforms a probabilistic prediction of the actions.
weaknesses: I would wish for some more explanation/insights on why conformal predictions would outperform other uncertainty-aware predictions. See questions for more details.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: Could you clarify how the adapted conformal calibration in CAMMARL differs from existing conformal methods in multi-agent reinforcement learning? Is this calibration uniquely addressing specific challenges or nuances in multi-agent environments?

Improving the visual clarity of the figures and plots would greatly help in interpreting the data. A tabular representation of evaluation metrics would be beneficial.
soundness: 3
strengths: The paper introduces a novel integration of conformal prediction with multi-agent reinforcement learning (MARL. Providing confidence sets enables agents to make a more meaningful decision when the actions of other agents may not be directly observable.
The paper is well organized and clear in the presentation of the methods used. The prediction module provides an important framework that can be used to create more adaptive and robust multi-agent systems.
summary: The paper presents an algorithm CAMMARL, which introduces a conformal prediction model to inform each agent of the confidence sets of actions taken by other agents. 
The method allows agents to model other agent’s actions along with a confidence set, leading to more informed policy learning. The authors evaluate CAMMARL in fully cooperative tasks with 2, 3, and 4 agent scenarios. The authors perform a comparison of their method with other baselines with increasing levels of agent modeling or information sharing. The authors also perform experiments in a mixed setting without a cooperation requirement.
weaknesses: The experimental results could be presented in a more compelling manner. Specifically, the plots in Figures 3a, 4a, and 5 are hard to read due to overlapping lines. Improving the clarity and readability of these figures would make it easier for readers to interpret the findings.

 Additionally, while the paper discusses trends in confidence coverage, this claim could be more robustly supported with quantitative evidence. For example, including success rates and reward values would provide a clearer picture of agent performance improvements during evaluation.

A comprehensive assessment of agent performance with the trained model is missing. Adding metrics such as success rates, average rewards, and perf across varying conditions during post-training evaluation would significantly strengthen the experimental results section.

The claim regarding trends in confidence coverage needs more support, as the current presentation in Figure 7 is inconclusive. Similarly, the accuracy and loss curves in Figure 7 lack clarity.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 2
questions: 1. Given the global state access assumption in the mathematical model, could the authors clarify how CAMMARL would perform in environments with strictly local observations? Are there adaptations or modifications that would allow it to operate effectively under full partial observability?
2. Given the potentially high memory requirements, especially in multi-agent settings with extended time horizons, have the authors analyzed the memory complexity of CAMMARL?
soundness: 3
strengths: 1. **Novel Application of Conformal Predictions for Action Modeling:** CAMMARL´s use of conformal prediction sets provides a novel approach to handle uncertainty in agent actions without distributional assumptions. These conformal prediction sets enable agents to act with quantified confidence which offers an advantage where precise action predictions are difficult. Moreover, conformal action predictions provides better interpretability by offering agents clear confidence intervals on co-agent actions. 
2. **Empirical Results:** Initial experiments have supporting results, demonstrating CAMMARL´s faster convergence and higher rewards in cooperative tasks compared to baselines.
summary: This paper introduces CAMMARL (Conformal Action Modeling in Multi-Agent Reinforcement Learning), a novel algorithm for MARL that uses conformal prediction to model the actions of other agents as probabilistic sets, i.e. conformal action sets, to improve cooperative decision-making under uncertainty. Conformal prediction sets that CAMMARL provide are distribution-free confidence intervals for actions and their integration improves adaptability in cooperative multi-agent environments. The proposed framework is evaluated in several multi-agent cooperative tasks where CAMMARL demonstrates improved convergence and performance over baseline approaches.
weaknesses: 1. **Assumption of Global State Access:** As noted by the authors, CAMMARL assumes full access to the state space, which may limit its applicability in real-world settings. Further exploration of adaptations to handle true partial observability could improve its practical relevance.
2. **Simplistic Experimental Scenarios:** The chosen experimental environments are relatively simple and may not fully capture the complexity of real-world, non-stationary, partially observable environments.
3. **Lack of Theoretical Convergence Analysis:** Although the conformal prediction set approach used in CAMMARL provides interpretability and a bounded measure of control over agent uncertainty through confidence sets, a formal convergence analysis would strengthen the framework´s theoretical foundation.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 1
questions: 1. The algorithm demonstrates superior performance on Google Football compared to other tasks. Could you provide some insights into what types of tasks the proposed algorithm may be most effective for?
2. How does the setting of prediction accuracy threshold for selecting the action set impact the algorithm's performance?
soundness: 2
strengths: 1. The paper is well-motivated. The issue of uncertainty prediction in opponent modeling is interesting and noteworthy.
2. This paper introduces conformal prediction to quantify uncertainty in action predictions, which appears technically feasible.
summary: The paper proposes a CAMMARL method, which introduces conformal prediction into opponent modeling to quantify uncertainty in action predictions. The authors conduct experiments on four MARL environments to evaluate the method.
weaknesses: 1. The organization of the paper is poor, especially in the experiments, making it hard to read. I suggest introducing all baselines before discussing the results.
2. The paper lacks comparisons with existing opponent modeling algorithms. Moreover, the algorithm's performance seems to have no obvious advantage in many experimental results.
3. The motivation of the method in Section 3 is not clearly explained. Improving the clarity of the writing would be very helpful.
4. I suggest the authors include some technical background of conformal prediction.

Meta-review: This paper proposes CAMMARL, a new algorithm for multi-agent reinforcement learning that uses conformal prediction to model the actions of other agents as probabilistic sets, i.e. conformal action sets, to improve cooperative decision-making under uncertainty. The proposed framework is evaluated in several multi-agent cooperative tasks where CAMMARL demonstrates improved convergence and performance over baseline approaches. The introduction of conformal prediction into MARL, especially for action modeling, is new, and the empirical results are mostly effective. However, there were some major concerns regarding the insufficiency and convincingness of the experimental results when compared with several important baselines, as well as some issues regarding the clarity and presentation of the experimental results. I suggest the authors incorporate the feedback from this round, and prepare for other upcoming machine learning venues.

Decision: Reject