The Boltzmann machine module
In this paragraph the Boltzmann machine simulation module is described. The panel to
drive the simulation will open when the item BOLTZMANN MACHINE
in the MODEL
sub-menu is
choosen.
Boltzmann machine: an overview
The Boltzmann machines belong to a category of well understood and studied
neural networks consisting of one layer of nodes fully interconnected.
The Hopfield network is a special case of this category.
A Hopfield network accepts binary inputs x and the nodes output y is
either 1 or -1 according to I>0
or I<0, where I is computed by the following formula, in which n is the number
of neurons and w are the connection weights:
.
Associated to the net current state we
introduce the concept of global energy, that involves the weights of the
connections and current activity levels of nodes:
.
Each time there is a transition in the network and the neuron states change
from 1 to -1 or viceversa the global energy varies. The difference in global
energy for each transition is given by:
.
This formula expresses the net weighted input I to the i-th node. The transfer
function computes the relative difference in the network's global energy
based on whether each node goes into state 1 or -1. Each time a neuron
changes its state from 1 to -1 or viceversa, it effects the global energy,
that lowers. The network's energy can reach a local minimum.
A way to get around the problem of local minima is to look at the activity
of neurons as a statistical process. Phisicists G.Hinton & T.Sejnowski
(see Learning and Relearning in Boltzmann Machines
in Parallel Distributed Processing vol.1, Rumelhart et al., eds)
applied the approach of statistical thermodynamics to give a representation
of the action of a set of atoms, even when the individual behaviour is
unknown, to the analysis of the activities of a Hopfield network.
This approach is called the Boltzmann machine.
The node activity is not deterministically determined by a sign function
but by a probability function.
Each node i sets its output to +1 with
probability given by:
where and T is the Boltzmann temperature.
T is the parameter to manage the
network action; when T is very large relative to energy change the
probability approaches 0.5, on the other hand if T decreases to very
small values then the probability that the node is in state +1 or -1 is 1.
When temperature is high the network randomly bounces between the energy
local minima; but if the temperature is slowly lowered then it is more
likely that the network will move to the next minimum without being able
to bounce back. In this way the network has a higher probability to find
a global minimum.
This process is also called simulated annealing.
Also the method to determine the nodes to update can be statistical.
The panel is divided into five sections: the Net Interface section with the buttons
CONNECT
, DISCONNECT
and EXIT
to allow the association between the network and the simulation module; the Simulation Scheduler section with
the buttons RUN
, STOP
, OPTIONS
and some other tools to manage the
simulations; the Training Set section with the buttons LOAD TS
and
ADD EX
, besides two clickable arrows labelled VIEW
to manage the training set files; the Learning Scheduler section where users can set the number of learning cycles; and finally the Output section, that will show output data of the simulation and messages context dependent.
The application guides the use of the panel changing the sensitivity of the
panel tools according to the feasible operations at a given phase of the simulation.
The Net Interface section
-
CONNECT
- Establishes the connection between the model panel and the current net; it forces arcs type
to be symmetric and allocates some internal data structures.
-
DISCONNECT
- Erase the connection to the net, deallocating from memory the simulation data.
-
EXIT
- Closes the Boltzmann machine simulation panel.
-
RUN
- It starts the simulation on the current net, with current parameters and options settings;
a run-time plot of the statistic selected in the options panel
(see
OPTIONS
below)
will be performed on the output window. While simulation is running, the
STOP
button is mouse sensitive, and users can stop it.
-
STOP
- Allows user to stop the running simulation; this feature is useful because the simulation
time could be quite large, expecially with big nets (hundreds of neurons), and one could
think to change the simulation parameters and restart.
-
OPTIONS
- Clicking on this button will open an option panel with some Motif toggle buttons,which allows to set six simulation flags to modify both model behaviour and output features.
- mode: parallel/sequential
-
with button down, parallel mode is active (multiple neurons, eventually all, can evaluate their new
states simultaneously); with button up, sequential mode is on (only one randomly
chosen neuron can change state at a time). Setting the Activation Mode will change tools
located in the Simulation Scheduler section, because simulation parameters are different.
-
parallelism: full/random
- when parallel mode is on, this button down causes all neurons to evaluate their states at each time (full parallelism), while this button down implies that a random subset of them will do it (random parallelism).
- behaviour: deterministic/stochastic
- this button down causes the Boltzmann machine to change its configuration improving the consensus function deterministically, becoming an Hopfield net and performing a gradient
descendent optimization method (deterministic behaviour)
; this button up implements the optimization through the
simulated annealing algorithm (stochastic behaviour).
- cooling: free/scheduled
- with button up the cooling sheduling is fixed is scheduled (scheduled cooling),
with button down the sheduling can be customized (free cooling) through a tool
that will appear in the Net Interface section of the Boltzmann machine control panel.
- report file: yes/no
- if the button is down an output text file is written, while simulation is running. The output file can be found in directory
<INNEHOME>/NOTES
and is named report.txt
(a successive output will rewrite the last one);
the output file reports different statistics on data taken after each
iteration of the optimization algorithm.
- refresh: once/often
- with button down, refresh on the net is done at the end of simulation to
show the reached configuration; with button up, the refresh is done at the end of each
iteration, to show the configuration of thermal equilibrium.
- display: temperature/consensus
- this button allows to choose the data to show on output window, between the plot of the consensus
function or the plot of the decreasing temperature; data are taken at thermal
equilibrium after each annealing iteration.
THE SIMULATION PARAMETERS
In the Boltzmann machine control panel three tools allow to customize the parameters
of the simulated annealing cooling schedule; each tool provides a Motif
scale widget and an associated text field: users can drag the slider using mouse, or
input directly the desired value in text form.
If the mode flag in the option panel indicates the
sequential mode, then in this section are listed the parameters:
- Initial Frequence Range: used to set the initial acceptance frequence which ranges form 0.01 to
0.10. Setting the parameter to a value x means that the starting annealing temperature is chosen such
that the estimated acceptance frequency of proposed transitions will be in [0.5-x,0.5+x].
- Equilibrium Distance: used to set the speed of decreasing for the temperature. It ranges from
0.05 to 0.50; the higher is the value and the faster is temperature decreasing.
- Stop Parameter: used to set the stop value. It ranges from 0.000001 to 0.001000
and it means that the algorithm stops if, in the last iteration, the variance of the
visited configurations with respect to their average divided by the current temperature is
less than the stop value.
If the mode flag indicates the parallel mode, then in this section are listed the parameters:
- Temp Dec Rate: used to set the temperature
decrement rate. It ranges from 0.900 to 0.990, and is the value that, at the end of each
annealing iteration, multiplies the temperature value to obtain the new value.
- Trans to Equilibrate: it shows the number of transitions (state evaluations) that each neuron has to perform
to consider the thermal equilibrium reached.
- Stable Iterations: it shows
the number of stable (with no configuration changes) annealing iterations needed to stop
the algorithm. The parameter ranges from 4 to 15.
All ranges have been choosen according to data from experimental applications.
The Training Set section
LOAD TS
Loads from a training set file a sequence of example; the neurons classification of the
current net into input, output and hidden units determines the expected format of the file,
in input and output patterns dimensions; if this format isn't satisfied, the load fails.
A standard Motif file selection box is used to select the training set file name.
ADD EX
Users can configure the current net with a global state, using the SET
tool that allows
easy activation/deactivation of neurons; this button gets, from such configuration, the
input and output patterns and adds the correspondent example to the file (selected with a
Motif file selection box); it is also possible to add a text line that will precede the
example in the file as a comment (see the training set file format).
VIEW ARROWS
Two arrows labelled with VIEW
allow users to examine the loaded training set scrolling the examples; an example will be showed setting the state of the each involved
neuron according to the respective pattern value.
Back to index