                             Multi-Modal Object Re-Identification via Sparse Mixture-of-Experts

the residual attention layer can be represented as:                   defined as the normalized routing weight corresponding to
                                                                      expert i summed over images as:
          Y = X + MH-Attn (LayerNorm(X)),
                                                           (7)
                                                                                                    X
                                                                                                         e
          Z = Y + RAda (LayerNorm(Y )),                                                Impe (Ib ) =     Srouter .          (11)
                                                                                                     I∈Ib

where X and Z are the input and the output of the current             The important loss Limp is given by the squared coefficient
layer, MH-Attn(·) represents the multi-head attention layer,          of variation of the importance distribution over experts as:
RAda (·) represents the RepAdapter layer. The formula of
the RepAdapter layer is as:                                                                        ST D(Imp(Ib )) 2
                                                                                 Limp (Ib ) = (                    ) .          (12)
                                                                                                  M EAN (Imp(Ib ))
RAda (Ylnorm ) = Ylnorm + conv B (drop (conv A (Ylnorm ))),
                                                                 Meanwhile, the load loss Lload can be given as:
                                                             (8)
                                                                                       ST D(load(I))
where Ylnorm refers to the Y after the LayerNorm layer,                Lload (Ib ) =                     ,
                                                                                      M EAN (load(I))
conv A and conv B represent 1D convolutions with kernel                                      P
                                                                       with loade (Ib ) = I∈Ib pe (I),                          (13)
size of 1 × 1 and groups set to 1. Similarly, to better adapt to
multi-modal data, we use RAda as the expert and enhance it                                     ηk − (W1 IWe )e
                                                                       and pe (I) = 1 − Φ(                       ).
by the MoE (Li et al., 2022) layer.                                                                    σ
                                                                      Herein, the ηk refers to the Kth largest entry after softmax
      Ada                      W1R Ylnorm WeR
     Srouter = Sof tmax(                         ),                   while Φ indicates the cumulative distribution function of a
                             τ W1R Ylnorm ∥WeR ∥           (9)        Gaussian distribution. Therefore, the whole auxiliary losses
                                 Ada                                  Laux is formulated as:
     GateAda (Ylnorm ) = T opk (Srouter ),
                                                                                                   Limp + Lload
where τ = 0.01 and k = 1. It is important to note that                                  Laux =                  .               (14)
                                                                                                        2
since the number of modalities is 3, the number of experts
should be greater than 3. W1R is the weight of the linear             Finally, the total loss function of MFRNet is given as fol-
projection, which aims to project the input token to a low-           lows:
rank subspace, while WeR is the expert embedding that
transforms the feature to the final scoring distribution.               L = LVceiT + LVtriiT + (Lmoe1   moe2     Ada
                                                                                                 aux + Laux ) + Laux . (15)
                                      moe
Based on the above derivation, using lAda to represent the
MoE-enhanced RepAdapter, the modality-specific features               4. Experiments
are as follows:
                                                                      4.1. Implementation
                           moe
                  Z = Y + lAda (Ylnorm ).                 (10)        Datasets. We evaluate our model performance on three
                                                                      public multi-modal object ReID datasets. Specifically,
Here, the auxiliary loss for MoE is denoted as LAda
                                                aux .                 RGBNT201 (Zheng et al., 2021) is a multi-modal person
                                                                      ReID dataset, which includes 4,787 aligned RGB, NIR, and
3.3. Objective Function                                               TIR images from 201 identities. RGBNT100 (Li et al., 2020)
                                                                      is a large-scale multi-modal vehicle ReID dataset compris-
As shown in Figure 2, our model consists of three main
                                                                      ing 17,250 image triples. It covers a wide range of challeng-
loss functions: losses for the ViT backbone, auxiliary losses
                                                                      ing visual conditions, making it suitable for assessing the ro-
for the multi-modal feature completion module, and auxil-
                                                                      bustness of vehicle ReID methods. MSVR310 (Zheng et al.,
iary losses for the modality-specific feature representation
                                                                      2022) is a small-scale multi-modal vehicle ReID dataset that
module. For the losses for the ViT backbone, we follow
                                                                      includes 2,087 high-quality image triples captured across
previous research by using label smoothing cross-entropy
                                                                      diverse environments and time spans, providing complex
loss (Szegedy et al., 2016) and triplet loss (Hermans et al.,
                                                                      visual challenges for vehicle ReID evaluation.
2017) for optimizing the representation. Besides the basic
losses, following the (Riquelme et al., 2021; Li et al., 2022),       Evaluation protocols. To assess the performance of our
we define two auxiliary losses: important loss Limp and               method, we utilize the mean Average Precision (mAP) and
load loss Lload to balance the frequency being activated for          Cumulative Matching Characteristics (CMC) at Rank-K
the expert. The important loss Limp to encourage a balanced           (K = 1, 5, 10). These metrics are standard in this field and
usage of different experts across tokens and load loss Lload          provide a comprehensive evaluation of our model’s effec-
to encourage balanced assignment across experts. Specifi-             tiveness. Additionally, we present the number of parameters
cally, the importance of expert e in a batch of images Ib is          and FLOPs to analyze the complexity of our model.

                                                                  5
