Search arXivSearch

arXiv subjects

Hanqing Li

Publications and source records attributed to Hanqing Li.

17 recordsLinked to original sources

Union-Find with Constant-Time Deletions Across the Optimal Worst-Case Tradeoff

We consider union-find with deletions, where the representation and the cost of a query must depend on the current number of live elements rather than on the number of elements ever created. For every integer parameter $k\ge 2$, we give a linear-space data structure supporting $\mathsf{MakeSet}$ in $O(1)$ worst-case time, $\mathsf{Union}$ in $O(k)$ worst-case time, $\mathsf{Delete}$ in $O(1)$ worst-case time, and $\mathsf{Find}$ in $O\left(1+\frac{\log n}{\log k}\right)$ worst-case time for a set containing $n$ live elements. A deletion is given only an element handle, not the identifier of its current set. The construction separates global rank growth from local deletion repair. A logical set is represented by fewer than $k$ disjoint ranked trees. Equal-level trees are collected without physical linking until $k$ certificates are available, at which point one base-$k$ carry is performed in $O(k)$ time. Each member tree uses a strengthened form of the full/reduced local rebuilding scheme of Ben-Amram and Yoffe. A $q$-ary value argument, with $q=3/2$, couples the local trees to the base-$k$ certificates and yields the stated current-size height bound. A small but essential rule handles high-rank stars, a state that the base-$k$ carry can create but that does not arise directly in the binary-rank construction underlying the earlier local scheme.

cs.DS

Directed Hamiltonian-Cycle Parity in $O^*((3/2)^n)$ Deterministic Time and Polynomial Space

We give a deterministic algorithm that computes the parity of the number of Hamiltonian cycles in an $n$-vertex directed graph in $O(n^4(3/2)^n)$ time and $O(n^2)$ bits of working space, improving the $O^*(φ^n)$ bound of Björklund and Husfeldt. Their local-degree formula reduces the problem to a weighted sum over solutions of structured quadratic equations. We cover the corresponding ternary state space by binary subcubes, each inducing an affine system. The Kuang--Wang cover can be regenerated within the target bound; canonical ownership resolves its overlaps, while self-loop conditional expectations bound every affine solution visit. Rollback elimination shares the work across cover prefixes. The same cover gives a Las Vegas algorithm listing all $L$ solutions of $m$ affine product constraints in $N$ Boolean variables in expected time $\operatorname{poly}(N,m)((3/2)^m+L)$ and polynomial space. Finally, we show that complete enumeration can require $Ω((3/2)^n)$ visits even on strongly connected digraphs after an optimal self-loop choice. This is a limitation of the enumeration method, not a general lower bound for Hamiltonian-cycle parity.

cs.DS

Fast Odd-Permutation Sums in Characteristic Two and Shortest Even Directed Cycles

For a matrix $A$ over a field of characteristic two, let $Φ(A)$ be the sum of its permutation monomials indexed by odd permutations. Although determinant and permanent coincide in this characteristic, this parity sub-sum retains information that neither gives separately. We show that $Φ(A)$ and all its first partial derivatives can be computed deterministically in $O(n^τ)$ field operations for every $n\times n$ matrix, where $2<τ\le3$ is any fixed admissible matrix multiplication exponent. The result includes singular matrices and the binary field. An inversion-count identity expresses $Φ$ through complementary minors. For invertible matrices, a decomposition along two binary interval trees aggregates these minors by matrix multiplication; a Boolean border of constant size handles the remaining ranks. We also give an explicit matrix formula for the full gradient. Applied to $Φ(I+zW)$ for a randomly weighted adjacency matrix $W$, the evaluator computes the shortest even directed-cycle length in $\widetilde{O}(n^{τ+1})$ bit operations, improving the $\widetilde{O}(n^{τ+3})$ bound of Björklund, Husfeldt, and Kaski with the same multiplication exponent. The same time bound recovers the union of the arcs of all shortest even cycles with high probability, and deterministically outputs the cycle under a unique-shortest-cycle promise. For general graphs, exact maintenance of a nonzero coefficient gives an $\widetilde{O}(n^4)$ algorithm that outputs a shortest even cycle with high probability. Complementary extraction methods improve this bound for short cycles and for cycles that omit few vertices.

cs.DS

A Deterministic $(2+\varepsilon)$-Approximation for Weighted Feedback Vertex Set in Tournaments

We study the weighted feedback vertex set problem in tournaments. For every fixed integer $k\geq 2$, we give a deterministic $(2+1/k)$-approximation algorithm with running time $n^{2^{O(k)}}$, apart from polynomial dependence on the encoding length of the weights. Consequently, for every fixed $\varepsilon>0$, weighted feedback vertex set in tournaments has a deterministic $(2+\varepsilon)$-approximation running in time $n^{2^{O(1/\varepsilon)}}$. The algorithm combines two ingredients. When the triangle graph of the tournament has bounded clique number, a chain decomposition of its transitive complement yields an exact dynamic program for a maximum-weight transitive subtournament. When the clique number is large, a structural theorem for triangle graphs supplies a constant-size strongly good cost vector. A local-ratio reduction with this cost vector gives the claimed guarantee. As a by-product, the dynamic program solves weighted feedback vertex set exactly in $\mathcal B_7$-free tournaments in time $O(n^7)$, where $\mathcal B_7$ is the family of seven-vertex tournaments with feedback vertex set number at least three.

cs.DS

Bernstein-von Mises theorem for sparse generalized linear models

We establish an oracle Bernstein-von Mises theorem for high-dimensional sparse generalized linear models under an outcome-independent spike-and-slab prior. The posterior consistently recovers the true active set and converges in total variation to the Gaussian law that would arise if this set were known in advance, even when the active dimension grows. The result holds for both ordinary and fractional posteriors, the latter with the expected variance inflation under tempering. In fixed-design logistic regression, a sufficient lower bound on the squared minimum signal is proportional to the logarithm of the ambient dimension divided by sample size. Separate likelihood controls for model selection and oracle approximation allow the Gaussian approximation to use a weaker curvature condition. We verify the conditions for six canonical and noncanonical models under fixed and random designs, including Poisson regression with potentially unbounded Fisher weights. The results also yield oracle-rate contraction, credible regions on the recovered support and pointwise frequentist coverage.

math.ST

C2P-Cache: Scalable GPU L1 Cache Sharing via Concurrent Candidate Pruning

Modern GPUs rely on private per-SM L1 caches and a shared L2 cache, but this organization obscures cross-SM reuse: an L1 miss is typically forwarded to L2 even when the requested line already resides in a peer L1 cache, leading to redundant L2 access. Prior GPU L1-sharing designs attempt to recover such reuse through exact or broad remote-hit searches, which become increasingly difficult to scale and can interfere with the critical L1 miss path under high concurrency. %miss handling as more caches participate and more misses arrive concurrently. We observe that eliminating redundant L2 accesses does not require exact, chip-wide knowledge of private L1 contents. Instead, it requires only sufficient visibility to sharply narrow down a small set of candidate caches, leaving exact confirmation to a much smaller number of L1s. Based on this insight, we propose C2P-Cache, a scalable GPU L1-sharing mechanism that transforms remote-hit discovery from a chip-wide exact search problem into a lightweight filtering-and-confirmation process. C2P-Cache maintains compact Bloom-filter-based snapshots of private L1 tags, performs parallel chip-wide candidate filtering, and selectively probes only a small number of likely peer caches. To sustain high concurrency, C2P-Cache organizes filtering as bit-sliced matching over a banked and replicated snapshot matrix, enabling efficient, parallel processing of many concurrent misses without interfering with normal L1 accesses. Across a wide range of GPU workloads, C2P-Cache improves instructions per cycle (IPC) by up to 49.7\% and by 23.5\% on average for applications with high remote-L1 reuse and strong sensitivity to L2 latency, demonstrating that lightweight, scalable filtering can effectively unlock cross-SM reuse with modest overhead.

cs.AR

DecoEvo: Score-Decoupled Co-Evolution of Solver and Rubric-Generator Skills in Text Space

Text-space optimization adapts large language models (LLMs) by editing external natural-language artifacts rather than model weights, so the optimized artifacts remain inspectable and the model can be treated as a black box. However, most existing text-space methods keep evaluation fixed. On open-ended tasks, this can become a bottleneck: once the solver improves on the criteria a rubric measures, omitted dimensions remain invisible to the optimization signal. Simply evolving the rubric is also unreliable when updates are selected by the current solver's score, because apparent progress can come from making the rubric easier to satisfy. We introduce DecoEvo (Decoupled Co-Evolution), which co-evolves a solver skill and a rubric-generator skill under decoupled objectives without using gold rubrics during optimization. The solver skill is updated using criterion-level feedback, while the rubric-generator skill is revised through complementary audits of requirement coverage and response discrimination that are independent of aggregate solver score. This separation focuses generator updates on newly exposed solver weaknesses, reducing repeated emphasis on criteria the solver already satisfies. Under each benchmark's official evaluation, DecoEvo outperforms all compared methods across five benchmarks and three LLM backbones, yielding 2.8--5.0\% relative gains over SkillOpt in the five-benchmark average.

cs.AI

Bayesian Model Averaging under Predictor Redundancy via Density-Ratio Posterior Compression

Bayesian model averaging in support-indexed regression induces a posterior distribution over active predictor supports. Under predictor redundancy, posterior mass can spread across many nearly interchangeable supports, making exact-support summaries unstable or hard to interpret even when prediction is stable. We study how to report an already fitted Bayesian model averaging posterior without changing the Bayesian target. A report uses hard or soft regions of support space, and its compressed reporting law is compared with the reference posterior through an explicit density ratio. This ratio gives computable total-variation and Kullback--Leibler distortion, bounds for bounded predictive summaries, retained-mass diagnostics, and fallback-weight diagnostics. The framework covers fixed hard regions, metric-ball regions, posterior-cluster regions, and pooled-pruned region dictionaries. We prove exact error formulas and validation bounds for these region reports, and give conditions under which a few regions can replace a long list of individual supports. In simulations, our region reports often give shorter and clearer summaries while preserving the main posterior information, and the density-ratio diagnostics show when too much information has been lost.

stat.ML

Decoupled Multimodal Fusion for User Interest Modeling in Click-Through Rate Prediction

Modern industrial recommendation systems improve recommendation performance by integrating multimodal representations from pre-trained models into ID-based Click-Through Rate (CTR) prediction frameworks. However, existing approaches typically adopt modality-centric modeling strategies that process ID-based and multimodal embeddings independently, failing to capture fine-grained interactions between content semantics and behavioral signals. In this paper, we propose Decoupled Multimodal Fusion (DMF), which introduces a modality-enriched modeling strategy to enable fine-grained interactions between ID-based collaborative representations and multimodal representations for user interest modeling. Specifically, we construct target-aware features to bridge the semantic gap across different embedding spaces and leverage them as side information to enhance the effectiveness of user interest modeling. Furthermore, we design an inference-optimized attention mechanism that decouples the computation of target-aware features and ID-based embeddings before the attention layer, thereby alleviating the computational bottleneck introduced by incorporating target-aware features. To achieve comprehensive multimodal integration, DMF combines user interest representations learned under the modality-centric and modality-enriched modeling strategies. Offline experiments on public and industrial datasets demonstrate the effectiveness of DMF. Moreover, DMF has been deployed on the product recommendation system of the international e-commerce platform Lazada, achieving relative improvements of 5.30% in CTCVR and 7.43% in GMV with negligible computational overhead.

cs.IR

Zero-shot Graph Reasoning via Retrieval Augmented Framework with LLMs

We propose a new, training-free method, Graph Reasoning via Retrieval Augmented Framework (GRRAF), that harnesses retrieval-augmented generation (RAG) alongside the code-generation capabilities of large language models (LLMs) to address a wide range of graph reasoning tasks. In GRRAF, the target graph is stored in a graph database, and the LLM is prompted to generate executable code queries that retrieve the necessary information. This approach circumvents the limitations of existing methods that require extensive finetuning or depend on predefined algorithms, and it incorporates an error feedback loop with a time-out mechanism to ensure both correctness and efficiency. Experimental evaluations on the GraphInstruct dataset reveal that GRRAF achieves 100% accuracy on most graph reasoning tasks, including cycle detection, bipartite graph checks, shortest path computation, and maximum flow, while maintaining consistent token costs regardless of graph sizes. Imperfect but still very high performance is observed on subgraph matching. Notably, GRRAF scales effectively to large graphs with up to 10,000 nodes.

cs.AI

BEAR: BGP Event Analysis and Reporting

The Internet comprises of interconnected, independently managed Autonomous Systems (AS) that rely on the Border Gateway Protocol (BGP) for inter-domain routing. BGP anomalies--such as route leaks and hijacks--can divert traffic through unauthorized or inefficient paths, jeopardizing network reliability and security. Although existing rule-based and machine learning methods can detect these anomalies using structured metrics, they still require experts with in-depth BGP knowledge of, for example, AS relationships and historical incidents, to interpret events and propose remediation. In this paper, we introduce BEAR (BGP Event Analysis and Reporting), a novel framework that leverages large language models (LLMs) to automatically generate comprehensive reports explaining detected BGP anomaly events. BEAR employs a multi-step reasoning process that translates tabular BGP data into detailed textual narratives, enhancing interpretability and analytical precision. To address the limited availability of publicly documented BGP anomalies, we also present a synthetic data generation framework powered by LLMs. Evaluations on both real and synthetic datasets demonstrate that BEAR achieves 100% accuracy, outperforming Chain-of-Thought and in-context learning baselines. This work pioneers an automated approach for explaining BGP anomaly events, offering valuable operational insights for network management.

cs.NI

Reverse Prompt Engineering

We explore a new language model inversion problem under strict black-box, zero-shot, and limited data conditions. We propose a novel training-free framework that reconstructs prompts using only a limited number of text outputs from a language model. Existing methods rely on the availability of a large number of outputs for both training and inference, an assumption that is unrealistic in the real world, and they can sometimes produce garbled text. In contrast, our approach, which relies on limited resources, consistently yields coherent and semantically meaningful prompts. Our framework leverages a large language model together with an optimization process inspired by the genetic algorithm to effectively recover prompts. Experimental results on several datasets derived from public sources indicate that our approach achieves high-quality prompt recovery and generates prompts more semantically and functionally aligned with the originals than current state-of-the-art methods. Additionally, use-case studies introduced demonstrate the method's strong potential for generating high-quality text data on perturbed prompts.

cs.CL

Unsupervised Video Summarization via Iterative Training and Simplified GAN

This paper introduces a new, unsupervised method for automatic video summarization using ideas from generative adversarial networks but eliminating the discriminator, having a simple loss function, and separating training of different parts of the model. An iterative training strategy is also applied by alternately training the reconstructor and the frame selector for multiple iterations. Furthermore, a trainable mask vector is added to the model in summary generation during training and evaluation. The method also includes an unsupervised model selection algorithm. Results from experiments on two public datasets (SumMe and TVSum) and four datasets we created (Soccer, LoL, MLB, and ShortMLB) demonstrate the effectiveness of each component on the model performance, particularly the iterative training strategy. Evaluations and comparisons with the state-of-the-art methods highlight the advantages of the proposed method in performance, stability, and training efficiency.

cs.CV

Freezing dynamics of wetting droplet under a uniform electric field

Electrofreezing is a powerful technique that employs the electric field to control and enhance the freezing process. In this work, a phase-field-based lattice Boltzmann (LB) method is developed to study the electrofreezing process of sessile droplet on a cooled substrate. The accuracy of the present LB method is first validated through performing some simulations of the three-phase Stefan problem, the droplet freezing on a cold wall, and the droplet deformation under a uniform electric field. Then it is used to investigate the effect of an electric field on the freezing of a wetting droplet on a cold substrate, and the numerical results show that the electric field has a significant influence on the freezing time of the droplet mainly through changing the morphology of the droplet. In particular, under the effect of the electric field, the freezing time is increased for the droplet with a prolate pattern, while the freezing time of the droplet with an oblate pattern is decreased. These numerical results bring some new insights on the electrofreezing and provide a valuable guidance for the precise regulation of droplet freezing.

physics.flu-dyn

RHS-TRNG: A Resilient High-Speed True Random Number Generator Based on STT-MTJ Device

High-quality random numbers are very critical to many fields such as cryptography, finance, and scientific simulation, which calls for the design of reliable true random number generators (TRNGs). Limited by entropy source, throughput, reliability, and system integration, existing TRNG designs are difficult to be deployed in real computing systems to greatly accelerate target applications. This study proposes a TRNG circuit named RHS-TRNG based on spin-transfer torque magnetic tunnel junction (STT-MTJ). RHS-TRNG generates resilient and high-speed random bit sequences exploiting the stochastic switching characteristics of STT-MTJ. By circuit/system co-design, we integrate RHS-TRNG into a RISC-V processor as an acceleration component, which is driven by customized random number generation instructions. Our experimental results show that a single cell of RHS-TRNG has a random bit generation speed of up to 303 Mb/s, which is the highest among existing MTJ-based TRNGs. Higher throughput can be achieved by exploiting cell-level parallelism. RHS-TRNG also shows strong resilience against PVT variations thanks to our designs using bidirectional switching currents and dual generator units. In addition, our system evaluation results using gem5 simulator suggest that the system equipped with RHS-TRNG can achieve 3.4-12x higher performance in speeding up option pricing programs than software implementations of random number generation.

cs.AR

Learning Unified Representations for Multi-Resolution Face Recognition

In this work, we propose Branch-to-Trunk network (BTNet), a representation learning method for multi-resolution face recognition. It consists of a trunk network (TNet), namely a unified encoder, and multiple branch networks (BNets), namely resolution adapters. As per the input, a resolution-specific BNet is used and the output are implanted as feature maps in the feature pyramid of TNet, at a layer with the same resolution. The discriminability of tiny faces is significantly improved, as the interpolation error introduced by rescaling, especially up-sampling, is mitigated on the inputs. With branch distillation and backward-compatible training, BTNet transfers discriminative high-resolution information to multiple branches while guaranteeing representation compatibility. Our experiments demonstrate strong performance on face recognition benchmarks, both for multi-resolution identity matching and feature aggregation, with much less computation amount and parameter storage. We establish new state-of-the-art on the challenging QMUL-SurvFace 1: N face identification task. Our code is available at https://github.com/StevenSmith2000/BTNet.

cs.CV

Cross Domain Object Detection by Target-Perceived Dual Branch Distillation

Cross domain object detection is a realistic and challenging task in the wild. It suffers from performance degradation due to large shift of data distributions and lack of instance-level annotations in the target domain. Existing approaches mainly focus on either of these two difficulties, even though they are closely coupled in cross domain object detection. To solve this problem, we propose a novel Target-perceived Dual-branch Distillation (TDD) framework. By integrating detection branches of both source and target domains in a unified teacher-student learning scheme, it can reduce domain shift and generate reliable supervision effectively. In particular, we first introduce a distinct Target Proposal Perceiver between two domains. It can adaptively enhance source detector to perceive objects in a target image, by leveraging target proposal contexts from iterative cross-attention. Afterwards, we design a concise Dual Branch Self Distillation strategy for model training, which can progressively integrate complementary object knowledge from different domains via self-distillation in two branches. Finally, we conduct extensive experiments on a number of widely-used scenarios in cross domain object detection. The results show that our TDD significantly outperforms the state-of-the-art methods on all the benchmarks. Our code and model will be available at https://github.com/Feobi1999/TDD.

cs.CV