Searcharxiv⌕ Search

arXiv subjects

Hao Li

Publications and source records attributed to Hao Li.

At least 271 records · Page 15Linked to original sources

Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP Servers

Although Foundation Models (FMs), such as GPT-4, are increasingly used in domains like finance and software engineering, reliance on textual interfaces limits these models' real-world interaction. To address this, FM providers introduced a tool called -- triggering a proliferation of frameworks with distinct tool interfaces. In late 2024, Anthropic introduced the Model Context Protocol (MCP) to standardize this tool ecosystem. MCP is rapidly emerging as a de facto industry standard. Despite its adoption, MCP's AI-driven, non-deterministic control flow introduces new risks to sustainability, security, and maintainability, warranting closer examination. Towards this end, we present the first large-scale empirical study of MCP. Using state-of-the-art health metrics and a hybrid analysis pipeline that combines a general-purpose static analysis tool with an MCP-specific scanner, we evaluate 1,899 open-source MCP servers to assess their health, security, and maintainability. Despite MCP servers demonstrating strong health metrics, we identify eight distinct vulnerabilities -- only three of which overlap with traditional software vulnerabilities. Additionally, 7.2% of servers contain general vulnerabilities, and 5.5% exhibit MCP-specific tool poisoning. Regarding maintainability, while 66% exhibit code smells, 14.4% contain ten bug patterns overlapping prior research. These findings highlight the need for MCP-specific vulnerability detection techniques while reaffirming the value of traditional analysis and refactoring practices. Furthermore, we advocate for stronger governance across the MCP ecosystem by incorporating MCP-specific vulnerabilities into standardized vulnerability databases, enabling automated security scanning within MCP registries, and promoting responsible development practices to ensure the long-term safety and sustainability of the MCP ecosystem.

cs.SE↗

A unified descriptor framework for hydrogen storage capacity and equilibrium pressure in interstitial hydrides

Hydrogen is a promising energy carrier, yet its practical deployment is limited by the lack of storage materials that simultaneously achieve high storage capacity ($w$) and practical equilibrium pressure at room temperature ($P_{\rm eq,RT}$). Interstitial metal hydrides offer fast kinetics and favorable thermodynamics (high $P_{\rm eq,RT}$) but suffer from intrinsically low w. Here, we establish a physically interpretable, data-driven framework to uncover descriptor-property relationships in interstitial hydrides using a curated database of pressure-composition-temperature measurements (Digital Hydrogen Platform, DigHyd) and white-box symbolic regression. Strikingly, the analysis reveals a clear separation of governing mechanisms, in which $w$ is governed by geometric and lattice conditions, captured by the average atomic radius ($\left\langle r_M \right\rangle$) and average thermal conductivity ($\left\langleκ\right\rangle$), with an optimal regime of $r_M \sim 1.47 Å$ and relatively low $\left\langleκ\right\rangle$. In contrast, $P_{\rm eq,RT}$ is governed by elastic properties, captured by the average shear modulus ($\left\langle G \right\rangle$) and average Poisson's ratio ($\left\langle ν\right\rangle$), reflecting the role of lattice rigidity and mechanical compliance. These relationships are translated into compositional optimization pathways that follow the descriptor trends above, enabling the design of candidate materials with enhanced w under practical equilibrium conditions ($P_{\rm eq,RT} \sim 0.1$ MPa). This work establishes a general, interpretable strategy for physics-informed design of energy materials systems.

cond-mat.mtrl-sci↗

Stable localized orthogonal decomposition in Raviart-Thomas spaces

This work proposes a computational multiscale method for the mixed formulation of a second-order linear elliptic equation subject to a homogeneous Neumann boundary condition, based on a stable localized orthogonal decomposition (LOD) in Raviart-Thomas finite element spaces. In the spirit of numerical homogenization, the construction provides low-dimensional coarse approximation spaces that incorporate fine-scale information from the heterogeneous coefficients by solving local patch problems on a fine mesh. The resulting numerical scheme is accompanied by a rigorous error analysis, and it is applicable beyond periodicity and scale-separation in spatial dimensions two and three. In particular, this novel realization circumvents the presence of pollution terms observed in a previous LOD construction for elliptic problems in mixed formulation. Finally, various numerical experiments are provided that demonstrate the performance of the method.

math.NA↗

Data Mixing Agent: Learning to Re-weight Domains for Continual Pre-training

Continual pre-training on small-scale task-specific data is an effective method for improving large language models in new target fields, yet it risks catastrophic forgetting of their original capabilities. A common solution is to re-weight training data mixtures from source and target fields on a domain space to achieve balanced performance. Previous domain reweighting strategies rely on manual designation with certain heuristics based on human intuition or empirical results. In this work, we prove that more general heuristics can be parameterized by proposing Data Mixing Agent, the first model-based, end-to-end framework that learns to re-weight domains. The agent learns generalizable heuristics through reinforcement learning on large quantities of data mixing trajectories with corresponding feedback from an evaluation environment. Experiments in continual pre-training on math reasoning show that Data Mixing Agent outperforms strong baselines in achieving balanced performance across source and target field benchmarks. Furthermore, it generalizes well across unseen source fields, target models, and domain spaces without retraining. Direct application to the code generation field also indicates its adaptability across target domains. Further analysis showcases the agents' well-aligned heuristics with human intuitions and their efficiency in achieving superior model performance with less source-field data.

cs.LG↗

Revisiting the Scale Loss Function and Gaussian-Shape Convolution for Infrared Small Target Detection

Infrared small target detection still faces two persistent challenges: training instability from non-monotonic scale loss functions, and inadequate spatial attention due to generic convolution kernels that ignore the physical imaging characteristics of small targets. In this paper, we revisit both aspects. For the loss side, we propose a \emph{diff-based scale loss} that weights predictions according to the signed area difference between the predicted mask and the ground truth, yielding strictly monotonic gradients and stable convergence. We further analyze a family of four scale loss variants to understand how their geometric properties affect detection behavior. For the spatial side, we introduce \emph{Gaussian-shaped convolution} with a learnable scale parameter to match the center-concentrated intensity profile of infrared small targets, and augment it with a \emph{rotated pinwheel mask} that adaptively aligns the kernel with target orientation via a straight-through estimator. Extensive experiments on IRSTD-1k, NUDT-SIRST, and SIRST-UAVB demonstrate consistent improvements in $mIoU$, $P_d$, and $F_a$ over state-of-the-art methods. We release our anonymous code and pretrained models.

cs.CV↗

Do AI Coding Agents Log Like Humans? An Empirical Study

Software logging is essential for maintaining and debugging complex systems, yet it remains unclear how AI coding agents handle this non-functional requirement. While prior work characterizes human logging practices, the behaviors of AI coding agents and the efficacy of natural language instructions in governing them are unexplored. To address this gap, we conduct an empirical study of 4,550 agentic pull requests across 81 open-source repositories. We compare agent logging patterns against human baselines and analyze the impact of explicit logging instructions. We find that agents change logging less often than humans in 58.4% of repositories, though they exhibit higher log density when they do. Furthermore, explicit logging instructions are rare (4.7%) and ineffective, as agents fail to comply with constructive requests 67% of the time. Finally, we observe that humans perform 72.5% of post-generation log repairs, acting as "silent janitors" who fix logging and observability issues without explicit review feedback. These findings indicate a dual failure in natural language instruction (i.e., scarcity of logging instructions and low agent compliance), suggesting that deterministic guardrails might be necessary to ensure consistent logging practices.

cs.SE↗

PhysInOne: Visual Physics Learning and Reasoning in One Suite

We present PhysInOne, a large-scale synthetic dataset addressing the critical scarcity of physically-grounded training data for AI systems. Unlike existing datasets limited to merely hundreds or thousands of examples, PhysInOne provides 2 million videos across 153,810 dynamic 3D scenes, covering 71 basic physical phenomena in mechanics, optics, fluid dynamics, and magnetism. Distinct from previous works, our scenes feature multiobject interactions against complex backgrounds, with comprehensive ground-truth annotations including 3D geometry, semantics, dynamic motion, physical properties, and text descriptions. We demonstrate PhysInOne's efficacy across four emerging applications: physics-aware video generation, long-/short-term future frame prediction, physical property estimation, and motion transfer. Experiments show that fine-tuning foundation models on PhysInOne significantly enhances physical plausibility, while also exposing critical gaps in modeling complex physical dynamics and estimating intrinsic properties. As the largest dataset of its kind, orders of magnitude beyond prior works, PhysInOne establishes a new benchmark for advancing physics-grounded world models in generation, simulation, and embodied AI.

cs.CV↗

New Exact Vacuum Solutions in Extended Bumblebee Gravity

We investigate the static spherically symmetric vacuum solutions in a generalized bumblebee gravity model characterized by non-minimal couplings $B^2 R$ and $B^μB^νR_{μν}$. We demonstrate that the variation of the action and the imposition of the vacuum expectation value constraint are non-commutative, leading to a richer solution space than previously explored. A diverse set of solutions, including naked singularities, black holes, and wormholes, is obtained, and as many as ten exact solutions are presented. The thermodynamic properties of the new black hole solutions are also analyzed, and a subset of these solutions is found to have zero entropy. We argue that if such a non-minimally coupled vector-tensor gravity provides a fundamental description of the universe, it is best described by a Bumblebee-type theory, where the vector field acquires a VEV.

gr-qc↗

Uni-ViGU: Towards Unified Video Generation and Understanding via A Diffusion-Based Video Generator

Unified multimodal models integrating visual understanding and generation face a fundamental challenge: visual generation incurs substantially higher computational costs than understanding, particularly for video. This imbalance motivates us to invert the conventional paradigm: rather than extending understanding-centric MLLMs to support generation, we propose Uni-ViGU, a framework that unifies video generation and understanding by extending a video generator as the foundation. We introduce a unified flow method that performs continuous flow matching for video and discrete flow matching for text within a single process, enabling coherent multimodal generation. We further propose a modality-driven MoE-based framework that augments Transformer blocks with lightweight layers for text generation while preserving generative priors. To repurpose generation knowledge for understanding, we design a bidirectional training mechanism with two stages: Knowledge Recall reconstructs input prompts to leverage learned text-video correspondences, while Capability Refinement fine-tunes on detailed captions to establish discriminative shared representations. Experiments demonstrate that Uni-ViGU achieves competitive performance on both video generation and understanding, validating generation-centric architectures as a scalable path toward unified multimodal intelligence. Project Page and Code: https://fr0zencrane.github.io/uni-vigu-page/.

cs.CV↗

STAR: Learning Diverse Robot Skill Abstractions through Rotation-Augmented Vector Quantization

Transforming complex actions into discrete skill abstractions has demonstrated strong potential for robotic manipulation. Existing approaches mainly leverage latent variable models, e.g., VQ-VAE, to learn skill abstractions through learned vectors (codebooks), while they suffer from codebook collapse and modeling the causal relationship between learned skills. To address these limitations, we present \textbf{S}kill \textbf{T}raining with \textbf{A}ugmented \textbf{R}otation (\textbf{STAR}), a framework that advances both skill learning and composition to complete complex behaviors. Specifically, to prevent codebook collapse, we devise rotation-augmented residual skill quantization (RaRSQ). It encodes relative angles between encoder outputs into the gradient flow by rotation-based gradient mechanism. Points within the same skill code are forced to be either pushed apart or pulled closer together depending on gradient directions. Further, to capture the causal relationship between skills, we present causal skill transformer (CST) which explicitly models dependencies between skill representations through an autoregressive mechanism for coherent action generation. Extensive experiments demonstrate the superiority of STAR on both LIBERO benchmark and realworld tasks, with around 12\% improvement over the baselines.

cs.RO↗

The Python Simulations of Chemistry Framework: 10 years of an open-source quantum chemistry project

Over the past decade, the Python-based Simulations of Chemistry Framework (PySCF) has developed into a widely used open-source platform for electronic structure theory and quantum chemical method development. This article reviews the major advances since the previous overview in 2020, covering new modules and methodology, infrastructure changes, and performance benchmarks.

physics.chem-ph↗

MultiPress: A Multi-Agent Framework for Interpretable Multimodal News Classification

With the growing prevalence of multimodal news content, effective news topic classification demands models capable of jointly understanding and reasoning over heterogeneous data such as text and images. Existing methods often process modalities independently or employ simplistic fusion strategies, limiting their ability to capture complex cross-modal interactions and leverage external knowledge. To overcome these limitations, we propose MultiPress, a novel three-stage multi-agent framework for multimodal news classification. MultiPress integrates specialized agents for multimodal perception, retrieval-augmented reasoning, and gated fusion scoring, followed by a reward-driven iterative optimization mechanism. We validate MultiPress on a newly constructed large-scale multimodal news dataset, demonstrating significant improvements over strong baselines and highlighting the effectiveness of modular multi-agent collaboration and retrieval-augmented reasoning in enhancing classification accuracy and interpretability.

cs.CL↗

Smart Transfer: Leveraging Vision Foundation Model for Rapid Building Damage Mapping with Post-Earthquake VHR Imagery

Living in a changing climate, human society now faces more frequent and severe natural disasters than ever before. As a consequence, rapid disaster response during the "Golden 72 Hours" of search and rescue becomes a vital humanitarian necessity and community concern. However, traditional disaster damage surveys routinely fail to generalize across distinct urban morphologies and new disaster events. Effective damage mapping typically requires exhaustive and time-consuming manual data annotation. To address this issue, we introduce Smart Transfer, a novel Geospatial Artificial Intelligence (GeoAI) framework, leveraging state-of-the-art vision Foundation Models (FMs) for rapid building damage mapping with post-earthquake Very High Resolution (VHR) imagery. Specifically, we design two novel model transfer strategies: first, Pixel-wise Clustering (PC), ensuring robust prototype-level global feature alignment; second, a Distance-Penalized Triplet (DPT), integrating patch-level spatial autocorrelation patterns by assigning stronger penalties to semantically inconsistent yet spatially adjacent patches. Extensive experiments and ablations from the recent 2023 Turkiye-Syria earthquake show promising performance in multiple cross-region transfer settings, namely Leave One Domain Out (LODO) and Specific Source Domain Combination (SSDC). Moreover, Smart Transfer provides a scalable, automated GeoAI solution to accelerate building damage mapping and support rapid disaster response, offering new opportunities to enhance disaster resilience in climate-vulnerable regions and communities. The data and code are publicly available at https://github.com/ai4city-hkust/SmartTransfer.

cs.CV↗

InverseDraping: Recovering Sewing Patterns from 3D Garment Surfaces via BoxMesh Bridging

Recovering sewing patterns from draped 3D garments is a challenging problem in human digitization research. In contrast to the well-studied forward process of draping designed sewing patterns using mature physical simulation engines, the inverse process of recovering parametric 2D patterns from deformed garment geometry remains fundamentally ill-posed for existing methods. We propose a two-stage framework that centers on a structured intermediate representation, BoxMesh, which serves as the key to bridging the gap between 3D garment geometry and parametric sewing patterns. BoxMesh encodes both garment-level geometry and panel-level structure in 3D, while explicitly disentangling intrinsic panel geometry and stitching topology from draping-induced deformations. This representation imposes a physically grounded structure on the problem, significantly reducing ambiguity. In Stage I, a geometry-driven autoregressive model infers BoxMesh from the input 3D garment. In Stage II, a semantics-aware autoregressive model parses BoxMesh into parametric sewing patterns. We adopt autoregressive modeling to naturally handle the variable-length and structured nature of panel configurations and stitching relationships. This decomposition separates geometric inversion from structured pattern inference, leading to more accurate and robust recovery. Extensive experiments demonstrate that our method achieves state-of-the-art performance on the GarmentCodeData benchmark and generalizes effectively to real-world scans and single-view images.

cs.CV↗

HairOrbit: Multi-view Aware 3D Hair Modeling from Single Portraits

Reconstructing strand-level 3D hair from a single-view image is highly challenging, especially when preserving consistent and realistic attributes in unseen regions. Existing methods rely on limited frontal-view cues and small-scale/style-restricted synthetic data, often failing to produce satisfactory results in invisible regions. In this work, we propose a novel framework that leverages the strong 3D priors of video generation models to transform single-view hair reconstruction into a calibrated multi-view reconstruction task. To balance reconstruction quality and efficiency for the reformulated multi-view task, we further introduce a neural orientation extractor trained on sparse real-image annotations for better full-view orientation estimation. In addition, we design a two-stage strand-growing algorithm based on a hybrid implicit field to synthesize the 3D strand curves with fine-grained details at a relatively fast speed. Extensive experiments demonstrate that our method achieves state-of-the-art performance on single-view 3D hair strand reconstruction on a diverse range of hair portraits in both visible and invisible regions.

cs.CV↗

An Empirical Study of Testing Practices in Open Source AI Agent Frameworks and Agentic Applications

Foundation model (FM)-based AI agents are rapidly gaining adoption across diverse domains, but their inherent non-determinism and non-reproducibility pose testing and quality assurance challenges. While recent benchmarks provide task-level evaluations, there is limited understanding of how developers verify the internal correctness of these agents during development. To address this gap, we conduct the first large-scale empirical study of testing practices in the AI agent ecosystem, analyzing 39 open-source agent frameworks and 439 agentic applications. We identify ten distinct testing patterns and find that novel, agent-specific methods like DeepEval are seldom used (around 1%), while traditional patterns like negative and membership testing are widely adapted to manage FM uncertainty. By mapping these patterns to canonical architectural components of agent frameworks and agentic applications, we uncover a fundamental inversion of testing effort: deterministic components like Resource Artifacts (tools) and Coordination Artifacts (workflows) consume over 70% of testing effort, while the FM-based Plan Body receives less than 5%. Crucially, this reveals a critical blind spot, as the Trigger component (prompts) remains neglected, appearing in around 1% of all tests. Our findings offer the first empirical testing baseline in FM-based agent frameworks and agentic applications, revealing a rational but incomplete adaptation to non-determinism. To address it, framework developers should improve support for novel testing methods, application developers must adopt prompt regression testing, and researchers should explore barriers to adoption. Strengthening these practices is vital for building more robust and dependable AI agents.

cs.SE↗

Altermagnetism and Room-Temperature Metal-to-Insulator Transition in CsCr$_2$S$_2$O

Metal-to-insulator transitions (MITs), particularly near room temperature, have been extensively studied in nonmagnetic and conventional ferromagnetic and antiferromagnetic systems, yet the co-emergence of MIT and altermagnetism (AM) remains unexplored. Here, a layered chromium-based compound CsCr$_2$S$_2$O that realizes this coexistence was synthesized. It crystalizes in CeCr$_2$Si$_2$C-type structure with Cr moments orders in a C-type antiferromagnetic configuration below $T_\mathrm{N}$ = 326 K, constituting a room-temperature d-wave altermagnet. In the altermagnetic state, a subsequent Verwey-type MIT appears at $T_\mathrm{MI}$ = 305 K, driven by a tetragonal-to-orthorhombic structural distortion and stripe charge ordering of Cr$^{+2}$/Cr$^{+3}$ ions, while maintaining its altermagnetic character. First-principles calculations show moment-dependent spin-split electronic structures with maximum splitting energies of ~0.6 eV and ~0.3 eV in the metallic and insulating states, respectively. Our work links the two prominent phenomena, MIT and AM, in a single material, establishing a new platform for potential spintronic applications.

cond-mat.mtrl-sci↗

Single-Waveguide Multiple-Pinching-Antenna Systems: OMA versus NOMA

This paper investigates the performance of a pinching-antenna (PA) system with a signal waveguide and multiple pinching antennas to serve users distributed across multiple rooms. The performance of the system is evaluated through a comparative analysis under both orthogonal multiple access (OMA) and non-orthogonal multiple access (NOMA) schemes. Specifically, this paper derives closed-form expressions for the outage probability (OP) and ergodic rate (ER) in each scheme. Furthermore, asymptotic analyses are conducted to characterize the system behavior in the high signal-to-noise ratio (SNR) regime. Extensive Monte Carlo simulations are utilized to validate the accuracy of the analytical derivations. The comparative results can be summarized as follows: 1) in the downlink fixed-rate scenario, whether OMA or NOMA achieves better outage performance depends on system parameters, such as the number of users and power allocation coefficients; 2) in the uplink fixed-rate scenario, the outage performance of NOMA is inferior to that of OMA in the high-SNR regime, and the decay rate of the OP for NOMA users depends on the rate thresholds; and 3) for both uplink and downlink adaptive-rate scenarios, the rate performance comparison of the two schemes depends on system parameters in the low-SNR regime, whereas OMA generally outperforms NOMA in the high-SNR regime.

eess.SP↗