We extend the recent supervised contrastive learning method [1]} to the MARL setting by considering multiple trajectories during learning. We refer to this loss formulation as Communication Alignment Contrastive Learning (CACL). In this case, we consider messages within a trajectory to be different views of the same data sample with the same label. Let \(i \in I\)  be an index of a message in a batch. \(j\)  be an index of a trajectory in a batch of trajectories \(H\) , \(\mathbf {m_j}\)  be a set of messages sent in a trajectory \(j\)  and \(A(i) \equiv I \setminus \lbrace i\rbrace  \) . The loss is in the form of:
\(L_{CACL} = \sum _{i \in I} \frac{-1}{\vert P(i) \vert } \sum _{p \in P(i)} \log [\exp (m_i \cdot m_p / \tau )] - \log [\sum _{a \in A(i)} \exp (m_i \cdot m_a / \tau )]\) 
