Decision Rules vs. Pattern Matching
two approaches to artificial intelligence; and why LLMs are not human
Suppose you want to develop a computer program that will never lose a game as the second player, O, in Tic-Tac-Toe. There are two approaches. One uses decision rules and the other uses pattern matching.
Decision rules are coded in the form of if-then statements. “If X opens by moving to a corner, then move to the center. If X opens by moving to the center, then move to the top-left corner.”
Pattern matching means giving the computer a bunch of sample games and having it select moves that most often avoid a loss. It will soon figure out that when X opens by moving to a corner, draws occur more often when O responds by moving to the center.
To take a more complex example, consider looking over a credit report in order to decide whether or not to approve an application for a loan, such as a mortgage. You could train the computer to use decision rules, such as “deny the loan if over the past three years the borrower has had at least two delinquencies of 60 days or more on credit cards.” Or you could give the computer a large dataset of credit reports on loans that were approved and the subsequent performance of those loans.1 The computer then searches for patterns in the data.
It turns out that pattern matching has an advantage in loan underwriting. Human underwriters never realized that “number of inquiries” is a major risk factor for a potential borrower. Using pattern matching, credit scoring firms discovered that if a borrower is applying for credit at many places at once, then this is a sign of distress.
I would speculate that for humans, pattern-matching is related to what Daniel Kahneman calls “system one,” the rapid intuitive response. Rule-based systems are more analogous to “system two,” where we reflect and process inputs more carefully. Something ahead of me seems to match the pattern of a snake, so system one causes me to flinch. But as I take a couple of steps closer, system two kicks in and says, “If it were a snake, it would move. I’ve never seen a snake on this path, but I’ve seen lots of sticks. This thing is brown, and it’s not moving. I bet it’s a stick.”
Large language models rely primarily on pattern matching. When I asked chatGPT-3 to write a short biography of “economist Arnold Kling,” it recognized the pattern that profiles of economists usually say where they got their education. So it said “Arnold Kling attended ” which was an appropriate phrase to use. But then it screwed up, saying “Harvard.” It’s impossible to know exactly why, but here is one guess. I went to Swarthmore College, which has very few students, and therefore rarely shows up in text about economists. But Harvard shows up a lot more often, so the LLM thought that the most plausible next word was Harvard.
A rule-based system would have known to look up where Arnold Kling went to college, not just guess based on the fact that “Harvard” appears in the same sentence with “economist” more often than does “Swarthmore.” It is because they rely so much on pattern-matching that LLMs “hallucinate.”
Chatbots are corrected by a method called “reinforcement learning/human feedback.” For example, suppose you asked a chatbot to write a rap song about the recent contretemps regarding Harvard’s ex-President. It might come back with lyrics that refer to her as a Ho’, or that use the N-word. After all, rappers often use that sort of language. You would use RLHF to get the chatbot to change its behavior. Sort of like when my third grade teacher made me write “I will not talk in class” on the blackboard 100 times.
To clean up the chatbot’s language, one could use a rule-based overlay that keeps it from ever saying “Ho’” or using the N-word. Alternatively, you might overload its training data with many, many examples of rap lyrics that use only clean language, so that when it does pattern matching, it will be unlikely to choose a dirty word.
The reason that chatbots seemed to come out of nowhere is that you would not expect pattern matching to work as well as it does. With a rule-based system, you could be sure that the chatbot responds with useful content. But with pattern matching, you might expect it to respond with legible, grammatically correct random nonsense. Instead, it seems that given really massive amounts of text to work with and a lot of computing power, the chatbot responds to prompts in a reasonable way.
Because they use pattern matching, chatbots can be more flexible than rule-based systems. Like humans, they can be creative by mixing and matching patterns.
I regard the early Beatles not as some out-of-nowhere musical innovation, but as a mixture of their influences. “Can’t Buy Me Love” is Everly Brothers singing layered over Chuck Berry’s rhythm-and-blues musical phrasing. Similarly, an LLM could try out different combinations of influences, either if prompted to do so or on its own.
Strengths and Weaknesses
I think that understanding that LLMs rely on pattern matching rather than rules will give us a better idea of their strengths and weaknesses. For example, in looking up information, rule-based systems will tend to be more reliable. If your goal is to use an LLM to replace Google, prepare to be disappointed.
For role playing, the pattern-matching approach will probably work well. The potential for using LLMs to depict characters for movies and games appears staggering.
Visionaries have raised hopes for media-based education since the age of television. But in order to learn, you need more than just access to information. People need motivation and guidance. If, and I emphasize if, chatbots can take on many different personalities in order to provide feedback, encouragement, and empathy, then they may be able to finally solve the challenge of enabling everyone to learn without a human teacher.
In addition, I argue that LLMs have a “superpower” in that they can communicate between humans and computers without humans having to learn the computer’s language. Early adopters are using this superpower to dramatically improve their productivity in applications that involve computer use. For example, see Seth Stephens-Davidowitz as interviewed by Razib Khan.
Many of us foresee that this will be a real boon for makers of robots. Imagine teaching a robot a new behavior by just talking to it, without having to write code.
Not Human Intelligence
When I see LLMs as using pattern matching, I do not see them as having human intelligence. When humans match patterns, we build models to explain the patterns. As economist Edward Leamer says, we are pattern-seeking and storytelling animals. Of course, an LLM could be prompted to emit a story to describe a pattern. But it is not sitting there automatically thinking up stories the way that you or I would. I think therein lies an important difference between LLMs and humans.
As a human, I am aware of my thought process. I do not need the carrot and stick of external RLHF to change my thought process. I can instead reflect and re-think. I can give a rule-based, system 2 narrative for much of my behavior. I can explain to you how I wrote this essay. (Of course, psychology researchers tell us that when we describe our thought process we might be self-deceiving or merely rationalizing.)
I will grant that an LLM can appear to do all of these things. To demonstrate this, I asked ChatGPT4 a question, and then I asked it to explain how it came up with its answer. I first asked
What three changes to our election system would make it work better?
I will put its answer in a footnote.2
Then I said,
Interesting. How did you come up with that answer?
To formulate an answer about potential improvements to an election system, I drew upon a combination of principles from political science, public policy, and examples observed in various electoral systems around the world. My response is based on commonly discussed themes and recommendations in the field of electoral reform, which include:
Ranked-Choice Voting (RCV): RCV is a topic of growing interest in electoral studies. It's been implemented in various jurisdictions and is often discussed in academic and policy circles as a way to address issues like vote splitting and the "spoiler effect."
Campaign Finance Reform: The influence of money in politics is a well-established area of concern and study in political science. Campaign finance reform is frequently suggested as a means to reduce perceived corruption and increase fairness in the electoral process.
Enhancing Voter Access and Participation: This aspect is based on the democratic principle of broad participation in the electoral process. Efforts to increase voter access and participation are central to discussions about democratic deepening and the legitimacy of electoral processes.
These ideas are not exhaustive or universally agreed upon solutions, but they represent a synthesis of widely discussed concepts in the realm of electoral reform. The specific applicability and effectiveness of these ideas can vary greatly depending on the context and the existing political and legal framework of a country or region.
So the chatbot can give a pretty good impersonation of someone who thinks about what he is thinking. I just refuse to believe that it is actually doing that. I think it is just pattern-matching.
substacks referenced above:
@
To get a richer data set, you might approve some loans that an underwriter believes are likely to go bad, just to see how they actually perform.
ChatGPT
Improving an election system can depend on various factors such as the existing structure, legal framework, and socio-political context of a country. However, three general changes that are often considered to potentially enhance the effectiveness and fairness of election systems include:
Implementation of Ranked-Choice Voting (RCV): This system allows voters to rank candidates in order of preference. If no candidate wins a majority of first-preference votes, the candidate with the fewest first-preference votes is eliminated, and second-choice votes are reallocated until a candidate achieves a majority. This method can reduce polarization, encourage more moderate candidates, and ensure that the elected candidate has broad support.
Strengthening Campaign Finance Regulations: Implementing stricter regulations on campaign financing can help reduce the influence of money in politics. This might include limiting the amount of money individuals, corporations, or political action committees can contribute to campaigns, improving transparency in funding sources, and providing public funding options for campaigns. These measures can help level the playing field and reduce the disproportionate influence of wealthy donors and special interest groups.
Enhancing Voter Access and Participation: Measures such as automatic voter registration, making Election Day a national holiday, offering early voting and mail-in ballots, and ensuring adequate polling places can increase voter turnout. These changes aim to make voting more accessible and convenient for everyone, particularly for those who might face barriers such as work obligations, health issues, or transportation challenges.
It's important to note that the effectiveness of these changes can vary based on the specific context of each country or region. Additionally, the implementation of these changes often requires legal and constitutional amendments, as well as broad public and political support.
Another fact about LLMs is that they learn once and then the model weights are frozen. Not really a human analogue
Peter Norvig wrote on this topic many years ago (http://norvig.com/chomsky.html) in an essay that aged well, I think. Chomsky takes a rules based approach, where llms use statistics. I feel like a fusion of the ideas could improve performance in many areas.