Search arXiv⌕ Search

arXiv subjects

Jiaju Wu

Publications and source records attributed to Jiaju Wu.

4 recordsLinked to original sources

Shared Weights, Selected Computations: How Looped Transformers Route What Each Loop Does

Looped Transformers repeatedly apply the same set of Transformer layers, giving them a recurrent architecture for latent computation. Their strong performance on iterative reasoning and length-generalization tasks suggests an appealing explanation: recurrence may provide an inductive bias that lets the model reuse a learned algorithm across loops. However, weight sharing alone does not imply that every loop performs the same operation. This raises a basic question: is each loop actually repeating the same computation, and if not, what routes the shared parameters to different operations? We study this question using graph walks as a test case. In the model's native trajectories, decoded predictions can advance by different numbers of graph steps or remain at a reached target, showing that recurrent progress need not follow a fixed one-loop-one-step pattern. We then show that a frozen loop can be steered toward different transitions by modifying its entering hidden state: a learned linear layer $J$ selects the desired transition without changing the shared Transformer layers. To test how this steering works, we use activation patching and find that attention patterns can recover its effects and switch the selected transition. Across five matched pairs of graph models, changing intermediate supervision during backbone training changes which transitions $J$ can induce. This suggests that $J$ selects computations learned by the backbone rather than creating new algorithms. Together, these results show that the hidden state can control shared computation, with attention routing as a causal pathway.

cs.LG↗

Shiva-DiT: Residual-Based Differentiable Top-$k$ Selection for Efficient Diffusion Transformers

Diffusion Transformers (DiTs) are costly at high resolution because self-attention scales quadratically with token sequence length. Existing pruning methods do not jointly provide end-to-end learnability, low training overhead, and deterministic token counts for predictable token-dependent computation. We propose Shiva-DiT, based on Residual-Based Differentiable Top-k Selection. Its forward pass executes hard top-k selection, while a residual-aware straight-through estimator propagates gradients to both token scores and the budget k without evaluating a second backbone path. A Context-Aware Router and Adaptive Ratio Policy learn layer- and timestep-dependent retention schedules under a target average budget. Experiments on SD3-Medium, Flux.1-dev, and PixArt-Σ show consistent reductions in FLOPs and measured latency. On SD3-Medium, Shiva-DiT provides four fidelity-latency operating points and reaches a 1.54x wall-clock speedup with competitive fidelity.

cs.LG↗

SegQuant: A Semantics-Aware and Generalizable Quantization Framework for Diffusion Models

Diffusion models have demonstrated exceptional generative capabilities but are computationally intensive, posing significant challenges for deployment in resource-constrained or latency-sensitive environments. Quantization offers an effective means to reduce model size and computational cost, with post-training quantization (PTQ) being particularly appealing due to its compatibility with pre-trained models without requiring retraining or training data. However, existing PTQ methods for diffusion models often rely on architecture-specific heuristics that limit their generalizability and hinder integration with industrial deployment pipelines. To address these limitations, we propose SegQuant, a unified quantization framework that adaptively combines complementary techniques to enhance cross-model versatility. SegQuant consists of a segment-aware, graph-based quantization strategy (SegLinear) that captures structural semantics and spatial heterogeneity, along with a dual-scale quantization scheme (DualScale) that preserves polarity-asymmetric activations, which is crucial for maintaining visual fidelity in generated outputs. SegQuant is broadly applicable beyond Transformer-based diffusion models, achieving strong performance while ensuring seamless compatibility with mainstream deployment tools.

cs.CV↗

Ultrahigh-Q chiral resonances empowered by multi-head attention deep learning

High quality (Q) factor optical chiral resonators are indispensable for many chiral photonic devices. Designing ultrahigh Q-factors in chiral metasurfaces traditionally relies on extensive parameter scanning, which is time-consuming and inefficient. While deep learning now provides a rapid design alternative, conventional models still face challenges in accurately predicting ultrahigh Q-factor spectral characteristics. In this study, we introduce a multi-head attention network (MuHAN) to accelerate the design of ultrahigh Q-factor optical chiral resonators in bilayer metasurfaces. MuHAN achieves forward spectral predictions in approximately 10ms, thousands of times faster than finite-difference time-domain simulations, boasting 99.85% and 99.9% accuracy for forward and inverse predictions, respectively. By transferring the learned physical principles, we perform inverse design of nanoscale structures with ultrahigh Q-factors (up to 2.9910E5) based on chiral quasi-bound states in the continuum (quasi-BICs) at minimal computational cost. Our rapid design tool, based on MuHAN, enables high-performance encryption imaging, bridging deep learning with high-Q chiral metasurfaces for advanced sensing, laser, and detection applications.

physics.optics↗