rolisz's site

Cracking the human memory

Brain

Photo by Robina Weermeijer on Unsplash

I’ve never had a par­tic­u­lar­ly good memory, despite what others might claim. While many times others are astonished that I remember something, often I am just able to find a pattern or a logical reasoning behind something and then I can deduce it when needed. Myself, I am astonished by the memorizing ca­pa­bil­i­ties of my smart wife, who finished pharmacy school a couple of months ago. Comparing her exams, where she had to memorize long chemical reactions, to my exams, where most of the time I had to memorize a couple basic things and then the rest could be derived, it’s clear she has a much better memory.

While in highschool, when I was doing lots of physics, going to com­pe­ti­tions and doing pretty well at a national level, I still had trouble memorizing some of the formulas I needed. I never actually invested time in memorizing them, instead re­mem­ber­ing some “logical things”, such as the focal length formula is all inverses, or the grav­i­ta­tion­al force is sym­met­ri­cal and is pro­por­tion­al to masses, so things must look so and so. Many of the formulas I eventually memorized, but simply by brute forcing it: I wrote them down while solving exercise so many times, that they ended up getting “burned” into my memory. Recently I helped my sister-in-law with her high school physics classes and in many cases as soon as I looked at a problem, I knew the answer, but figuring out the reasoning behind it and explaining it took much longer.

It’s a similar story with pro­gram­ming. I have been pro­gram­ming for more than 10 years. In particular, I’ve been working in Python for around 8 years. And yet I still can’t remember some basic APIs that I’ve used a 1000 times. Recently I had to look up how to delete a file in Python. Whenever I need to use the path ma­nip­u­la­tion API in Python, I have to look up the docs. Even in highschool, when I wrote my own PHP framework, I didn’t remember a lot of the API. Because Python has a fairly simple syntax, I don’t really have problems with it, but in other languages, that have more syntactic elements, such as Rust, I constantly kept forgetting even simple things such as how to declare an Enum.

Bible

Photo by Aaron Burden on Unsplash

While these can all be ra­tio­nal­ized away, because Stack­Over­flow is one Google away and can tell us everything a programmer needs to know to solve “all” problems that appear on the job, there is another domain where I feel that my memory impaired me more. For a long time I have wanted to memorize more Bible verses. The Bible itself is full of ex­hor­ta­tions along these lines (Psalm 119:105: “I have stored up your word in my heart, that I might not sin against you.”, Deuteron­o­my 11:18 “You shall therefore lay up these words of mine in your heart and in your soul”). I’ve set this as a goal for myself many times (in 2016, in 2017 and in 2018), but every time I failed miserably. I tried writing flash cards with the verses that I wanted to memorize, but sooner or later I would forget about them. Or the verses would be too long and I would find them really hard to memorize at once. All kinds of problems.

But this year I ran into several articles about “fixing” our memory. One of them is from Michael Nielsen, a really smart guy, writing about all kinds of things, from se­ques­ter­ing carbon dioxide from the atmosphere, to quantum computing, to machine learning. In his article he describes a bit how memory works and how he is augmenting it to memorize all kinds of things. Among other things, he is using it to read scientific articles and understand them better, and to memorize pro­gram­ming APIs and he explains why it’s not a waste of time to do this.

Also this year, a visitor to our church issued a challenge to the youth to memorize a book from the New Testament. This really motivated me to finally do this, so I decided to learn the letter to the Galatians. I knew my previous attempts had failed, so I needed some new methods, such as the ones described by Michael Nielsen.

The Spaced Repetition method

I had previously heard about Spaced Repetition memorizing. I tried it for a little and I had some success for using it while learning German. But it requires effort to create your study decks, it’s not as simple as just reading something, so my past efforts quickly petered out. But this time I had the motivation (the challenge) and some additional in­for­ma­tion on how to best apply this, and I have suc­cess­ful­ly applied it for the last two months.

The idea behind spaced repetition is that memory decays along an ex­po­nen­tial curve and each time you recall something, you boost the strength of that memory and make the forgetting curve less steep. The best results are obtained if you recall something just as you were about to forget it.

Forgetting curve

Graph by Michael Nielsen

To exploit this, you have to review the factoids of knowledge that you want memorized on an increasing schedule. After you memorize it once, you review it the next day, then after 2 days, then after 4, and so on. If you make a mistake, you start again, by reviewing it the following day. This formula can be tweaked, if you have a hard time re­mem­ber­ing something, you might want to review it sooner, if it came to mind instantly, you can review it much later.

Some people have done this with paper cards and boxes, but now we have a much better tool that does all the scheduling for us: Anki. There are other Space Repetition Software (SRS) out there, but Anki is the best known, has a rich community, has many plugins, and in general gets the job done well.

Applying SRS to Bible verses

As I said, I had used Anki in the past, and I did learn German words with it. But I knew that that approach would not work well for memorizing Bible verses, simply because questions of the form “Galatians 2:2” -> “I went up because of a revelation and set before them (though privately to those that seemed in­flu­en­tial) the gospel that I proclaim among the Gentiles, in order to make sure that I was not running or had not run in vain.” are too com­pli­cat­ed. One small mistake and the whole card is gone.

The missing link was cloze questions. They enable you to take one longer text and break it up into smaller pieces that you will be tested on. Anki generates cards for each of the fragments you define and each card has one fragment missing. Our previous example would become:

Galatians 2:2 {{c1::I went up because of a revelation}} {{c2::and set before
them}} ({{c3::though privately before those who seemed influential}}) {{c4::the
gospel that I proclaim among the Gentiles}}, {{c5::in order to make sure}}
{{c6::I was not running}} {{c7::or had not run in vain.}}

This would be turned by Anki au­to­mat­i­cal­ly into the following cards:

Galatians 2:2 ... and set before them though privately before those who seemed
influential) the gospel that I proclaim among the Gentiles, in order to make
sure I was not running or had not run in vain.
Galatians 2:2 I went up because of a revelation ... (though privately before
those who seemed influential) the gospel that I proclaim among the Gentiles,
in order to make sure I was not running or had not run in vain.

And so on for the other 5 fragments.

These cloze fragments can’t be generated randomly and I found that choosing them well is critical for memorizing a verse. If you make the fragments too long or if you break up on “odd” boundaries, they become much harder to memorize. For example, if in the above example I had

{{c1::I went up because of a revelation and set}} {{c2::before them (though privately}} 
{{c3:: before those who seemed influential}})

In this case, the second fragment “before them (though privately” would be quite hard to memorize correctly, because it actually belongs to two different ideas. Ideally, you have one idea per fragment. Of course, in some cases, an idea is too long and has to be split into multiple fragments. And sometimes, the boundaries are not as clear, but some logical con­sis­ten­cy must be seeked.

Results

I have had great success with this method. I have started learning the letter to the Galatians at the beginning of November. As of today I have suc­cess­ful­ly memorized the entire first chapter and the first eight verses of the second chapter, with around 5.2 minutes spent per day. In total I spent 4 hours memorizing this. I have tested myself outside of Anki, and I have an accuracy of about 90%. Most of my mistakes are things like mixing up “and”/”but” or sometimes the tenses of verbs.

I am astonished how well Anki works. I didn’t expect to be able to learn a text just like it. I like this new found power of memorizing things so much, that I actually started to apply it to other things. For example, last year I learned to solve the Rubik’s cube, but because I didn’t practice for a while, I kinda forgot. So I created an Anki deck with the steps. I have a deck for mis­cel­la­neous life things, such as the zip code where I live, which I always forget and I need to add it for online orders.

I also made some decks for pro­gram­ming languages. I am learning Rust, so I add there common things that I should know. I have a deck for Python, where I add things which I should already know, but I keep searching for.

As Michael Nielsen said, using spaced repetition “means memory is no longer a haphazard event, to be left to chance. Rather, it guarantees I will remember something, with minimal effort. That is, Anki makes memory a choice." I love having this choice, to be able to memorize things, so I plan to continue Anki for quite a while.