NAME

CLM -- class unit for the Competitive Layer Model

PROTOTYPE

unitptr CLM( int iMaxFeatures, int iFeatureDim, int iLnum, int iThreads, unitptr uHost)

ARGUMENTS

int iMaxFeatures
maximum number of features
int iFeatureDim
dimensionality of feature vectores
int iLnum
number of layers
int iThreads
number of threads to use for iteration
unitptr uHost
host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

DESCRIPTION:

The CLM class container implements the Competitive Layer Model and provides several interfacing methods. For details on the CLM, please refer to Heiko Wersing "Spatial Feature Binding and Learning in Competitive Neural Layer Architectures", 2000, Cuvillier Verlag.

NEO CREATION:

When creating the unit, the following parameters have to be specified:
Maximum number of features:
In order to compute the interaction matrix and the dynamics, all feature vectors are stored within the unit. This parameter describes the maximal number of features the unit can store.
Dimensionality of features:
The dimensionality iDim of the feature vectors to be stored.
Number of layers:
The number of layers L the CLM uses.
Number of threads:
The number of threads which are used to simulate the CLM dynamics. Only useful for machines with more than 1 processor.

The parameter window contains the following items:

IA library:
The name of the shared object (e.g. "clm_ia.so") containing the interaction functions.
function:
The name of the actual interaction function (e.g. "proximity"). The interaction function has the following prototype float (.ia_function) (float *pfF1, float *pfF2, float *pfParams, int iDim), where pfF1 and pfF2 point to the two interacting feature vectors, *pfParams points to a parameter array which reflects the 64 dimensional input of the subunit ia_matrix, and iDim is the dimensionality of the feature vectors. This function is called by the subunit ia_matrix and is used to compute the interaction matrix.
Inhibition:
The global inhibition parameter which is subtracted from all interaction values computed by ia_function().
conn. thresh:
The connection threshold. Connections are only established between features which exceed this threshold.
Trash layer:
With this button "on", layer 0 becomes a so-called trash-layer. In this layer, the features do not interact with eachother, their activity is only supported by their self coupling constant.
self coupling:
The self coupling constant.
J1:
A button which controls the setting of the J1 parameter. Possible values are: "global", "max eigen" and "local". If "local" is choosen, then for each feature position r a local J1 value is computed (the sum over all positive interactions with all other features s). Otherwise, a global value is used during the dynamics.
factor:
The estimation for J1 is multiplied by this value.
Annealing:
The button allows to choose between three annealing schemas: "no" for no annealing, "exp" for an exponential annealing from the specified start and end temperature in the given number of iterations, "exp est" for an exponential annealing where the temperatures are weighted with the maximum eigenvalue of the interaction matrix.
temp. from:
The starting temperature t0 for the annealing mode
to:
The final temperature t1 for the annealing mode
iterations:
The number of sweeps in which the temperature falls from t0 to t1.
Update prob:
The probability with which a neuron with zero activity gets updated
Iterations:
If positive the number of sweeps, if negative, the number of single neuron updates
Auto break:
If set to "yes", after each iteration update steps, it is checked, whether the energy of the system changed by a certain amount. If yes, the dynamics will be stopped, otherwise the system iterates iteration steps more.
min delta x:
If the sum over the activation difference of all neurons exceeds this threshold the dynamics will be stopped (c.f. with Auto break).
Initialize activities:
By pressing this button, all activities will be resetted.

NEO-INTERFACE:

The input fields provide a way to change the units parameter during runtime. All parameters described above can be adjusted by a setting of their corresponding input pins. They are:
Input field 0:
(string, string) Name of shared object for interaction functions, Name of actual interaction function.
Input field 1 (64 floats):
Pin 0:
global Inhibition
Pin 1:
connection threshold
Pin 2:
use trash layer (0,1)
Pin 3:
self coupling term
Pin 4:
J1 mode (0,1,2)
Pin 5:
J1 factor
Pin 6:
Annealing mode (0,1,2)
Pin 7:
t0
Pin 8:
unused
Pin 9:
t1
Pin 10:
iterations for annealing
Pin 11:
Updateprobability for zero activities
Pin 12:
iteration for dynamics
Pin 13:
Auto break (0,1)
Pin 14:
Minimum delta activity for auto break
No output fields.

EXECUTION:

Execution of the created unit does nothing. However, execution of any of its named subunits (via a use_named unit) invokes the corresponding C++ class method. The interface of each named subunit provides inputs and outputs for the corresponding method.

INTERFACE AND DESCRIPTION OF NAMED SUBUNITS:

init_inp:
no Input/Output
Execution will delete all feature vectors from the input set and set the current number of features to zero.
add_inp:
Input field 0:
(packed float iDim) Feature vector
Execution will add the current input at field 0 to the feature set.
nb_inp:
Output field 0:
(float 1) Number of currently stored feature vectors
for_inps:
Output field 0:
(packed float iDim) Feature vector data
Output field 1:
(float 1) current feature number (starting with 0)
Execution will iterate over all feature vectors f_r and copy their corresponding data to the output fields.
ia_matrix:
Input field 0:
(packed float 64) Parameter vector
Execution will create the interaction matrix with the currently stored feature vectors. The interaction function specified in the parameter dialog of the CLM unit will be called for the computation. The 64 dimensional parameter vector will be passed to the interaction function.
dynamix:
no Input/Output
Execution will start the asynchronous simulation of the CLM dynamics
layer_stats:
Output field 0:
(packed float L) sum over all activities per layer
Output field 1:
(packed float L) average activity per layer
Output field 2:
(packed float L) variance of activities per layer
Output field 3:
(float 6) currently unused
Execution will compute some layer statistics.
ia_stats:
Output field 0:
(float 1) average connectivity
Execution will compute the average connection value of all interactions in the interaction matrix.
ralpha_act:
Input field 0:
(float 2) feature index r, layer alpha
Output field 0:
(float 1) activity x(r,alpha)
Output field 1:
(packed float iDim) feature vector f_r
Execution will retrieve the activity and the feature vector at the given position r, alpha.
r_act:
Input field 0:
(float 1) feature index r
Output field 0:
(packed float L) array of activities in column r
Output field 1:
(packed float iDim) feature vector f_r
Execution will retrieve the activities in the CLM column r and the corresponding feature vector
for_rs_act:
Output field 0:
(packed float L) array of activities in column r
Output field 1:
(packed float iDim) feature vector f_r
Output field 2:
(float 1) column position r
Execution iterates over all column positions r and copies the corresponding values to the output fields.
for_rs_maxact:
Output field 0:
(float 2) layer index alpha with maximum activity, the corresponding activity itself
Output field 1:
(packed float iDim) feature vector f_r
Output field 2:
(float 1) column position r
Execution iterates over all column positions r and copies the corresponding values to the output fields.
rs_ia:
Input field 0:
(float 2) two feature position r and s
Output field 0:
(float 1) the interaction between the given features
for_ss_ia:
Input field 0:
(float 1) feature position r
Output field 0:
(float 1) interaction between features at position r and s
Output field 1:
(float 1) feature position s
Output field 2:
(packed float iDim) feature vector f_s
Execution iterates over all features s and returns interaction between given feature position r
init_act:
no Input/Output
Execution will initialize all activities with a random value in the range [0, 0.001).
set_T:
Input field 0:
(float 1) current temperature t for annealing
Execution will set the current temperature value for the annealing process.

FILE

nst_clm.cc