ca.nengo.model.nef.impl
Class BiasOrigin

java.lang.Object
  extended by ca.nengo.model.nef.impl.DecodedOrigin
      extended by ca.nengo.model.nef.impl.BiasOrigin
All Implemented Interfaces:
Configurable, Noise.Noisy, Origin, ShortTermPlastic, Resettable, SimulationMode.ModeConfigurable, java.io.Serializable, java.lang.Cloneable

public class BiasOrigin
extends DecodedOrigin

Part of a projection in which each of the Nodes making up an Ensemble is a source of only excitatory or inhibitory connections.

The theory is presented in Parisien, Anderson & Eliasmith (2007).

Such a projection includes a "base" DecodedOrigin and DecodedTermination (a projection between these may have weights of mixed sign). The projection is expanded with a BiasOrigin a pair of BiasTerminations, and a new NEFEnsemble of interneurons. The make weight signs uniform, a projection is established between the BiasOrigin and BiasTermination, in parallel with the original projection. The effective synaptic weights that arise from the combination of these two projections are of uniform sign. However, the post-synaptic Ensemble receives extra bias current as a result. This bias current is cancelled by a projection from the BiasOrigin through the interneurons, to a second BiasTermination.

TODO: account for transformations in the Termination, which can change sign and magnitude of weights

Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
BiasOrigin(NEFEnsemble ensemble, java.lang.String name, Node[] nodes, java.lang.String nodeOrigin, float[][] constantOutputs, int numInterneurons, boolean excitatory)
           
 
Method Summary
 NEFEnsemble getInterneurons()
           
 float[] getRange()
           
 void optimizeDecoders(float[][] baseWeights, float[] biasEncoders, boolean excitatory)
          This method adjusts bias decoders so that the bias function is as flat as possible, without changing the bias encoders on the post-synaptic ensemble.
 void optimizeInterneuronDomain(DecodedTermination interneuronTermination, DecodedTermination biasTermination)
          This method adjusts the interneuron channel so that the interneurons are tuned to the range of values that is output by the bias function.
 
Methods inherited from class ca.nengo.model.nef.impl.DecodedOrigin
clone, getConfiguration, getDecoders, getDimensions, getError, getError, getFunctions, getMode, getName, getNode, getNodeOrigin, getNoise, getSTPDynamics, getSTPDynamics, getSTPHistory, getValues, rebuildDecoder, redefineNodes, rescaleDecoders, reset, run, setDecoders, setMode, setNoise, setSTPDynamics, setValues
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BiasOrigin

public BiasOrigin(NEFEnsemble ensemble,
                  java.lang.String name,
                  Node[] nodes,
                  java.lang.String nodeOrigin,
                  float[][] constantOutputs,
                  int numInterneurons,
                  boolean excitatory)
           throws StructuralException
Throws:
StructuralException
Method Detail

optimizeDecoders

public void optimizeDecoders(float[][] baseWeights,
                             float[] biasEncoders,
                             boolean excitatory)
This method adjusts bias decoders so that the bias function is as flat as possible, without changing the bias encoders on the post-synaptic ensemble. Distortion can be minimized by calling this method and then calling optimizeInterneuronDomain().

Parameters:
baseWeights - Matrix of synaptic weights in the unbiased projection (ie the weights of mixed sign)
biasEncoders - Encoders of the bias dimension on the post-synaptic ensemble
excitatory - If true, weights are to be kept positive (otherwise negative)

optimizeInterneuronDomain

public void optimizeInterneuronDomain(DecodedTermination interneuronTermination,
                                      DecodedTermination biasTermination)
This method adjusts the interneuron channel so that the interneurons are tuned to the range of values that is output by the bias function.

Parameters:
interneuronTermination - The Termination on getInterneurons() that recieves input from this Origin
biasTermination - The BiasTermination to which the interneurons project (not the one to which this Origin projects directly)

getRange

public float[] getRange()
Returns:
Vector of mininum and maximum output of this origin, ie {min, max}

getInterneurons

public NEFEnsemble getInterneurons()
Returns:
An ensemble of interneurons through which this Origin must project (in parallel with its direct projection) to compensate for the bias introduced by making all weights the same sign.