---
title: Chiral Transformer Fusion Block in MoCTEFuse
url: https://www.emergentmind.com/topics/chiral-transformer-fusion-block-ctfb
type: topic
---

# Chiral Transformer Fusion Block in MoCTEFuse

Searching arXiv for the named papers and closely related context.
arxiv_search query: "2507.20180 MoCTEFuse Chiral Transformer Fusion Block"
Chiral Transformer Fusion Block (CTFB) denotes, in MoCTEFuse, the core fusion unit inside each expert subnetwork of an illumination-gated Mixture of Chiral Transformer Experts for multi-level infrared and visible image fusion; it fuses infrared (IR) and visible (VI) features by jointly modeling intra- and inter-modal relationships through a windowed Transformer with an asymmetric cross-attention (ACA) mechanism [2507.20180]. In the same data record, an unrelated synthesis of the rational VOA/RCFT paper “Modular Exercises for Four-Point Blocks -- I” also uses “CTFB” to denote a vector of chiral four-point sphere core blocks together with its modular transformation law and fusion-braiding data [2002.11125]. The acronym therefore has a cross-disciplinary ambiguity, but in computer-vision usage it refers to the transformer fusion block introduced within MoCTEFuse.

## 1. Definition, Motivation, and Functional Role

Within MoCTEFuse, the CTFB is the core fusion unit in each expert subnetwork of the Mixture of Chiral Transformer Experts (MoCTE). Its stated function is to fuse IR and VI features by jointly modeling intra- and inter-modal relationships, using a windowed Transformer with ACA. “Chiral” denotes asymmetry in the cross-attention direction: the modality deemed primary supplies the queries, while the other modality, termed auxiliary, supplies supplementary keys and values. This design is motivated by the observation that under high illumination, VI carries more reliable textures and details, whereas under low illumination, IR carries stronger target and contrast cues; many methods that directly merge source images are described as suffering modality bias because they fuse modalities uniformly rather than conditionally [2507.20180].

The primary–auxiliary assignment is not fixed globally. MoCTE contains two experts: HI-MoCTE and LI-MoCTE. In HI-MoCTE, visible is primary and infrared is auxiliary, yielding an HI-CTFB; in LI-MoCTE, infrared is primary and visible is auxiliary, yielding an LI-CTFB. An illumination-sensitive gate estimates illumination probability from the VI image and weights the high- and low-illumination experts accordingly. This means that the operational semantics of “chiral” are illumination-dependent rather than merely architectural.

A common misunderstanding is to treat the asymmetry as a hard exclusion of the auxiliary modality. The paper instead defines ACA so that the primary modality supplies queries, while attention is computed over concatenated keys and values from both modalities. The auxiliary modality is therefore not discarded; it is incorporated as supplementary context under a directional attention rule.

## 2. Architectural Placement and Block Topology

The MoCTEFuse pipeline takes an IR image $I_{ir}$ and a VI image $I_{vi}$. Two modality-specific encoders first extract features. The shallow feature extractor is a $3\times 3$ convolution followed by LReLU. The deep feature extractor uses Residual Transformer Blocks (RTB) and Residual Dense Blocks (RDB), described as being “as in DCTNet.” These stages produce aligned features $Z_{vi}^{in}, Z_{ir}^{in}\in R^{H\times W\times C}$, which serve as CTFB inputs [2507.20180].

Each CTFB partitions feature maps into non-overlapping local windows of size $M\times M$, with $M=8$ by default, producing $HW/M^2$ windows. Each window is reshaped to a sequence of shape $M^2\times C$, and a linear projection (LP) maps inputs to the attention space. The ordering inside the block is explicitly given as
\[
\mathrm{LP}\rightarrow \mathrm{LN}\rightarrow \mathrm{ACA}\rightarrow \text{residual},\qquad
\mathrm{LN}\rightarrow \mathrm{FFN}\rightarrow \text{residual}.
\]
The FFN uses two MLP layers with GeLU activation. Attention is local within each window rather than global, and the paper does not specify multi-head attention; the formulation is single-head. A shifted window strategy is used in conjunction with the windowed LP and ACA.

The forward equations are written for both directional paths. For the path “IR$\rightarrow$VI” with VI as primary and IR auxiliary,
\[
Z_{ir\rightarrow vi}^{ACA}=\mathrm{ACA}(\mathrm{LN}(\mathrm{LP}(Z_{vi}^{in},Z_{ir}^{in})))+\mathrm{LP}(Z_{vi}^{in}),
\]
\[
Z_{ir\rightarrow vi}^{out}=\mathrm{FFN}(\mathrm{LN}(Z_{ir\rightarrow vi}^{ACA}))+Z_{ir\rightarrow vi}^{ACA}.
\]
For the path “VI$\rightarrow$IR” with IR as primary and VI auxiliary,
\[
Z_{vi\rightarrow ir}^{ACA}=\mathrm{ACA}(\mathrm{LN}(\mathrm{LP}(Z_{ir}^{in},Z_{vi}^{in})))+\mathrm{LP}(Z_{ir}^{in}),
\]
\[
Z_{vi\rightarrow ir}^{out}=\mathrm{FFN}(\mathrm{LN}(Z_{vi\rightarrow ir}^{ACA}))+Z_{vi\rightarrow ir}^{ACA}.
\]
The outputs $\{Z_{ir\rightarrow vi}^{out}, Z_{vi\rightarrow ir}^{out}\}$ are then fed into the next CTFB stage. Because CTFBs are stacked across multiple hierarchy levels in each expert, the architecture performs progressive refinement of modality-specific and cross-modal information rather than single-pass fusion.

## 3. Asymmetric Cross-Attention as the “Chiral” Mechanism

For a given window, the tokens are denoted $X_{vi}, X_{ir}\in R^{M^2\times C}$. The block uses distinct learnable modality-specific projections
\[
\{W_{vi}^Q, W_{ir}^Q\},\ \{W_{vi}^K, W_{ir}^K\},\ \{W_{vi}^V, W_{ir}^V\}\in R^{C\times C}.
\]
The projected queries, keys, and values are
\[
\{Q_{vi},K_{vi},V_{vi}\}=\{X_{vi}W_{vi}^Q,\ X_{vi}W_{vi}^K,\ X_{vi}W_{vi}^V\},
\]
\[
\{Q_{ir},K_{ir},V_{ir}\}=\{X_{ir}W_{ir}^Q,\ X_{ir}W_{ir}^K,\ X_{ir}W_{ir}^V\}.
\]
The keys and values are concatenated along the token dimension:
\[
K=\mathrm{Concat}(K_{vi},K_{ir}),\qquad V=\mathrm{Concat}(V_{vi},V_{ir}).
\]
This is the formal point at which the auxiliary modality enters the attention computation [2507.20180].

The two directional ACA paths are then defined as
\[
Z_{ir\rightarrow vi}^{ACA}=\mathrm{softmax}\!\left(\frac{Q_{vi}K^T}{\sqrt{d_k}}+B_1\right)V,
\]
\[
Z_{vi\rightarrow ir}^{ACA}=\mathrm{softmax}\!\left(\frac{Q_{ir}K^T}{\sqrt{d_k}}+B_2\right)V,
\]
where $d_k$ is the key dimension, equal to $C$ in the single-head formulation, and $B_1,B_2$ are learnable relative positional encodings. The visible-primary path corresponds to the HI-CTFB direction, and the infrared-primary path corresponds to the LI-CTFB direction.

This mechanism is “chiral” in the precise sense that the query source changes with the designated primary modality, while the attended context remains a concatenated cross-modal token set. The paper further states that there are two parallel directional paths, IR$\rightarrow$VI and VI$\rightarrow$IR, computed per block; expert specialization and illumination gating determine which direction dominates in forming the final fused output. This suggests that the asymmetry is implemented as a directional bias rather than as a one-direction-only information flow.

## 4. Illumination Gating, Output Formation, and Optimization

The illumination-sensitive gating network is a ResNet18-based classifier that takes the visible image as input and outputs probabilities $P_H$ and $P_L$ for high and low illumination through a final sigmoid activation. Its structure is given as Conv1: $7\times 7$, 64, stride 2; MaxPool $3\times 3$, stride 2; then ResNet18 stages Conv2–Conv5; Average Pool, Fully-Connected, Sigmoid, producing an output of $1\times 1$ interpreted as high- and low-illumination probabilities [2507.20180].

These probabilities modulate the experts and therefore the CTFBs nested inside them. Each expert decodes its fused features into a candidate fused image, denoted $I_f^H$ and $I_f^L$. The final output is
\[
I_f=P_H I_f^H + P_L I_f^L.
\]
The paper states explicitly that the prediction probability is used to assign appropriate weights to HI-MoCTE and LI-MoCTE, with the weighted output being the fused image. Decoder details are not elaborated beyond standard reconstruction from fused features.

Training is divided into two stages. The illumination gate is trained with binary cross-entropy,
\[
\mathcal{L}_{ISSN}=-y\log(P_H)-(1-y)\log(P_L),
\]
where $y$ is the ground-truth illumination label. The fusion network then uses three sub-losses:
\[
\mathcal{L}_{int}=\frac{1}{HW}\|I_f-I_{ir}\|_1+\frac{1}{HW}\|I_f-I_{vi}\|_1,
\]
\[
\mathcal{L}_{grad}=\frac{1}{HW}\bigl\||\nabla I_f|-\max(|\nabla I_{ir}|,|\nabla I_{vi}|)\bigr\|_1,
\]
\[
\mathcal{L}_{ssim}=0.5(1-\mathrm{ssim}(I_f,I_{ir}))+0.5(1-\mathrm{ssim}(I_f,I_{vi})).
\]
These are combined as
\[
\mathcal{L}_{total}=\alpha\mathcal{L}_{int}+\beta\mathcal{L}_{grad}+\gamma\mathcal{L}_{ssim},
\]
with $\alpha=1$, $\beta=5$, and $\gamma=10$ in experiments.

A distinctive element is the competitive mixture loss. Let the expert outputs be $o_i$ with fused images $I_f^i$ and probabilities $P_i$ from the gate, with $N=2$ experts and $P_1=P_H$, $P_2=P_L$. The per-expert loss is defined as $\mathcal{L}(o_i)=\mathcal{L}_{total}(I_f^i,I_{ir},I_{vi})$, and the competitive loss is
\[
\mathcal{L}_{fusion}=-\ln\left(\sum_{i=1}^{N} P_i e^{-\mathcal{L}(o_i)}\right).
\]
Its derivative is written as
\[
\frac{\partial \mathcal{L}_{fusion}}{\partial o_i}
=
\left(
\frac{P_i e^{-\mathcal{L}(o_i)}}{\sum_{j=1}^{N} P_j e^{-\mathcal{L}(o_j)}}
\right)\cdot \mathcal{L}'(o_i).
\]
The paper interprets this as encouraging experts to compete under the illumination distribution, thereby sharpening specialization of the high- and low-illumination branches.

Implementation details report window size $M=8$, training resolution $128\times 128$ normalized to $[0,1]$, testing at original resolution, Adam with a warmup cosine annealing learning-rate schedule, 60 epochs, and batch size 8. The gate is trained first and then frozen while the fusion model is trained with the competitive loss.

## 5. Complexity, Empirical Behavior, and Reported Performance

Let $N=H\cdot W$ and let each local window contain $M^2$ tokens. The paper gives the single-head ACA complexity per window as $O((M^2)^2\cdot C)$ in compute and $O(M^4)$ in attention memory. Across all windows, this becomes
\[
O\!\left(\frac{N}{M^2}\cdot M^4\cdot C\right)=O(N\cdot M^2\cdot C)
\]
for compute and
\[
O\!\left(\frac{N}{M^2}\cdot M^4\right)=O(N\cdot M^2)
\]
for memory. With $M=8$, attention is therefore local and described as more tractable than global $O(N^2)$. Each CTFB uses modality-specific linear projections for $Q/K/V$, two learnable relative positional encodings, LayerNorms, and a two-layer MLP FFN with GeLU. The paper does not report parameter counts, and no weight sharing across experts is stated [2507.20180].

Ablation experiments isolate the contributions of HI-MoCTE, LI-MoCTE, and the competitive loss. On MSRS, the full MoCTEFuse reports EN $6.7270\pm 0.6934$, SD $43.1572\pm 13.3259$, MI $3.6316\pm 0.6553$, and VIF $1.0398\pm 0.1001$; removing HI-MoCTE gives EN $6.6065$, SD $42.4878$, MI $3.4835$, VIF $1.0196$; removing LI-MoCTE gives EN $6.6235$, SD $42.0666$, MI $3.3977$, VIF $0.9938$; replacing the competitive loss with $\mathcal{L}_{total}$ gives EN $6.4803$, SD $42.4879$, MI $3.2736$, VIF $0.9369$. On DroneVehicle, the full model reports EN $7.3718\pm 0.2853$, SD $48.4722\pm 9.5070$, MI $3.7781\pm 0.6231$, and VIF $0.8550\pm 0.1638$; the corresponding ablations yield EN $7.3194$, SD $46.2482$, MI $3.6895$, VIF $0.8329$ without HI-MoCTE, EN $7.3085$, SD $45.7927$, MI $3.6400$, VIF $0.8267$ without LI-MoCTE, and EN $7.3111$, SD $45.7862$, MI $3.7582$, VIF $0.8279$ without the competitive loss.

Across DroneVehicle, MSRS, TNO, and RoadScene, the paper states that MoCTEFuse achieves superior fusion performance and state-of-the-art averages on EN, SD, MI, and VIF in most cases. It also reports the best detection mean Average Precision of $70.93\%$ on MFNet and $45.14\%$ on DroneVehicle. Qualitatively, the model is described as preserving salient IR targets under low light, preserving VI details under high light, and reducing ghosting artifacts under weak misalignment on DroneVehicle. The principal limitation noted is relatively high computational cost, since windowed attention remains tractable but stacked CTFBs at multiple stages in two experts are not lightweight.

## 6. Cross-Disciplinary Ambiguity: the Unrelated VOA/RCFT Usage

A separate use of “CTFB” appears in a concise synthesis of “Modular Exercises for Four-Point Blocks -- I,” where the acronym denotes the vector of chiral four-point sphere core blocks together with its modular transformation law under the appropriate modular group and the fusion-braiding data of the rational VOA/RCFT [2002.11125]. In that setting, the construction packages the chiral four-point block decomposition in intermediate channels, the modular map from the sphere cross-ratio to the torus modulus, vector-valued modularity of the block vector, crossing and fusion modular transformations, and the modular-invariant full correlator.

The same synthesis states that the sphere cross-ratio $x$ is identified with the torus modulus $\tau$ through the modular lambda function,
\[
x=\lambda(\tau)=\frac{\theta_2(\tau)^4}{\theta_3(\tau)^4},
\]
and that the block vector becomes a weight-0 vector-valued modular form for $P\Gamma(2)$, $P\Gamma_0(2)$, or $\mathrm{PSL}_2(\mathbb{Z})$, depending on the multiplicities of identical external insertions. In this language, crossing symmetry is recast as modular symmetry, and the full four-point correlator is modular invariant. The synthesis also highlights a sphere–torus correspondence relating certain sphere quantities of a family $\mathcal{T}_s$ to torus quantities of another family $\mathcal{T}_t$.

This usage is unrelated to the transformer block in MoCTEFuse. The shared acronym does not indicate methodological continuity between infrared-visible image fusion and rational VOA/RCFT. A plausible implication is that citations using “CTFB” require disambiguation by field, since the term can refer either to an asymmetric cross-attention fusion block in multimodal vision or to a vector-valued modular-form packaging of chiral four-point blocks in conformal field theory.

Source: https://www.emergentmind.com/topics/chiral-transformer-fusion-block-ctfb