Skip to content

Commit acd0ffa

Browse files
committed
template for Hopfield Network Assignment
1 parent fe7f7e9 commit acd0ffa

File tree

1 file changed

+198
-0
lines changed

1 file changed

+198
-0
lines changed
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {
6+
"id": "view-in-github",
7+
"colab_type": "text"
8+
},
9+
"source": [
10+
"<a href=\"https://colab.research.google.com/github/ContextLab/memory-models-course/blob/main/content/assignments/Assignment_1%3AHopfield_Networks/hopfield_assignment_template.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"id": "4112dba2",
16+
"metadata": {
17+
"id": "4112dba2"
18+
},
19+
"source": [
20+
"# Assignment 1: Hopfield Networks\n",
21+
"\n",
22+
"This notebook provides a suggested starter template for completing the [Hopfield network assignment](https://contextlab.github.io/memory-models-course/assignments/Assignment_1%3AHopfield_Networks/README.html).\n",
23+
"\n",
24+
"You should submit your assignment by uploading your completed notebook to [Canvas](https://canvas.dartmouth.edu/courses/71051/assignments/517353). Please ensure that your notebook runs without errors in [Google Colaborator](https://colab.research.google.com/)."
25+
]
26+
},
27+
{
28+
"cell_type": "markdown",
29+
"id": "13a772fc",
30+
"metadata": {
31+
"id": "13a772fc"
32+
},
33+
"source": [
34+
"## Setup\n",
35+
"\n",
36+
"Import necessary libraries and define helper functions."
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": null,
42+
"id": "3487ab4e",
43+
"metadata": {
44+
"id": "3487ab4e"
45+
},
46+
"outputs": [],
47+
"source": [
48+
"import numpy as np\n",
49+
"import matplotlib.pyplot as plt\n",
50+
"\n",
51+
"# Define any helper functions here"
52+
]
53+
},
54+
{
55+
"cell_type": "markdown",
56+
"id": "a38cd155",
57+
"metadata": {
58+
"id": "a38cd155"
59+
},
60+
"source": [
61+
"## Task 1: Memory Storage and Retrieval\n",
62+
"\n",
63+
"Implement the Hebbian learning rule and update dynamics."
64+
]
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": null,
69+
"id": "49999427",
70+
"metadata": {
71+
"id": "49999427"
72+
},
73+
"outputs": [],
74+
"source": [
75+
"# TODO: Implement memory storage (Hebbian rule) and retrieval update rule here"
76+
]
77+
},
78+
{
79+
"cell_type": "markdown",
80+
"id": "ea862e41",
81+
"metadata": {
82+
"id": "ea862e41"
83+
},
84+
"source": [
85+
"## Task 2: Small Network Test\n",
86+
"\n",
87+
"Use a small network with $N = 5$ to test memory storage and retrieval."
88+
]
89+
},
90+
{
91+
"cell_type": "code",
92+
"execution_count": null,
93+
"id": "3e5fb216",
94+
"metadata": {
95+
"id": "3e5fb216"
96+
},
97+
"outputs": [],
98+
"source": [
99+
"# TODO: Encode and test small network with noisy inputs"
100+
]
101+
},
102+
{
103+
"cell_type": "markdown",
104+
"id": "5c170918",
105+
"metadata": {
106+
"id": "5c170918"
107+
},
108+
"source": [
109+
"## Task 3: Evaluate Storage Capacity\n",
110+
"\n",
111+
"Test how performance varies with network size and number of memories."
112+
]
113+
},
114+
{
115+
"cell_type": "code",
116+
"execution_count": null,
117+
"id": "97192fac",
118+
"metadata": {
119+
"id": "97192fac"
120+
},
121+
"outputs": [],
122+
"source": [
123+
"# TODO: Run multiple trials and generate heatmap + expectation plot"
124+
]
125+
},
126+
{
127+
"cell_type": "markdown",
128+
"id": "84937332",
129+
"metadata": {
130+
"id": "84937332"
131+
},
132+
"source": [
133+
"## Task 4: Cued Recall\n",
134+
"\n",
135+
"Simulate associative memory with cue-response pairs."
136+
]
137+
},
138+
{
139+
"cell_type": "code",
140+
"execution_count": null,
141+
"id": "51395b97",
142+
"metadata": {
143+
"id": "51395b97"
144+
},
145+
"outputs": [],
146+
"source": [
147+
"# TODO: Implement A-B memory pairs and test cued retrieval"
148+
]
149+
},
150+
{
151+
"cell_type": "markdown",
152+
"id": "76339e63",
153+
"metadata": {
154+
"id": "76339e63"
155+
},
156+
"source": [
157+
"## Task 5: Contextual Drift\n",
158+
"\n",
159+
"Simulate sequential memories with gradually shifting contexts."
160+
]
161+
},
162+
{
163+
"cell_type": "code",
164+
"execution_count": null,
165+
"id": "be69a9df",
166+
"metadata": {
167+
"id": "be69a9df"
168+
},
169+
"outputs": [],
170+
"source": [
171+
"# TODO: Implement drifting context memory and analyze retrieval bias"
172+
]
173+
},
174+
{
175+
"cell_type": "markdown",
176+
"id": "43278d97",
177+
"metadata": {
178+
"id": "43278d97"
179+
},
180+
"source": [
181+
"## Discussion\n",
182+
"\n",
183+
"Summarize your findings, observations, and any interesting results."
184+
]
185+
}
186+
],
187+
"metadata": {
188+
"language_info": {
189+
"name": "python"
190+
},
191+
"colab": {
192+
"provenance": [],
193+
"include_colab_link": true
194+
}
195+
},
196+
"nbformat": 4,
197+
"nbformat_minor": 5
198+
}

0 commit comments

Comments
 (0)