system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What are the leading theories attempting to explain "Deja-vu"?
gpt
The prevailing theory is that the sensory input is stored to memory as it is being "experienced" as a live event by the brain. But sometimes, signals get delayed, and the input gets put in memory a tiny fraction of a second before it gets experienced.

When your brain is processing what you see and hear as something happening "now", it is constantly searching your memory to see if this has happened before, because our brains are wired for pattern matching as a survival mechanism.

But if what you see and hear gets to memory before your brain starts to search for similar events, then the brain gets a trigger -- "Hey, this is in memory! This might be important!" And then, the brain starts to search through its memory for the details of when this happened before -- but by then, the timing issue has resolved itself, and it can't find anytime when this happened before, except of the memory of it happening just a moment ago.

So what you are left with is the sensation of recollection without any details of what you're recollecting -- and that's exactly what deja vu is.