Index:
 


1. General
This document describe coding standard AINN-001. This standard describe how to store neural networks at text file.

This standard was designed for moving data (neural networks) between different systems. It have some restrictions due to easy parser functions impementation. It is also human frendly :)

Standard version: AINN-001_v1
 


2. File (comments, line terminators etc.)

Comments

Line that first character is "#" (hash) is a comment. It is not recomendet put "#" characters at other positions that at begining of line.


Line terminator

Line terminator should be character "\n" - standard linux end line terminator.


Data separators

Data separators should be all characters (not one of them): "," , ".", ":", ";", "\t", " " (space)

Example "ai_file.txt" and "ai_identical_file.txt"
# connection_schema example

[connection_schema-connection]
1 : in_1, in_2
2 : in_1, in_2
3 : 1, 2
4 : 1, 2
out_1 : 3
out_2 : 4

[connection_schema-broken_connection]
1 : 3

# End of file
# connection_schema example

[connection_schema-connection]
1:in_1:       in_2
2     ;      in_1 in_2
3 1 2
4:1,.:; 2
out_1.....3
out_2 4

[connection_schema-broken_connection]
1 3

# End of file

This files defines identical neural networks.


Tags

File contain tags. Tags are special strings inside square brackets, eg "[example-tag]". Tag should begin at fist char at line, and there should not be any data at the same line.
Data assiociated with tag is below that tag up to next tag.


Example "ai_file.txt"
# connection_schema example

[connection_schema-connection]
1 : in_1, in_2
2 : in_1, in_2
3 : 1, 2
4 : 1, 2
out_1 : 3
out_2 : 4

[connection_schema-broken_connection]
1 : 3

# End of file

This examle show, tags, tag positions and associated data to this tags at text file.
 


3. HTML pages
Is recomended that INPUTs and TEXTAREAs at HTML pages accept file format. Users will be able to copy and paste content.
 


4. Neurons
Tags:
[neuron_schema-name]
[neuron_schema-description]
[neuron_schema-coefficient]
[neuron_schema-activation_function_type]
[neuron_schema-activation_function_formula]
[neuron_schema-input_bias]
[neuron_schema-output_bias]

Each neuron at neural network have own properties, this section describe it.







[neuron_schema-name]
One line neuron schema name. Recommend that should not be longer that 25 characters.

Data restrictions:
- none


[neuron_schema-description]
Multiline description of neuron schema.

Data restrictions:
- none


[neuron_schema-coefficient]
Defines neuron coefficients.

Data restrictions:
- first neuron has number 1
- each next neuron must have next number

Example "ai_file.txt"
# Neuron schema coeffiecients example

[neuron_schema-coefficient]
1 : -0.96505372876537
2 : -0.82198244790639, -0.84340324524949
3 : 0.65500070976792
4 : -0.79525958271476, -0.49581326893336, -0.88625108724751

# End of file

This example show coefficients to 4 neurons:

neuron 1 has 1 input:
     input 1 coefficient has value -0.96505372876537
neuron 2 has 2 inputs:
     input 1 coefficient has value -0.82198244790639
     input 2 coefficient has value -0.84340324524949
neuron 3 has 1 input:
     input 1 coefficient has value 0.65500070976792
neuron 4 has 3 inputs:
     input 1 coefficient has value -0.79525958271476
     input 2 coefficient has value -0.49581326893336
     input 3 coefficient has value -0.88625108724751



[neuron_schema-activation_function_type]
Not defined yet.

Data restrictions:
- unknown


[neuron_schema-activation_function_formula]
Not defined yet.

Data restrictions:
- unknown


[neuron_schema-input_bias]
Defines neuron input bias.

Data restrictions:
- first neuron has number 1
- each next neuron must have next number
- second number is input bias value for first input
- third number is input bias value for second input, etc.

Example "ai_file.txt"
# Neuron schema input bias example

[neuron_schema-input_bias]
1 : -0.1
2 : -0.02, 0.05
3 : 0.65
4 : -0.07, -0.49, -0.088

# End of file

This example show input biases to 4 neurons:

neuron 1 has 1 input:
     input 1 bias has value -0.1
neuron 2 has 2 inputs:
     input 1 bias has value -0.02
     input 2 bias has value 0.05
neuron 3 has 1 input:
     input 1 bias has value 0.65
neuron 4 has 3 inputs:
     input 1 bias has value 0.07
     input 2 bias has value -0.49
     input 3 bias has value -0.088



[neuron_schema-output_bias]
Defines neuron output bias.

Data restrictions:
- first neuron has number 1
- each next neuron must have next number

Example "ai_file.txt"
# Neuron schema output bias example

[neuron_schema-output_bias]
1 : 0.3
2 : 0.05
3 : -0.45
4 : -0.06

# End of file

This example show output biases to 4 neurons:

neuron 1 output bias value is 0.3
neuron 2 output bias value is 0.05
neuron 3 output bias value is -0.45
neuron 4 output bias value is -0.06

 


5. Connection schema
Tags:
[connection_schema-name]
[connection_schema-description]
[connection_schema-connection]
[connection_schema-broken_connection]

Connection schema defines how neurons, inputs and outputs are connected each other and also define broken connections at network.



[connection_schema-name]
One line connection schema name. Recommend that should not be longer that 25 characters.

Data restrictions:
- none


[connection_schema-description]
Multiline description of neuron schema.

Data restrictions:
- none


[connection_schema-connection]
Connection schema defines how neurons, inputs and outputs are connected each other.

Data restrictions:
- first neuron has number 1
- each next neuron must have next number
- at first positions at line could be only neuron or output
- at second and next positions at line could be only neurons and inputs
- output could be connected only to one neuron

Example "ai_file.txt"
# connection schema, connections example

[connection_schema-connection]
1 : in_1, in_2
2 : in_1, in_2
3 : 1, 2
4 : 1, 2
out_1 : 3
out_2 : 4

# End of file

This example generate network:

neuron 1 has connected to his inputs neural network input in_1 and neural network input in_2
neuron 2 has connected to his inputs neural network input in_1 and neural network input in_2
neuron 3 has connected to his inputs neuron 1 output and neuron 2 output
neuron 4 has connected to his inputs neuron 1 output and neuron 2 output
neuron 3 output is output out_1 of neural network
neuron 4 output is output out_2 of neural network


In the picture we can see that neural network.



[connection_schema-broken_connection]
Broken connection tag define which connections are broken.

Data restrictions:
- first neuron have to has less number than second

Example "ai_file.txt"
# connection schema, broken connections example

[connection_schema-broken_connection]
1 : 4
5 : 7

# End of file

This example that:

connection between neuron 1 and neuron 4 is broken
connection between neuron 5 and neuron 7 is broken


In the picture, broken connections are red.

 


6. Learn schema
Tags:
[learn_schema-name]
[learn_schema-description]
[learn_schema-stimulation_and_responce]

Learn schema define neural network stimulation and expected responses (learn vectors) needed to learn process.



[learn_schema-name]
One line learn schema name. Recommend that should not be longer that 25 characters.

Data restrictions:
- none


[learn_schema-description]
Multiline description of learn schema.

Data restrictions:
- none


[learn_schema-stimulation_and_responce]
Defines stimulation and expected responces.

Data restrictions:
- char that seperate stimulation from responce is ":"
- line should have equal number of stimulation and responces that previous line

Example "ai_file.txt"
# learn schema example

[learn_schema-stimulation_and_responce]
1,    0   : 1, 0
0,   -1   : 0, 1
0.5, -0.5 : 1, 1

# End of file

This example show 3 stimulations and responces (learn vectors), neural network has 2 inputs and 2 outputs:

learn vector 1:
neural network input in_1 has value 1
neural network input in_2 has value 0
neural network output out_1 expected value is 1
neural network output out_2 expected value is 0

learn vector 2:
neural network input in_1 has value 0
neural network input in_2 has value -1
neural network output out_1 expected value is 0
neural network output out_2 expected value is 1

learn vector 3:
neural network input in_1 has value 0.5
neural network input in_2 has value -0.5
neural network output out_1 expected value is 1
neural network output out_2 expected value is 1
 


7. Examples

Simulators, web pages, portals and programs that uses this standard:






Example 1 text file


Example 2 text file


Example 3 text file


NOTICE: Use Wordpad to open this files, not Notepad. End of line terminator is '\n' - linux standard terminator. Example files are zipped.