SearcharxivSearch

arXiv subjects

Nan Jia

Publications and source records attributed to Nan Jia.

15 recordsLinked to original sources

Asymmetric On-Policy Distillation: Bridging Exploitation and Imitation at the Token Level

On-policy distillation (OPD) trains a student on its own trajectories with token-level teacher feedback and often outperforms off-policy distillation and standard reinforcement learning. However, we find that its standard advantage weighted policy gradient suffers from three structural weaknesses, including high variance updates, vanishing gradients in zero-advantage regions, and exploration bottlenecks when corrective signals are insufficient. We therefore propose Asymmetric On-Policy Distillation (AOPD), which replaces ineffective negative reinforcement with localized divergence minimization in non-positive advantage regions while preserving positive reinforcement learning. Experiments on mathematical reasoning benchmarks show that AOPD consistently outperforms standard OPD, with average gains of 4.09 / 8.34 under strong / weak initialization, respectively. AOPD also maintains higher policy entropy during training and better capability retention during sequential tool-use adaptation.

cs.LG

CoHalLo: code hallucination localization via probing hidden layer vector

The localization of code hallucinations aims to identify specific lines of code containing hallucinations, helping developers to improve the reliability of AI-generated code more efficiently. Although recent studies have adopted several methods to detect code hallucination, most of these approaches remain limited to coarse-grained detection and lack specialized techniques for fine-grained hallucination localization. This study introduces a novel method, called CoHalLo, which achieves line-level code hallucination localization by probing the hidden-layer vectors from hallucination detection models. CoHalLo uncovers the key syntactic information driving the model's hallucination judgments and locates the hallucinating code lines accordingly. Specifically, we first fine-tune the hallucination detection model on manually annotated datasets to ensure that it learns features pertinent to code syntactic information. Subsequently, we designed a probe network that projects high-dimensional latent vectors onto a low-dimensional syntactic subspace, generating vector tuples and reconstructing the predicted abstract syntax tree (P-AST). By comparing P-AST with the original abstract syntax tree (O-AST) extracted from the input AI-generated code, we identify the key syntactic structures associated with hallucinations. This information is then used to pinpoint hallucinated code lines. To evaluate CoHalLo's performance, we manually collected a dataset of code hallucinations. The experimental results show that CoHalLo achieves a Top-1 accuracy of 0.4253, Top-3 accuracy of 0.6149, Top-5 accuracy of 0.7356, Top-10 accuracy of 0.8333, IFA of 5.73, Recall@1% Effort of 0.052721, and Effort@20% Recall of 0.155269, which outperforms the baseline methods.

cs.SE

An Empirical Framework for Evaluating Semantic Preservation Using Hugging Face

As machine learning (ML) becomes an integral part of high-autonomy systems, it is critical to ensure the trustworthiness of learning-enabled software systems (LESS). Yet, the nondeterministic and run-time-defined semantics of ML complicate traditional software refactoring. We define semantic preservation in LESS as the property that optimizations of intelligent components do not alter the system's overall functional behavior. This paper introduces an empirical framework to evaluate semantic preservation in LESS by mining model evolution data from HuggingFace. We extract commit histories, $\textit{Model Cards}$, and performance metrics from a large number of models. To establish baselines, we conducted case studies in three domains, tracing performance changes across versions. Our analysis demonstrates how $\textit{semantic drift}$ can be detected via evaluation metrics across commits and reveals common refactoring patterns based on commit message analysis. Although API constraints limited the possibility of estimating a full-scale threshold, our pipeline offers a foundation for defining community-accepted boundaries for semantic preservation. Our contributions include: (1) a large-scale dataset of ML model evolution, curated from 1.7 million Hugging Face entries via a reproducible pipeline using the native HF hub API, (2) a practical pipeline for the evaluation of semantic preservation for a subset of 536 models and 4000+ metrics and (3) empirical case studies illustrating semantic drift in practice. Together, these contributions advance the foundations for more maintainable and trustworthy ML systems.

cs.SE

Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph Execution

Efficiency is essential to support ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code -- supporting symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, imperative DL frameworks encouraging eager execution have emerged but at the expense of run-time performance. Though hybrid approaches aim for the "best of both worlds," using them effectively requires subtle considerations. Our key insight is that, while DL programs typically execute sequentially, hybridizing imperative DL code resembles parallelizing sequential code in traditional systems. Inspired by this, we present an automated refactoring approach that assists developers in determining which otherwise eagerly-executed imperative DL functions could be effectively and efficiently executed as graphs. The approach features novel static imperative tensor and side-effect analyses for Python. Due to its inherent dynamism, analyzing Python may be unsound; however, the conservative approach leverages a speculative (keyword-based) analysis for resolving difficult cases that informs developers of any assumptions made. The approach is: (i) implemented as a plug-in to the PyDev Eclipse IDE that integrates the WALA Ariadne analysis framework and (ii) evaluated on nineteen DL projects consisting of 132 KLOC. The results show that 326 of 766 candidate functions (42.56%) were refactorable, and an average relative speedup of 2.16x on performance tests was observed with negligible differences in model accuracy. The results indicate that the approach is useful in optimizing imperative DL code to its full potential.

cs.SE

Measuring the Spin of Black Hole Transient 4U 1543-47 Using Insight-HXMT

We provided a comprehensive study of the properties of the black hole in the low-mass X-ray binary system 4U 1543-47, specifically focusing on the 2021 outburst (MJD 59380-59470). Using observations from the \textit{Insight}-HXMT mission, we employed X-ray reflection fitting method and analyzed spectral data to estimate key black hole parameters. Through our investigation redbased on 6 out of the 52 available observations, we estimated the spin parameter of the black hole to be $0.902_{-0.053}^{+0.054}$ and the inclination angle of the accretion disk to be $28.91_{-1.24}^{+1.82}$ degrees (90\% confidence limits, statistical only), then we discussed the influence of high luminosity. Based on the \texttt{relxill} series models are not suitable for thick disk scenario, and in comparison with findings from other studies, we propose that our estimation of the spin value may be exaggerated.

astro-ph.HE

M-DEW: Extending Dynamic Ensemble Weighting to Handle Missing Values

Missing value imputation is a crucial preprocessing step for many machine learning problems. However, it is often considered as a separate subtask from downstream applications such as classification, regression, or clustering, and thus is not optimized together with them. We hypothesize that treating the imputation model and downstream task model together and optimizing over full pipelines will yield better results than treating them separately. Our work describes a novel AutoML technique for making downstream predictions with missing data that automatically handles preprocessing, model weighting, and selection during inference time, with minimal compute overhead. Specifically we develop M-DEW, a Dynamic missingness-aware Ensemble Weighting (DEW) approach, that constructs a set of two-stage imputation-prediction pipelines, trains each component separately, and dynamically calculates a set of pipeline weights for each sample during inference time. We thus extend previous work on dynamic ensemble weighting to handle missing data at the level of full imputation-prediction pipelines, improving performance and calibration on downstream machine learning tasks over standard model averaging techniques. M-DEW is shown to outperform the state-of-the-art in that it produces statistically significant reductions in model perplexity in 17 out of 18 experiments, while improving average precision in 13 out of 18 experiments.

cs.LG

The spin measurement of MAXI J1348-630 using the Insight-HXMT data

We report the results of fitting Insight-HXMT data to the black hole X-ray binary MAXI J1348-430, which was discovered on January 26th, 2019, with the Gas Slit Camera (GSC) on-board MAXI. Several observations at the beginning of the first burst were selected, with a total of 10 spectra. From the residuals of fits using disk plus power law models, X-ray reflection signatures were clearly visible in some of these observations. We use the state-of the-art relxill series reflection model to fit six spectra with distinct reflection signatures and a joint fit to these spectra. In particular, we focus on the results for the black hole spin values. Assuming Rin = RISCO, the spin parameter is constrained to be 0.82+0.04-0.03 with 90% confidence level (statistical only).

astro-ph.HE

Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Graph Execution

Efficiency is essential to support responsiveness w.r.t. ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code -- supporting symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development tends to produce code that is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, less error-prone imperative DL frameworks encouraging eager execution have emerged at the expense of run-time performance. Though hybrid approaches aim for the "best of both worlds," using them effectively requires subtle considerations to make code amenable to safe, accurate, and efficient graph execution -- avoiding performance bottlenecks and semantically inequivalent results. We present our ongoing work on an automated refactoring approach that assists developers in specifying whether and how their otherwise eagerly-executed imperative DL code could be reliably and efficiently executed as graphs at run-time in a semantics-preserving fashion. The approach, based on a novel tensor analysis specifically for imperative DL code, consists of refactoring preconditions for automatically determining when it is safe and potentially advantageous to migrate imperative DL code to graph execution and modifying decorator parameters or eagerly executing code already running as graphs. The approach is being implemented as a PyDev Eclipse IDE plug-in and uses the WALA Ariadne analysis framework. We discuss our ongoing work towards optimizing imperative DL code to its full potential.

cs.SE

The spin measurement of MAXI J0637-430: a black hole candidate with high disk density

The Galactic black hole candidate MAXI J0637-430 was first discovered by $\textit{MAXI/GSC}$ on 2019 November 02. We study the spectral properties of MAXI J0637-430 by using the archived $\textit{NuSTAR}$ data and $\textit{Swift}$/XRT data. After fitting the eight spectra by using a disk component and a powerlaw component model with absorption, we select the spectra with relatively strong reflection components for detailed X-ray reflection spectroscopy. Using the most state-of-art reflection model $\tt{relxillCp}$, the spectral fitting measures a black hole spin $\textit{a}_{\rm{*}} > 0.72$ and the inclination angle of the accretion disk $i$ = $46.1_{-5.3}^{+4.0}$ degrees, at 90 per cent confidence level. In addition, the fitting results show an extreme supersolar iron abundance. Combined with the fitting results of the reflection model $\tt{reflionx\_hd}$, we consider that this unphysical iron abundance may be caused by a very high density accretion disk ( $n_{\rm{e}} > 2.34 \times 10^{21}$ $\rm{cm}^{-3}$ ) or a strong Fe K$α$ emission line. The soft excess is found in the soft state spectral fitting results, which may be an extra free-free heating effect caused by high density of the accretion disk. Finally, we discuss the robustness of black hole spin obtained by X-ray reflection spectroscopy. The result of relatively high spin is self-consistent with broadened Fe K$α$ line. Iron abundance and disk density have no effect on the spin results.

astro-ph.HE

The Spin of New Black Hole Candidate: MAXI J1803-298 Observed by NuSTAR and NICER

MAXI J1803-298, a newly-discovered Galactic transient and black hole candidate, was first detected by \emph{MAXI}/GSC on May 1st, 2021. In this paper, we present a detailed spectral analysis of MAXI J1803-298. Utilizing the X-ray reflection fitting method, we perform a joint fit to the spectra of MAXI J1803-298, respectively, observed by \emph{NuSTAR} and \emph{NICER}/XTI on the same day over the energy range between 0.7-79.0 keV, and found its spin (and the inclination angle i) can be constrained to be close to an extreme value, 0.991 ($i\sim$ $70 ^{\circ}$), at 68\% confidence interval. The results suggest that MAXI J1803-298 may be a fast-rotating black hole with a large inclination angle.

astro-ph.HE

Detailed analysis on the reflection component for the black hole candidate MAXI J1348-630

The black hole candidate MAXI J1348-630 was discovered on January 26th, 2019, with the Gas Slit Camera (GSC) on-board \textit{MAXI}. We report a detailed spectral analysis of this source by using the archived data of \textit{NuSTAR}. A total of 9 observations covered the complete outburst evolution of MAXI J1348-630 from the hard state to the soft state and finally back to the hard state. Additionally, the intermediate state is found in the transition from the hard state to the soft state. We use the state-of-art reflection model \verb'relxill' family to fit all the 9 spectra, and the spectra from two focal plane module detectors of \textit{NuSTAR} are jointly fitted for each observation. In particular, we concentrate on the results of the black hole spin parameter and the inclination of the accretion disk. Based on the analysis of the inner radius of the accretion disk, we obtain the spin parameter $a_* =0.78_{-0.04}^{+0.04}$, and the inclination angle of the inner disk $i = 29.2_{-0.5}^{+0.3}$ degrees. Furthermore, we also find that when the black hole is in the hard state, the accretion disk would show a significant truncation. The high iron abundance and ionization of the accretion disk obtained in the fitting results can be possibly explained by the high density of the accretion disk.

astro-ph.HE

Estimating the spin of the black hole candidate MAXI J1659-152 with the X-ray continuum-fitting method

As a transient X-ray binary, MAXI J1659-152 contains a black hole candidate as its compact star. MAXI J1659-152 was discovered on 2010 September 25 during its only known outburst. Previously-published studies of this outburst indicate that MAXI J1659-152 may have an extreme retrograde spin, which, if confirmed, would provide an important clue as to the origin of black hole spin. In this paper, utilizing updated dynamical binary-system parameters (i.e. the black hole mass, the orbital inclination and the source distance) provided by \cite{Torres2021}, we analyze 65 spectra of MAXI J1659-152 from \emph{RXTE}/PCA, in order to assess the spin parameter. With a final selection of 9 spectra matching our $f_{\mathrm{sc}} \lesssim 25 \%$, soft-state criteria, we apply a relativistic thin disk spectroscopic model \texttt{kerrbb2} over 3.0-45.0 keV. We find that inclination angle correlates inversely with spin, and, considering the possible values for inclination angle, we constrain spin to be $-1 < a_{*} \lesssim 0.44$ at 90\% confidence interval via X-ray continuum-fitting. We can only rule out an extreme prograde (positive) spin. We confirm that an extreme retrograde solution is possible and is not ruled out by considering accretion torques given the young age of the system.

astro-ph.HE

Spectral Analysis of New Black Hole Candidate AT2019wey Observed by NuSTAR

AT2019wey is a new galactic X-ray binary that was first discovered as an optical transient by the Australia Telescope Large Area Survey (ATLAS) on December 7, 2019. AT2019wey consists of a black hole candidate as well as a low-mass companion star ($M_{\text {star }} \lesssim 0.8 M_{\odot}$) and is likely to have a short orbital period ($P_{\text {orb }} \lesssim 8$ h). Although AT2019wey began activation in the X-ray band during almost the entire outburst on March 8, 2020, it did not enter the soft state during the entire outburst. In this study, we present a detailed spectral analysis of AT2019wey in the low/hard state during its X-ray outburst on the basis of Nuclear Spectroscopic Telescope Array \emph observations. We obtain tight constraints on several of its important physical parameters by applying the State-of-art \texttt{relxill} relativistic reflection model family. In particular, we determine that the measured inner radius of the accretion disk is most likely to have extended to the innermost stable circular orbit (ISCO) radius, i.e., $R_{\text{in}}=1.38^{+0.23}_{-0.16}~R_{\text{ISCO}}$. Hence, assuming $R_{\text{in}}$=$R_{\text{ISCO}}$, we find the spin of AT2019wey to be $a_{*}\sim$ $0.97$, which is close to the extreme and an inner disk inclination angle of ~$i\sim$ $22 ^{\circ}$. Additionally, according to our adopted models, AT2019wey tends to have a relatively high iron abundance of $A_{\mathrm{Fe}}\sim$ 5 $A_{\mathrm{Fe}, \odot}$ and a high disk ionization state of $\log ξ\sim$ 3.4.

astro-ph.HE

Estimating the black hole spin for the X-ray binary MAXI J1820+070

MAXI J1820+070 is a newly-discovered black hole X-ray binary, whose dynamical parameters, namely the black hole mass, the inclination angle and the source distance, have been estimated recently. \emph{Insight}-HXMT have observed its entire outburst from March 14th, 2018. In this work, we attempted to estimate the spin parameter~$a_*$, using the continuum-fitting method and applying a fully-relativistic thin disk model to the soft-state spectra obtained by \emph{Insight}-HXMT. It is well know that $a_*$ is strongly dependent on three dynamical parameters in this method, and we have examined two sets of parameters. Adopting our preferred parameters: $M$ = $8.48^{+0.79}_{-0.72}~M_\odot$, $i=63^\circ\pm3^\circ$ and $D=2.96\pm0.33$ kpc, we found a slowly-spinning black hole of $a_*=0.14 \pm 0.09$ ($1σ$), which give a prograde spin parameter as majority of other systems show. While it is also possible for the black hole to have a retrograde spin (less than 0) if different dynamical parameters are taken.

astro-ph.HE

Line k-Arboricity in Product Networks

A \emph{linear $k$-forest} is a forest whose components are paths of length at most $k$. The \emph{linear $k$-arboricity} of a graph $G$, denoted by ${\rm la}_k(G)$, is the least number of linear $k$-forests needed to decompose $G$. Recently, Zuo, He and Xue studied the exact values of the linear $(n-1)$-arboricity of Cartesian products of various combinations of complete graphs, cycles, complete multipartite graphs. In this paper, for general $k$ we show that $\max\{{\rm la}_{k}(G),{\rm la}_{\ell}(H)\}\leq {\rm la}_{\max\{k,\ell\}}(G\Box H)\leq {\rm la}_{k}(G)+{\rm la}_{\ell}(H)$ for any two graphs $G$ and $H$. Denote by $G\circ H$, $G\times H$ and $G\boxtimes H$ the lexicographic product, direct product and strong product of two graphs $G$ and $H$, respectively. We also derive upper and lower bounds of ${\rm la}_{k}(G\circ H)$, ${\rm la}_{k}(G\times H)$ and ${\rm la}_{k}(G\boxtimes H)$ in this paper. The linear $k$-arboricity of a $2$-dimensional grid graph, a $r$-dimensional mesh, a $r$-dimensional torus, a $r$-dimensional generalized hypercube and a $2$-dimensional hyper Petersen network are also studied.

math.CO