Skip to content

Commit fe2e954

Browse files
GNN v1 upload
Punctuation, Source file structure, and Step-by-Step examples.
1 parent cacc72f commit fe2e954

File tree

3 files changed

+196
-0
lines changed

3 files changed

+196
-0
lines changed

GNN examples ~ Step-by-Step.csv

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
GNN Section,Static Perception,Dynamic Perception,Dynamic Perception with Policy Selection,Dynamic Perception with Flexible Policy Selection
2+
Image from paper,image.png,image.png,image.png,image.png
3+
GNN version and flags,"## LanGauge
4+
v1","## LanGauge
5+
v1","## LanGauge
6+
v1","## LanGauge
7+
v1"
8+
Model name,# Static perception v1,# Dynamic perception v1,"# Dynamic perception with Policy Selection v1 ",# Dynamic perception with Flexible Policy Selection v1
9+
Model annotation,"## Model annotations
10+
Static
11+
Perception
12+
Simple
13+
Snapshot
14+
This model relates a single hidden state, to a single observable modality. It is a static model.","## Model annotations
15+
Dynamic
16+
Perception
17+
This model relates a single hidden state, to a single observable modality. It is a dynamic model because it tracks changes in the hidden state through time. ","## Model annotations
18+
Dynamic
19+
Perception
20+
Action
21+
Variational Free Energy
22+
This model relates a single hidden state, to a single observable modality. It is a dynamic model because it tracks changes in the hidden state through time. There is Action applied via pi. ","## Model annotations
23+
Dynamic
24+
Perception
25+
Action
26+
Variational Free Energy
27+
This model relates a single hidden state, to a single observable modality. It is a dynamic model because it tracks changes in the hidden state through time. There is Action applied via pi, and uncertainty about action via the beta parameter. "
28+
State space block,"## State space block
29+
D[2,1,type=float]
30+
s[2,1,type=float]
31+
A[2,2,type=float]
32+
o[2,1,type=float]","## State space block
33+
D[2,1,type=float]
34+
B[2,1,type=float]
35+
s_t[2,1,type=float]
36+
A[2,2,type=float]
37+
o_t[2,1,type=float]
38+
t[1,type=int]","## State space block
39+
A[2,2,type=float]
40+
D[2,1,type=float]
41+
B[2,len(π), 1,type=float]
42+
π=[2]
43+
C=[2,1]
44+
G=len(π)
45+
s_t[2,1,type=float]
46+
o_t[2,1,type=float]
47+
t[1,type=int]","## State space block
48+
A[2,2,type=float]
49+
D[2,1,type=float]
50+
B[2,len(π),1,type=float]
51+
π=[2]
52+
C=[2,1]
53+
G=len(π)
54+
s_t[2,1,type=float]
55+
o_t[2,1,type=float]
56+
t[1,type=int]"
57+
Connections,"## Connections among variables
58+
D-s
59+
s-A
60+
A-o","## Connections among variables
61+
D-s_t
62+
s_t-A
63+
A-o
64+
s_t-B
65+
B-s_t+1","## Connections among variables
66+
D-s_t
67+
s_t-A
68+
A-o
69+
s_t-B
70+
B-s_t+1
71+
C>G
72+
G>π","## Connections among variables
73+
D-s_t
74+
s_t-A
75+
A-o
76+
s_t-B
77+
B-s_t+1
78+
C>G
79+
G>π
80+
E>π
81+
β-γ
82+
γ>π"
83+
"Initial parameterization ","Initial Parameterization
84+
85+
D={0.5,0.5}
86+
87+
o={1,0}
88+
89+
A={(.9,.1),(.2,.8)}","## Initial Parameterization
90+
",## Initial Parameterization,Initial Parameterization
91+
Equations,"## Equations
92+
\text{softmax}(\ln(D)+\ln(\mathbf{A}^\top o))
93+
","## Equations
94+
s_{tau=1}=softmax((1/2)(ln(D)+ln(B^dagger_tau*s_{tau+1})+ln(trans(A)o_tau)
95+
96+
s_{tau>1}=softmax((1/2)(ln(D)+ln(B^dagger_tau*s_{tau+1})+ln(trans(A)o_tau)","Equations
97+
98+
s_{pi, tau=1}=sigma((1/2)(lnD+ln(B^dagger_{pi, tau}s_{pi, tau+1}))+lnA^T*o_tau)
99+
100+
s_{pi, tau>1}=sigma((1/2)(ln(B_{pi, tau-1}s_{pi, tau-1})+ln(B^dagger_{pi, tau}s_{pi, tau+1}))+lnA^T*o_tau)
101+
102+
G_pi=sum_tau(As_{pi, tau}(ln(A*s_{pi, tau})-lnC_tau)-diag(A^TlnA)*s_{pi, tau})
103+
104+
pi=sigma(-G)","Equations
105+
106+
F_pi = sum_tau (s_{pi, tau} * (ln(s_{pi, tau}) - (1/2)(ln(B_{pi, tau-1}s_{pi, tau-1}) + ln(B^dagger_{pi, tau}s_{pi, tau+1})) - A^To_tau))
107+
108+
pi_0=sigma(lnE-gamma*G)
109+
110+
pi=sigma(lnE-F-gamma*G)
111+
112+
p(gamma)=Gamma(1,beta)
113+
114+
E[gamma]=gamma=1/beta
115+
116+
beta=beta-beta_{update}/psi
117+
118+
beta_{update}=beta-beta_0+(pi-pi_0)*(-G)"
119+
Time,"## Time
120+
Static","## Time
121+
Dynamic
122+
s_t=DiscreteTime
123+
ModelTimeHorizon=Unbounded","## Time
124+
Dynamic
125+
s_t=DiscreteTime
126+
ModelTimeHorizon=Unbounded","## Time
127+
Dynamic
128+
s_t=DiscreteTime
129+
ModelTimeHorizon=Unbounded"
130+
ActInf Ontology annotation,"## Active Inference Ontology
131+
A=RecognitionMatrix
132+
D=Prior
133+
s=HiddenState
134+
o=Observation
135+
","## Active Inference Ontology
136+
A=RecognitionMatrix
137+
B=TransitionMatrix
138+
D=Prior
139+
s=HiddenState
140+
o=Observation
141+
t=Time
142+
","## Active Inference Ontology
143+
A=RecognitionMatrix
144+
B=TransitionMatrix
145+
C=Preference
146+
D=Prior
147+
G=ExpectedFreeEnergy
148+
s=HiddenState
149+
o=Observation
150+
π=PolicyVector
151+
t=Time
152+
","## Active Inference Ontology
153+
A=RecognitionMatrix
154+
B=TransitionMatrix
155+
C=Preference
156+
D=Prior
157+
E=Prior on Action
158+
G=ExpectedFreeEnergy
159+
s=HiddenState
160+
o=Observation
161+
π=PolicyVector
162+
t=Time"
163+
Footer,# Static perception v1,# Dynamic perception v1,"# Dynamic perception with Policy Selection v1 ",# Dynamic perception with Flexible Policy Selection v1
164+
Signature,,,,

GNN Punctuation.csv

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Symbol,Meaning,Example Use,Meaning of Example
2+
^,A caret means superscript.,X^Y,X with a superscript Y
3+
",",A comma is used to separate items in a list.,"X,Y",List with X and Y as elements
4+
##,A double hashtag signals a new section in the Markdown file.,## Section123,Has “Section123” as a section name
5+
#,A hashtag signals the title header in the Markdown file.,"## Title123 ",Has “Title123” as model title
6+
###,A triple hashtag is a comment line in the Markdown file.,### Comment123,Has “Comment123” as a comment
7+
{ },Curly brackets are specification of exact values for a variable.,X{1},X is a scalar with value of 1
8+
-,Hypen is an undirected causal edge between two variables.,X-Y,Undirected causal edge between X and Y
9+
( ),Parentheses are used to bound other expressions.,X^(Y_2),X with a superscript that is Y with a subscript 2
10+
[ ],"Rectangular brackets define the dimensionality, or state space, of a variable.","X[2,3]","X is a matrix with dimensions (2,3)"
11+
=,"The equals sign declares the two side of the = to be equal. ",X=5,Sets the variable X to value of 5
12+
>,The greater than symbol represents a directed causal edge between two variables.,X>Y,Unidirectional causal edge from X to Y
13+
_,Underscore means subscript.,X_2,X with a subscript 2

GNN source file structure.csv

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
GNN Section,Section Meaning,Controlled Terms
2+
Image from paper,"Shows the image of the graphical model, if one exists.",
3+
GNN version and flags,Describes which specification of LanGauge is being used.,
4+
Model name,Gives a name for the model being expressed.,
5+
Model annotation,"Plaintext caption or annotation for the model. This is a free metadata field which does not need to use any formal or controlled language. ",
6+
State space block,"Describes all variables in the model, and their state space (dimensionality). ",
7+
Connections,Describes edges among variables in the graphical model.,
8+
"Initial parameterization ","Provides the initial parameter values for variables.
9+
",
10+
Equations,"Describes any equations associated with the model, written in LaTeX. These equations are at least rendered for display, and further can actually specify relationships among variables. ",
11+
Time,"Describes the model’s treatment of Time. ","“Static” → Is a static model.
12+
“Dynamic” → Is a dynamic model.
13+
DiscreteTime=X_t → Specifies X_t as the temporal variable in a discrete time model.
14+
ContinuousTime=X_t → Specifies X_t as the temporal variable in a continuous time model.
15+
ModelTimeHorizon=X → Specifies X as the time horizon for finite-time modeling. "
16+
ActInf Ontology annotation,"Connects the variables to their associated Active Inference Ontology term, for display and model juxtaposition.","Variables in this section are associated with one or more terms from the Active Inference Ontology.
17+
For example “C=Preference” means that the C variable plays the role of the Preference variable. "
18+
Footer,"Closes the file and allows read-in from either end. ",
19+
Signature,"Cryptographic signature block (can have information regarding the completeness or provenance of the .S file). ",

0 commit comments

Comments
 (0)