On Logic and Generative AI-2409
On Logic and Generative AI-2409
On Logic and Generative AI-2409
This article was originally written for the June 2024 issue of the Bulletin of
European Association for Theoretical Computer Science, in the framework of the
“Logic in Computer Science” column administered by Yuri Gurevich. In the fol-
lowing pages, the article is reproduced as is.
arXiv:2409.14465v1 [cs.AI] 22 Sep 2024
Foreword by the columnist
The ongoing AI revolution raises many foundational problems. For quite a while, I
felt that the issue needs to be addressed in this column. Not being an AI expert, I
was looking for volunteers. This didn’t work, and so one day I took a deep breath
and started to write an article myself. Andreas Blass, my long-time collaborator,
was reluctant to join me, but eventually he agreed.
A hundred years ago, logic was almost synonymous with foundational studies.
I tried to rekindle that tradition in [5]. The goal of the following dialog is to
provoke young logicians with a taste for foundations to notice the foundational
problems raised by the ongoing AI revolution.
A whimsical picture of a neural net with a devil’s head by the OpenAI tool Dall-E
2
On logic and generative AI
Yuri Gurevich and Andreas Blass
University of Michigan in Ann Arbor, MI, USA
Q: I just learned that Daniel Kahneman, Nobel laureate in economics and the
author of “Thinking, fast and slow” [7], passed away on March 27, 2024. I heard
a lot about this book but have never read it. What did he mean by thinking fast
and thinking slow?
A: System 2 is much slower than System 1 and requires more effort. “While
walking comfortably with a friend, ask him to compute 23 × 78 in his head, and
to do so immediately. He will almost certainly stop in his tracks ” [7, p 74]. It is
1
The freewheeling conversations [1, 4, 10] are broken into “chapters” for the reader’s conve-
nience. Following this example, our freewheeling dialog was broken into parts at the eleventh
hour.
Below Q is Quisani, a former student of the first author, and A is the authors.
3
not surprising that often we tend to be lazy and rely on System 1 more than we
should.
§2 Is generative AI intelligent?
“I would argue they’re doing the form. They’re doing the form, they’re
doing it really, really well. And are they doing the meaning? No, probably
not. There’s lots of these examples from various groups showing that they
can be tricked in all kinds of ways. They really don’t understand the
meaning of what’s going on. And so there’s a lot of examples . . . which
show they don’t really understand what’s going on” [4, 01:34:33].
4
A: The rules of natural languages may have statistical character and may not be
written anywhere.
Q: Give me an example.
A: Also, in America, one is “in the hospital” while, in England, one is “in
hospital.” In America, the government “proposes” a law, while, in England, the
government “propose” a law.
A: Yann LeCun, along with Yoshua Bengio and Geoffrey Hinton, received the
2018 Turing Award for their work on deep learning. They are sometimes referred
to as the “Godfathers of Deep Learning.” LeCun says that LLMs, large language
models like GPT-4, aren’t truly intelligent yet (and cannot take us to
superhuman intelligence) because they essentially lack important
capabilities [10, 00:02:47]:
2. persistent memory,
3. reasoning, and
4. planning.
“That is not to say,” adds LeCun, “that autoregressive LLMs are not useful,
they’re certainly useful; or that they’re not interesting; or that we can’t build a
whole ecosystem of applications around them, of course we can. But as a path
towards human-level intelligence, they’re missing essential components.”
At this point, we heard two skeptics. What do you think?
5
Q: Gibson’s argument did not convince me too much. I am thinking about clever
extraterrestrials analysing the wet chemistry of our nervous system and
wondering do humans really understand the meaning of what’s going on? There
are lots of ways humans can be tricked into irrational behaviour.
LeCun doesn’t look to me like a true skeptic. He points out various ways to
improve the current generative AI.
Also, there is a matter of definitions, in particular the definition of intelligence.
Maybe we should be speaking about degrees of intelligence.
A: OK, let’s turn our attention to the defence of the thesis. In a recent talk,
Geoffrey Hinton made a strong case for the intelligence of the current large
language models, LLMs.
“They [LLMs] turn words into features, they make these features interact,
and from those feature interactions they predict the features of the next
word. And what I want to claim is that these millions of features and
billions of interactions between features that they learn, are understanding
...
This is the best model we have of how we understand. So it’s not like
there’s this weird way of understanding that these AI systems are doing
and then this [is] how the brain does it. The best that we have, of how the
brain does it, is by assigning features to words and having features [and]
interactions” [6, 0:14–15].
Q: Wait, there is a closely related issue: What about the future? Many AI
experts say that generative AI is getting more intelligent than humans and may
become a danger to us.
6
A: The chances are that its intelligence will be incomparable to ours. Think of
airplanes versus birds. Airplanes fly faster, but birds can land and take off
almost anywhere. On the other hand, AI develops fast and we don’t know the
directions. “It’s tough to make predictions, especially about the future,” said the
baseball philosopher Yogi Berra.
In any case, you are right. Numerous AI experts worry that generative AI may
become a danger to humans. They point out that it may be used by bad actors
for manipulating electorates and waging wars.
“But the threat I’m really worried about,” says Hinton, “is the long term
existential threat. That is the threat that these things could wipe out
humanity . . .
[W]hat happens if superintelligences compete with each other? . . . The one
that can grab the most resources will become the smartest. As soon as
they get any sense of self-preservation, then you’ll get evolution occurring.
The ones with more sense of self-preservation will win and the more
aggressive ones will win” [6, 0:21–24].
7
Q: Concerning LeCun’s item 3, what kind of reasoning is AI incapable of?
A: System 2 reasoning. An LLM is basically just two files. One is a huge data
file that reflects the information the model was trained on. The other is an
algorithm, typically succinct, which usually embodies the model architecture as
well as a probabilistic inference mechanism. That mechanism works with a
sequence of words. It starts with a given query, and runs in rounds. During one
round, it infers another word and appends it to the current sequence. (More
exactly, it works with subword tokens which are not necessarily full words.)
Sometimes the next word is obvious, but sometimes it is very hard to figure out
an appropriate next word. But the LLM cannot stop and think. In the AI
parlance, “it is allocating approximately the same amount of compute for each
token it generates” [1, 00:59:51]. In that sense it uses only fast thinking
(System 1). As far as we know, it is an open problem how to improve the process
by incorporating slow, deliberate thinking (System 2).
A: At the early stage of AI, the logic approach was dominating. A lot of good
work was done; see the article “Logic-based artificial intelligence” in the Stanford
Encyclopedia of Philosophy [15]. But then an important competitor arose. Let
us quote LeCun on the issue2 .
“In the 1950s, while the heralds of classical AI, based on logic and
tree-based exploration, were pushing back its limits, the pioneers of
learning started to make their voices heard. They defended the idea that,
if we want to make computer systems capable, like animals and humans, of
complex tasks, logic is not enough. We must get closer to the functioning
2
The French original: “Dans les années 1950, tandis que les héraults de l’intelligence artifi-
cielle classique, basée sur la logique et l’exploration arborescente, en repoussent les limites, les
pionniers de l’apprentissage commencent à donner de la voix. Ils défendent l’idée que, si l’on
veut rendre les systèmes informatiques capables de tâches complexes, à la manière de l’animal et
de l’homme, la logique ne suffit pas. Il faut se rapprocher du fonctionnement du cerveau, et donc
rendre les systèmes capables de se programmer eux-mêmes, en s’inspirant de ses mécanismes
d’apprentissage. Cette partie de la recherche fondée sur l’apprentissage profond (deep learning)
et les réseaux de neurones (artificiels) est celle à laquelle je me consacre. Elle est à l’œuvre dans
toutes les applications spectaculaires actuelles, à commencer par la voiture autonome” [9, p. 23].
8
of the brain, and therefore make the systems capable of self-programming,
drawing inspiration from their learning mechanisms. This part of research
based on deep learning and (artificial) neural networks is the one to which
I am devoted here. It is at work in all of today’s spectacular applications,
starting with the autonomous car” [9, p. 23].
§4 Real-world understanding
A: Not really.
A: Sure. Henri Lebesgue had an idea that we can build upon: there are cases
where arithmetic does not apply. “Suppose I put two animals in a cage and then
two more. How many animals will the cage then contain? [8, p. 14]” Let’s present
a version of this scenario to Google’s Gemini.
— Suppose that I put 2 animals of one kind and 3 animals of another kind into a
closed space. How many animals will be there altogether?
— Adding the number of animals of each kind together, you will have 2 + 3 = 5
animals altogether.
Q: This is ridiculous. Gemini doesn’t realize that the result depends on the
kinds of animals. For example, the two animals of the first kind may consume
some or all of the three animals of the other kind. Maybe, Gemini takes into
account only the moment that the you close the door of the closed space.
— What if I check the total number of animals not immediately but in one hour, one
day, or one month?
9
— The total number of animals (5) wouldn’t change regardless of whether you check
on them in one hour, one day, or even one month. As long as no animals enter or
leave the closed space, the initial sum of 2 and 3 will remain the same.
Q: One month is not a trivial period. Even if none of our original animals is a
predator, some of the animals may die or have young.
Q: This harks back to the issue that an LLM can’t stop and think.
A: In this particular case, the necessary thinking is algorithmic: just check the
known sources. So this hallucination seems to be a bug.
§5 Moravec’s paradox
10
solving problems on intelligence tests or playing checkers, and difficult or
impossible to give them the skills of a one-year-old when it comes to
perception and mobility.
In hindsight, this dichotomy is not surprising. Since the first multicelled
animals appeared about a billion years ago, survival in the fierce
competition over such limited resources as space, food, or mates has often
been awarded to the animal that could most quickly produce a correct
action from inconclusive perceptions. Encoded in the large, highly evolved
sensory and motor portions of the human brain is a billion years of
experience about the nature of the world and how to survive in it. The
deliberate process we call reasoning is, I believe, the thinnest veneer of
human thought, effective only because it is supported by this much older
and much more powerful, though usually unconscious, sensorimotor
knowledge. We are all prodigious olympians in perceptual and motor
areas, so good that we make the difficult look easy. Abstract thought,
though, is a new trick, perhaps less than 100 thousand years old. We have
not yet mastered it. It is not all that intrinsically difficult; it just seems so
when we do it.”
Q: I don’t buy that slow thinking is not all that intrinsically difficult. He also
seems to suggest that — given a chance and time — evolution will make slow
thinking more efficient. Taking into account how wayward evolution is, the time
in question may be humongous. But I digress.
11
observation and interaction with the real world, not through
language” [10, 00:05:12].
§6 Thinking fast
Q: All this makes the fast-thinking grasp of the real world even more interesting
and relevant. Clearly, LLMs would need such a grasp.
A: Imagine that they sent you something, say a laptop, and it arrived damaged,
that you waited for that laptop longer than promised, and that you need one
right now. A human would quickly realize that you are upset and would try to
be extra empathetic. So should the bot.
Q: Yes, and this requires reading the situation on the fly, fast thinking.
Now that I have some idea about fast thinking, I understand Yuri’s question
what the logic of fast thinking is in the February 2021 column. But is there is a
logic of fast thinking?
A: Oh, yes. For example, we intuitively judge the frequency of an event by how
easily examples come to mind, which can be influenced by recent exposure and
emotions [7, p. 244]. Such rules of thumb help us, given inconclusive perceptions,
to produce quickly an action that is often beneficial but may be detrimental.
Arguably logic should study the laws of thinking, including fast thinking,
whatever they are. The intention, in the question about the logic of fast
12
thinking, was to provoke young logicians with a taste for foundations to notice
the nascent study of fast thinking.
13
A: The most dramatic development was the invention of calculus. Its use of
infinitesimals and related notions, like infinite sums, certainly raised new logical
issues. Reasonable looking computations could contradict each other.
Q: Give me an example.
A: It took a while for mathematicians to work out notions like convergence. The
problem was actual infinity. Mathematicians used to work with finite objects and
potential infinity, never actual infinity. E.g., for Euclid, the only lines were finite
line segments.
14
A: It surely did. Andrei Kolmogorov and John von Neumann started as
logicians. Alan Turing wrote his PhD thesis in logic [16]. The universal Turing
machine suggested to von Neumann the idea of the universal electronic computer
which made logic even more popular.
In 1956, when the famous Dartmouth workshop [17] started AI as a field, logic
was at the zenith of its popularity. This is a partial explanation for the
dominance of the logic approach at the early stage of AI. By the way, the term
“artificial intelligence” was coined by John McCarthy, Marvin Minsky, Nathaniel
Rochester and Claude E. Shannon in their proposal for the Dartmouth
conference.
Q: In both cases, the birth of logic and the resolution of the foundational crisis
in mathematics, there was a need, and logic rose to the occasion. Demand
preceded supply, so to speak. Do you think that, this time around, generative AI
provides sufficient demand?
Q: Give me an example.
A: But the set of attributes may depend on the assessor; for example, a runner
may see whether P is a runner. Also, the set of values that an attribute takes
may be dynamic; for example, a child may learn only whether P is a child or an
adult — in contrast to an adult’s more precise estimate of P ’s age.
A: Rapid assessment is a case of fast thinking. In [5], Yuri asked what the logic
of fast thinking is. If and when laws of fast thinking are understood, at least to
some extent, they may help us to analyze rapid assessment.
15
A: This is an interesting question. To us, logic is the study of reasoning, any
kind of reasoning [5]. There is no doubt that the kinds of reasoning which are
relevant to AI will be studied.
A: At the moment this does not look probable. It is not predetermined what is
or is not logic. Conflicting social processes are in play. Much depends on how —
and whether — the logic community will address the challenge.
The story of infinitesimal calculus may be instructive. See a sketch of that story
in [5, §2]. After the invention of infinitesimal calculus, a question arose how to
reason with infinitesimals? For a couple of centuries, mathematicians struggled
with the problem and eventually largely solved it using the epsilon-delta
approach that essentially eliminated infinitesimals. In a sense, the mathematical
heroes of that story worked as logicians but this wasn’t recognized. This
particular story has a happy, albeit somewhat bitter, end of sorts as far as
logicians are concerned. Abraham Robinson came up with a proper logic of
infinitesimals, which he called nonstandard analysis and which allows you to
handle infinitesimals consistently [12]. But, in the meantime, mathematicians got
accustomed to the epsilon-delta approach and weren’t too much interested in
nonstandard analysis which is arguably more elegant and efficient.
A: True.
Acknowledgments
Many thanks to Naomi Gurevich, Ben Kuipers, Vladimir Lifschitz, and Moshe
Vardi for useful comments.
References
[1] Sam Altman, “OpenAI, GPT-5, Sora, Board Saga, Elon Musk, Ilya, Power,
and AGI,”
Lex Fridman Podcast #419, 18 March 2024, transcript,
https://lexfridman.com/sam-altman-2
[2] Yoshua Bengio, “One of the ‘godfathers of AI’ airs his concerns,” The
Economist July 21st 2023
16
[3] George Boole, “An investigation of the laws of thought,” Walton & Maberly
1854, https://gutenberg.org/ebooks/15114
[7] Daniel Kahneman, “Thinking fast and slow,” Farrar, Straus and Giroux 2011
[8] Henri Lebesgue, “Measure and the integral” (a translation of “La mesure
des grandeurs” and “Sur le développement de la théorie de l’intégrale”),
Holden-Day 1966
[10] Yann LeCun, “Meta AI, Open Source, Limits of LLMs, AGI & the Future of
AI,”
Lex Fridman Podcast #416, 7 March 2024, transcript,
https://lexfridman.com/yann-lecun-3-transcript
[13] Ilya Sutskever, “Deep learning,” Lex Fridman Podcast #94, 8 May 2020,
https://www.youtube.com/watch?v=13CZPWmke6A (At the time of writing,
only an auto-generated transcript is available.)
[14] Ilya Sutskever, “The Exciting, Perilous Journey Toward AGI,” TED Podcast
20 November 2023,
https://www.youtube.com/watch?v=SEkGLj0bwAU
17
[15] Richmond Thomason, “Logic-based artificial intelligence,” Stanford
Encyclopedia of Philosophy (Spring 2024 Edition), E.N. Zalta & U.
Nodelman (eds.),
https://plato.stanford.edu/archives/spr2024/entries/logic-ai/
18