arXiv ScienceSearch

arXiv subjects

Barak Hirshberg

Publications and source records attributed to Barak Hirshberg.

At least 19 recordsLinked to original sources

Using Diffusion Models to Estimate Uncertainties in Analytic Continuation

Inverse problems are ubiquitous in physics, chemistry, and engineering, arising when reconstructing hidden quantities from indirect measurements. A key example is the analytic continuation of imaginary-time correlation functions (iTCFs) to the real-frequency domain. This process requires an inverse Laplace transform, which is inherently ill-posed and highly sensitive to small input variations. Recent neural network (NN)-based methods have shown promising results by learning mappings from imaginary-time to real-frequency spectra, often outperforming traditional techniques such as maximum entropy. However, because the problem is ill-posed, many spectra fit the same iTCF. Regression-based approaches output a single solution, which approximates an average over the true solution space, and therefore fail to capture the full distribution of plausible power spectra. To address this issue, we introduce a diffusion-based framework for analytic continuation that learns the distribution of spectra consistent with a given iTCF. It offers two key advantages. First, it quantifies uncertainty directly from the learned distribution. Second, by analyzing the spread and structure of this distribution, we can quantitatively assess the intrinsic hardness of each inversion problem. We measure this hardness with a new metric, the uncertainty pseudo-volume. Applying the framework to an iTCF from a path-integral molecular dynamics simulation of liquid parahydrogen, we obtain the self-diffusion coefficient with an error bar and flag a secondary high-frequency peak as a possible spurious artifact. In contrast to previous attempts at uncertainty quantification, our generative approach rests on a concrete probabilistic basis, providing a more theoretically grounded measure of confidence in the reconstructed power spectra.

physics.comp-ph

Bosonic Condensed Phase Real-time Dynamics from Ring Polymer Molecular Dynamics

We present a method for approximating real-time correlation functions and quantum transport coefficients of bosonic condensed phases. The direct evaluation of quantum real-time correlation functions in the path integral formulation is impossible due to a severe dynamical sign problem. Evaluating imaginary-time correlation functions and inverting them using analytic continuation is famously ill-posed. Ring polymer molecular dynamics (RPMD) provides an alternative approach resulting in accurate approximations for real-time correlation functions of condensed phases but neglects exchange effects. In this work, we develop a bosonic RPMD method, which is exact in the harmonic, short time, and high temperature limits. A critical enabling observation is that the Kubo-transformed correlation function for bosons is real only when the correlated observables are symmetric under exchange. We benchmark the method on harmonic and anharmonic model systems and then use it to directly obtain the Lieb-Liniger gas density-density real-time correlation functions at various temperatures and momentum transfers. This work enables the direct simulation of finite-temperature, real-time dynamics of large bosonic condensed phases using RPMD for the first time.

physics.chem-ph

Stochastic Resetting: A Non-Equilibrium Framework for Prediction, Inference and Design

Stochastic resetting has evolved from a simple model of diffusive search acceleration into a general framework for predicting, inferring, and controlling stochastic dynamics far from equilibrium. Its defining features, i.e., the creation of non-equilibrium steady states and the acceleration of first-passage kinetics, are increasingly relevant across physical chemistry, from biological restart mechanisms to molecular simulations and colloidal experiments. We review the renewal theory underlying stochastic resetting and show how it enables prediction of reset dynamics from properties of the underlying process, while also allowing the latter to be inferred from the resetting-accelerated dynamics. We then discuss applications to state preparation, enhanced sampling, kinetic inference, and training and sampling of machine learning models. Finally, we review recent advances in adaptive resetting, environmental feedback, many-body dynamics, and thermodynamic costs of resetting. These developments establish new opportunities for controlling stochastic dynamics with resetting across theory, simulations, and experiments.

physics.chem-ph

Generalized Suzuki-Chin Factorization in Bosonic Path Integral Molecular Dynamics

Modern implementations of path integral molecular dynamics (PIMD) simulations of distinguishable particles frequently make use of high order factorization schemes for the Boltzmann operator to expedite convergence of equilibrium averages. Among these methods is the generalized Suzuki-Chin factorization (GSF), which is accurate up to fourth order in the imaginary-time step. In this work, we show that the GSF decomposition of the Boltzmann operator is applicable to bosonic PIMD, and results in an improved convergence of estimators. In particular, we show that the recently developed quadratic scaling bosonic PIMD need not change when using the GSF. The GSF scheme is implemented as a re-weighting factor for observables, without affecting the sampling generated by the standard, second-order, primitive factorization. We study the effect of this factorization for bosons in a harmonic trap and a sinusoidal potential. We also assess the effectiveness of GSF in calculating fermionic expectation values for harmonically-trapped atoms. In all these cases, we find that the GSF speeds up convergence with the Trotter number by a factor of $\sim 2-4$ across a wide temperature range, at only a modest computational cost.

physics.chem-ph

fix pimd/langevin: An Efficient Implementation of Path Integral Molecular Dynamics in LAMMPS

Path integral molecular dynamics (PIMD), which maps a quantum particle onto a fictitious classical system of ring polymers and propagates the "beads" of this extended classical system using molecular dynamics, is widely used to capture nuclear quantum effects (NQEs) in molecular simulations. Accurate PIMD calculations typically require a large number of beads and are therefore computationally demanding. While software packages such as i-PI offer comprehensive PIMD functionality, the high efficiency of simulations driven by machine learning interatomic potentials, such as Deep Potential (DP), calls for more efficient PIMD implementations that fully exploit modern massively parallel supercomputers. Here we present fix pimd/langevin, an efficient PIMD implementation in LAMMPS that supports commonly used features and leverages the Message Passing Interface architecture of LAMMPS to achieve high computational efficiency. We demonstrate the usage and validate the correctness of our code using liquid water as a representative example, and provide a comprehensive overview of the supported features. Then we discuss several important technical aspects of the implementation. Using DP simulations of water as a benchmark, we show that our implementation achieves several-fold acceleration compared to i-PI. Finally, we report strong and weak scaling results that demonstrate the favorable parallel performance of our code.

physics.chem-ph

More Bang for the Buck: Improving the Inference of Large Language Models at a Fixed Budget using Reset and Discard (ReD)

The performance of large language models (LLMs) on verifiable tasks is usually measured by pass@k, the probability of answering a question correctly at least once in k trials. At a fixed budget, a more suitable metric is coverage@cost, the average number of unique questions answered as a function of the total number of attempts. We connect the two metrics and show that the empirically-observed power-law behavior in pass@k leads to a sublinear growth of the coverage@cost (diminishing returns). To solve this problem, we propose Reset-and-Discard (ReD), a query method of LLMs that increases coverage@cost for a given budget, regardless of the pass@k form. Moreover, given a pass@k, we can quantitatively predict the savings in the total number of attempts using ReD. If pass@k is not available for the model, ReD can infer its power-law exponent. Experiments on three LLMs across coding (HumanEval), math (GSM8K), and reasoning (MMLU-Pro) benchmarks demonstrate that ReD substantially reduces the required attempts, tokens, and USD cost to reach a desired coverage, while also offering an efficient way to measure inference power-laws. ReD's advantage is maintained for imperfect verifiers and outperforms the tested allocation baselines.

cs.LG

Combining Harmonic Sampling with the Worm Algorithm to Improve the Efficiency of Path Integral Monte Carlo

We propose an improved Path Integral Monte Carlo (PIMC) algorithm called Harmonic PIMC (H-PIMC) and its generalization, Mixed PIMC (M-PIMC). PIMC is a powerful tool for studying quantum condensed phases. However, it often suffers from a low acceptance ratio for solids and dense confined liquids. We develop two sampling schemes especially suited for such problems by dividing the potential into its harmonic and anharmonic contributions. In H-PIMC, we generate the imaginary time paths for the harmonic part of the potential exactly and accept or reject it based on the anharmonic part. In M-PIMC, we restrict the harmonic sampling to the vicinity of local minimum and use standard PIMC otherwise, to optimize efficiency. We benchmark H-PIMC on systems with increasing anharmonicity, improving the acceptance ratio and lowering the auto-correlation time. For weakly to moderately anharmonic systems, at $\beta \hbar \omega=16$, H-PIMC improves the acceptance ratio by a factor of 6-16 and reduces the autocorrelation time by a factor of 7-30. We also find that the method requires a smaller number of imaginary time slices for convergence, which leads to another two- to four-fold acceleration. For strongly anharmonic systems, M-PIMC converges with a similar number of imaginary time slices as standard PIMC, but allows the optimization of the auto-correlation time. We extend M-PIMC to periodic systems and apply it to a sinusoidal potential. Finally, we combine H- and M-PIMC with the worm algorithm, allowing us to obtain similar efficiency gains for systems of indistinguishable particles.

physics.comp-ph

Stochastic Resetting vs. Thermal Equilibration: Faster Relaxation, Different Destination

Stochastic resetting is known for its ability to accelerate search processes and induce non-equilibrium steady states. Here, we compare the relaxation times and resulting steady states of resetting and thermal relaxation for Brownian motion in a harmonic potential. We show that resetting always converges faster than thermal equilibration, but to a different steady-state. The acceleration and the shape of the steady-state are governed by a single dimensionless parameter that depends on the resetting rate, the viscosity, and the stiffness of the potential. We observe a trade-off between relaxation speed and the extent of spatial exploration as a function of this dimensionless parameter. Moreover, resetting relaxes faster even when resetting to positions arbitrarily far from the potential minimum.

cond-mat.stat-mech

Machine Learning the Entropy to Estimate Free Energy Differences without Sampling Transitions

Thermodynamic phase transitions, a central concept in physics and chemistry, are typically controlled by an interplay of enthalpic and entropic contributions. In most cases, the estimation of the enthalpy in simulations is straightforward but evaluating the entropy is notoriously hard. As a result, it is common to induce transitions between the metastable states and estimate their relative occupancies, from which the free energy difference can be inferred. However, for systems with large free energy barriers, sampling these transitions is a significant computational challenge. Dedicated enhanced sampling algorithms require significant prior knowledge of the slow modes governing the transition, which is typically unavailable. We present an alternative approach, which only uses short simulations of each phase separately. We achieve this by employing a recently developed deep learning model for estimating the entropy and hence the free energy of each metastable state. We benchmark our approach calculating the free energies of crystalline and liquid metals. Our method features state-of-the-art precision in estimating the melting transition temperature in Na and Al without requiring any prior information or simulation of the transition pathway itself.

cond-mat.soft

Have you tried turning it off and on again? Stochastic resetting for enhanced sampling

Molecular dynamics simulations are widely used across chemistry, physics, and biology, providing quantitative insight into complex processes with atomic detail. However, their limited timescale of a few microseconds is a significant obstacle in describing phenomena such as conformational transitions of biomolecules and polymorphism in molecular crystals. Recently, stochastic resetting, i.e., randomly stopping and restarting the simulations, emerged as a powerful enhanced sampling approach, which is collective variable-free, highly parallelized, and easily implemented in existing molecular dynamics codes. Resetting expedites sampling rare events while enabling the inference of kinetic observables of the underlying process. It can be employed as a standalone tool or in combination with other enhanced sampling methods, such as Metadynamics, with each technique compensating for the drawbacks of the other. Here, we comprehensively describe resetting and its theoretical background, review recent developments in stochastic resetting for enhanced sampling, and provide instructive guidelines for practitioners.

physics.chem-ph

First-Passage Approach to Optimizing Perturbations for Improved Training of Machine Learning Models

Machine learning models have become indispensable tools in applications across the physical sciences. Their training is often time-consuming, vastly exceeding the inference timescales. Several protocols have been developed to perturb the learning process and improve the training, such as shrink and perturb, warm restarts, and stochastic resetting. For classifiers, these perturbations have been shown to result in enhanced speedups or improved generalization. However, the design of such perturbations is usually done ad hoc by intuition and trial and error. To rationally optimize training protocols, we frame them as first-passage processes and consider their response to perturbations. We show that if the unperturbed learning process reaches a quasi-steady state, the response at a single perturbation frequency can predict the behavior at a wide range of frequencies. We employ this approach to a CIFAR-10 classifier using the ResNet-18 model and identify a useful perturbation and frequency among several possibilities. We demonstrate the transferability of the approach to other datasets, architectures, optimizers and even tasks (regression instead of classification). Our work allows optimization of perturbations for improving the training of machine learning models using a first-passage approach.

cs.LG

Periodic Boundary Conditions for Bosonic Path Integral Molecular Dynamics

We develop an algorithm for bosonic path integral molecular dynamics (PIMD) simulations with periodic boundary conditions (PBC) that scales quadratically with the number of particles. Path integral methods are a powerful tool to simulate bosonic condensed phases, which exhibit fundamental physical phenomena such as Bose--Einstein condensation and superfluidity. Recently, we developed a quadratic scaling algorithm for bosonic PIMD, but employed an ad hoc treatment of PBC. Here we rigorously enforce PBC in bosonic PIMD. It requires summing over the spring energies of all periodic images in the partition function, and a naive implementation scales exponentially with the system size. We present an algorithm for bosonic PIMD simulations of periodic systems that scales only quadratically. We benchmark our implementation on the free Bose gas and a model system of cold atoms in optical lattices. We also study an approximate treatment of PBC based on the minimum-image convention, and derive a numerical criterion to determine when it is valid.

physics.chem-ph

Inference of non-exponential kinetics through stochastic resetting

We present an inference scheme of long timescale, non-exponential kinetics from Molecular Dynamics simulations accelerated by stochastic resetting. Standard simulations provide valuable insight into chemical processes but are limited to timescales shorter than $\sim 1 \mu s$. Slower processes require the use of enhanced sampling methods to expedite them, and inference schemes to obtain the unbiased kinetics. However, most kinetics inference schemes assume an underlying exponential first-passage time distribution and are inappropriate for other distributions, e.g., with a power-law decay. We propose an inference scheme that is designed for such cases, based on simulations enhanced by stochastic resetting. We show that resetting promotes enhanced sampling of the first-passage time distribution at short timescales, but often also provides sufficient information to estimate the long-time asymptotics, which allows the kinetics inference. We apply our method to a model system and a short peptide in an explicit solvent, successfully estimating the unbiased mean first-passage time while accelerating the sampling by more than an order of magnitude.

physics.chem-ph

Adaptive Resetting for Informed Search Strategies and the Design of Non-equilibrium Steady-states

Stochastic resetting, the procedure of stopping and re-initializing random processes, has recently emerged as a powerful tool for accelerating processes ranging from queuing systems to molecular simulations. However, its usefulness is severely limited by assuming that the resetting protocol is completely decoupled from the state and age of the process that is being reset. We present a general formulation for state- and time-dependent resetting of stochastic processes, which we call adaptive resetting. This allows us to predict, using a single set of trajectories without resetting and via a simple reweighing procedure, all key observables of processes with adaptive resetting. These include the first-passage time distribution, the propagator, and the steady-state. Our formulation enables efficient exploration of informed search strategies and facilitates the prediction and design of complex non-equilibrium steady states, eliminating the need for extensive brute-force sampling across different resetting protocols. Finally, we develop a general machine learning framework to optimize the adaptive resetting protocol for an arbitrary task beyond the current state of the art. We use it to discover efficient protocols for accelerating molecular dynamics simulations.

cond-mat.stat-mech

Accelerating Molecular Dynamics through Informed Resetting

We present a procedure for enhanced sampling of molecular dynamics simulations through informed stochastic resetting. Many phenomena, such as protein folding and crystal nucleation, occur over time scales that are inaccessible in standard simulations. We recently showed that stochastic resetting can accelerate molecular simulations that exhibit broad transition time distributions. However, standard stochastic resetting does not exploit any information about the reaction progress. For a model system and chignolin in explicit water, we demonstrate that an informed resetting protocol leads to greater accelerations than standard stochastic resetting in molecular dynamics and Metadynamics simulations. This is achieved by resetting only when a certain condition is met, e.g., when the distance from the target along the reaction coordinate is larger than some threshold. We use these accelerated simulations to infer important kinetic observables such as the unbiased mean first-passage time and direct transit time. For the latter, Metadynamics with informed resetting leads to speedups of 2-3 orders of magnitude over unbiased simulations with relative errors of only ~35-70%. Our work significantly extends the applicability of stochastic resetting for enhanced sampling of molecular simulations.

physics.chem-ph

i-PI 3.0: a flexible and efficient framework for advanced atomistic simulations

Atomic-scale simulations have progressed tremendously over the past decade, largely due to the availability of machine-learning interatomic potentials. These potentials combine the accuracy of electronic structure calculations with the ability to reach extensive length and time scales. The i-PI package facilitates integrating the latest developments in this field with advanced modeling techniques, thanks to a modular software architecture based on inter-process communication through a socket interface. The choice of Python for implementation facilitates rapid prototyping but can add computational overhead. In this new release, we carefully benchmarked and optimized i-PI for several common simulation scenarios, making such overhead negligible when i-PI is used to model systems up to tens of thousands of atoms using widely adopted machine learning interatomic potentials, such as Behler-Parinello, DeePMD and MACE neural networks. We also present the implementation of several new features, including an efficient algorithm to model bosonic and fermionic exchange, a framework for uncertainty quantification to be used in conjunction with machine-learning potentials, a communication infrastructure that allows deeper integration with electronic-driven simulations, and an approach to simulate coupled photon-nuclear dynamics in optical or plasmonic cavities.

physics.chem-ph

Unveiling a crystal's entropy of disorder via electron diffraction. A statistical mechanics approach

Upon melting, the molecules in the crystal explore numerous configurations, reflecting an increase in disorder. The molar entropy of disorder can be defined by Bolzmann's formula dSd = Rln(Wd) where Wd is the increase in the number of microscopic states, so far inaccessible experimentally. We found that the Arrhenius frequency factor A of the electron diffraction signal decay provides Wd via an experimental equation A = AINTWd where AINT is an inelastic scattering cross-section. The method connects Clausius and Boltzmann experimentally and supplements the Clausius approach, being applicable to a femtogram quantity of thermally unstable and biomolecular crystals. The data also showed that crystal disordering and crystallization of melt are reciprocal, both governed by the entropy change, but manifesting in opposite directions.

physics.chem-ph

The effect of ligands on the size distribution of copper nanoclusters: insights from molecular dynamics simulations

Controlling the size distribution in the nucleation of copper particles is crucial for achieving nanocrystals with desired physical and chemical properties. However, their synthesis involves a complex system of solvents, ligands, and copper precursors with intertwining effects on the size of the nanoclusters. We combine molecular dynamics simulations and DFT calculations to provide insight into the nucleation mechanism in the presence of a triphenylphosphite ligand. We identify the crucial role of the strength of the metal-phosphine bond in inhibiting the cluster's growth. We demonstrate computationally several practical routes to fine-tune the bond strength by modifying the side groups of the additive. Our work provides molecular insight into the complex nucleation process of protected copper nanocrystals, which can assist in controlling their size distribution and, eventually, their morphology.

physics.chem-ph