Class Synapse

  • All Implemented Interfaces:
    Writable

    public class Synapse
    extends Object
    implements Writable
    The Synapse class connects two neurons with each other. When propagating an activation signal, the weight of the synapse is multiplied with the activation value of the input neurons activation. The result is then added to the output neurons weighted sum to compute the output activation value. In contrast to a conventional neural network synapses in Aika do not just propagate the activation value from one neuron to the next, but also structural information like the text range and the relational id (e.g. word position) and also the interpretation to which the input activation belongs. To determine in which way the structural information should be propagated synapses in Aika possess a few more properties.

    The properties relativeRid and absoluteRid determine either the relative difference between the rid of the input activation and the rid of the output activation or require a fixed rid as input.

    The properties range match, range mapping and range output manipulate the ranges. The range match determines whether the input range begin or end is required to be equal, greater than or less than the range of the output activation. The range mapping can be used to map for example an input range end to an output range begin. Usually this simply maps begin to begin and end to end. The range output property is a boolean flag which determines whether the input range should be propagated to the output activation.

    Furthermore, the property isRecurrent specifies if this synapse is a recurrent feedback link. Recurrent feedback links can be either negative or positive depending on the weight of the synapse. Recurrent feedback links kind of allow to use future information as inputs of a current neuron. Aika allows this by making assumptions about the recurrent input neuron. The class SearchNode modifies these assumptions until the best interpretation for this document is found.

    Author:
    Lukas Molzberger
    • Constructor Detail

      • Synapse

        public Synapse()
    • Method Detail

      • getInput

        public Neuron getInput()
      • getOutput

        public Neuron getOutput()
      • isRecurrent

        public boolean isRecurrent()
      • setRecurrent

        public void setRecurrent​(boolean recurrent)
      • isIdentity

        public boolean isIdentity()
      • setIdentity

        public void setIdentity​(boolean identity)
      • isInactive

        public boolean isInactive()
      • setInactive

        public void setInactive​(Synapse.State s,
                                boolean inactive)
      • getWeight

        public double getWeight()
      • getLimit

        public double getLimit()
      • getNewWeight

        public double getNewWeight()
      • getNewLimit

        public double getNewLimit()
      • getWeightDelta

        public double getWeightDelta()
      • getLimitDelta

        public double getLimitDelta()
      • link

        public void link()
      • unlink

        public void unlink()
      • getMaxInputValue

        public double getMaxInputValue()
      • exists

        public boolean exists()
      • commit

        public void commit()
      • isZero

        public boolean isZero()
      • computeRelationWeights

        public double computeRelationWeights​(Link l)
      • computeMaxRelationWeights

        public double computeMaxRelationWeights()
      • isWeakIntern

        public boolean isWeakIntern​(Synapse.State state)
      • updateDelta

        public void updateDelta​(Document doc,
                                double weightDelta,
                                double limitDelta)
      • update

        public void update​(Document doc,
                           double weight,
                           double limit)
      • write

        public void write​(DataOutput out)
                   throws IOException
        Description copied from interface: Writable
        Serialize the fields of this object to out.
        Specified by:
        write in interface Writable
        Parameters:
        out - DataOuput to serialize this object into.
        Throws:
        IOException
      • readFields

        public void readFields​(DataInput in,
                               Model m)
                        throws IOException
        Description copied from interface: Writable
        Deserialize the fields of this object from in.

        For efficiency, implementations should attempt to re-use storage in the existing object where possible.

        Specified by:
        readFields in interface Writable
        Parameters:
        in - DataInput to deseriablize this object from.
        Throws:
        IOException
      • linksAnyOutput

        public boolean linksAnyOutput()