The present invention relates to techniques for generating and training continuous restricted Boltzmann machines.
Restricted Boltzmann machines (RBMs) are a type of generative neural network. They summarize their input data to build a probabilistic model that can then be used to reconstruct missing data or to classify new data. Unlike discrete Boltzmann machines, where the data are mapped to the space of integers or bitstrings, continuous Boltzmann machines directly use floating point numbers and therefore represent the data with higher fidelity. The primary limitation in using Boltzmann machines for big-data problems is the efficiency of the training algorithm.
Restricted Boltzmann machines develop an energy-based model of the data presented to them. Since RBMs learn to recognize the data they have seen, they are well-suited to extracting and reconstructing consistent patterns in data. In a very real sense they straddle the divide between unsupervised and supervised learning algorithms. Because they are regenerative, they are also a prototype of deep learning, and can serve as an “adapter” between real data and a more abstract representation suitable for other machine learning approaches. RBMs are inherently probabilistic recognizers and can interface effectively with fuzzy representations of uncertainty.
The classic or discrete RBM (dRBM) restricts the input and output data to integer values or bitstrings. Real valued data typically are mapped to unique bit-strings. This results in a loss of fidelity in the reconstruction because only the bitstring can be reproduced. The encoding or mapping is also problem-dependent and the use of a sub-optimal encoding will result in sub-optimal training, classification, and reconstruction.
Continuous RBMs (cRBM) replace discrete valued spins with continuous values. The problem of training an RBM shifts from enumerating independent spins to estimating the continuous values of the hidden variables. However, issues still arise with the training of such cRBMs. A need arises for improved techniques for training cRBMs.
Embodiments of the present systems and methods may provide techniques for deterministic training of cRBMs. Embodiments may utilize least square error estimates for the hidden variables, which is computationally tractable and provides improved results.
For example, in an embodiment, a computer-implemented method for machine learning may comprise generating a continuous restricted Boltzman machine model by replacing discrete valued spins in a discrete restricted Boltzman machine model with continuous values, training the continuous restricted Boltzman machine model using a training dataset using a deterministic training process having hidden variables defined using least square error estimates, and using the trained continuous restricted Boltzman machine model to recognize patterns in new data.
In embodiments, training the continuous restricted Boltzman machine model may comprise generating initial values of weights of the continuous restricted Boltzman machine model, generating initial values of the hidden variables based on the training dataset and visible values, updating the values of the hidden variables based on a least squares error estimate of a distance from each hidden value to a predicted value of the hidden value and a visible value, given the weights; and updating the weights using an integral over changes in potential. The expected value of the shift in weights over changes in potential may be approximated by:
where W are the weights.
In an embodiment, a system for machine learning may comprise a processor, memory accessible by the processor, and computer program instructions stored in the memory and executable by the processor to perform generating a continuous restricted Boltzman machine model by replacing discrete valued spins in a discrete restricted Boltzman machine model with continuous values, training the continuous restricted Boltzman machine model using a training dataset using a deterministic training process having hidden variables defined using least square error estimates, and using the trained continuous restricted Boltzman machine model to recognize patterns in new data.
In an embodiment, a computer program product for machine learning may comprise a non-transitory computer readable storage having program instructions embodied therewith, the program instructions executable by a computer, to cause the computer to perform a method comprising generating a continuous restricted Boltzman machine model by replacing discrete valued spins in a discrete restricted Boltzman machine model with continuous values, training the continuous restricted Boltzman machine model using a training dataset using a deterministic training process having hidden variables defined using least square error estimates, and using the trained continuous restricted Boltzman machine model to recognize patterns in new data.
The details of the present invention, both as to its structure and operation, can best be understood by referring to the accompanying drawings, in which like reference numbers and designations refer to like elements.
Embodiments of the present systems and methods may provide techniques for deterministic training of cRBMs. Embodiments may utilize least square error estimates for the hidden variables, which is computationally tractable and provides improved results.
In embodiments, an RBM may train or optimize a potential against data. A full discrete Boltzmann machine uses a spin-lattice construct of hidden variables to enumerate states and seeks to find an energy minimum over that lattice given an observed set of data. Since the number of possible states of the spin-lattice is exponential, simplifications such as the RBM have been developed. In embodiments, an RBM may use a layer of independent hidden variables and thus the number of possible states may be a linear function of the number of hidden variables. Conventional RBMs use an iterative stochastic optimization algorithm, contrastive divergence, for training.
In embodiments, the present systems and methods may replace the stochastic algorithm with an analytic approximation, which results in considerable simplifications to the method. An example of an embodiment of a method of cRBM Training using analytic approximation is shown in
The formal background of the algorithm for a continuous Boltzmann machine starts from the definition of the potential energy:
Where Vi are the observed data, Wi,j are the weights and Hj are the hidden values. A bias could be added to both the observed data and hidden values. However, since the bias is colinear with the data and hidden values, it may be set to a constant of zero. Adding a bias would replace Hj with (Hj−bhj) and Vi with (Vi−bvi) where bh and bv are hidden and visible layer bias values, respectively. The free energy is by definition and as an analogy the Helmholtz free energy in statistical mechanics:
The partition function Z is defined as
and the probability of any one state is given by
Taking the derivative of F yields the probability:
thus by the chain rule, the derivative of F with respect to a parameter p is:
where < > denotes expected value. Maximizing U to train and minimizing F to prevent over-training results in the total derivative
Taking the derivative of U−F with respect to Wi,j results in:
which encapsulated Hebbian learning in the correlation between V and H.
Two major difficulties arise in the use of equation 5. The first is the evaluation of the expected value term and the second is the evaluation of Hj. Contrastive divergence finds a numerical approximation for
Moving from the discrete model to a continuous model requires shifting from a sum over two states (spins of ±1) to an integral over the changes in potential. Numerical approximations readily converge for this integral and we use:
where dWi,j is ViHj.
Evaluating Hj is more difficult. Naively using the gradient
to estimate H tends to lose information and converge to a uniform set of weights. Forming the least squares estimate that matches H and V given W gives far better results. The rows of W form a basis set for expanding Vin the least squares algorithm.
Where N is the normal equation of the system. N is a symmetric, diagonally dominant, matrix. During training, N may be ill-conditioned, so as a practical matter, it is regularized by adding λI. In embodiments, λ=1 and the magnitude of the elements of N may be typically about 100-1000. In embodiments, the pseudocode shown in
Classification Algorithm. The values of the energy and the quality of the reconstruction are poor predictors of class membership with cRBMs. In essence, the reconstruction algorithm is too good for the errors to be a reliable indicator of class membership. Since the rows of W are a basis set and H is the expansion of the data in that basis, the values of H are useful for classifying data. Since the rank of W is often lower than the number of features or the number of features times the number of classes, the values of H are a compressed representation of the data.
Exemplary Results. Table 1 shows an example of Benchmark Results of the performance of this cRBM tested against standard datasets. This example, shows the performance of the cRBM on a range of problems taken from the UCI repository. In this example, the best results for the dRBMs, after optimizing the encoding to discrete bitstrings, were included in the table. The prescribed training and test sets were used for all of the UCI datasets and the others were evaluated with five-fold cross validation with the mean accuracy reported. The new algorithm consistently out-performs the older ones. While not shown, the PPV, recall and F-scores are consistent with the level of accuracy in the results. The correlation between the reconstructed data, determined by equation 8 and the input data is >0.99 for most of the data sets. (TPV is an exception where it is only >0.9).
Ecoli
An example of benchmarking embodiments of the present techniques against HIVpr drug resistance data of a previous approach are shown in Table 2. This example demonstrates embodiments of the present techniques can handle relatively large datasets. In this example, the previous approach maps drug resistant mutations onto the molecular structure and uses Delaunay triangulation to reduce it to a 210 long feature vector. The previous approach used compressed encoding, as well as SVM and ANN, so it is a relevant comparison. The average values for 5-fold cross validation using 10 hidden layers and standard errors are reported for this data. The data used included between 10000 and 17000 data points.
The MNIST character recognition data set consists of 60,000 scanned and centered handwritten digits for training and 10,000 digits for testing.
In embodiments, the code may be written, for example, in C++ and complied with the GNU compiler. Other than the MNIST benchmark, in embodiments the calculations may be performed, for example, on a small laptop computer (such as al 0.6 GHz lenovo n22, using Ubuntu under windows 10) in a matter of minutes. The exact times depend on training parameters, but the cited examples from Table 3 took 205 seconds for the microRNA set with 50 hidden layers and 60 seconds for the shuttle set with 10 hidden layers. The MNIST data took about an hour of CPU time per point on a 1.6 GHz Linux workstation. Ten training epochs were used in all the examples.
Embodiments of the present systems and methods may provide effective techniques for classification and reconstruction using a continuous RBM. The accuracy of the predictions may be competitive with conventional methods when validated either against standard test sets or by 5-fold cross validation. In embodiments, the naive 1-NN classification method may be replaced with a more accurate one, and the mechanics of the least square estimation of H may be implemented in a more efficient manner. In embodiments, the techniques may be implemented on a GPU with significant performance enhancement.
An exemplary block diagram of a computer system 402, in which processes involved in the embodiments described herein may be implemented, is shown in
Input/output circuitry 404 provides the capability to input data to, or output data from, computer system 402. For example, input/output circuitry may include input devices, such as keyboards, mice, touchpads, trackballs, scanners, analog to digital converters, etc., output devices, such as video adapters, monitors, printers, etc., and input/output devices, such as, modems, etc. Network adapter 406 interfaces device 400 with a network 410. Network 410 may be any public or proprietary LAN or WAN, including, but not limited to the Internet.
Memory 408 stores program instructions that are executed by, and data that are used and processed by, CPU 402 to perform the functions of computer system 402. Memory 408 may include, for example, electronic memory devices, such as random-access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), flash memory, etc., and electro-mechanical memory, such as magnetic disk drives, tape drives, optical disk drives, etc., which may use an integrated drive electronics (IDE) interface, or a variation or enhancement thereof, such as enhanced IDE (EIDE) or ultra-direct memory access (UDMA), or a small computer system interface (SCSI) based interface, or a variation or enhancement thereof, such as fast-SCSI, wide-SCSI, fast and wide-SCSI, etc., or Serial Advanced Technology Attachment (SATA), or a variation or enhancement thereof, or a fiber channel-arbitrated loop (FC-AL) interface.
The contents of memory 408 may vary depending upon the function that computer system 402 is programmed to perform. In the example shown in
In the example shown in
As shown in
The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general-purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
Although specific embodiments of the present invention have been described, it will be understood by those of skill in the art that there are other embodiments that are equivalent to the described embodiments. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims.
This invention was made with government support under Grant GM062920 awarded by National Institute of Health. The government has certain rights in the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2019/048963 | 8/30/2019 | WO | 00 |
Number | Date | Country | |
---|---|---|---|
62724655 | Aug 2018 | US |