betaFeedback

WorksComputer Science

REACT: Response-based Expert Assembly from Contextual Trajectories

Abstract

Dense feed-forward networks are unaffected by how their neurons are grouped: every neuron is evaluated. Sparse execution makes this grouping consequential, because each input can access only a few experts. An arbitrary partition can therefore retain pretrained weights while separating computations that an input needs together. We argue that upcycling should organize neurons according to their responses to similar inputs. To establish this correspondence, we introduce a context-guided upcycling approach REACT, Response-based Expert Assembly from Contextual Trajectories, that uses frozen denoising trajectories to connect input contexts with pretrained neuron responses. We first identify contexts after timestep-wise centering to account for distribution shifts across noise levels, then use their associated responses to allocate intact neurons to routed experts. The same contexts initialize the corresponding router entries, aligning expert contents with their intended inputs, while global activation statistics select an always-active shared expert. Layer-wise reconstruction and end-to-end adaptation refine this initialization for sparse execution. On ImageNet-1K, our approach achieves better generation quality while activating only 37.5% of the original FFN parameters and reducing total per-token activated parameters by 27.6%.

Introduction

In a dense feed-forward network (FFN), how hidden units are grouped has no functional effect because every input evaluates every unit. Sparse execution removes this invariance: once a token reaches only its top-KK experts, the grouping of pretrained units determines which computations remain accessible (Figure 1). Dense-to-sparse upcycling is therefore a correspondence problem between input contexts, pretrained unit responses, and router access, not merely a matter of reusing weights.

Figure 1. Why grouping matters under sparse execution. Orange marks the eight of 32 pretrained units needed by one token. Dense execution reaches all units, whereas a random partition leaves only four accessible through top-2 routing. REACT groups units by response and initializes each router row from the matching context, restoring access to all eight. This is a conceptual illustration, not a measurement.

This correspondence is particularly consequential for Diffusion Transformers (DiTs) (Peebles & Xie [17]), whose dense FFNs process every spatial token at every denoising step, whereas a sparse mixture-of-experts (MoE) layer activates only a few experts per token ([20, 14, 7]). Sparse upcycling reuses a dense checkpoint (Komatsuzaki et al. [11]), but weight reuse alone does not specify which pretrained functions each routing decision can access. Existing conversions replicate the dense FFN, partially reinitialize it, partition its neurons, or initialize the router from intermediate representations ([11, 15, 24, 28, 10]); recent LLM and CLIP methods couple expert construction with router initialization ([18, 3]), and Dense2MoE converts DiTs through importance-based initialization and distillation ([27]). We ask a narrower, diffusion-specific question: can denoising trajectories provide one context index that both allocates intact source FFN units to routed experts and initializes the corresponding router rows?

Diffusion makes this nontrivial because the same FFN serves every noise level, so activations pooled over a trajectory mix between-timestep mean shifts with the within-timestep variation that distinguishes local contexts. We introduce REACT (Figure 2) to address this. Frozen denoising trajectories provide FFN inputs and unit activations; subtracting original-timestep means and normalizing the residual directions yields a layer-local context partition. A trajectory-wide co-activation score selects units for an always-active shared expert, and cluster-conditioned response scores allocate units to routed experts, each copied intact as one input–nonlinearity–output tuple; padded units fill any remaining capacity. The normalized context centroids initialize the same-index rows of a learnable top-KK router, so context ee names both routed expert ee and router row ee. Layer-wise reconstruction against frozen dense teachers and end-to-end diffusion training then recover the sparse model.

Figure 2. REACT pipeline. (a) Frozen trajectories define timestep-centered token clusters whose responses assemble routed experts and whose centroids initialize same-index router rows; pooled co-activation selects shared units. (b) Only the router input is centered at run time; experts receive the original state. (c) Stage I matches sparse FFNs to dense teachers, and Stage II adapts the full denoiser.

Controlled recovery experiments on class-conditional ImageNet-1K at 256×256256 \times256 support this matched construction. REACT reports lower FID than bundled random initialization at every checkpoint from 100K to 500K for both DiT-XL and DiT-M sources (2.54 versus 2.78 and 8.60 versus 10.26 at 500K), and a matched M-source contrast that holds expert assembly fixed favors same-index router initialization (8.60 versus 8.90). A separately trained DiT-XL/2 conversion, REACT-M32, attains 2.21 FID versus 2.27 for DiT-XL/2 [17]. It activates 37.5% of the dense FFN parameters and uses 489M non-router parameters per token—27.6% fewer than the dense model’s 675M—while sampling 1.47× faster in a shared profiling setup.

Our contributions are:

  1. Layer-local token contexts derived from original-timestep-centered denoising trajectories, which separate cross-timestep shifts from the residual token geometry used for dense-to-sparse DiT conversion.

  1. A matched sparse initialization that allocates intact source units by cluster-conditioned response and initializes the corresponding router row from the same context index, coupling expert contents to router access.

  1. Recovery curves at two source scales, crossed initialization controls, routing diagnostics, and sensitivity studies that evaluate the complete pipeline, together with quality, activation, and latency operating points.

Related Work

Sparse experts for diffusion. Sparse MoEs activate a small expert subset per token [20, 14, 7], while shared-expert variants reserve always-active capacity for common computation [4]. Switch-DiT and DiT-MoE introduce shared or token-choice experts along the denoising trajectory, and PromOE augments routing with conditional and prototypical guidance [16, 8, 22]. These designs focus on routing and expert layout rather than on initializing expert contents from a dense checkpoint; REACT studies dense-to-sparse initialization for a conventional shared-plus-Top-2 target.

Dense-to-MoE upcycling and coupled initialization. Sparse Upcycling replicates a dense FFN, Drop-Upcycling partially reinitializes the copies, and MoEfication and LLaMA-MoE partition pretrained units [11, 15, 24, 28]. Closer to our setting, representation-based upcycling initializes routers from language-model states, activation-pattern restructuring constructs shared and routed LLM experts with an analytical router, and Cluster-Aware Upcycling couples activation clusters, centroid routing, and low-rank CLIP experts [10, 18, 3]. REACT brings this coupled construction to diffusion: timestep-centered trajectory contexts allocate intact source units and initialize the same-index router rows, and the router remains trainable thereafter.

Dense DiT conversion. Dense2MoE, the closest prior DiT conversion method, assigns pretrained units to experts by a global Taylor-importance criterion computed once for all contexts and recovers quality through distillation [27], so its expert contents and router initialization are not tied to particular token contexts. REACT instead derives a layer-local context partition from denoising trajectories and conditions both unit allocation and router-row initialization on it. Methods that keep the dense FFN and adapt computation dynamically across timesteps or tokens, or that train diffusion MoEs from scratch, are complementary and are surveyed in Appendix § 9 [25, 1, 19].

Method

Overview. REACT converts the FFNs of a pretrained Diffusion Transformer (DiT) into sparse mixture-of-experts (MoE) layers. Its key design is to derive expert contents and router initialization from one layer-specific partition of token contexts. For each layer, token cluster ee supplies the prototype responses that select the source units of routed expert ee, and its normalized centroid initializes router row ee. The shared cluster index therefore couples expert construction to initial router access; the router is trained afterwards, so the coupling is an initialization device rather than a routing constraint.

Conversion is performed offline with the dense DiT frozen. Denoising trajectories provide FFN inputs and post-GELU activations. Trajectory-wide activation statistics select an always-active shared expert, and cluster-conditioned prototype responses select the units of the routed experts. The sparse model is then recovered by layer-wise teacher matching followed by end-to-end diffusion training. Figure 2 summarizes the pipeline; § 3.1–§ 3.4 define the sparse target, construct the token contexts, initialize experts and router, and describe the two recovery stages.

Sparse Target and Source-Unit Transfer

Consider block ℓ∈{1,…,L}\ell\in\{1,\ldots,L\} of a dense DiT with model width dd and FFN width HH, and let ϕ\phi denote its tanh-approximated GELU. We treat hidden unit jj as one tuple: input row wℓ,j⊤\mathbf{w}_{\ell,j}^{\top}, input bias bℓ,jb_{\ell,j}, the nonlinearity, and the paired output column vℓ,j\mathbf{v}_{\ell,j}. The dense FFN is the sum of its units,

Fℓ(h)=∑j=1Hvℓ,jϕ(wℓ,j⊤h+bℓ,j)+bℓ(2).(1)F_{\ell}(h)=\sum_{j=1}^{H}\mathbf{v}_{\ell,j}\phi\left(\mathbf{w}_{\ell,j}^{\top}h+b_{\ell,j}\right)+b_{\ell}^{(2)}. \tag*{(1)}

An intact transfer copies a unit’s full tuple, so every inherited unit initially computes exactly what it computed in the dense FFN.

The converted layer has one shared expert of width SS and EE routed experts of width RR. Each expert has the form of Eq. equation 1 restricted to an index set of source units: the shared expert uses Iℓsh\mathcal{I}_{\ell}^{\mathrm{sh}} and keeps the dense output bias bℓ(2)b_{\ell}^{(2)}, and routed expert ee uses Iℓ,e\mathcal{I}_{\ell,e} with a zero output bias. Routed slots that receive no source unit hold trainable padding units whose output columns are zero, so padding contributes nothing at initialization; all inherited and padded units are trained during recovery. The shared expert is always active, and a trainable router selects KK routed experts per token. For the selected set Tℓ,K(h,t)\mathcal{T}_{\ell,K}(h,t) (§ 3.3), the converted layer computes

F~ℓ(h,t)=Fℓsh(h)+∑e∈Tℓ,K(h,t)αℓ,e(h,t)Fℓ(e)(h).(2)\widetilde{F}_{\ell}(h,t)=F_{\ell}^{\mathrm{sh}}(h)+\sum_{e\in\mathcal{T}_{\ell,K}(h,t)}\alpha_{\ell,e}(h,t)F_{\ell}^{(e)}(h). \tag*{(2)}

where αℓ,e\alpha_{\ell,e} is the router probability renormalized over the selected experts. The layer stores S+ERS+ER expert-unit slots and activates S+KRS+KR per token; for the configurations in § 4, more than half of the routed slots are padding (Appendix § 7.§ 2). The remaining subsections specify how the index sets and the router are initialized and how the converted model is recovered.

Trajectory-Conditioned Contexts

Token contexts are formed from the within-timestep variation of the FFN inputs, after subtracting the mean input of each noise level. We run frozen class-conditional reverse trajectories and record, for each block, the AdaLN-modulated FFN input hℓ,i∈Rdh_{\ell,i} \in\mathbb{R}^{d}, its post-GELU activation aℓ,i∈RHa_{\ell,i} \in\mathbb{R}^{H}, and the original diffusion timestep tit_i, where ii ranges over spatial tokens from both classifier-free-guidance branches. All recorded tokens enter the mean and activation statistics below; a subsample SℓS_\ell (one token per sequence and sampling call; Appendix § 7.§ 4) is retained for clustering.

Timesteps are grouped into BB buckets by κ(t)=⌊tB/Tdiff⌋\kappa(t)=\lfloor tB/T_{\mathrm{diff}}\rfloor, where TdiffT_{\mathrm{diff}} is the number of original diffusion steps, and μℓ,b\mu_{\ell,b} is the mean FFN input over the recorded tokens of bucket bb. Each sampled input is centered by its bucket mean and scaled to unit length,

zℓ,i=norm⁡(hℓ,i−μℓ,κ(ti)),i∈Sℓ,(3)z_{\ell,i}=\operatorname{norm}\left(h_{\ell,i}-\mu_{\ell,\kappa(t_i)}\right), \qquad i \in S_\ell, \tag*{(3)}

where norm⁡(⋅)\operatorname{norm}(\cdot) divides a vector by its Euclidean norm (floored at 10−1210^{-12}). Euclidean KK-means with EE clusters partitions {zℓ,i}\{z_{\ell,i}\} into index sets Ωℓ,1,…,Ωℓ,E\Omega_{\ell,1},\ldots,\Omega_{\ell,E}, and the context direction cℓ,ec_{\ell,e} is the mean of the members of Ωℓ,e\Omega_{\ell,e} scaled to unit length. Buckets are indexed by the original diffusion-process timestep, not by the respaced sampler-call index. The bucket means are non-trainable buffers: they are updated as running averages during both recovery stages and held fixed at evaluation (Appendix § 7.§ 3); § 4.5 reports the sensitivity to BB.

Cluster-Indexed Expert and Router Initialization

Shared units. The shared expert should hold computation that is used at every noise level, so its units are selected from pooled, uncentered activation statistics. Unit jj receives the score

qℓ,j=1Nact∑iαℓ,i,j∑kαℓ,i,k,q_{\ell,j}=\frac{1}{N_{\mathrm{act}}}\sum_i \alpha_{\ell,i,j}\sum_k \alpha_{\ell,i,k},

the average product of its activation with the total activation of the same token over all NactN_{\mathrm{act}} recorded activation vectors; equivalently, qℓ,jq_{\ell,j} is the jj-th column sum of the trajectory-wide second-moment matrix of the activations (Figure 2a). The SS largest scores define Iℓsh\mathcal{I}_{\ell}^{\mathrm{sh}}.

Routed units. Routed experts process the original state hh, so their units are scored where they will operate: in raw input space, at a prototype of each context. Let hˉℓ,e\bar{h}_{\ell,e} be the mean of the uncentered inputs {hℓ,i:i∈Ωℓ,e}\{h_{\ell,i}:i\in\Omega_{\ell,e}\}. The prototype response of unit jj to context ee is its activation at that mean,

Aℓ,e,j=ϕ(wℓ,e,jThˉℓ,e+bℓ,j),(4)A_{\ell,e,j}=\phi\left(\mathbf{w}_{\ell,e,j}^{\mathsf{T}}\bar{h}_{\ell,e}+b_{\ell,j}\right), \tag*{(4)}

which ranks units by how strongly they fire on a typical input of the context. After excluding shared units, expert–unit pairs are visited in descending order of Aℓ,e,jA_{\ell,e,j}, and a unit is added to expert ee unless the expert is full or the unit has reached its replication limit; a second pass places each still-unassigned unit in its highest-scoring expert with remaining capacity, and a unit stays unassigned if no expert has room. The resulting Iℓ,e\mathcal{I}_{\ell,e} may share a unit up to the replication limit and never overlap with Iℓsh\mathcal{I}_{\ell}^{\mathrm{sh}}; the capacity bounds and traversal order are given in Appendix § 7.§ 1. For every selected index we copy the input row, input bias, and output column together, and all non-FFN parameters come from the same dense checkpoint.

Same-index router initialization. Router row ee is initialized from the same context that built expert ee, and the router scores the centered but unnormalized residual of a token:

wℓ,ert∣init=cℓ,e,gℓ,e(h,t)=(wℓ,ert)T(h−μℓ,κ(t)).(5)\mathbf{w}_{\ell,e}^{\mathrm{rt}} \big|_{\mathrm{init}}=\mathbf{c}_{\ell,e},\qquad g_{\ell,e}(h,t)=\left(\mathbf{w}_{\ell,e}^{\mathrm{rt}}\right)^{\mathsf{T}}\left(h-\boldsymbol{\mu}_{\ell,\kappa(t)}\right). \tag*{(5)}

A softmax over the EE logits gives routing probabilities, the Top-KK experts form Tℓ,K(h,t)\mathcal{T}_{\ell,K}(h,t), and the selected probabilities are renormalized to give αℓ,e\alpha_{\ell,e}. Only the router receives the centered residual; every expert processes hh. The router is bias-free and trainable, so the shared index fixes initial access only. Because the rows have unit norm, the residual magnitude scales all logits of a token equally: it sets the softmax sharpness but not the Top-KK order. Initial routing can still differ from the KK-means assignment, which uses Euclidean distance to unnormalized centroids, and training may move the router beyond the initial partition. Partitioning pretrained units into experts and initializing a router from input centroids are established ingredients ([24, 28, 3]); REACT differs in centering the contexts by timestep bucket, in allocating intact units by prototype response under capacity and replication limits, and in selecting the shared expert from pooled activation statistics.

Two-Stage Sparse Recovery

Sparse selection omits some dense units, replicates others, and combines only KK routed experts under router weights, so the converted layer does not reproduce FℓF_{\ell} exactly. We first match each sparse FFN to its frozen dense counterpart and then adapt the full sparse denoiser. Both stages add the token-choice load-balancing loss Lbal\mathcal{L}_{\mathrm{bal}} ([7]) (Appendix § 7.§ 4):

LI=∑ℓ=1LMSE⁡(F~ℓ(hℓ,t),Fℓ(hℓ))+λbalILbal,(6)\mathcal{L}_{\mathrm{I}}=\sum_{\ell=1}^{L}\operatorname{MSE}\left(\widetilde{F}_{\ell}(h_{\ell},t),F_{\ell}(h_{\ell})\right)+\lambda_{\mathrm{bal}}^{\mathrm{I}}\mathcal{L}_{\mathrm{bal}}, \tag*{(6)}
LII=Ldiff+λbalIILbal.\mathcal{L}_{\mathrm{II}}=\mathcal{L}_{\mathrm{diff}}+\lambda_{\mathrm{bal}}^{\mathrm{II}}\mathcal{L}_{\mathrm{bal}}.

where hℓh_{\ell} is the AdaLN-modulated input to FFN ℓ\ell, Ldiff\mathcal{L}_{\mathrm{diff}} is the source DiT diffusion objective, and the λbal\lambda_{\mathrm{bal}} coefficients weight the auxiliary loss in each stage.

Stage I: parallel layer-wise teacher matching. The original frozen FFN is attached to every converted block, all non-MoE parameters are frozen, and the router, shared expert, and routed experts are trained with LI\mathcal{L}_{\mathrm{I}}. Dense outputs stay on the residual stream, so every sparse FFN receives the teacher’s hidden states and all layers are matched in parallel.

Stage II: end-to-end adaptation. The teachers are removed, sparse outputs are placed on the residual stream, and every normally trainable parameter is optimized with LII\mathcal{L}_{\mathrm{II}}. Calibration, allocation, centering-state, optimizer, EMA, and loss settings for both stages are reported in Appendices § 7.§ 1–§ 7.§ 4.

Experiments

Our evaluation addresses four questions: (1) what quality–activation and measured-latency operating points does sparse conversion attain; (2) how does trajectory-conditioned initialization affect recovery at matched Stage-II checkpoints; (3) what routing coherence and expert utilization emerge after recovery; and (4) how sensitive is recovery to centering granularity and Stage-I duration?

Evaluation Protocol and Comparison Design

Task and metrics. We evaluate class-conditional ImageNet-1K generation at 256×256256 \times256 resolution ([5]). At each recovery checkpoint, we generate 50,000 samples and report FID and spatial FID (sFID), where lower is better, along with Inception Score (IS), precision, and recall, where higher is better ([9, 12]). All primary recovery comparisons use the same five Stage-II checkpoints from 100K to 500K end-to-end adaptation steps. Stage-I reconstruction precedes this axis. Except in the explicitly labeled Stage-I duration study, the controlled comparisons match both Stage-I duration and Stage-II checkpoint across conditions.

Initialization conditions. XL and M denote conversions initialized from dense DiT-XL and DiT-M checkpoints, respectively; these source-scale labels differ from the expert-width suffixes used below. Within each source-scale study, REACT initializes the shared and routed experts together with their matched centroid router. Experts + random router retains the M-source expert construction and original-timestep centering but randomly initializes the router. Centroid router + random experts keeps the centroid router and centering while replacing trajectory-based expert construction. Bundled random combines a Xavier-initialized router, no timestep centering, random shared-unit selection, and random routed-unit allocation. The M-source study includes all four conditions; the XL-source study compares REACT with bundled random under the same checkpoint protocol.

Quality, Activation, and Measured Latency

Table 1 separates parameter accounting from generation quality for three Top-2 REACT variants converted from DiT-XL/2. Relative to the dense backbone, REACT-M32 has 4.125× as many total FFN parameters while activating only 0.375× as many FFN parameters per token. At the model level, this corresponds to 1.61B total parameters and 489M active parameters, versus 675M total and active parameters for DiT-XL/2. REACT-M48 increases total FFN capacity to 6.125× without increasing token-wise activation, whereas REACT-L32 uses 5.5× total and 0.5× active FFN parameters, corresponding to 2.02B total and 526M active model parameters. The three variants attain FIDs of 2.21, 2.22, and 2.18, respectively, compared with 2.27 for DiT-XL/2. Because each nonshared unit is copied at most twice, at least 56.25% of the routed slots in REACT-M32 are zero-output padding at initialization (Appendix § 7.§ 2), which the two-stage recovery must fill.

ModelEEKKFFN SizeTotal ParamActive ParamTotal ParamActive Param
DiT-XL/2––46081.000×1.000\times1.000×1.000\times675M675M
REACT-M323225764.125×4.125\times0.375×0.375\times1606M489M
REACT-M484825766.125×6.125\times0.375×0.375\times2202M489M
REACT-L323227685.500×5.500\times0.500×0.500\times2015M526M
ModelFID↓\downarrowsFID↓\downarrowIS↑\uparrowPrec.↑\uparrowRec.↑\uparrow
DiT-XL/22.274.60278.240.830.57
REACT-M322.214.75276.530.820.59
REACT-M482.224.70279.150.820.60
REACT-L322.184.73286.850.820.59

Table 1. Parameter and generation-quality operating points for DiT-XL/2 and its REACT conversions. In (a), FFN Size gives the dense hidden width or, for a sparse variant, the width shared by its shared and routed experts; FFN multipliers compare total and token-wise active FFN parameters with dense DiT-XL/2. Total Param includes router parameters, whereas Active Param is the token-wise active non-router count. In (b), the DiT-XL/2 quality row uses classifier-free guidance at 1.5 and follows [17]; sparse rows are 50K-sample runs. Best values in (b) are bold. (a) Parameter capacity and token-wise activation. FFN Params vs. Dense Model Params. Model Params. (b) ImageNet-256 generation quality.

In the shared profiling instance, both sparse variants reduce latency at every measured scope (Table 2). REACT-M32 provides 2.32× FFN and 1.45× full-forward speedups; end-to-end sampling falls from 26.81 to 18.19 seconds, a 1.47× speedup. REACT-L32 provides corresponding gains of 1.74×, 1.33×, and 1.34×. The transition from the isolated FFN gain to sampling reflects the non-FFN computation and routing overhead retained by the complete pipeline.

ModelFFN (ms)↓\downarrowForward (ms)↓\downarrowSampling (s)↓\downarrow
Dense2.117 (1.00×\times)58.79 (1.00×\times)26.81 (1.00×\times)
REACT-M320.912 (2.32×\times)40.41 (1.45×\times)18.19 (1.47×\times)
REACT-L321.217 (1.74×\times)44.16 (1.33×\times)20.04 (1.34×\times)

Table 2. Latency in one shared profiling setup (speedup over Dense in parentheses; bold marks the best value).

Controlled Recovery and Initialization Contrasts

REACT reports lower FID point estimates than bundled random at every observed checkpoint in both source-scale studies (Figure 3). At 500K, the M-source condition reaches 8.60 rather than 10.26 FID, while the XL-source condition reaches 2.54 rather than 2.78. The M-source panel also tracks the two crossed controls over the same Stage-II interval, exposing how expert construction and router initialization shape the recovery trajectory.

Figure 3. FID-50K during Stage-II adaptation; the M-source panel adds the two crossed controls. Each condition is one run, lines guide the eye, and the panels use independent scales.

Table 4 reports the complete 500K metrics. REACT has the lowest FID and sFID and the highest IS and precision at both source scales. At the displayed precision, recall is 0.56 for centroid router + random experts in the M study and 0.55 for the other M conditions; REACT reaches 0.58 in the XL study.

SourceConditionFID↓sFID↓IS↑Prec.↑Rec.↑
MREACT8.606.01132.430.740.55
MExperts + random router8.906.02130.310.730.55
MCentroid router + random experts9.806.31124.830.720.56
MBundled random10.266.43122.570.720.55
XLREACT2.544.82247.140.820.58
XLBundled random2.784.98235.530.810.57

Table 4. Complete 50K-sample metrics at the 500K checkpoint.

Control contrasts. REACT and experts + random router share expert contents and timestep centering, so this pair isolates router initialization. The centroid router yields lower FID point estimates at all five checkpoints, with gaps of 0.25–0.41; at 500K, the endpoints are 8.60 versus 8.90 FID and 132.43 versus 130.31 IS.

The remaining controls compare pathway bundles rather than single factors. Experts + random router is 1.36–2.61 FID lower than bundled random, while the centroid-router control is 0.46–0.68 lower than bundled random and 1.16–2.34 higher than REACT. The observed ordering is therefore REACT, experts + random router, centroid router + random experts, and bundled random at every checkpoint. Table 3 lists every plotted value.

Stage-II stepREACTRandomREACTExpertsRouterRandom
100K3.093.8211.8512.2614.1814.87
200K2.813.2510.3110.6112.0912.60
300K2.672.959.619.8711.0311.51
400K2.582.829.079.3210.2310.83
500K2.542.788.608.909.8010.26

Table 3. FID-50K at every Stage-II checkpoint of the controlled initialization studies. Experts: mapped experts with a random router; Router: centroid router with random experts; Random: bundled random. XL source: REACT, Random. M source: REACT, Experts, Router, Random.

Routing Coherence and Expert Utilization

We next test whether recovered routing is organized without concentrating on a small expert subset. For a stored REACT-M32 (XL/2-source) Group 2 analysis, SijS_{ij} is the mean dot product between normalized router-input representations assigned to experts ii and jj, excluding identical self-pairs. Among the eight analyzed experts, every diagonal entry is largest in its row; the diagonal mean is 0.571 versus 0.460 off diagonal. All 32 experts receive traffic, with shares from 1.477% to 4.333% and a coefficient of variation of 0.161 (Figure 4). Together, these measurements show coherent assignments alongside broad expert participation.

Figure 4. Routing diagnostics for recovered REACT-M32 Group 2: (a) SijS_{ij} for the eight most frequently activated experts selected from all 32 experts and reindexed as 0–7 for visualization (scale 0.42–0.61); (b) all-expert traffic relative to the uniform 3.125% share.

Sensitivity to Centering and Stage-I Duration

Table 5 tracks both factors over matched Stage-II checkpoints in the M-source setting. Centering with 50 rather than 250 buckets changes FID by at most 0.07 at any checkpoint, so recovery is insensitive to centering granularity in the tested range. Stage-I duration matters more: at 400K, Stage-I runs of 100K, 200K, and 300K steps reach 9.43, 9.07, and 8.88 FID, exposing a recovery–compute tradeoff. Complementary 400K metrics appear in Appendix § 7.§ 5.

Conclusion

REACT uses original-timestep-centered trajectories to assemble complete source units into experts and initialize matched router rows. At both source scales, REACT reports lower FID than bundled random initialization at every Stage-II checkpoint. A matched M-source control additionally favors same-index router initialization. In a separate DiT-XL/2 run, REACT-M32 reaches 2.21 FID while using 489M active parameters per token, versus 2.27 FID and 675M active parameters for DiT-XL/2, and accelerates sampling by 1.47×1.47 \times in the shared profiling instance. The routing diagnostics show use of all 32 experts and stronger within- than cross-expert coherence in the analyzed subset, while the tested centering granularities remain within 0.07 FID throughout recovery. Together, these results support trajectory-conditioned sparse initialization over the tested bundled-random dense-to-sparse conversion baseline.

AI Use Statement

We used Claude (Anthropic), accessed through Claude Code, as a writing and presentation assistant. Its assistance covered three areas: (i) the design of the method overview (Figure 2) and the motivation figure (Figure 1), including the panel layout, visual encoding, and vector rendering from author-specified content; (ii) the typesetting of the manuscript, including figure and table placement, moving supporting tables between the appendix and the main text, and balancing section lengths; and (iii) language polishing of the full text, including sentence-level editing of the introduction, related work, method, and captions, and tightening the presentation of the equations. All methods, experiments, measurements, and claims were designed, executed, and verified by the authors; the assistant generated no results, data, or references. The authors reviewed every AI-assisted edit and take full responsibility for the content of this paper.

Reproducibility Statement

The main text reports the evaluation convention and quantitative comparisons. Appendix A gives conversion, accounting, implementation, and sensitivity details; Appendix D provides additional samples; Appendix B discusses scope and future directions; and Appendix C extends the comparison across sparse diffusion and dense-to-MoE upcycling.

Conversion and Reproducibility Details

Offline Conversion Procedure

For each dense DiT block, the implemented conversion performs the following operations:

  1. Run frozen class-conditional denoising trajectories. Accumulate post-GELU co-activations, per-sequence FFN-input means, and sampled token inputs together with the original diffusion timesteps used for centering and routing.

  2. Map each original timestep to κ(t)=⌊tB/Tdiff⌋\kappa(t)=\lfloor tB/T_{\mathrm{diff}}\rfloor. Reject the calibration if any bucket is unobserved. Store sample timesteps, bucket identifiers, mean counts, and mapping metadata in version-2 artifacts so downstream stages use the same centering index.

  3. Subtract the matching bucket mean from every sampled token, normalize the result, and run ordinary Euclidean layer-wise KK-means. Retain the cluster assignments and raw centers; normalize each center only when it is copied into the router.

  4. Sum each column of the co-activation matrix and select the top SS dense neurons to populate the always-active shared expert with intact source units.

  5. Evaluate the remaining dense neurons on the raw mean input of every token cluster. With u=(H−S)/Eu=(H-S)/E, the first allocation pass targets mmin⁡=⌈kmin⁡u⌉m_{\min}=\lceil k_{\min}u\rceil neurons per expert, caps each expert at mmax⁡=⌊kmax⁡u⌋m_{\max}=\lfloor k_{\max}u\rfloor, and limits each neuron to rmax⁡r_{\max} copies. It scans all expert–neuron pairs in descending response order and stops when every expert reaches mmin⁡m_{\min} or the list is exhausted. A second pass visits never-assigned nonshared neurons in source index order and places each in its highest-response expert with room under the hard cap min⁡{⌊(kmax⁡+1)u⌋,R}\min\{\lfloor(k_{\max}+1)u\rfloor,R\}. A neuron remains unassigned if no expert has room. Exact ties follow the tensor library’s returned order. All reported configurations satisfy mmax⁡≤Rm_{\max}\le R.

  6. Slice the dense FFN input rows, input biases, and output columns using the selected indices. Copy the dense output bias only to the shared expert; zero routed output biases and the output columns of padded units so padding contributes nothing at initialization.

  7. Copy the normalized cluster centers to same-index router rows. This aligns cluster, expert, and router-row identities; runtime assignments then follow the bias-free router’s dot-product decision rule before the router is updated during sparse recovery.

The operations above form an offline, non-optimizing initialization. Training then has two stages: Stage I reconstructs the MoE FFNs against frozen dense teachers, and Stage II removes the teachers and adapts the converted denoiser end to end.

Parameter and Activation Accounting

Ignoring biases for exposition, a dense FFN contains 2dH2dH parameters, all of which are active for each token. The converted FFN contains 2d(S+ER)2d(S+ER) expert parameters plus a dEdE router, while a token activates 2d(S+KR)2d(S+KR) expert parameters. Whole-model totals additionally include biases, attention and conditioning modules, embeddings, and the output head. Total parameters, active parameters per token, and measured FLOPs are distinct quantities; expert parallelism may shard parameters without changing their global count.

Total Param in Table 1 includes the router, whereas Active Param follows the token-wise accounting convention and omits the router. Including active router weights would add approximately 1.0M parameters to REACT-L32 and REACT-M32 and 1.5M to REACT-M48.

All three configurations use d=1152d=1152, H=4608H=4608, L=28L=28, and K=2K=2. For REACT-M32, E=32E=32 and S=R=576S=R=576, yielding 4.125×4.125\times total and 0.375×0.375\times active FFN parameters relative to dense DiT-XL/2; its whole-model counts are 1.61B total and 489M active parameters per token. REACT-L32 uses E=32E=32 and S=R=768S=R=768, yielding 5.5×5.5\times total and 0.5×0.5\times active FFN parameters, with 2.02B total and 526M active model parameters. REACT-M48 keeps S=R=576S=R=576 but increases EE to 48, yielding 6.125×6.125\times total and 0.375×0.375\times active FFN parameters, with approximately 2.20B total and 489M active model parameters. These counts characterize structural sparsity; end-to-end efficiency additionally depends on kernels, dispatch, communication, batching, and hardware.

When a routed set contains fewer than RR inherited neurons, the remaining slots use zero-output trainable padding. Because each nonshared neuron is copied at most rmax⁡r_{\max} times, the padded fraction satisfies

ρpad≥max⁡{0,1−rmax⁡(H−S)ER}.(7)\rho_{\mathrm{pad}} \ge\max\left\{0,1-\frac{r_{\max}(H-S)}{ER}\right\}. \tag*{(7)}

For the REACT-M32 values H=4608H=4608, S=R=576S=R=576, E=32E=32, and rmax⁡=2r_{\max}=2, at least 56.25% of routed slots are padded and therefore count as newly added trainable capacity.

Timestep-Centering Compatibility Contract

The centering state for each layer contains the mean matrix, observation counts, format version, number of original diffusion steps, and number of buckets. Sample files additionally contain one original timestep and bucket identifier per sampled token. Profiling, KK-means, PyTorch inference, expert-parallel inference, model checkpoints, and EMA checkpoints validate the same metadata. Checkpoints that enable centering in only the model or only the EMA weights are rejected.

Version-1 artifacts indexed means by reverse sampling call order. For a 250-step reverse process, this can associate the first stored row with a high original timestep while runtime indexing expects a low timestep. Because online training updates can mix correctly and incorrectly addressed rows, a post-hoc row reversal is not generally valid. Only calibration, clustering, mapping, and trained checkpoints produced under the version-2 contract are admissible; version-1 results are excluded.

Reference Implementation Configuration

The calibration procedure uses one reverse trajectory per ImageNet class, 250 sampling calls mapped to a 1000-step original diffusion process, 250 centering buckets, classifier-free guidance scale 1.5, and profiling seed 0. Both the conditional and unconditional branches enter the activation statistics. All spatial tokens contribute to the co-activation matrix, while one token per sequence and denoising call is retained for clustering. Layer-wise KK-means uses scikit-learn’s ordinary Euclidean implementation with EE clusters and seed 0; initialization count, stopping tolerance, iteration limit, and solver use the installed library defaults. Routed-neuron allocation uses kmin⁡=0.6k_{\min}=0.6, kmax⁡=2.0k_{\max}=2.0, and rmax⁡=2r_{\max}=2; padded first-layer parameters use standard deviation 10−210^{-2}. The reference optimizer is AdamW with constant learning rate 10−410^{-4}, zero weight decay, and the PyTorch default (β1,β2,ϵ)=(0.9,0.999,10−8)(\beta_1,\beta_2,\epsilon)=(0.9,0.999,10^{-8}); there is no learning-rate warmup or scheduler. The reference trainer defaults to global batch size 256 and seed 0. It uses the sd-vae-ft-ema encoder, center cropping, random horizontal flipping, uniform sampling over the 1000 training timesteps, FP32 tensors with CUDA TF32 matrix operations enabled, and no explicit autocast. Load-balancing coefficients are 10−210^{-2} in Stage I and 10−410^{-4} in Stage II, and EMA decay is 0.9999. Token-choice routing has no capacity factor or token dropping in the reference PyTorch implementation. The auxiliary loss used in both stages is computed from local-worker statistics; data-parallel training averages the resulting gradients. With GG workers, it can be written as

Lbal=1G∑g=1G∑ℓ=1LE∑e=1Efℓ,e(g)pˉℓ,e(g).(8)\mathcal{L}_{\mathrm{bal}}=\frac{1}{G}\sum_{g=1}^{G}\sum_{\ell=1}^{L}E\sum_{e=1}^{E}f_{\ell,e}^{(g)}\bar{p}_{\ell,e}^{(g)}. \tag*{(8)}

where fℓ,e(g)f_{\ell,e}^{(g)} is the local-minibatch fraction of tokens whose top-KK set contains expert ee, and pˉℓ,e(g)\bar{p}_{\ell,e}^{(g)} is its mean pre-selection routing probability over all local tokens.

For DiT-XL/2, storing 28 full 4608 × 4608 co-activation matrices in FP32 requires approximately 595 million entries (2.38 GB) before temporary buffers. Preparation cost therefore includes collection, distributed aggregation, host transfer, clustering, and neuron allocation and is distinct from the time spent in the two optimization stages that follow.

Detailed Sensitivity Results

Table 6 reports FID and complementary generation metrics at the common 400K M-source checkpoint. The full FID trajectories of the sensitivity runs appear in Table 5.

FactorSetting100K200K300K400K
Reference250 buckets; Stage I = 200K11.8510.319.619.07
Centering50 buckets11.8810.329.549.05
Stage-I duration100K12.7010.8810.069.43
Stage-I duration300K11.5610.119.418.88

Table 5. M-source sensitivity (FID-50K↓\downarrow) at matched Stage-II checkpoints. The reference uses 250 centering buckets and 200K Stage-I steps; each other row changes one factor.

ConfigurationFID↓\downarrowsFID↓\downarrowIS↑\uparrowPrec.↑\uparrowRec.↑\uparrow
REACT (250 buckets; Stage I = 200K)9.076.05128.930.730.55
Experts + random router9.326.11127.620.730.55
Centroid router + random experts10.236.40121.410.720.55
Bundled random10.836.55118.470.710.55
TC-50 (50 centering buckets)9.056.06129.390.730.55
Stage I = 100K9.436.12125.740.730.55
Stage I = 300K8.886.05129.910.740.54

Table 6. Generation metrics at the common 400K M-source checkpoint.

Scope and Future Directions

We evaluate class-conditional ImageNet DiTs; extending the conversion to multimodal text conditioning, video diffusion, and non-diffusion transformers is future work. The method lowers token-wise active FFN parameters while increasing total parameter capacity, so deployment gains depend on batching, kernels, dispatch, communication, and hardware.

Offline conversion adds calibration and clustering costs, including an H×HH \times H co-activation matrix. The current design couples shared-neuron selection, routed-neuron allocation, replication, padding, and timestep centering. Factorized controls and cross-sampler evaluation will determine which components transfer across settings and model families.

Additional Related Work

Broader diffusion-expert designs. Beyond the main-text examples, MEME and Remix-DiT form timestep specialists, whereas EC-DiT, Diff-MoE, and Race-DiT study expert-choice, time–space-adaptive, and competitive routing [13, 6, 21, 2, 23]. MicroDiT combines MoE layers with deferred token masking for low-budget training from scratch [19]. Collectively, these designs introduce expert routing or token sparsification into diffusion training and inference; unlike REACT, they do not initialize expert contents by recovering intact FFN units from a dense checkpoint during initialization.

Efficient DiT computation and scaling. Complementary approaches adapt computation without converting a dense FFN into experts. DyDiT changes width and token computation across timesteps and spatial regions, SparseDiT sparsifies tokens with layer- and denoising-stage-dependent density, and μ\muP transfers optimization hyperparameters across DiT scales [25, 1, 26]. These methods target dynamic execution or scale-stable training, whereas REACT targets dense-checkpoint reuse through trajectory-conditioned expert construction and aligns router rows with the same trajectory partition.

Additional Qualitative Samples

Additional qualitative samples from REACT

Figure 5. Additional qualitative samples from REACT, arranged by broad semantic content (animals, natural subjects, outdoor scenes, vehicles, and manufactured objects); the figure illustrates diversity and is not a quantitative comparison.

References

  1. [1]Shuning Chang, Pichao Wang, Jiasheng Tang, Fan Wang, and Yi Yang. Sparseddit: Token sparsification for efficient diffusion transformer. Advances in Neural Information Processing Systems, 38: 91456–91483, 2026.arxiv.org/abs/2412.06028
  2. [2]Kun Cheng, Xiao He, Lei Yu, Zhijun Tu, Mingrui Zhu, Nannan Wang, Xinbo Gao, and Jie Hu. Diff-moe: Diffusion transformer with time-aware and space-adaptive experts. In Forty-second International Conference on Machine Learning, 2025.
  3. [3]Sanghyeok Chu, Pyunghwan Ahn, Gwangmo Song, Seung Hwan Kim, Honglak Lee, and Bohyung Han. Enhancing mixture-of-experts specialization via cluster-aware upcycling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, II2823–II2922, 2026.arxiv.org/abs/2604.13508
  4. [4]Damai Dai, Chengqi Deng, Chenggang Zhao, RX Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Yu Wu, et al. Deepseekmoe: Towards ultimate expert specialization in mixture-of-experts language models. In Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: Long papers), pp. 1280–1297, 2024.
  5. [5]Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Lee, 2009.
  6. [6]Gongfan Fang, Xinyin Ma, and Xinchao Wang. Remix-dit: Mixing diffusion transformers for multi-expert denoising. Advances in Neural Information Processing Systems, 37:107494–107512, 2024.arxiv.org/abs/2412.05628
  7. [7]William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022.arxiv.org/abs/2101.03961
  8. [8]Zhengcong Fei, Mingyuan Fan, Changqian Yu, Debang Li, and Junshi Huang. Scaling diffusion transformers to 16 billion parameters. arXiv preprint arXiv:2407.11633, 2024.arxiv.org/abs/2407.11633
  9. [9]Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
  10. [10]Wangyi Jiang, Yaojie Lu, Hongyu Lin, Xianpei Han, and Le Sun. Improved sparse upcycling for instruction tuning. In Proceedings of the 31st International Conference on Computational Linguistics, pp. 9485–9498, 2025.
  11. [11]Aran Komatsuzaki, Joan Puigcerver, James Lee-Thorp, Carlos Riquelme Ruiz, Basil Mustafa, Joshua Ainslie, Yi Tay, Mostafa Dehghani, and Neil Houlsby. Sparse upcycling: Training mixture-of-experts from dense checkpoints. arXiv preprint arXiv:2212.05055, 2022.arxiv.org/abs/2212.05055
  12. [12]Tuomas Kynkäänniemi, Tero Karras, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Improved precision and recall metric for assessing generative models. Advances in neural information processing systems, 32, 2019.arxiv.org/abs/1904.06991
  13. [13]Yunsung Lee, JinYoung Kim, Hyojun Go, Myeongho Jeong, Shinhyeok Oh, and Seungtaek Choi. Multi-architecture multi-expert diffusion models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 13427–13436, 2024.arxiv.org/abs/2306.04990
  14. [14]Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. GShard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020.arxiv.org/abs/2006.16668
  15. [15]Taishi Nakamura, Takuya Akiba, Kazuki Fujii, Yusuke Oda, Rio Yokota, and Jun Suzuki. Drop-upcycling: Training sparse mixture of experts with partial re-initialization. In International Conference on Learning Representations, volume 2025, pp. 84370–84397, 2025.
  16. [16]Byeongjun Park, Hyojun Go, Jin-Young Kim, Sangmin Woo, Seokil Ham, and Changick Kim. Switch diffusion transformer: Synergizing denoising tasks with sparse mixture-of-experts. In European Conference on Computer Vision, pp. 461–477. Springer, 2024.arxiv.org/abs/2403.09176
  17. [17]William Peebles and Saining Xie. Scalable diffusion models with transformers. In 2023 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 4172–4182. IEEE, 2023.arxiv.org/abs/2212.09748
  18. [18]Zehua Pei, Hui-Ling Zhen, Lancheng Zou, Xianzhi Yu, Wulong Liu, Sinno Jialin Pan, Mingxuan Yuan, and Bei Yu. Analytical ffn-to-moe restructuring via activation pattern analysis. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 4777–4789, 2026.
  19. [19]Vikash Sehwag, Xianghao Kong, Jingtao Li, Michael Spranger, and Lingjuan Lyu. Stretching each dollar: Diffusion training from scratch on a micro-budget. In 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 28596–28608. IEEE, 2025.arxiv.org/abs/2407.15811
  20. [20]Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.arxiv.org/abs/1701.06538
  21. [21]Haotian Sun, Tao Lei, Bowen Zhang, Yanghao Li, Haoshuo Huang, Ruoming Pang, Bo Dai, and Nan Du. Ec-dit: Scaling diffusion transformers with adaptive expert-choice routing. In International Conference on Learning Representations, volume 2025, pp. 72383–72401, 2025.arxiv.org/abs/2410.02098
  22. [22]Yujie Wei, Shiwei Zhang, Hangjie Yuan, Yujin Han, Zhekai Chen, Jiayu Wang, Difan Zou, Xihui Liu, Yu Liu, Hongming Shan, et al. Routing matters in moe: Scaling diffusion transformers with explicit routing guidance. In International Conference on Learning Representations, volume 2026, pp. 23381–23405, 2026.arxiv.org/abs/2510.24711
  23. [23]Yike Yuan, Ziyu Wang, Zihao Huang, Defa Zhu, Xun Zhou, Jingyi Yu, and Qiyang Min. Expert race: A flexible routing strategy for scaling diffusion transformer with mixture of experts. arXiv preprint arXiv:2503.16057, 2025.arxiv.org/abs/2503.16057
  24. [24]Zhengyan Zhang, Yankai Lin, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. Moefication: Transformer feed-forward layers are mixtures of experts. In Findings of the Association for Computational Linguistics: ACL 2022, pp. 877–890, 2022.arxiv.org/abs/2110.01786
  25. [25]Wangbo Zhao, Yizeng Han, Jiasheng Tang, Kai Wang, Yibing Song, Gao Huang, Fan Wang, and Yang You. Dynamic diffusion transformer. In International Conference on Learning Representations, volume 2025, pp. 65520–65552, 2025.arxiv.org/abs/2410.03456
  26. [26]Chenyu Zheng, Xinyu Zhang, Rongzhen Wang, Wei Huang, Zhi Tian, Weilin Huang, Jun Zhu, and Chongxuan Li. Scaling diffusion transformers efficiently via μ p. Advances in Neural Information Processing Systems, 38:19372–19413, 2026.arxiv.org/abs/2505.15270
  27. [27]Youwei Zheng, Yuxi Ren, Xin Xia, Xuefeng Xiao, and Xiaohua Xie. Dense2moe: Restructuring diffusion transformer to moe for efficient text-to-image generation. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 18661–18670. IEEE, 2025.arxiv.org/abs/2510.09094
  28. [28]Tong Zhu, Xiaoye Qu, Daize Dong, Jiacheng Ruan, Jingqi Tong, Conghui He, and Yu Cheng. Llama-moe: Building mixture-of-experts from llama with continual pre-training. In Proceedings of the 2024 conference on empirical methods in natural language processing, pp. 15913–15923, 2024.arxiv.org/abs/2406.16554

Paper details

vlnc:W_2hjevezr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC0-1.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Claude Code

View statement
Looking for related papers…
Contents