SearcharxivSearch

arXiv subjects

Yufei Yang

Publications and source records attributed to Yufei Yang.

5 recordsLinked to original sources

LLM Agents Can See Code Repositories

Coding agents powered by large language models have demonstrated strong performance on software engineering tasks. Yet most agents consume repositories almost entirely as text, which differs from how human developers use visual structure such as folder hierarchies and dependency relationships to orient themselves in large codebases. With multimodal large language models (MLLMs), it is an open question whether agents can effectively benefit from visual representations of repositories. This paper presents the first systematic empirical study of visual repository representations for LLM-based agents on repository-level issue resolution. We evaluate four recent multimodal models. Our results show that a strictly vision-only setup degrades accuracy and increases token cost, because agents lack sufficient symbolic detail and compensate with repeated visual queries. In contrast, integrating visual graphs of repository structure as a supplementary modality alongside standard text interfaces helps agents understand structure more efficiently: input token consumption decreases by up to 26% while issue-resolution accuracy is maintained or improved. Visualization is most useful during fault localization and when the agent autonomously controls exploration depth. These findings point to a practical hybrid text-and-vision design for next-generation coding agents.

cs.SE

Tool Calling is Linearly Readable and Steerable in Language Models

When a tool-calling agent picks the wrong tool, the failure is invisible until execution: the email gets sent, the meeting gets missed. As agents take on consequential actions, one bad tool call can do real damage. We currently have no way to look inside the model and catch the mistake before it happens; this paper shows that we can. Inside the model, the choice of tool is carried by a single direction in activation space, one direction per pair of tools. Adding that direction during generation switches which tool the model picks. Across 12 instruction-tuned and 6 base models spanning Gemma 3, Qwen 3, Qwen 2.5, and Llama 3.1 (270M to 27B), this works at 83-100% accuracy on 4B+ instruction-tuned models on a 15-tool synthetic benchmark and at 77-94% on the real-API benchmark $\tau$-bench airline. The JSON arguments that follow automatically adapt to the new tool's schema, so flipping the name is enough. The same per-tool directions also flag likely errors before they happen: queries where the model is unsure between two tools fail 21x more often than queries where it is not (Gemma 3 27B). This is not just topic injection: random vectors at the same magnitude give a 0% switch rate, and a probe within a single domain (14 airline tools that share one topic) still reads which tool the model will call at top-1 61-89% across five 4B-14B models. Even base models already carry the right tool internally before they can emit it: reading the chosen tool off the model's internal state (cosine readout) recovers 61-82% accuracy on BFCL while base generation lands at 2-10%, suggesting pretraining forms the representation and instruction tuning later wires it to the output. Our results cover single-turn, fixed-menu settings; on multi-turn agent loops the same intervention is less stable (matched-baseline gain or loss of up to 30 percentage points with no consistent direction).

cs.CL

Ion-Scale Solitary Structures in the Solar Wind Observed by Solar Orbiter and Parker Solar Probe

We investigate a class of ion-scale magnetic solitary structures in the solar wind, characterized by distinct magnetic field enhancements and bipolar rotations over spatial scales of several proton inertial lengths. These structures are revisited using high-resolution data from the Solar Orbiter and Parker Solar Probe missions. Using a machine learning-based method, we identified nearly a thousand such structures, providing new insights into their evolution and physical properties. Statistical analysis shows that these structures are more abundant closer to the Sun, with occurrence rates peaking around (30 - 40, R_sun) and decreasing farther out. High-cadence measurements reveal that these structures are predominantly found in low-beta (beta <= 1) environments, with consistent fluctuations in density, velocity, and magnetic field. Magnetic field enhancements are often accompanied by plasma density drops, which, under near pressure balance, limit field increases. This leads to small fractional field enhancements near the Sun (approximately 0.01 at 20 R_sun), making detection challenging. Magnetic field variance analysis indicates that these structures are primarily oblique to the local magnetic field. Alfv\'enic velocity-magnetic field correlations suggest that most of these structures, unlike most near-Sun solar wind fluctuations, exhibit sunward-directed Alfv\'enic polarization in the plasma frame. We compare these findings with previous studies, discussing possible generation mechanisms and their implications for the turbulent cascade in the near-Sun Alfv\'enic solar wind. While these structures might be Alfv\'enic solitons, vortices, or flux ropes, we refrain from a definitive classification pending further evidence. Further high-resolution observations and simulations are needed to fully understand their origins and impacts.

physics.space-ph

On Estimation of Optimal Dynamic Treatment Regimes with Multiple Treatments for Survival Data-With Application to Colorectal Cancer Study

Dynamic treatment regimes (DTR) are sequential decision rules corresponding to several stages of intervention. Each rule maps patients' covariates to optional treatments. The optimal dynamic treatment regime is the one that maximizes the mean outcome of interest if followed by the overall population. Motivated by a clinical study on advanced colorectal cancer with traditional Chinese medicine, we propose a censored C-learning (CC-learning) method to estimate the dynamic treatment regime with multiple treatments using survival data. To address the challenges of multiple stages with right censoring, we modify the backward recursion algorithm in order to adapt to the flexible number and timing of treatments. For handling the problem of multiple treatments, we propose a framework from the classification perspective by transferring the problem of optimization with multiple treatment comparisons into an example-dependent cost-sensitive classification problem. With classification and regression tree (CART) as the classifier, the CC-learning method can produce an estimated optimal DTR with good interpretability. We theoretically prove the optimality of our method and numerically evaluate its finite sample performances through simulation. With the proposed method, we identify the interpretable tree treatment regimes at each stage for the advanced colorectal cancer treatment data from Xiyuan Hospital.

stat.ME

Correlating Chemical Reaction and Mass Transport in Hydrogen-based Direct Reduction of Iron Oxide

Steelmaking contributes 8% to the total CO2 emissions globally, primarily due to coal-based iron ore reduction. Clean hydrogen-based ironmaking has variable performance because the dominant gas-solid reduction mechanism is set by the defects and pores inside the mm-nm sized oxide particles that change significantly as the reaction progresses. While these governing dynamics are essential to establish continuous flow of iron and its ores through reactors, the direct link between agglomeration and chemistry is still contested due to missing measurements. In this work, we directly measure the connection between chemistry and agglomeration in the smallest iron oxides relevant to magnetite ores. Using synthesized spherical 10-nm magnetite particles reacting in H2, we resolve the formation and consumption of w\"ustite (FeO) - the step most commonly attributed to agglomeration. Using X-ray scattering and microscopy, we resolve crystallographic anisotropy in the rate of the initial reaction, which becomes isotropic as the material sinters. Complementing with imaging, we demonstrate how the particles self-assemble, subsequently react and sinter into ~100x oblong grains. Our insights into how morphologically uniform iron oxide particles react and agglomerate H2 reduction enable future size-dependent models to effectively describe the multiscale iron ore reduction.

cond-mat.mtrl-sci