# Pattern Matching vs Reasoning Pattern matching is a very vague term. However, the intuition that you want articulated is that some of pattern matching is **classification**. For example, I recognize that this ball looks like other balls that I have seen before. **Reasoning**, on the other hand, is when I confront something that I have *never* seen before, and I take general knowledge that I have to interpret it. The classic version of reasoning is: > Socrates is a man. > All men are mortal > Therefore Socrates is mortal. Hence, *syllogism* is a form of reasoning (where you take some known premises and you get to a conclusion that is guaranteed by those premises). In the real world it may look like: > I have never seen coronavirus before, but people are dying from it. > Things that people die from are dangerous. > Therefore I should take some actions. This is very different from the classification approach (i.e. a neural network, or GPT) where we go to look in our “database” (neural network weights) and ask: “what have people done in the past when dealing with coronavirus?”. This of course would be meaningless because this was an entirely new virus! Now in terms of neural networks not being able to handle the coronavirus example, it is worth mention that it has some tools will allow it to give the *illusion* of reasoning. The main one is the learning of *latent variables/concepts*, which can be viewed in certain lights as a simple form of [*Abstraction*](Abstraction%20(Computer%20Science).md). For instance, just as in a CNN their are latent concepts such as “face”, “car”, “tree”, and “gorilla” that can be learned, a GPT could learn a latent concept of “disease” or “pandemic” that coronavirus, due to similarity to previous diseases/pandemics, would be mapped to. This isn’t true reasoning in the sense that it is based purely on correlations and similarities, but it can provide the illusion of reasoning. Gary Marcus goes on to say: > Neural Networks are effectively a curiosity. They can in theory memorize anything, but so what? Great. What happens when you are confronted with something that you haven’t seen before? [Reasoning vs Pattern Recognition](https://youtu.be/iccd86vOz3w?list=PLwcClAaLqrJy4wrVTB43HDlnzW-d20fUt&t=1068) * Pattern recognition is transforming data from one substrate to another. That may mean transforming gridded vision data on a planar manifold to some type of topological graph (or even some one hot vector). So pattern recognition is the *glue* (the transformations between spaces, “holding” them together) * Reasoning can be thought of as the “missing information problem”. Given a structured query, I didn’t see that ball because it was occluded, but because I am on a tennis court I fill in the missing information via some basic reasoning (that the occluded object is indeed a tennis ball). So you run a program over what you have seen and your world knowledge in order to produce the information. * Finite state machines are pattern recognition and Turing Machines are reasoning. Reasoning is an unbounded computation, whereas pattern recognition is bounded computation. --- Date: 20230111 Links to: [AI MOC](AI%20MOC.md) Tags: #review References: * [#031 WE GOT ACCESS TO GPT-3! (With Gary Marcus, Walid Saba and Connor Leahy) - YouTube](https://youtu.be/iccd86vOz3w?list=PLwcClAaLqrJy4wrVTB43HDlnzW-d20fUt&t=4202)