SearcharxivSearch

arXiv subjects

Jin Pan

Publications and source records attributed to Jin Pan.

At least 19 recordsLinked to original sources

Concept of Time-Reversal Characteristic Modes in Non-Free-Space Environments

Characteristic modes possess a natural environmental interpretation in the current domain because the surrounding scene is carried by the Green function used to construct the impedance operator. An equally direct physical interpretation is less evident in the scattering domain once the background itself participates in propagation and feedback. This paper introduces a field-level definition of time-reversal characteristic modes based on the differential scattered field relative to a prescribed background. A characteristic state is identified when this additional field, after time reversal and propagation through the same background, regenerates the same differential scattering state up to a scalar modal factor. The concept is verified in two distinct non-free-space settings. For a finite structural background, it reproduces established substructure characteristic modes and agrees with a common-origin spherical-wave realization. For a PEC half-space, it agrees with the modes obtained from the half-space Green-function impedance operator, although the infinite plane has no natural finite-object transition matrix. The results show that the physical modal statement can remain unchanged even when the numerical representation of the environment is fundamentally different.

cs.CE

Efficient and Trainable Language Model Test-Time Scaling via Local Branch Routing

Test-time scaling improves language-model reasoning, but existing approaches often face a difficult trade-off: long chain-of-thought sampling remains single-threaded, while sentence- or solution-level search can be computationally expensive and hard to train end-to-end. We introduce Local Branch Routing (LBR), a token-level test-time scaling framework that expands a small local lookahead tree, forwards all sampled branches through the language model, and uses a lightweight router to select the depth-1 subtree to commit. By routing over the hidden states of candidate local futures, LBR allows each token decision to use evidence beyond the root next-token distribution while avoiding full solution-level search. The resulting prune-shift-grow decoding process preserves discrete branch identities and defines a tractable tree-trajectory likelihood: newly grown nodes are counted when first sampled, and router decisions are assigned explicit probabilities. This enables end-to-end reinforcement learning with verifiable rewards, jointly optimizing the base model and router under the same likelihood-ratio principle as discrete-token RLVR. On synthetic hierarchical-planning tasks, LBR shows that post-candidate hidden states provide useful routing evidence. On mathematical reasoning benchmarks, LBR improves both Pass@1 and Pass@32 over discrete chain-of-thought, vanilla discrete-token RLVR, and RL-compatible soft-token branching baselines. These results suggest that lightweight local branching offers an efficient, trainable, and discrete form of language-model test-time scaling.

cs.CL

World Engine: Towards the Era of Post-Training for Autonomous Driving

Autonomous vehicles must operate safely in the real world, where errors can have severe consequences. Although modern end-to-end driving policies excel in routine scenarios, their reliability is limited by the scarcity of safety-critical ``long-tail'' events in real driving datasets. These rare interactions define the practical safety boundary of the learned policy, yet they are difficult to collect at scale in the real world. Here we show that this fundamental limitation can be addressed by post-training pre-trained driving models on synthesized high-stakes interactions. We introduce World Engine, a generative framework that reconstructs high-fidelity interactive environments from real-world logs and systematically extrapolates them into realistic safety-critical variations. This paradigm enables reinforcement-based post-training to align policies with safety constraints, circumventing the physical risks inherent in real-world exploration. On a public benchmark built on nuPlan, World Engine substantially reduces failures in rare safety-critical scenarios and yields significantly larger gains than scaling pre-training data alone. Furthermore, when deployed on a production-scale autonomous driving system, the resulting policy reduces simulated collisions and demonstrates measurable improvements in on-road testing, showing that post-training on synthesized, safety-critical interactions offers a scalable and effective pathway to safer autonomous driving. The full codebase suite, including training, is released to the public.

cs.RO

Time-Reversal Characteristic Modes of Lossy Reciprocal Structures

A time-reversal characteristic-mode decomposition is developed for reciprocal lossy electromagnetic structures. The formulation is built on a transmit--receive interpretation of reciprocity: the far-field pattern radiated by a mode determines the time-reversed incident field that is optimally matched to couple energy back into that same mode. This physical picture leads to an antilinear characteristic-mode equation whose solutions remain radiation-power orthogonal even in the presence of material loss, lossy loading, or matched absorption. As a result, the modal expansion coefficients directly represent the radiated-power contributions of the corresponding modes and avoid the singular biorthogonal normalization that may arise in nonnormal classical characteristic-mode expansions. Equivalent formulations are derived in the scattering-operator, T-matrix, and method-of-moments (MoM) frameworks, thereby connecting external wave-channel descriptions with current-space and port-excitation descriptions. The proposed modes reduce to classical characteristic modes in the lossless limit. Numerical examples involving a lossy two-sphere system and a loaded folded antenna demonstrate the radiation-power orthogonality, modal-expansion stability, and power interpretability of the proposed decomposition near exceptional points, where classical characteristic-mode expansions become singular or lose their radiated-power meaning.

physics.optics

Length Value Model: Scalable Value Pretraining for Token-Level Length Modeling

Tokens are the fundamental units of computation in modern autoregressive models, and generation length directly influences both inference cost and reasoning performance. Despite its importance, existing approaches model length primarily at the coarse sequence level. We introduce the Length Value Model (LenVM), a token-level framework that estimates the remaining generation length at every decoding step. By formulating length modeling as a value estimation problem and assigning a constant negative reward to each generated token, LenVM predicts a bounded, discounted return that is a monotone proxy for the remaining generation horizon. This value formulation provides annotation-free, dense, unbiased, and scalable supervision. Experiments on LLMs and VLMs show that LenVM supports exact control, continuous performance--efficiency steering, length prediction, and interpretation. On LIFEBench-token, it raises the exact-length score of Qwen2.5-7B-Instruct from $30.9$ to $64.8$ in one pass and reaches $83.6$ when combined with LCG. Near $200$ tokens on GSM8K, LenVM retains about $63\%$ Pass@1 versus $6\%$ under a hard token budget. Across other settings, LenVM improves matched-length quality over prompting and EOS calibration, while its length-prediction accuracy improves with scale and exceeds specialized predictors. Its token-level values also identify markers of shifts between longer and shorter trajectories. These results establish generation length as an effective scalable token-level value signal for control, prediction, and future value-based training.

cs.CL

SWE-Edit: Rethinking Code Editing for Efficient SWE-Agent

Large language model agents have made strong progress on software engineering, yet current systems suffer from a context coupling problem: the standard code editing interface conflates code inspection, modification planning, and edit execution within a single context window, forcing agents to interleave exploratory viewing with strictly formatted edit generation. Irrelevant context accumulates and edit reliability degrades. We propose SWE-Edit, which decomposes the editing interface into two specialized subagents: a Viewer that extracts task-relevant code on demand, and an Editor that executes modifications from high-level natural language plans -- letting the main agent focus on reasoning while delegating context-intensive operations to clean context windows. On SWE-Bench Verified, this decomposition raises resolve rate by 2.1 pp and cuts inference cost by 17.9%, with consistent gains across multiple reasoning-model families (Kimi-K2, MiniMax-M2.1, GLM-4.7). We further show that effective edit-format selection can be trained into a small model rather than requiring frontier-scale capacity: GRPO training on Qwen3-8B with an adaptive find-replace/whole-file-rewrite policy improves edit success by 12.5 pp and brings an 8B open-source editor to parity with GPT-5-nano on downstream SWE-Bench resolve rate. To enable rapid editor iteration, we release PR-Edit, a lightweight evaluation whose scores correlate strongly with SWE-Bench resolve rate. We release our code at https://github.com/microsoft/SWE-Edit.

cs.SE

SpecForge: A Flexible and Efficient Open-Source Training Framework for Speculative Decoding

Large language models incur high inference latency due to sequential autoregressive decoding. Speculative decoding alleviates this bottleneck by using a lightweight draft model to propose multiple tokens for batched verification. However, its adoption has been limited by the lack of high-quality draft models and scalable training infrastructure. We introduce SpecForge, an open-source, production-oriented framework for training speculative decoding models with full support for EAGLE-3. SpecForge incorporates target-draft decoupling, hybrid parallelism, optimized training kernels, and integration with production-grade inference engines, enabling up to 9.9x faster EAGLE-3 training for Qwen3-235B-A22B. In addition, we release SpecBundle, a suite of production-grade EAGLE-3 draft models trained with SpecForge for mainstream open-source LLMs. Through a systematic study of speculative decoding training recipes, SpecBundle addresses the scarcity of high-quality drafts in the community, and our draft models achieve up to 4.48x end-to-end inference speedup on SGLang, establishing SpecForge as a practical foundation for real-world speculative decoding deployment.

cs.LG

Constitutional Classifiers++: Efficient Production-Grade Defenses against Universal Jailbreaks

We introduce enhanced Constitutional Classifiers that deliver production-grade jailbreak robustness with dramatically reduced computational costs and refusal rates compared to previous-generation defenses. Our system combines several key insights. First, we develop exchange classifiers that evaluate model responses in their full conversational context, which addresses vulnerabilities in last-generation systems that examine outputs in isolation. Second, we implement a two-stage classifier cascade where lightweight classifiers screen all traffic and escalate only suspicious exchanges to more expensive classifiers. Third, we train efficient linear probe classifiers and ensemble them with external classifiers to simultaneously improve robustness and reduce computational costs. Together, these techniques yield a production-grade system achieving a 40x computational cost reduction compared to our baseline exchange classifier, while maintaining a 0.05% refusal rate on production traffic. Through extensive red-teaming comprising over 1,700 hours, we demonstrate strong protection against universal jailbreaks -- no attack on this system successfully elicited responses to all eight target queries comparable in detail to an undefended model. Our work establishes Constitutional Classifiers as practical and efficient safeguards for large language models.

cs.CR

Corrective Diffusion Language Models

While Diffusion Language Models (DLMs) are theoretically well-suited for iterative refinement due to their non-causal structure, they often fail to reliably revise incorrect tokens in practice. The key challenge lies in the model's inability to distinguish between correct and erroneous tokens in a visible sequence. Standard masked diffusion language model (MDLM) training is restricted to the objective of unmasking, undermining the effectiveness of refinement guided by confidence. Based on this observation, we study corrective behavior in DLMs, defined as the ability to assign lower confidence to incorrect tokens and iteratively refine them while preserving correct content. We show that this capability is not induced by conventional masked diffusion objectives and propose a post-training principle oriented by correction that explicitly supervises visible incorrect tokens, enabling discriminative confidence and targeted refinement. To evaluate corrective behavior, we introduce the Code Revision Benchmark, a controllable and executable benchmark for assessing error localization and in-place correction. Experiments on code revision tasks and parallel decoding scenarios demonstrate that models trained with our approach substantially outperform standard MDLMs, with gains that are most pronounced when parallel decoding introduces substantial uncertainty and iterative refinement becomes essential. Our code is publicly available at https://github.com/zhangshuibai/CDLM.

cs.LG

Hybrid Method of Moments and Generalized Scattering Matrix: Applications to Antennas in Radomes, Reflectors, and Implantable Media

Electromagnetic analysis of antennas embedded in or interacting with large surrounding structures poses inherent multiscale challenges: the antenna is electrically small yet geometrically detailed, while the environment is electrically large but comparatively smooth. To address this, we present a hybrid method of moments (MoM) and generalized scattering matrix (GSM) framework that achieves a clean separation between fine-scale and large-scale complexities while preserving their full mutual coupling. Antennas of arbitrary geometry can be characterized once and reused across different environments, or conversely, a given environment can be modeled once to accommodate multiple antenna designs. The framework is inherently versatile, encompassing GSM-PO and GSM + T-matrix extensions, and thus provides a unified paradigm for multiscale antenna modeling. With the large body always represented by the formulation best suited to its scale and shape, the approach combines accuracy, efficiency, and adaptability. Numerical validations on implantable antennas, radome-protected arrays, and reflector systems confirm excellent agreement with full-wave solvers while demonstrating dramatic reductions in computational cost for design and optimization.

cs.CE

APRIL: Active Partial Rollouts in Reinforcement Learning to Tame Long-tail Generation

Reinforcement learning (RL) has become a cornerstone in advancing large-scale pre-trained language models (LLMs). Successive generations, including GPT-o series, DeepSeek-R1, Kimi-K1.5, Grok 4, and GLM-4.5, have relied on large-scale RL training to enhance reasoning and coding capabilities. To meet the community's growing RL needs, numerous RL frameworks have been proposed. However, RL training remains computationally expensive, with rollout generation accounting for more than 90% of total runtime. In addition, its efficiency is often constrained by the long-tail distribution of rollout response lengths, where a few lengthy responses stall entire batches, leaving GPUs idle and underutilized. As model and rollout sizes continue to grow, this bottleneck increasingly limits scalability. To address this challenge, we propose Active Partial Rollouts in Reinforcement Learning (APRIL), which mitigates long-tail inefficiency. In the rollout phase, APRIL over-provisions rollout requests, terminates once the target number of responses is reached, and recycles incomplete responses for continuation in future steps. This strategy ensures that no rollouts are discarded while substantially reducing GPU idle time. Experiments show that APRIL improves rollout throughput by 22.5% on average (at most 44%) across commonly used RL algorithms (GRPO, DAPO, GSPO), accelerates convergence, and achieves 2.1% on average(at most 8%) higher final accuracy across tasks. Moreover, APRIL is both framework and hardware agnostic, already integrated into the slime RL framework, and deployable on NVIDIA and AMD GPUs alike. Taken together, this work unifies system-level and algorithmic considerations in proposing APRIL, with the aim of advancing RL training efficiency and inspiring further optimizations in RL systems. Our codebase is available at https://github.com/RLsys-Foundation/APRIL

cs.LG

Generalized Scattering Matrix Framework for Modeling Implantable Antennas in Multilayered Spherical Media

This paper presents a unified and computationally efficient framework for modeling antennas embedded in spherically stratified media, applicable to implantable biomedical antennas and radome-enclosed systems. The method separates the characterization of the radiator from that of the surrounding medium by combining the antenna's free-space generalized scattering matrix (GSM) with a set of extended spherical scattering operators (SSOs). This decoupling enables rapid reevaluation under arbitrary changes of the spherical medium without re-simulating the antenna, yielding orders-of-magnitude speedups over traditional DGF-based MoM approaches. The SSO formulation accommodates multilayer, radially inhomogeneous, and radially uniaxial anisotropic profiles, and the GSM can be obtained from diverse numerical solvers or far-field data, supporting array-level synthesis and measurement-driven modeling. Extensive examples confirm excellent agreement with full-wave and DGF-based solutions, demonstrating the accuracy, generality, and practical versatility of the proposed framework.

math.NA

Fast and Rigorous Modeling of Antenna--Medium Interactions Above Planar Stratified Media via the Generalized Scattering Matrix

A rigorous and computationally efficient method is presented for evaluating the reflection coefficients of antennas operating above planar layered media. The approach reformulates the problem within the framework of the antenna's generalized scattering matrix (GSM), expressed in terms of spherical vector wave functions (SVWFs). The mutual interaction between the antenna and the layered structure is modeled through spherical-to-planar vector wave transformations that incorporate the exact Fresnel reflection response of the medium, without introducing any simplifying approximations. This formulation dramatically reduces algebraic complexity and enables fast, stable numerical implementation. Excluding the one-time preprocessing required to obtain the antenna's free-space GSM, each evaluation for a given layered configuration can be completed within milliseconds -- achieving several orders of magnitude speed improvement over full-wave solvers such as FEKO, while maintaining virtually identical accuracy. The proposed framework thus provides a powerful foundation for real-time electromagnetic characterization and inverse modeling involving planar layered environments.

cs.CE

Generalized Scattering Matrix Synthesis: Independent Region Decomposition for Hybrid Antenna--Scatterer Systems

This paper presents a unified formulation for synthesizing the generalized scattering matrix (GS-matrix) of hybrid electromagnetic systems comprising arbitrary numbers of antennas and scatterers. The proposed method provides a modular region decomposition framework that enables efficient analysis of electromagnetic interactions between distinct structures, under the relaxed geometric condition that the constituents are separable by a plane. By leveraging the addition theorem of vector spherical wavefunctions (VSWFs), a compact matrix representation is derived to assemble the GS- and S-matrices of individual components into the overall system response. This formulation generalizes and extends prior methods developed for either multiple scattering or antenna array analysis, and is particularly suited to configurations where substructures may be repositioned or reused. Numerical examples are provided to validate the accuracy and versatility of the method, including scenarios involving tightly spaced components and rotational variations in substructure layout.

cs.CE

Synthesis Method for Obtaining Characteristic Modes of Multi-Structure Systems via independent Structure T-Matrix

This paper presents a novel and efficient method for characteristic mode decomposition in multi-structure systems. By leveraging the translation and rotation matrices of vector spherical wavefunctions, our approach enables the synthesis of a composite system's characteristic modes using independently computed simulations of its constituent structures. The computationally intensive translation process is simplified by decomposing it into three streamlined sub-tasks: rotation, z-axis translation, and inverse rotation, collectively achieving significant improvements in computational efficiency. Furthermore, this method facilitates the exploration of structural orientation effects without incurring additional computational overhead. A series of illustrative numerical examples is provided to validate the accuracy of the proposed method and underscore its substantial advantages in both computational efficiency and practical applicability.

cs.CE

Generalized Scattering Matrix of Antenna: Moment Solution, Compression Storage and Application

This paper presents a computation method of generalized scattering matrix (GSM) based on integral equations and the method of moments (MoM), specifically designed for antennas excited through waveguide ports. By leveraging two distinct formulations -- magnetic-type and electric-type integral equations -- we establish concise algebraic relations linking the GSM directly to the impedance matrices obtained from MoM. To address practical challenges in storing GSM data across wide frequency bands and multiple antenna scenarios, we propose a efficient compression scheme. This approach alleviates memory demands by selectively storing the dominant eigencomponents that govern scattering behavior. Numerical validation examples confirm the accuracy of our method by comparisons with full-wave simulation results. Furthermore, we introduce an efficient iterative procedure to predict antenna array performance, highlighting remarkable improvements in computational speed compared to conventional numerical methods. These results collectively demonstrate the GSM framework's strong potential for antenna-array design processes.

eess.SP

VRCopilot: Authoring 3D Layouts with Generative AI Models in VR

Immersive authoring provides an intuitive medium for users to create 3D scenes via direct manipulation in Virtual Reality (VR). Recent advances in generative AI have enabled the automatic creation of realistic 3D layouts. However, it is unclear how capabilities of generative AI can be used in immersive authoring to support fluid interactions, user agency, and creativity. We introduce VRCopilot, a mixed-initiative system that integrates pre-trained generative AI models into immersive authoring to facilitate human-AI co-creation in VR. VRCopilot presents multimodal interactions to support rapid prototyping and iterations with AI, and intermediate representations such as wireframes to augment user controllability over the created content. Through a series of user studies, we evaluated the potential and challenges in manual, scaffolded, and automatic creation in immersive authoring. We found that scaffolded creation using wireframes enhanced the user agency compared to automatic creation. We also found that manual creation via multimodal specification offers the highest sense of creativity and agency.

cs.HC

Computation of Characteristic Mode for Regional Structure of Interconnected Metal Bodies

Existing methods for calculating substructure characteristic modes require treating interconnected metal structures as a single entity to ensure current continuity between different metal bodies. However, when these structures are treated as separate entities, existing methods exhibit inaccuracies, affecting the assessment of structural performance. To address this challenge, we propose an enhanced electromagnetic model that enables accurate characteristic mode analysis for regional structures within interconnected metal bodies. Numerical results validate the accuracy of the proposed method, and an antenna design example demonstrates its practical utility.

physics.class-ph