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


                                                                                                                                                                                                           RE-0




                                 Multi-modal Feature Fusion




                                                                                      Vision Transformer Blocks
      TIR




                                                                                                                        Multi-modal Feature
                                                                  𝐿𝑎𝑢𝑥




                                                                                                                                                             Multi-Head Attention
             Linear Projection




                                                                                                                          Representation
                                                                                                                                                                                                                  𝐿𝑐e




                                                                                                                                                                                           Cosine Router
                                                                                                                                                                                                           RE-1
      NIR                                                                                                                                                                                                          +




                                                                                                                                                      Norm




                                                                                                                                                                                    Norm
                                                                   GE-2
                                                                GE-1
                                                               GE-0
                                                                                                                                                                                                                  𝐿𝑡𝑟𝑖
                                                                                                                                                                                                            …
                                                                 Weighted Sum
      RGB
                                                                   GE-2
                                                                 GE-1                                                                                                                                      RE-N
                                                               GE-0
                                                                                                                                                              𝐿𝑎𝑢𝑥

Figure 2. Overall architecture of MFRNet. MFRNet is built from the basic Transformer blocks inherited from vanilla ViT, with two
new modules (feature fusion module and feature representation Module) added to adapt to multi-modal object re-identification tasks.
In the blue box, the Feature Fusion Module (FFM) employs multiple simple generators to adaptively provide fine-grained interaction
information, while in the green box, the Feature Representation Module (FRM) employs diverse representation experts to extract and
combine modality-specific and modality-shared features. Here, GE refers to the generation experts in FFM, while RE represents the
representation experts in FRM. Notably, the figure illustrates the NIR+RGB → TIR interaction, with the same interaction applying to NIR
and RGB.
              N         T
                               
Sof tmax wR     (IN ), wR (IT ) . The weight generation func-                                                                            scenarios in a modality-complementing way. Specifically,
tion is modality-specific, and there are total 6 functions for                                                                           for the modality missing scenarios during testing, we de-
3 modalities.                                                                                                                            velop conditional reconstructed rules for modality M as:
For the feature generation function g(·), as mentioned be-
                                                                                                                                                (
                                                                                                                                                                      S
                                                                                                                                                            P
                                                                                                                                           g      λIM + S∈A wM           (IS ) × g(IS ) if M present
fore, the transformation between different modality images                                                                                IM = P             S
is simple but variant. Compared to complex structures, sim-                                                                                                w
                                                                                                                                                      S∈A M s   (I ) ×  g(I S)           if M missing,
ple generators work well (Zhang et al., 2024b). Therefore,                                                                                                                                           (6)
we apply the mixture-of-experts (MoE) architecture (Li                                                                                   where A denotes available modalities. For example, if RGB
et al., 2022) to combine multiple simple generators. We                                                                                  is missing, its features are generated based on NIR and TIR
                                                                                                                                                                 N                      T
define the simplest generation expert gf (·) as:                                                                                         as follows: IR = wR       (IN ) × g(IN ) + wR    (IT ) × g(IT ).
                                                                                                                                         Here, g(IN ) denotes the features for RGB generated from
             gf (I) = conv2 (drop (conv1 (I))) .                                                                  (4)                    NIR, g(IT ) represents the features for RGB generated from
                                                                                                                                                N               T
                                                                                                                                         TIR, wR  (IN ) and wR    (IT ) are the respective weights.
Then we enhance it using sparse MoE technology. Specifi-
cally, we categorize feature generation into two types based
on the different modalities: {IN →R , IT →R , IR→N } and                                                                                 3.2. Feature Representation Module
{IT →N , IR→T , IN →T }. Since each of the three modalities                                                                              Existing approaches face fundamental challenges in bal-
can generate features for the other two modalities, we define                                                                            ancing modality-shared and modality-specific information.
two moe layers. Finally, the feature generation function is                                                                              While employing separate networks for each modality pre-
as follows:                                                                                                                              serves modality-specific characteristics, this introduces sig-
         Iexperts = {gf (f ci (I)) | for i ∈ [1, K]}                                                                                     nificant structural and computational redundancy. Con-
                                                                   W1F IWeF                                                              versely, using a fully shared single network for all modalities
         Srouter = Sof tmax(                                                    )                                                        exclusively captures shared representations across modali-
                                                                 τ W1F I ∥WeF ∥                                   (5)
                                                                                                                                         ties. Hence, we propose the Feature Representation Mod-
         Gate(X) = T opk (Srouter )                                                                                                      ule (FRM), which integrates a Mixture-of-Experts architec-
         g(I) = Gate(I) · Iexperts ,                                                                                                     ture to preserve valuable modality-specific information with
                                                                                                                                         parameter-efficient implementation.
where f ci refers to the linear layer for uth expert, Srouter
represents cosine router which indicates routing scores for                                                                             With the reconstructed multi-modal image features I g =
                                                                                                                                          g    g
selecting experts. ∥·∥ indicate the L2 normalization, and τ                                                                             (IR , IN , ITg ), we use a vision transformer (ViT) to extract
indicates the learnable temperature scaler. W1F is the weight                                                                           fundamental features. Within this module, we aim to capture
of linear projection which aims to project the input token                                                                              modality-specific feature representations within a unified
to a low-rank subspace, while WeF is the expert embedding                                                                               architectural framework.
that transforms the feature to final scoring distribution. Note
                                                                                                                                         Specifically, we modify the residual attention layer based
that k = 1 represents only the highest-scoring expert is
                                                                                                                                         on RepAdapter as follows: To extract unique features for
selected for feature generation each time.
                                                                                                                                         different modality data, we employ RepAdapter (Luo et al.,
As stated before, although do not have any specific training,                                                                            2023), which is designed to rapidly adapts to vision tasks
we find that FFM can also work well for modality-missing                                                                                 by inserting adapter layers between key layers. Specifically,

                                                                                                                            4
