PMML 1.1 -- DTD for Neural Network Models
Neural Network Models for BackpropagationThe description of neural network models assumes that the reader has a general knowledge of artificial neural network technology.A neural network has one or more input nodes and one or more neurons. Some neuron's outputs are the output of the network. The network is defined by the neurons and their connections, aka weights. All neurons are organized into layers; the sequence of layers defines the order in which the activations are computed. All output activations for neurons in some layer L are evaluated before computation proceeds to the next layer L+1. Note that this allows for recurrent networks where outputs of neurons in layer L+i can be used as input in layer L where L+i > L. The model does not define a specific evaluation order for neurons within a layer. Each neuron receives one or more input values, each coming via a network connection, and sends only one output value. All incoming connections for a certain neuron are contained in the corresponding Neuron element. Each connection Con stores the ID of a node it comes from and the weight. A bias weight coefficient may be stored as an attribute of Neuron.
All neurons in the network are assumed to have the same (default)
activation function, although each individual neuron may have its
own activation and threshold that override the default.
Given a fixed neuron j, and Wi represents the weight on the connection to
neuron i,
the activation for neuron j is computed as follows
Z = Sum( Wi * output(i) ) + bias Activation functions are:
DTD |
|
|
NeuralInput
defines how input fields are normalized such that the
values can be processed in the neural network. For example,
string values must be encoded as numeric values.
NeuralOutput defines how the output of the neural network must be interpreted. |
|
NN-NEURON-ID is just a string which identifies a neuron.
The string is not necessarily an XML ID because a PMML document may contain
multiple network models where neurons in differnt models can have the same
identifier. Within a model, though, all neurons
must have a unique identifier.
Neural Network Input NeuronsAn input neuron represents the normalized value for an input field. A numeric input field is usually mapped to a single input neuron while a categorical input field is usually mapped to a set of input neuron using some fan-out function. The elements NormContinuos and NormDiscrete are defined in a separate DTD subset for normalization .
|
|
|
Restrictions: A numeric input field must not appear more than once in the input layer. Similarly, a pair of categorical input field together with a input value must not appear more than once in the input layer.
Neural Network Neurons |
|
|
Neuron contains an identifier which must be unique in all layers, its attribute threshold has default value 0. If no activationFunction is given then the default activationFunction of the NeuralNetwork element applies. The attribute 'bias' implicitly defines a connection to a bias unit where the unit's value is 1.0 and the weight is the value of 'bias'. Weighted connection between neural net nodes are represented by Con elements. |
|
|
Con elements are always part of a Neuron. They define the connection coming into that parent element. The neuron identified by 'from' may be part of any layer. NN-NEURON-IDs of all nodes must be unique across the combined set of NeuralInput and Neuron nodes. The 'from' attributes of connections and NeuralOutputs refer to these identifiers.
Neural Network Output NeuronsIn parallel to input neurons, there are output neurons which are connected to input fields via some normalization. While the activation of an input neuron is defined by the value of the corresponding input field, the activation of an output neuron is computed by the activation function. Therefore, an output neuron is defined by a Neuron. In networks with supervised learning the computed activation of the output neurons is compared with the normalized values in the corresponding input fields; these values are often called 'teach values'. The difference between the neuron's activation and the normalized output field determines the prediction error. For application mode the normalisation for the output field is used to denormalize the predicted value in the output neuron. Therefore, each instance of Neuron which represent an output neuron, is additionally connected to a normalized field.Connect a neuron's output to the output of the network. |
|
|
For neural value prediction with back propagation, the output layer contains a single neuron, this is denormalized giving the predicted value. For neural classification with backpropagation, the output layers contains one or more neurons. The neuron with maximal activation determines the predicted class label. If there is no unique neuron with maximal activation then the predicted value is undefined. |
Conformance
|
Example model |
|
|
|