Search arXiv⌕ Search

arXiv subjects

Heng Wang

Publications and source records attributed to Heng Wang.

At least 19 recordsLinked to original sources

Reward Shaping to Mitigate Reward Hacking in RLHF

Reinforcement learning from human feedback (RLHF) is widely used to align large language models (LLMs) with human preferences. However, RLHF remains vulnerable to \emph{reward hacking}, whereby a policy exploits imperfections in the reward function instead of learning the intended behavior, thereby undermining alignment. Although reward shaping can stabilize RLHF training and partially mitigate reward hacking, shaping methods and their underlying design principles have not been systematically investigated. To address this gap, we conduct a comprehensive study of prevalent reward-shaping techniques. Our analysis identifies two key design principles: (1) the reinforcement-learning reward should be bounded, and (2) it should grow rapidly at first and then gradually saturate. Motivated by these principles, we propose Preference as Reward (PAR), a novel method that uses the latent preferences encoded in the reward model as the reinforcement-learning signal. We further show that PAR possesses two variance-reduction properties that stabilize RLHF training and substantially widen the practical window for early stopping. Our evaluation consists of two parts. First, we compare PAR with several other reward-shaping strategies using Proximal Policy Optimization (PPO) as the reinforcement-learning algorithm and Gemma2-2B as the base model. Second, we compare PAR with the vanilla baseline (i.e., unshaped reward) across four base models and four reinforcement-learning algorithms. In the first set of experiments, PAR consistently outperforms other reward-shaping methods and also reflects high data efficiency and robustness. The second set of experiments shows that PAR is particularly effective for actor-critic RL algorithms when value estimates become unstable and demonstrates its effectiveness across different base models. The code is available at https://github.com/PorUna-byte/PAR.

cs.LG↗

Sequential Detection-Based Iterative Blind Separation for Single-Channel Co-Frequency Signals

Existing single-channel co-frequency signal blind separation (SCSBS) algorithms struggle to balance separation accuracy, computational complexity, and robustness, while current channel state information (CSI) estimation methods lack precision. To address these limitations, we propose a sequential detection (SD)-based iterative separation (SDIS) algorithm. SDIS incorporates a delayed unscented Kalman filter (DUKF) into an iterative decision feedback framework, jointly enhancing signal separation and CSI estimation. Simulation results show that SDIS outperforms benchmarks in separation accuracy, CSI estimation accuracy, computational efficiency, and robustness. Notably, when the mean bit error rate (MBER) drops below $10^{-4}$, SDIS can tolerate at least $0.8$ dB more noise than the benchmarks.

eess.SP↗

Nearly Isotropic Vortex Solid in $\mathbf{(La,Pr)_{3}Ni_{2}O_{7}}$ Thin Films

The discovery of superconductivity in bulk bilayer nickelates has established a new platform for exploring high-$T_c$ superconductivity beyond the cuprates. The role of the Ni $3d_{z^2}$-derived $γ$ band in the superconductivity of bilayer nickelates remains unresolved. By performing simultaneous resistance and diamagnetism measurements on (La,Pr)$_3$Ni$_2$O$_7$ thin films, we map the vortex melting phase diagram for both in-plane and out-of-plane magnetic fields. For $H\parallel c$, the geometric confinement effect gives rise to pancake vortices. Remarkably, the anisotropy parameter of the vortex melting field $γ_{H_m} \equiv H_m^{ab}/H_m^c$ decreases monotonically with decreasing temperature and approaches unity at low temperatures. Within the anisotropic Ginzburg--Landau scaling, $H_m^{ab}/H_m^c = \sqrt{ρ_s^{ab}/ρ_s^c}$ tracks the superfluid-density anisotropy. Such a vortex solid implies a nearly isotropic superfluid density, which is irreconcilable with the strictly two-dimensional $3d_{x^2-y^2}$-derived bands, but naturally explained by a substantial interlayer superfluid contribution from the $3d_{z^2}$-derived $γ$ band. Our results provide thermodynamic evidence for a substantial contribution of the $γ$ band to superconductivity in bilayer nickelate thin films.

cond-mat.supr-con↗

Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning

Large language models achieve superior performance on tasks that require extended reasoning, but long chains of thought make the KV cache a severe memory bottleneck. Existing KV cache compression methods share one paradigm: score each cached token by some estimate of how much it will matter later, and keep the top-scoring ones. We show that the selection signal contributes almost nothing. Random Attention keeps the prompt and evicts uniformly at random within each attention head, computing no score at all; across four models and six reasoning tasks it matches the strongest prior evictor while serving 32-43% higher throughput than it in vLLM deployment. Controlled experiments explain this by showing that 1) the prompt is the fragile part of the cache, and most of the gap between selectors is just whether their selection signal happened to keep it; 2) the reasoning trace protects itself against eviction with redundancy at two levels, in the text (the model restates what it still needs as it works) and across attention heads (each keeps its own copy of the trace), so once the prompt is safe, a random draw retains enough copies of what the model still needs, and no score is required to pick them. Our code is publicly available at https://github.com/SalesforceAIResearch/Random-Attention.

cs.CL↗

Low-Complexity Sequential Detection Framework for Single-Channel Co-Frequency Signal Separation

Practical separation of single-channel co-frequency signals (SCCFSs) is hindered by the prohibitive computational complexity of benchmark algorithms. To address this issue, we propose a low-complexity separation framework based on sequential detection (SD), in which signal separation is cast as a sequential path search over a trellis. To support both hard-decision detection and log-likelihood ratio (LLR) extraction, we develop two algorithms within this framework: the SD-based separation (SDS) algorithm and its soft-output variant (SO-SDS). Furthermore, SDS employs a windowing strategy combined with dynamic pruning to concentrate computational resources on high-probability paths, thereby enabling efficient detection of transmitted symbol sequences. Building upon SDS, SO-SDS further incorporates a state completeness verification mechanism (SCVM) to estimate bit LLRs, thus facilitating subsequent soft decoding. Numerical results show that, compared to benchmark algorithms, SDS achieves significant complexity reduction without degrading separation performance, while SO-SDS offers notable computational savings with only modest LLR accuracy loss. Notably, the computational complexity advantage of the proposed algorithms over benchmark algorithms grows substantially with increasing modulation order.

eess.SP↗

MAS-on-the-Fly: In-Context Structural Adaptation of LLM-Based Multi-Agent Systems

Large Language Model (LLM)-based multi-agent systems (MAS) have emerged as a promising paradigm for complex tasks. However, existing works often rely on manual designs or "one-size-fits-all" automation and lack adaptability after deployment. We study in-context structural adaptation, where structured experience conditions both query-dependent system generation and execution-time reconfiguration without updating LLM parameters. We introduce MASFly, which realizes this adaptation through two complementary mechanisms. First, a retrieval-augmented SOP instantiation mechanism retrieves and adapts successful collaboration patterns to construct a query-specific MAS. Second, an experience-enhanced process supervision mechanism uses a dedicated Watcher agent to monitor execution against prior failure experience and reconfigure the system upon abnormal behavior. Experiments demonstrate that MASFly achieves state-ofthe-art performance, including a 61.7% success rate on TravelPlanner, with strong task adaptability and robustness.

cs.MA↗

Why Knowing Both Hops Is Not Enough: Understanding Two-Hop Generalization in Language Models

Large language models (LLMs) can solve complex multi-hop problems yet exhibit puzzling failures on simple two-hop queries: although a model may correctly store each individual hop, it often fails to combine them. To understand the internal mechanisms of this phenomenon, we train transformers from scratch in a controlled symbolic environment. Our experiments reveal a pattern in two-hop generalization: models generalize reliably when the second hop follows the training distribution, but always fail when it deviates. Through mechanistic analysis, we provide a complete explanation for these distinct generalization behaviors: in settings where models generalize successfully, performance is driven by the emergence of consistent intermediate representations for the same entities across contexts, whereas failures on settings where the second hop is out-of-distribution arise from a mismatch across layers: lower layers correctly construct these intermediate representations, but upper layers, while trained on corresponding atomic facts, primarily learn to map them to outputs rather than to reason over them. Driven by this insight, we propose a recurrent-style training strategy, which enables transformers to reuse their reasoning circuitry across input forms and substantially improves generalization on out-of-distribution two-hop queries. Our data and code are available at https://github.com/zzl-strong/two_hop .

cs.CL↗

Collapse of Patches: Ranking Image Patches for Efficient Visual Modeling

Observing certain patches in an image reduces the uncertainty of others. Their realization lowers the distribution entropy of each remaining patch feature, analogous to collapsing a particle's wave function in quantum mechanics. This phenomenon can intuitively be called patch collapse. To identify which patches are most relied on during a target region's collapse, we learn an autoencoder that softly selects a subset of informative patches during reconstruction. Graphing these learned dependencies for each patch's PageRank score reveals the optimal patch order to realize an image. We show that respecting this order benefits various masked image modeling methods. First, autoregressive image generation can be boosted by finetuning with the ordered generation sequence. Second, we introduce a new setup for image classification by exposing Vision Transformers only to high-rank patches in the collapse order. Seeing 22% of such patches is sufficient to achieve high accuracy. With these experiments, we propose patch collapse as a novel image modeling perspective that promotes vision efficiency.

cs.CV↗

Wavefront-Guided Electron Injection for Direct Laser Acceleration in Relativistic Laser-Driven Plasma Channel

We investigate electron injection into direct laser acceleration (DLA) in relativistic laser-driven plasma channels using particle-in-cell simulations. We identify and characterize a wavefront-guided injection mechanism, in which electrons are continuously fed into the plasma channel through the density pile-up layer at the laser-pulse front. Phase-space analysis reveals a localized injectable region within the pile-up layer, indicating that only a selected subset of electrons satisfies the conditions required for the subsequent direct laser acceleration. This mechanism provides a physical interpretation for the high-charge capability of DLA by explaining how electrons are continuously supplied to the accelerating channel. Beyond this continuous supply process, the injection dynamics are further modulated by the periodic variation of the carrier phase at the laser-pulse front. The spatial locations of injected electrons are found to be closely associated with magnetic-island structures formed under laser-phase modulation, suggesting that the laser wavefront not only supplies electrons but also organizes their entry into the accelerating channel. These findings advance the physical understanding of energetic-electron generation in relativistic laser-driven subcritical-density plasma channels and are relevant to the development of compact DLA-based particle and radiation sources.

physics.plasm-ph↗

GLaQ: Grounding Latent Queries in Visual Evidence for Multimodal Reasoning

Chain-of-thought reasoning has substantially improved the problem-solving capabilities of multimodal large language models. Fine-grained visual evidence, however, remains difficult to preserve and reuse across text-based reasoning steps. To address this limitation, tool-augmented thinking-with-images methods maintain visual access externally by revisiting or manipulating the image, but require predefined tools and additional inference-time processing. As an internal alternative, continuous visual latent reasoning retains intermediate computation in hidden states. However, its prevailing autoregressive construction makes each latent state depend on its predecessors, so later states may repeat information already present in the latent sequence rather than capture complementary visual details. We introduce GLaQ, a grounded latent-query framework that replaces sequential latent rollout with a fixed set of context-conditioned queries grounded in the original visual tokens. The grounded queries are reinjected for answer generation, providing direct and coordinated access to source visual evidence. We train GLaQ with localized-view supervision followed by reinforcement learning under task-level rewards. Across five benchmarks for fine-grained visual understanding and perception, GLaQ-7B gains 5.99--9.66\% over its base model and leads all compared visual latent methods, suggesting that direct query-to-image grounding can recover localized evidence from the full image without external visual operations or autoregressive latent rollouts.

cs.CV↗

QUMem: Personalized Memory for Query-Conditioned User-State Inference in LLM Agents

Large language model (LLM) agents increasingly use external memory systems to support personalization by drawing on long and evolving interaction histories, in which user preferences may be distributed across time, change with context, and conflict with earlier evidence. However, existing systems face three limitations: fixed-turn, fixed-token, or session-based boundaries can mix unrelated dialogue or split an event from its causes, decisions, and outcomes; storing multiple pieces of user information from the same interaction as a single memory binds together items that serve different functions and should be independently retrievable; and treating the current task as a single top-$k$ retrieval query can return fragments that are individually relevant but fail to jointly capture preference evolution, temporal validity, and contextual applicability. We introduce \textsc{QUMem}, a structured memory framework for query-conditioned user-state inference. \textsc{QUMem} first segments interaction histories into variable-length episodes according to semantic continuity, then decomposes each episode into independently retrievable factual, preference, and transferable insight memories while preserving temporal positions and source evidence. At inference time, three sequential agents identify task-specific information needs, plan multi-query retrieval over the typed memory stores, and jointly infer a temporally and contextually valid user state for downstream response generation. \textsc{QUMem} achieves state-of-the-art performance on both PersonaMem and KnowU-Bench, demonstrating the effectiveness of query-conditioned user-state inference for long-term personalization.

cs.CL↗

Self-Specialized Teachers for Domain Post-Training

Target-only post-training can improve performance in a specialized domain while degrading behaviors that a general-purpose base model acquired before adaptation. We study this problem when target-domain data are available but a representative replay corpus is not. We propose self-specialized teacher distillation (SSTD), a two-stage procedure that first trains a copy of the base model into a domain teacher, then distills its token distribution to a student on prefixes sampled from the student itself. Teacher training combines standard target supervision with base-aware key-token weighting and distribution alignment to the frozen base model; on-policy distillation then places domain feedback on states the student can encounter at inference time. On financial numerical reasoning, medical question answering, and legal holding identification, SSTD retains much of the target improvement of direct fine-tuning while improving the mean score on the evaluated general suite by 4.8--5.0 points at the reported operating point. The pattern persists across Qwen3 sizes and on Gemma backbones. SSTD requires neither an external teacher nor general replay data.

cs.AI↗

Beyond Retrieval: Query-Conditioned Reuse of Long-Horizon Agent Trajectories

Retrieval can identify a past trajectory that may matter, yet it does not specify how an acting agent should use that trajectory after users, entities, constraints, or environment state have changed. We identify this post-retrieval reuse step as a distinct bottleneck for long-horizon trajectory memory and formulate an evaluation framework that holds candidate retrieval, target state, model, decoding, and tool budget fixed while varying the support delivered to the agent. We instantiate the framework with query-conditioned reuse (QCR), a deliberately simple target-bound note that records a reusable procedure, bindings to recover, applicability conditions, and verification requirements. QCR serves to test the reuse hypothesis rather than to claim a universally preferred memory format. Across 2,391 target instances in WebArena, WorkArena, and AppWorld, QCR reaches 62.3% average Success, 10.7 points above Full Trajectory, while using 48.9% fewer online tokens. Summary reranking selects a reusable memory for 94.8% of targets, placing end-task Success within 1.8 points of an oracle reusable selector. Analyses by trajectory length and source--target binding shift show that direct trajectory injection loses much of its utility as traces grow longer or source-specific values change, whereas target-bound support preserves a larger share of the measured gain. The resulting framework separates retrieval quality from the problem of turning retrieved experience into safe, useful support for a new task.

cs.AI↗

AI4AI at Test-Time: Strong-to-Weak Capability Transfer via Harnesses

Recent work on distillation transfers the capabilities of large models to smaller ones often by updating the latter's parameters, through teacher forcing, on-policy distillation, and related training-time methods. In this paper, we ask whether such transfer can instead occur at test time. We study strong-to-weak scaffolding: whether a stronger builder model can construct inference-time harnesses that help a weaker target model solve tasks more reliably without any parameter updates. Using four representative Theory-of-Mind benchmarks, each builder model uses 5% of the data as a validation set to iteratively refine its harness over multiple rounds, after which the finalized harness is evaluated on the full test set. Empirically, this form of test-time capability transfer is highly effective, nearly doubling average target-model performance from 0.49 to 0.91. Our analysis shows that the gains come primarily from offloading unstable model reasoning into deterministic code, benchmark-specific routing, and strict answer-format enforcement, rather than from encouraging the target model to reason more extensively or sample more broadly. We further find that builder-model reasoning effort improves harness quality monotonically, platform effects are modest relative to the builder model's own capability, and weaker target models receive the largest gains. These results suggest that inference-time harness design is an important complement to conventional training-time distillation, enabling strong models to transfer cognitive structure to weaker models without retraining.

cs.LG↗

Different Feedback, Different Updates: Selective Self-Learning from User Interactions for Large Language Models

User feedback offers natural supervision for persistent LLM improvement, but a single message may support multiple behavioral changes with different scopes of generalization. We introduce SLIFT, a selective self-learning framework built on a task-relative view of user feedback. SLIFT decomposes each feedback message into atomic components and interprets each component relative to the original task as Fix, Spec, or Null: requirements for task validity, compatible condition-specific refinements, or content with no reliable positive update direction. To incorporate each change at the appropriate scope, SLIFT trains two complementary LoRA adapters on a shared frozen backbone: a Generalist that consolidates Fix requirements into default behavior through feedback-conditioned self-distillation, and a Specialist that observes only the task and Generalist response to supply residual guidance for applicable, unmet Spec refinements. Null components induce no positive update. Across backbones, SLIFT achieves strong performance on both MemoryBench and WildFB, with targeted analyses further examining its underlying mechanisms. We release our code at https://anonymous.4open.science/r/SLIFT.

cs.AI↗

MusicWeaver: Programmable Long-Form Music Generation with Provably Local Editing

Music generation systems produce increasingly realistic audio, yet they expose no interface between a creator's structural intent and the rendered sound. Form can only be steered through prompts, while local revisions require regenerating entire pieces. We recast music creation as program-guided generation, using an explicit, human-interpretable program layer between intent and audio. We present MusicWeaver, which decomposes generation into planning and rendering. The planning stage predicts a structured plan, a multi-level song program encoding musical form, motif recurrence, and bar-level attributes. The rendering stage synthesizes audio conditioned on this plan. We formalize editing as an algebra of typed plan operations, including section replacement, insertion, deletion, motif retagging, and attribute changes, and prove that they preserve plan validity. To realize edits, we propose Projected Diffusion Inpainting, which guarantees that audio outside the edited span is preserved exactly across repeated revisions. For rendering, we design a Global-Local Diffusion Transformer with Motif Memory Retrieval that executes minute-scale plans and produces section returns that are consistent yet varied. Our framework also supports plan induction, recovering an editable program from an existing recording, and a natural-language editor that compiles free-form instructions into validated operation sequences. We introduce plan-faithfulness and edit-fidelity measures and validate them against human judgments. Experiments on generation conditioned on text, video, and their combination show state-of-the-art structural coherence and editability, while edit quality remains stable over sequential revisions where prior methods degrade.

cs.SD↗

Every Client Is an Environment: Federated De-confounding for Spatio-Temporal Forecasting

Federated learning has emerged as a promising paradigm for spatio-temporal forecasting (STF), enabling collaborative model training without sharing raw observations. Existing federated STF methods primarily regard cross-client heterogeneity as an optimization challenge and mitigate it through personalized approaches. However, such heterogeneity fundamentally stems from diverse \emph{environmental conditions}, and these methods capture environment-specific forecasting patterns, hardly generalizing under environmental shifts. Our key insight is that the environmental diversity across federated clients should be exploited, as they provide \emph{complementary observations of the same underlying spatio-temporal system}. Based on this insight, we propose \method, a novel federated de-confounding framework that \textbf{treats clients as distinct causal environments}. \method leverages the client heterogeneity as distributed environmental evidence and learns a global prototype codebook to capture shared environmental regimes. We further derive a theoretical federated de-confounding bound that is linearly controlled by the averaged confounding strength. Extensive experiments demonstrate that \method consistently outperforms federated baselines, while providing transferable, interpretable, and communication-efficient environmental representations.

cs.LG↗

DA-Nav: Direction-Aware City-Scale Vision-Language Navigation

City-scale outdoor navigation is currently hindered by the heavy reliance on dense maps or costly navigation supervision. In this work, we introduce a novel paradigm for leveraging directional instructions from commercial navigation tools (e.g., Google Maps). To bridge the gap between commercial instructions and executable navigation actions, while mitigating long-horizon error accumulation through robust trajectory recovery, we propose DA-Nav, a Direction-Aware vision-language Navigation framework that reformulates navigation as a discrete spatial grounding problem on the egocentric 2D image plane. To achieve trajectory recovery, DA-Nav employs a Chain-of-Thought (CoT) reasoning process encompassing deviation assessment, action prediction, and target grid selection. We further introduce ReDA, a dataset that provides direction-aware instructions and recovery trajectories to enhance spatial grounding and support CoT recovery reasoning. Extensive experiments in CARLA demonstrate that DA-Nav achieves a high success rate of 56.16% in unseen urban environments, outperforming existing State-of-The-Art (SoTA) methods while maintaining a substantially stronger recovery capability. Furthermore, without fine-tuning, DA-Nav seamlessly adapts to both quadruped and humanoid robots, enabling stable kilometer-scale closed-loop outdoor navigation in complex real world environments.

cs.RO↗