<p>When we read a sentence we don't "pay attention to" each letter and the structure of each letter and the placement of the letter and color and lighting and all that. We just "end up with" the <em>meaning</em> of the sentence.</p>

<p>From a computational perspective, you would parse the sentence into "tokens", convert those tokens into a tree of nouns and verbs and such, resolve the ambiguities, etc. All of this process requires a lot of <em>data structures</em>. That is, you need trees pointing to strings, and trees pointing to other trees, etc. This could create dozens of intermediate data structures. In the end you want a final data structure with the meaning. But now we have all these intermediate structures we don't really need anymore. What is needed is some sort of <a href="https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)" rel="nofollow noreferrer"><em>garbage collection</em></a>.</p>

<p>So I'm wondering how the brain deals with this. How the brain "loses" or "forgets" or "discards" the intermediate information when parsing a sentence (or interpreting other visual or auditory information). Wondering how it knows to not permanently store that information, which would end up overcrowding our brain quickly. Wondering how it "ends up with" the final appropriate data structure. At least at a high level.</p>

CC BY-SA 4.0
2018-06-07T06:23:18.287Z
We frequently seem to get questions on this forum comparing the brain to a classical computer. But most modern computer programmers are at least somewhat familiar with neural networks (for machine learning). Artificial neural networks are loosely based on the way the brain (a biological neural network) works, so if you have an understanding of neural networks, then think about how Siri or Watson parse sentences, and you'll realize it doesn't require any garbage collection.
Arnon Weinberg
CC BY-SA 4.0
2018-06-10T18:08:53.047Z
@ArnonWeinberg - given the upvotes on your comment, could you turn it into an answer? Don't worry too much about sourcing, as I think it's the best (and only) answer that will come out of this question.
AliceD
CC BY-SA 4.0
2018-06-11T01:09:36.070Z
Sure @AliceD, let's give it a few more days, and if no one wants to take it, then my thinking is I'll add a more general question (and answer - community-style) about the brain-computer comparison, and maybe mark this question a duplicate of that, as well as similar questions that may come up in the future.
Arnon Weinberg
CC BY-SA 4.0
2018-06-17T01:21:43.310Z
@ArnonWeinberg Based on this stackoverflow question, I think it is *automatic* garbage collection that is not used in iOS; memory management is in the hands of the programmer: https://stackoverflow.com/q/6385285/6055422 However, I don't program these devices.
Frank Hubeny
CC BY-SA 4.0
2018-06-17T23:43:32.010Z
I added a general q&a for this topic here: https://psychology.stackexchange.com/q/19983/7001 - if the community likes it, then this question can be closed as a duplicate of that.
Arnon Weinberg
<cognitive-psychology><memory><language><language-processing>
How the Brain Does Garbage Collection in Real Time
Lance Pollard
# How the Brain Does Garbage Collection in Real Time

(Asked by: username_0 on 2018-06-07)

When we read a sentence we don't "pay attention to" each letter and the structure of each letter and the placement of the letter and color and lighting and all that. We just "end up with" the *meaning* of the sentence.

From a computational perspective, you would parse the sentence into "tokens", convert those tokens into a tree of nouns and verbs and such, resolve the ambiguities, etc. All of this process requires a lot of *data structures*. That is, you need trees pointing to strings, and trees pointing to other trees, etc. This could create dozens of intermediate data structures. In the end you want a final data structure with the meaning. But now we have all these intermediate structures we don't really need anymore. What is needed is some sort of [*garbage collection*](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)).

So I'm wondering how the brain deals with this. How the brain "loses" or "forgets" or "discards" the intermediate information when parsing a sentence (or interpreting other visual or auditory information). Wondering how it knows to not permanently store that information, which would end up overcrowding our brain quickly. Wondering how it "ends up with" the final appropriate data structure. At least at a high level.

**Tags:** cognitive-psychology, memory, language, language-processing

> **Comments:**
> **username_1**: We frequently seem to get questions on this forum comparing the brain to a classical computer. But most modern computer programmers are at least somewhat familiar with neural networks (for machine learning). Artificial neural networks are loosely based on the way the brain (a biological neural network) works, so if you have an understanding of neural networks, then think about how Siri or Watson parse sentences, and you'll realize it doesn't require any garbage collection.  
> **username_2**: @ArnonWeinberg - given the upvotes on your comment, could you turn it into an answer? Don't worry too much about sourcing, as I think it's the best (and only) answer that will come out of this question.  
> **username_1**: Sure @username_2, let's give it a few more days, and if no one wants to take it, then my thinking is I'll add a more general question (and answer - community-style) about the brain-computer comparison, and maybe mark this question a duplicate of that, as well as similar questions that may come up in the future.  
> **username_3**: @ArnonWeinberg Based on this stackoverflow question, I think it is *automatic* garbage collection that is not used in iOS; memory management is in the hands of the programmer: https://stackoverflow.com/q/6385285/6055422 However, I don't program these devices.  
> **username_1**: I added a general q&a for this topic here: https://psychology.stackexchange.com/q/19983/7001 - if the community likes it, then this question can be closed as a duplicate of that.  

---

## 0 answers

