Search arXiv⌕ Search

arXiv subjects

Weizhou Wang

Publications and source records attributed to Weizhou Wang.

8 recordsLinked to original sources

Learned Handed Frames for Chirality-Aware Equivariant Molecular Diffusion

Equivariant diffusion models are widely used to generate three-dimensional molecular structures because they respect the rotational symmetry of molecular geometry. Two properties of chiral molecules remain difficult for them: the relative configuration of stereocenters, which sparse message passing struggles to keep consistent across a structure, and the enantiomeric ratio, which reflection-equivariant generation with reflection-invariant inputs forces to be racemic. We introduce learned handed frames (LHF), which condition an equivariant denoiser on a learned right-handed orthonormal frame represented by three ordered auxiliary nodes connected to every atom. The frame lets reflection-equivariant backbones respond to handedness and adds two-hop paths between atoms, while the backbone, its edge rule, and its diffusion objective stay unchanged. A linear-time encoder learns the frame from clean conformations jointly with the denoiser. Generation fixes the frame to the identity without evaluating the encoder, which preserves the data distribution of every rotation-invariant observable. On Chignolin with 30\% of conformations reflected into the D-enantiomer, LHF improves homochirality and geometric validity over edge-matched controls for all five backbones tested. For EGNN, the homochiral fraction rises from 45.6\% to 85.2\% and validity from 12.0\% to 70.3\%. All LHF models give L fractions of 67.3--70.6\% among homochiral samples against a 70\% target, whereas the reflection-equivariant baselines are nearly racemic.

cs.LG↗

Composing diffusion priors with explicit physical context via generative Gibbs sampling

Pretrained diffusion models provide powerful learned priors, but in scientific sampling the target distribution often depends on physical context that a single generative model can neither fully represent nor learn from scarce joint-system data. We introduce Generative Gibbs for Physics-Aware Sampling (GG-PA), a training-free framework that composes learned partial priors with explicit physical context through Gibbs sampling. We prove that this sampler is asymptotically exact as the diffusion time vanishes and remains exact at finite diffusion time for quadratic interactions. As a special case, the finite-time result corrects a finite-noise bias in plug-and-play split Gibbs samplers for linear inverse problems at no additional cost. We further introduce replica exchange over diffusion time to accelerate mixing. In experiments, a one-dimensional double-well prior recovers a context-induced distribution shift when coupled to an environment, and copies of such a prior composed on a lattice reproduce the emergent collective behavior of the $ϕ^4$ model. In atomistic peptide systems, GG-PA captures a context-induced distribution shift and the spontaneous formation of hydrogen-bonded dimers from two copies of a prior trained only on the monomer.

cs.LG↗

Restrained Diffusion Bridges: Targeted Denoiser Training and Refinement

Diffusion models are often inaccurate in critical, data-sparse regions of the target distribution. Sampling from restrained distributions, biased distributions used in classical enhanced sampling to concentrate data near chosen configurations, can control where training data are collected but biases the learned distribution. We establish that this bias cancels exactly when forward noising from restrained data is conditioned on the restrained configuration at an appropriately chosen intermediate time. This allows a pretrained model fine-tuned on restrained data to achieve high accuracy in any chosen region of the target distribution, regardless of its probability, using standard denoising or flow matching objectives without importance weights. When no target data are available, Gibbs sampling enables inference from a model trained exclusively on restrained data.

cs.LG↗

Nuclear Quantum Effects as a Denoising Problem

Nuclear quantum effects are rigorously captured by imaginary-time path integrals, which map the quantum Boltzmann distribution onto a ring polymer of classical replicas. Yet the nuclear masses, the coupling to the environment, and the boundary conditions of the path remain hard-wired in the simulation or the trained model, even though this quantum context enters the path measure only through a quadratic action known in closed form. Here we show that a denoiser trained on classical Boltzmann statistics alone, composed at sampling time with an analytic Gaussian component carrying the entire quantum context, yields the quantum Boltzmann distribution of the nuclei. Such a composition exists and is exact whenever the training noise does not exceed the intrinsic quantum uncertainty of the target ensemble, and it is invariant across all quantum contexts admitted by this bound. We show exact transfer across temperature, isotopic mass, dissipation strength, and the boundary conditions of the path in theory and in numerical experiments, without retraining. The last yields the end-to-end displacement and momentum distributions of a tagged nucleus from open imaginary-time paths. The same invariance extends in principle to the permuted boundary conditions of bosonic exchange, with the identical denoiser. In this view, the noise of generative modeling and the quantum fluctuations of the nuclei are two faces of the same quadratic structure.

physics.chem-ph↗

ANVIL: Anomaly-based Vulnerability Identification without Labelled Training Data

Supervised-learning-based vulnerability detectors often fall short due to limited labelled training data. In contrast, Large Language Models (LLMs) are trained on vast unlabelled code corpora, yet perform only marginally better than coin flips when directly prompted to detect vulnerabilities. In this paper, we reframe vulnerability detection as anomaly detection, based on the premise that vulnerable code is rare and thus anomalous relative to patterns learned by LLMs. We introduce ANVIL, which performs a masked code reconstruction task: The LLM reconstructs a masked line of code, and deviations from the original are scored as anomalies. We propose a hybrid anomaly score that combines exact match, cross-entropy loss, prediction confidence, and structural complexity. We evaluate our approach across multiple LLM families, scoring methods, and context sizes, and against vulnerabilities after the LLM's training cut-off. On the PrimeVul dataset, ANVIL outperforms state-of-the-art supervised detectors - LineVul, LineVD, and LLMAO - achieving up to 2x higher Top-3 accuracy, 75% better Normalized MFR, and a significant improvement on ROC-AUC. Finally, by integrating ANVIL with fuzzers, we uncover two previously unknown vulnerabilities, demonstrating the practical utility of anomaly-guided detection.

cs.CR↗

Quantum statistics from classical simulations via generative Gibbs sampling

Accurate simulation of nuclear quantum effects is essential for molecular modeling but expensive using path integral molecular dynamics (PIMD). We present GG-PI, a ring-polymer-based framework that combines generative modeling of the single-bead conditional density with Gibbs sampling to recover quantum statistics from classical simulation data. GG-PI uses inexpensive standard classical simulations or existing data for training and allows transfer across temperatures without retraining. On standard test systems, GG-PI significantly reduces wall clock time compared to PIMD. Our approach extends easily to a wide range of problems with similar Markov structure.

physics.chem-ph↗

An Efficient Integrator Scheme for Sampling the (Quantum) Isobaric-Isothermal Ensemble in (Path Integral) Molecular Dynamics Simulations

Because most chemical or biological experiments are performed under conditions of controlled pressure and temperature, it is important to simulate the isobaric-isothermal ensemble at the atomic level to reveal the microscopic mechanism. By extending our configuration sampling protocol for the canonical ensemble, we propose a unified middle scheme to sample the coordinate (configuration) and volume distribution and thereby are able to accurately simulate either classical or quantum isobaric-isothermal processes. Various barostats and thermostats can be employed in the unified middle scheme for simulating real molecular systems with or without holonomic constraints. In particular, we demonstrate the recommended middle scheme by employing the Martyna-Tuckerman-Tobias-Klein barostat and stochastic cell-rescaling barostat, with the Langevin thermostat, in molecular simulation packages (DL_POLY, Amber, Gromacs, etc.). Benchmark numerical tests show that, without additional numerical effort, the middle scheme is competent in increasing the time interval by a factor of 5~10 to achieve the same accuracy of converged results for most thermodynamic properties in (path integral) molecular dynamics simulations.

cond-mat.stat-mech↗

MARAGE: Transferable Multi-Model Adversarial Attack for Retrieval-Augmented Generation Data Extraction

Retrieval-Augmented Generation (RAG) offers a solution to mitigate hallucinations in Large Language Models (LLMs) by grounding their outputs to knowledge retrieved from external sources. The use of private resources and data in constructing these external data stores can expose them to risks of extraction attacks, in which attackers attempt to steal data from these private databases. Existing RAG extraction attacks often rely on manually crafted prompts, which limit their effectiveness. In this paper, we introduce a framework called MARAGE for optimizing an adversarial string that, when appended to user queries submitted to a target RAG system, causes outputs containing the retrieved RAG data verbatim. MARAGE leverages a continuous optimization scheme that integrates gradients from multiple models with different architectures simultaneously to enhance the transferability of the optimized string to unseen models. Additionally, we propose a strategy that emphasizes the initial tokens in the target RAG data, further improving the attack's generalizability. Evaluations show that MARAGE consistently outperforms both manual and optimization-based baselines across multiple LLMs and RAG datasets, while maintaining robust transferability to previously unseen models. Moreover, we conduct probing tasks to shed light on the reasons why MARAGE is more effective compared to the baselines and to analyze the impact of our approach on the model's internal state.

cs.CL↗