Skip to content

Commit fede0c4

Browse files
committed
EFEasVFE example: address code review
Changes: - Polished tone in the first cell of the notebook - Changed the mathematical notation for random variables from = to ~ - Created a new version of the graph, with all the proper equality nodes and an attention to the data that is given in the first iteration.
1 parent 2b9c524 commit fede0c4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/Advanced Examples/EFE Minimization via Message Passing/EFE Minimization via Message Passing.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"id": "ac7aaa3a-2bb3-4cea-b921-d6f178ec8e71",
1414
"metadata": {},
1515
"source": [
16-
"This notebook is a reproduction of the insightful [A Message Passing Realization of Expected Free Energy Minimization](https://arxiv.org/abs/2508.02197). The paper reformulates Expected Free Energy minimization as Variational Free Energy minimization with epistemic priors, turning a combinatorial search problem into a tractable inference problem solvable through standard message passing on factor graphs. \n",
16+
"This notebook reproduces the methodology from the paper [A Message Passing Realization of Expected Free Energy Minimization](https://arxiv.org/abs/2508.02197), which shows how Expected Free Energy minimization can be recast as Variational Free Energy minimization on factor graphs augmented with some epistemic priors, making it tractable via message passing.\n",
1717
"\n",
18-
"The goal of this notebook is to build intuition for the core implementation ideas from the ground up. We only cover the `stochastic maze` environment here; the paper covers two more worth exploring. Since the code has been mostly rewritten for didactic purposes, it doesn't always follow the [accompanying code repo](https://github.com/biaslab/EFEasVFE) conventions."
18+
"The goal of this notebook is to build intuition for the core implementation ideas from the ground up. We only cover the `stochastic maze` environment here; the paper covers two additional ones. Since the code has been mostly rewritten for didactic purposes, it doesn't always follow the [accompanying code repo](https://github.com/biaslab/EFEasVFE) conventions."
1919
]
2020
},
2121
{
@@ -1827,7 +1827,7 @@
18271827
"\n",
18281828
"which is why the paper writes:\n",
18291829
"\n",
1830-
"$$u_t = \\text{Cat}(u_t |\\sigma(H[q(x_t,x_{t-1}|u_t)] - H[q(x_{t-1}|u_t)]))$$\n",
1830+
"$$u_t \\sim \\text{Cat}(u_t |\\sigma(H[q(x_t,x_{t-1}|u_t)] - H[q(x_{t-1}|u_t)]))$$\n",
18311831
"\n",
18321832
"where the $\\sigma$ function (softmax) normalizes the distribution. \n",
18331833
"\n",
@@ -1838,7 +1838,7 @@
18381838
"\n",
18391839
"which the paper writes as:\n",
18401840
"\n",
1841-
"$$x_t = \\text{Cat}(x_t | \\sigma(-H[q(y_t|x_t)]))$$"
1841+
"$$x_t \\sim \\text{Cat}(x_t | \\sigma(-H[q(y_t|x_t)]))$$"
18421842
]
18431843
},
18441844
{
@@ -1881,7 +1881,7 @@
18811881
"metadata": {},
18821882
"source": [
18831883
"The figure below shows the factor graph for the state inference part and the first planning step (the planning structure repeats for each subsequent step):\n",
1884-
"![A graph of the model](graph.jpeg)\n",
1884+
"![A graph of the model](graph.png)\n",
18851885
"\n",
18861886
"Two aspects of this implementation deserve clarification.\n",
18871887
"\n",
Binary file not shown.
167 KB
Loading

0 commit comments

Comments
 (0)