Generalized 1 / k-ensemble algorithm Faming Liang * Department of Statistics, Texas A&M University, College Station, Texas 77843-3143, USA (Received 21 September 2003; published 14 June 2004) We generalize the 1/ k-ensemble algorithm so that it can be used for both discrete and continuous systems, and show that the generalization is correct numerically and mathematically. We also compare the efficiencies of the generalized 1 / k-ensemble algorithm and the generalized Wang-Landau algorithm through a neural network example. The numerical results favor to the generalized 1 / k-ensemble algorithm. DOI: 10.1103/PhysRevE.69.066701 PACS number(s): 02.70.Tt, 07.05.Mh I. INTRODUCTION In practice, we often need to deal with the systems with rough energy landscapes—for example, peptides, proteins, neural networks, traveling salesman problems, spin glasses, etc. The energy landscapes of these systems are characterized by a multitude of local minima separated by high-energy barriers. At low temperatures, canonical Monte Carlo meth- ods, such as the Metropolis-Hastings algorithm [1] and the Gibbs sampler [2], tend to get trapped in one of these local minima. Hence only small parts of the phase space are sampled (in a finite number of simulation steps) and thermo- dynamical quantities cannot be estimated accurately. To alle- viate this difficulty, generalized ensemble methods have been proposed, such as simulated tempering [3,4], parallel temper- ing [5,6], the multicanonical algorithm [7,8], entropic sam- pling [9], the 1 / k-ensemble algorithm [10], the flat histogram algorithm [11], and the Wang-Landau algorithm [12]. They all allow a much better sampling of the phase space than the canonical methods. Simulated tempering and parallel tem- pering share the idea that the energy landscape can be flat- tened by raising the temperature of the system and, hence, the phase space can be well explored at a high temperature by the local move based canonical methods. The other algo- rithms [7–12] are histogram based and share the idea that a random walk in the energy space can escape from any energy barrier. Among the histogram-based algorithms, the multica- nonical algorithm and entropic sampling are mathematically identical as shown by Berg et al. [13], the flat histogram and Wang-Landau algorithms can be regarded as different imple- mentations of the multicanonical algorithm, and the 1/ k-ensemble algorithm is only slightly different from the multicanonical algorithm. The multicanonical algorithm re- sults in a free random walk, while the 1/ k-ensemble algo- rithm results in a random walk with more weight toward low-energy regions. In this sense, Hesselbo and Stinchcombe [10] claimed that the 1 / k-ensemble algorithm is superior to the multicanonical algorithm. We note that these histogram-based algorithms are all de- veloped for discrete systems. In this article, we generalize the 1/ k-ensemble algorithm so that it can be used for both discrete and continuous systems, and show that the generali- zation is correct numerically and mathematically. We also demonstrate the efficiency of the generalized 1 / k-ensemble algorithm through a neural network example. II. GENERALIZED 1 / k-ENSEMBLE ALGORITHM Let Edenote the density of states of a system. The 1/ k-ensemble algorithm seeks to sample from the distribu- tion 1/k E 1 kE , where KE= E ' E E'—that is, the number of states with energies up to and including E. Hence a run of the 1/ k-ensemble algorithm will produce the following distribu- tion of energy: P 1/k E E kE = d ln kE dE . Since in many physical systems kEis a rapidly increasing function, we have ln kE ln E, which is called the thermodynamic entropy of the system. For a wide range of values of energy, the simulation will approximately produce a free random walk in the thermodynamic entropy space. So the simulation is able to overcome any barrier of the energy landscape. Although the algorithm seems very attractive, kEis un- known, and it has to be estimated prior to the simulation. An iterative procedure for estimating kEwas given in Ref. [10], but the complexity of the procedure has limited the use of the algorithm. Recently, Wang and Landau [12] proposed an innovative implementation for the multicanonical algo- rithm. Motivated by the Wang-Landau algorithm have the following on-line implementation for the 1 / k-ensemble algo- rithm. We state that our implementation is online, in contrast to the off-line implementation, which first estimates E j ’s by the flat histogram or Wang-Landau algorithm, and then estimates kE i by k ˆ E i - E j E i ˆ E j , where ˆ E j denotes the estimate of ˆ E j . Suppose we axe interested in inferring from the distribu- tion *Electronic address: fliang@stat.tamu.edu PHYSICAL REVIEW E 69, 066701 (2004) 1539-3755/2004/69(6)/066701(7)/$22.50 ©2004 The American Physical Society 69 066701-1