Searcharxiv⌕ Search

arXiv subjects

Hui Sun

Publications and source records attributed to Hui Sun.

At least 19 recordsLinked to original sources

From GPU to TPU with Coding Agents: What Works, What Fails, and What It Costs?

A coding agent can migrate a machine learning workload, report success, and still change how the model trains. Rising compute costs, limited accelerator capacity, and vendor dependence are pushing organizations toward alternatives to graphics processing units (GPUs); a key question is whether agent-generated migrations to tensor processing units (TPUs) can be trusted and at what cost. We build a dataset of 148 PyTorch ML research projects and use Claude Code to migrate ten of them from NVIDIA GPUs to Google Cloud TPUs. We independently assess whether each migration runs, preserves numerical behavior, executes on the intended hardware, maintains the project's goal, and delivers acceptable performance. We also examine failures, human effort, and costs. Eight projects meet our project-goal criterion, and migrations require 2.4 human interventions on average. Of 70 execution attempts, 53 fail (76%), and 26 of these failures (49%) raise no error. The most frequent cause is repeated compilation and other execution inefficiencies, while interactions with third-party libraries can silently change the computation: in one four-chip migration, the agent reports success despite a change in gradient clipping that reduces accuracy from 86.53% to 84.89%. Execution costs vary widely: in one workload, TorchTPU, a PyTorch execution backend for TPUs, trains 1.86 times faster and 25% cheaper per run than the GPU. For practitioners, these findings motivate independent reference runs, verification under the intended hardware configuration, and workload-specific acceptance and stopping criteria that account for both computational and human costs.

cs.SE↗

EP251129a: A Fast X-ray Transient with Two X-Ray Plateaus and Its Off-axis Afterglow

Extragalactic fast X-ray transients (EFXTs) detected by the Einstein Probe are extending the parameter space of relativistic stellar explosions toward softer and longer-lived transients. Here we report EP251129a/GRB 251129A at z=0.505, which exhibits two X-ray plateaus: an early plateau lasting $\sim 10^{4}\,\rm s$ followed by a rapid decay with spectral softening, and a second plateau extending to 60 days, placing it at the extreme long-duration end of Gamma Ray Burst (GRB) plateaus. The early optical emission evolves independently of the X-ray, indicating a different origin; whereas the unusual radio afterglow shows a rapid rise of $F_ν\propto t^{1.9-2.5}$ and a delayed peak at $\sim36-40$ days, providing strong evidence for an off-axis geometry. We find that the early X-ray behavior resembles those of ultra-long GRBs (ULGRBs) and can be naturally explained by the internal dissipation from a newborn millisecond magnetar undergoing gravitational-wave-dominated spin-down before collapsing into a black hole. The early optical, radio and late X-ray emission are well described by an off-axis two-component jet afterglow with additional energy injection, possibly powered by fallback accretion onto black hole. EP251129a therefore connects the emerging EFXT population with ULGRB-like central-engine activity and off-axis afterglow, offering a rare opportunity to probe both the evolution of central engine and jet structure in a single event.

astro-ph.HE↗

Latent Bridge: From Video Latents to 3D Geometry via Feature Alignment

Video generation and feed-forward 3D reconstruction typically use separate representations, requiring RGB decoding and visual re-encoding to recover geometry from generated latents. We propose Latent Bridge, which connects video generative latent spaces with geometric feature spaces to directly predict 3D geometry from video latents. We develop representation-specific bridges for Wan2.1 and V-RAE, enabling feed-forward prediction of cameras, depth, and 3D point clouds without the intermediate RGB pathway. Each bridge is trained on RGB videos through feature distillation, while the video encoder and geometry model remain frozen. Training requires neither ground-truth geometry nor execution of the downstream geometric aggregator or prediction heads. At inference, the same video latents support both RGB decoding and geometry prediction. The same trained bridge can be reused for image-to-video and text-to-video generation within the same video latent space, without bridge retraining. Experiments on Co3Dv2 and WildRGB-D demonstrate competitive geometric reconstruction quality, efficient end-to-end generation and reconstruction, and faster latent-to-geometry decoding, highlighting latent alignment as a practical and reusable interface between video generation and 3D reconstruction. Our code is available at: https://github.com/hustvl/Latent-Bridge.

cs.CV↗

The (missing) gamma-ray counterparts to EP events

While the connection of Fast X-ray Transients (FXTs) detected by Einstein Probe (EP) with Gamma-ray Bursts (GRBs) is increasingly compelling, most lack gamma-ray counterparts, leaving their relation to GRBs unclear. We performed a systematic search for gamma-ray counterparts to the 72 transients detected by EP in its first year, using targeted searches in Fermi/GBM and Fermi/LAT data, complemented by SVOM/GRM, SVOM/ECLAIRs, Swift/BAT and Konus-Wind. For the visible events without a gamma-ray counterpart, we derived simultaneous $3σ$ flux upper limits in the 10-1000 keV and the 0.1-1 GeV band. We find that 23 events (32%) have a gamma-ray counterpart (seven sub-threshold), while 49 events (68%) have none, despite most being visible. For events with a gamma-ray counterpart, the X-ray flux over the gamma-ray $T_{\rm 90}$ is systematically higher than over the full X-ray duration, with flux ratios $1 \lesssim F_{\rm [10-1000\,keV]}/F_{\rm [0.5-4\,keV]} \lesssim 100$, suggesting that gamma-rays are preferentially detected during the brightest X-ray phases. For events without gamma-ray counterpart, the most stringent Fermi/GBM upper limits imply $E_{\rm peak} \lesssim 30$-100 keV and, for the 14 events with measured redshifts, $L_{\rm iso}\lesssim 10^{48}-9\times10^{51}$ erg/s. If classical GRB correlations hold in this regime, these lower energetics imply lower bulk Lorentz factors ($Γ_0 \lesssim 100$), as confirmed in a few cases by afterglow constraints. No significant GeV emission was detected by Fermi/LAT, yielding $1 \lesssim F_{0.1-1\,{\rm GeV}}/F_{0.5-4\,{\rm keV}} \lesssim 10$, placing the first constraints on a potential synchrotron self-Compton component for this new population. Although individual origins remain uncertain, many EP FXTs could be compatible with the GRB population, extending it toward lower $E_{\rm peak}$, luminosities, and bulk Lorentz factors.

astro-ph.HE↗

REATS: LLM Reasoning-based Ensemble Learning for Adaptive Time Series Forecasting

Due to the diversity of real-world time series, no single forecasting model consistently dominates across all samples. Ensemble learning addresses this by combining complementary model strengths, yet existing methods rely on fixed rules or black-box models based solely on numerical inputs, failing to leverage LLM reasoning for interpretable weighting decisions. We propose REATS, which leverages LLM reasoning capabilities as an intelligent ensemble router that jointly processes textual temporal pattern descriptions and numerical features to produce interpretable, sample-adaptive ensemble weights through chain-of-thought reasoning. To enable effective LLM-based ensembling, we study its key design choices and propose: (i) a structured input pipeline that transforms raw time series into hybrid textual--numerical representations with fixed token cost, enabling rule-based chain-of-thought construction without API dependency, augmented with retrieved similar-sample priors; (ii) a diverse multi-row weight supervision scheme coupled with a token-efficient percentage-table format that reduces numerical complexity and mitigates LLM hallucinations; and (iii) a two-stage fine-tuning framework combining SFT with GRPO, where a reciprocal reward mapping transforms the continuous unbounded MSE gap into bounded signals with amplified near-oracle sensitivity, addressing the uniform sensitivity and outlier-dominated advantage compression inherent in naive reward designs for regression-based GRPO. Experiments on eight benchmarks demonstrate that REATS outperforms competitive ensemble baselines while providing natural language explanations and demonstrating strong transfer learning and out-of-domain generalization to unseen candidate models.

cs.LG↗

OPDArena: Understanding Learning and Forgetting in On-Policy Distillation

On-policy distillation (OPD) is increasingly used for language model post-training, yet how teacher supervision shapes learning and forgetting remains unclear. We present OPDArena, a framework comparing supervised fine-tuning (SFT), reinforcement learning with verifiable rewards (RLVR), and OPD across five pretrained models and diverse teacher sources. It jointly evaluates mathematical learning, general capability retention, and predictive distribution changes. Teacher choice strongly shapes retention: students of RLVR-trained teachers improve on the target task while retaining prior capabilities, whereas students of SFT-trained teachers incur greater capability loss. Across post-training methods, out-of-domain (OOD) distribution change shows a more consistent positive association with forgetting than in-domain change. To understand how teacher choice affects these changes, we examine the additional information teachers provide relative to the student's pretrained model. Controlled teacher comparisons show that the task-specific preferences teachers acquire through post-training make student updates more concentrated in-domain.

cs.LG↗

Multi-wavelength study of EP250416a / GRB 250416C: An Optically Dark Long GRB with a Late Jet Break

We present multi-wavelength study of the $γ$/X-ray transient EP250416a (also designated GRB 250416C), triggered by the Einstein Probe (EP) Wide-field X-ray Telescope and also by SVOM and Konus-Wind (KW). Observations spanning the $γ$-ray, X-ray, and optical bands facilitated detailed analysis of the burst's prompt emission, afterglow evolution, and physical origin. GRB 250416C exhibits a burst duration of 30 s in X-ray and 17.7 s in $γ$-rays, with joint spectral fitting of 0.5-5000 keV data gives $E\rm_{peak}=342_{-232}^{+90}$ keV. Optical spectroscopy of the afterglow, acquired with the Gemini Multi-Object Spectrograph (GMOS) on Gemini South, yielded a redshift of $z=0.963$. Accounting for the measured redshift, the isotropic energies are $E\rm_{X,iso}=2.7_{-0.5}^{+0.9}\times10^{50}$ erg and $E\rm_{γ,iso}=7.34_{-2.1}^{+5.1}\times10^{51}$ erg, aligning with the Amati relation for long GRBs. The fluence ratio $\rm S(25-50~keV)/S(50-100~keV)=0.78_{-0.12}^{+0.10}$ classifies GRB 250416C as an X-ray rich (XRR) GRB. The X-ray afterglow shows an initial shallow decay ($α\approx -0.5$) transitioning to a canonical decay phase ($α\approx -1$), with a very late jet break at $t\sim 1.5\times 10^6$ s, corresponding to a jet half-opening angle of $θ_j=10.6_{-1.8}^{+1.9}$ degrees. GRB 250416C is optically dark, as it shows only a faint $r$-band detection ($r=24.16\pm 0.13$ mag) from Gemini South-GMOS and a low optical-to-X-ray spectral index $β_{\rm OX} = 0.3$. This may be attributed to significant host-galaxy extinction, with a required $A_V^{\text{host}}=2.7\pm 0.3\ \text{mag}$ derived from the extinction curve model.

astro-ph.HE↗

ReDrive: Shaping Representations with World Modeling for End-to-End Driving

Driving policies require capabilities of scene understanding and future evolution prediction. To achieve this goal, current end-to-end models typically construct complex perception-planning pipelines or introduce world models that explicitly predict future states, resulting in a complex system architecture. Inspired by the transferability of general-purpose visual representations, we argue that combining sufficiently strong visual representations with representation world modeling can support effective planning without relying on complex inference-time auxiliary modules. Based on this insight, we present ReDrive, an end-to-end driving framework that strengthens planning-oriented visual features via future representation prediction. To achieve this, ReDrive adopts a three-stage training pipeline consisting of driving video pretraining, joint world-modeling and planning training, and planner adaptation. This yields a strong planning-oriented representation and a high-performance planner, while requiring neither auxiliary perception modules nor future prediction at inference time. Experiments on NAVSIM demonstrate strong performance, achieving 91.0 PDMS on NAVSIM v1 and 90.8 EPDMS on NAVSIM v2. These results show that shaping representations with world modeling is sufficient to enable high-performance end-to-end planning while retaining a simple encoder-planner inference pipeline.

cs.CV↗

EP250302a: violent shell collision in a soft-X-ray-selected GRB-like transient

The Einstein Probe opens a previously unexplored soft X-ray window onto gamma-ray bursts, filling a critical observational gap in the soft X-ray coverage of their prompt emission. In this letter, we present EP250302a, a soft-X-ray-selected, GRB-like transient at $z=1.131$ detected by the Einstein Probe. Follow-up observations from X-ray to radio reveal a narrow X-ray flare at $\sim 1.1$\, ks and subsequent achromatic optical and X-ray rebrightening. These features challenge a standard single-component afterglow model and indicate the need for multiple ejecta components. A violent collision between a late relativistic shell and the decelerated leading blast wave provides a plausible interpretation: the flare arises from internal dissipation of the late ejecta, while the rebrightening is powered by the shocked emission produced in the collision. Quantitative modeling constrains the kinetic energy ratio between the late shell and the initial ejecta to $E_{\rm k,iso,2}/E_{\rm k,iso,1} \sim 5$ (with $E_{\rm k,iso,2} \sim 10^{53}$~erg and $E_{\rm k,iso,1} \sim 2\times10^{52}$~erg), as well as the Lorentz factor contrast to $Γ_{2,0}/Γ_{1,0} \approx 0.98$--$2.27$, required to reproduce the observed flare luminosity and rebrightening amplitude. Such an energetic late shell can be launched in a radiatively inefficient second episode of central-engine activity. Thanks to the well-sampled, early-time multiband coverage facilitated by the EP trigger, EP250302a provides a valuable case to test the physical connection between central-engine activity and shell collisions.

astro-ph.HE↗

CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification

Natural-language Computer-Aided Design (CAD) code generation aims to turn design intent into executable and editable parametric programs. Large language models (LLMs) make this goal increasingly practical, but useful systems must preserve the construction process behind the rendered geometry. Existing benchmarks and methods mostly focus on how closely the generated CAD model matches the reference geometry, often using metrics such as Intersection over Union (IoU). Such metrics can miss errors in part decomposition, construction hierarchy, Boolean operations, sketch structure, and geometric relations. This gap calls for a representation that makes design intent explicit and lets a system check generated code against that intent. We propose CIT-CAD, a framework that infers a Constraint Intent Tree (CIT) from the input description to represent the intended entities, hierarchy, operations, and relations. The tree has two roles: it guides CAD code generation and defines expected constraints for verification. The framework extracts actual constraints from the generated program, compares them with the expected constraints, and uses mismatches to localize and repair design violations. Experiments show that the framework improves CAD generation performance, with larger gains on more complex multi-entity designs. By turning design intent into an explicit and checkable object, this work is the first attempt to move text-to-CAD generation beyond rendered-geometry matching toward construction-aware synthesis, verification, and repair.

cs.AI↗

A Sample-Wise Adjoint Regression Framework for Mean-Field Control with Connections to Adjoint Matching

This work proposes a novel numerical approach for solving mean-field control (MFC) problems using an adjoint-based optimization framework motivated by the stochastic maximum principle (SMP). Rather than solving the adjoint processes $(Y_t,Z_t)$ explicitly, we construct sample-wise unbiased estimators of their discretized counterparts and use them to approximate the Hamiltonian control gradient through recursive regression. The control is then updated by a gradient-descent scheme. This approach differs from conventional deep-learning methods, which typically follow a ``discretize-then-optimize'' paradigm and directly optimize a globally parameterized control through the discretized objective. Numerical experiments demonstrate competitive, and in many cases improved performance compared with direct deep-learning approaches. The sample-wise and regression-based structure also supports scalable implementation in high-dimensional settings and makes the method attractive for generative modeling problems involving particle-based representations and distributional objectives. On the theoretical side, we establish a connection between a particular class of MFC problems and the \emph{adjoint matching} framework. Using the SMP under the mean field control setting, we further show that the self-consistent critical point of the resulting mean-field adjoint matching loss coincides with the optimal control.

math.OC↗

Evaluating Language Models on Cross-Language Code Functional Equivalence

Background: Large Language Models (LLMs) have demonstrated strong performance across a variety of code-understanding tasks, leading many to believe that they can reason about program semantics. However, existing evaluations primarily focus on single-language settings or rely on synthetically generated code, raising concerns about whether current results reflect true semantic understanding. Aims: We investigate whether LLMs can accurately judge functional equivalence across different programming languages in human-written code, a setting that requires deeper reasoning beyond superficial similarity. Method: We introduce PolyHuman, a dataset of human-written programs in CPP, Java, and Python. Using this dataset, we evaluate intra- and inter-language equivalence detection across open-weight and proprietary LLMs, selecting GPT-o4-mini as a representative model to assess stability. We then manually analyze 81 cases of systematic disagreement in which models incorrectly judge functional equivalence, examining the code logic and the generated Chain-of-Thought reasoning. Finally, we categorize these failures and compare them across GPT-o4-mini, Claude-Opus-4.7, and Gemini-3-Flash to determine whether they reflect model-specific issues or broader limitations of state-of-the-art LLMs. Results: We identify a difficulty-dependent breakdown in equivalence judgment (harder problems make the model increasingly prone to misclassifying non-equivalent code as equivalent), a model-specific sensitivity to programming language for the best-performing model (particularly a more conservative behavior on Python), and a partial reliance on similarity-based cues. GPT-o4-mini also shows substantial run-to-run instability under identical settings, indicating inconsistent rather than absent capability. Conclusions: Current LLMs do not reliably capture functional equivalence within or across languages.

cs.SE↗

Minutes-long soft X-ray prompt emission from a compact object merger

Compact object mergers are multi-messenger sources and known progenitors of some gamma-ray bursts, bright flashes of high-energy radiation powered by a central engine, either an accreting black hole or a neutron star. Our understanding of these events has so far been shaped primarily by observations in the gamma-ray band, leaving their prompt phase poorly constrained at lower energies. A long-lasting ($\approx$100 s) engine-driven X-ray emission was discussed to explain rapidly fading X-ray afterglows following several ($\approx$30%) bursts of short ($\lesssim$2 s) duration. However, this prompt X-ray component was not directly observed and past candidates were not confirmed. Here we report the discovery of EP250704a containing a minutes-long ($\sim$560 s) flash of soft (0.5--4 keV) X-rays immediately following the short ($\sim$0.4 s) GRB 250704B. The variability and spectral shape of this emission are inconsistent with the canonical picture of a hard, accretion-powered spike followed by a standard external-shock afterglow. Instead, the long-soft bump points to a distinct phase of prompt emission in X-rays, which would not have been detected without the soft X-ray coverage of Einstein Probe. The detection of a prompt soft X-ray counterpart in an otherwise ordinary short GRB shows that long-lasting X-ray emission is likely a common feature of merger-driven bursts and a promising electromagnetic counterpart to gravitational wave sources.

astro-ph.HE↗

Nonparametric Schrödinger Bridge Time Series Generator: Algorithm, Convergence Analysis and Applications

We conduct a convergence analysis for the Schrödinger Bridge Time Series (SBTS) data generator. Starting from a regularized formulation in which the data ensemble is mixed with a standard multivariate Gaussian distribution with a prescribed probability, we prove that the Euler-Maruyama discretization converges to the mixed target distribution with half-order convergence rate, provided that the ensemble size and kernel bandwidth are chosen appropriately. We further show that the regularized distribution converges to the original target distribution as the mixing probability tends to zero. The analysis simultaneously accounts for the ensemble approximation error, kernel approximation error, and time-discretization error, and therefore provides a full distributional convergence result for the SBTS generator. Empirically, we further examine the flexibility of the method by replacing the Wiener reference measure with the path measure induced by a more general SDE. The numerical experiments show that the schemes based on both the original Wiener reference measure and the SDE-induced reference measure achieve comparable performance, demonstrating the robustness and stability of the SBTS framework.

math.NA↗

The Ensemble Schr{ö}dinger Bridge filter for Nonlinear Data Assimilation

This work introduces a novel nonlinear optimal filtering method, termed the Ensemble Schr{ö}dinger Bridge nonlinear filter. The proposed filter combines the standard prediction step with a diffusion-generative-modeling-based analysis step, thereby completing one full filtering update. The resulting approach introduces no structural model error, and is derivative-free, training-free, and highly parallelizable. Numerical experiments demonstrate that the proposed algorithm performs effectively for highly nonlinear dynamics and nonlinear observation processes, including chaotic systems with dimension up to 40 and beyond. The results also show that the method outperforms classical approaches such as the ensemble Kalman filter and particle filter across a range of tests with varying degrees of nonlinearity. Future work will focus on extending the proposed method to practical meteorological applications and developing a rigorous convergence theory.

cs.LG↗

A JWST redshift for the host galaxy of EP250207b of z=3.2: a collapsar origin is viable

We present James Webb Space Telescope (JWST) and Hubble Space Telescope (HST) observations of the field of the fast X-ray transient (FXT) detected by Einstein Probe, EP250207b, to resolve any ambiguity about the host galaxy and redshift of the FXT. EP250207b was originally associated with a nearby galaxy at z=0.082, based on its low chance alignment probability, and a binary neutron star merger origin was proposed. However, we report the detection of a background galaxy at z=3.2 at the location of EP250207b. Assuming this galaxy is the actual host galaxy, the rest-frame energetics and timescales of the event change. Furthermore, the available data are not able to rule out the presence of a supernova associated with EP250207b if at this redshift. We model the X-ray, optical, near-infrared and radio light curves using a tophat jet model implemented in Redback and find that they are consistent with an on-axis gamma ray burst afterglow. The energetics and host galaxy properties do not allow us to distinguish between a collapsar and a merger driven event.

astro-ph.HE↗

Design-Specification Tiling for ICL-based CAD Code Generation

Large language models~(LLMs) have demonstrated remarkable capabilities in code generation, yet their performance remains limited on domain-specific tasks such as Computer-Aided Design~(CAD) code generation, largely due to the scarcity of high-quality training data. In-Context Learning~(ICL) provides a training-free alternative by prompting LLMs with task-specific exemplars, but its effectiveness critically depends on how exemplars are selected. Existing selection strategies mainly rely on similarity or point-wise diversity, often overlooking the compositional nature of CAD design specifications, where a query may involve multiple functional requirements, geometric constraints, and design primitives. As a result, selected exemplars can be individually relevant but collectively redundant, providing insufficient coverage for complex design requirements. In this work, we propose \emph{knowledge sufficiency} as a principled objective for exemplar selection, aiming to select a compact set of exemplars that maximally satisfies the requirements contained in a target design specification. To instantiate this objective, we introduce \emph{Design-Specification Tiling~(DST)}, which estimates knowledge sufficiency through a surrogate tiling ratio by decomposing design specifications into multi-granular components and measuring the proportion of query components covered by selected exemplars. We further show that optimizing this objective can be formulated as a submodular maximization problem, and develop a polynomial-time greedy algorithm tailored to this setting with a $(1-1/e)$-approximation guarantee. Extensive experiments across multiple LLMs demonstrate that DST substantially improves CAD code generation quality and consistently outperforms existing ICL exemplar selection strategies, highlighting the importance of requirement-level knowledge coverage for domain-specific code generation.

cs.SE↗

ACES: Who Tests the Tests? Leave-One-Out AUC Consistency for Code Generation

Selecting LLM-generated code candidates using LLM-generated tests is challenging because the tests themselves may be incorrect. Existing methods either treat all tests equally or rely on ad-hoc heuristics to filter unreliable tests. Yet determining test correctness requires knowing which codes are correct, creating a \emph{circular dependency}. Our key insight is that we need not determine test correctness at all: \emph{test votes should rank, not merely count}. What matters is not how many codes pass a test, but whether the test can \emph{distinguish} correct from incorrect code. We break the circular dependency via leave-one-out evaluation: hold out one test, rank codes by their aggregate scores on all remaining tests, and measure whether the held-out test's pass/fail pattern agrees with this ranking. We formalize this agreement as the leave-one-out AUC~(LOO-AUC) and prove that the expected LOO-AUC is proportional to each test's ability to separate correct code from incorrect code. Building on this, we propose \textbf{ACES}~(\textbf{A}UC \textbf{C}onsist\textbf{E}ncy \textbf{S}coring) with two complementary variants: ACES-C provides closed-form weights that provably approximate the oracle in expectation under a mild assumption on average test quality; ACES-O drops this assumption and iteratively optimizes a differentiable LOO-AUC objective. Both operate solely on the binary pass matrix with negligible overhead, and achieve state-of-the-art Pass@$k$ on multiple code generation benchmarks.

cs.LG↗