<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kevin Zatloukal on Medium]]></title>
        <description><![CDATA[Stories by Kevin Zatloukal on Medium]]></description>
        <link>https://medium.com/@kczat?source=rss-23a569c90e28------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*K8B5g3VqSm-rkyga.jpg</url>
            <title>Stories by Kevin Zatloukal on Medium</title>
            <link>https://medium.com/@kczat?source=rss-23a569c90e28------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 00:37:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kczat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The First Impacts of AI]]></title>
            <link>https://kczat.medium.com/the-first-impacts-of-ai-ea0c13eb77d2?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea0c13eb77d2</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 18:22:08 GMT</pubDate>
            <atom:updated>2025-06-23T18:22:08.269Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been over a year since my <a href="https://kczat.medium.com/myths-and-reality-of-ai-writing-code-5094862dbedc">last article</a> on AI. During that time, I have been dragging my feet, not due to a lack of ideas and opinions, but because I want to share ideas that I hold and can defend with some certainty. It hardly seems helpful to add yet another article speculating on where AI will be 12 months from now. You can already find speculation ranging from “achieving full AGI” or “entering another AI Winter”. (The real answer, of course, is no one knows.)</p><p>In comparison to all that speculation, I feel good about my <a href="https://kczat.medium.com/limits-to-super-intelligence-a0c7b5ff22e6">2023 prediction</a> that ChatGPT-like models would <em>never</em> be better at chess than AlphaZero. That article pointed out a key limitation in models of that time: the inability to <em>think ahead</em>. The design of the next generation of models starting with “o1” focused precisely on this limitation, creating the “thinking” or “reasoning” models that are dominant today and, I think, confirming that the older models were fundamentally limited.</p><p>Any prediction I would have made in 2023 about what problems frontier models would be solving in 12 months would almost certainly have been wrong. However, the one prediction I did feel confident about (ChatGPT vs AlphaZero) was able to explain a lot about what happened next.</p><p>With that in mind, I have another prediction that I feel can be made with some certainty: “LLMs will solve almost every <strong>homework</strong> problem long before they solve almost every <strong>real-world </strong>problem”.</p><p>In my <a href="https://medium.com/@kczat/myths-and-reality-of-ai-writing-code-5094862dbedc">2024 article</a>, I noted that homework is the “killer application” of LLMs. Since then, other applications been found. For example, LLMs are being widely used by software engineers. However, those efforts are still a long way from doing <em>most</em> of the work of an engineer. In a recent Stratechery interview, the CEO of Cursor, Michael Truell, said his hope is that Cursor (the most widely used AI-focused coding environment) will be able to automate 20–25% of a programmer’s work in 6–12 months.</p><p>I can’t predict with any certainty when it will cross 50%, but I can say with some certainty that Cursor will automate 50% of all coding <strong>homework</strong> problems <em>long before</em> it automates 50% of all <strong>real-world</strong> coding problems. I think the same will hold for other areas than coding: most homework problems will be solved long before most real-world problems are solved.</p><p>Homework problems are fundamentally different from real-world problems in particular ways that make it easier both to train and to apply LLMs to solve them. Let me explain….</p><h3>1. Problem Statements Must be Precise</h3><p>As an author of problems, to ensure that each homework problem is a valuable learning exercise, you need to be sure that students solve the problem you intended. Students know this as well, and since they don’t want to lose points on their homework, they are hyper-vigilant about any potential ambiguity in problem statements.</p><p>Any part of the statement with a possibility of multiple interpretations will result in questions from students. In a large class, a truly ambiguous statement will get hundreds of questions, but honestly, even a statement that has a ridiculous interpretation differing from what you intended will result in a dozen questions from students who just want reassurance that you didn’t mean the absurd thing that you obviously didn’t mean.</p><p>One of my former colleagues took to calling students “the lawyers”, in reference to how carefully they pick apart the language used in homework. That colleague would notice a potential issue in a problem statement and say “I’d better fix that before the lawyers see it”.</p><p>At the other extreme, you have students who look for any way to reinterpret a statement to make it easier. If that reinterpretation is so extreme that it actually makes the problem trivial, that is ideal! When they get a zero from the grader, they come back with “well, you didn’t explicitly say…” that you didn’t mean the thing that you obviously didn’t mean.</p><p>The end result of all of this is that problem statements are written very carefully. They go through multiple drafts. They are reviewed by multiple people. If similar problems have been given before, you know the issues that led to confusion before and can fix them. If this is a genuinely new problem, then I would typically have multiple TAs attempt the problem themselves (while pretending to be lawyers) to see if they can spot any potential concerns.</p><p>In the real world, a problem is typically explained to just one person, not to hundreds. And the listener is making a good faith effort to understand what is meant, not looking for any potential misinterpretation. As a result, you are unlikely to see problem statements that are crafted nearly as precisely as what an experienced educator would produce.</p><h3>2. Problem Staements Must be Concise</h3><p>One response to the above is to write problem statements that run several pages long, with footnotes explaining every last, dark corner case. However, that would not be ideal either, as problem statements are not only required to be precise but also concise.</p><p>Reading pages of dense, technical material is not enjoyable for anyone. Students, though, have particular limits on their time. Mine is not the only class they are taking. Some might be engaged in sports or have part time jobs as well. In fact, the university puts limits on how much time homework can be designed to take. If students need an hour just to read the problem statements, then that is a good fraction of the available time that will not be spent attempting to solve the problems nor really learning.</p><p>In the real world, large time spent reading is not unusual. A new programmer joining a team could very well spend their first few days if not weeks just reading through an existing code base to understand how it works, before they attempt to add anything to it.</p><p>Obviously, that can’t work in a classroom setting. The setting of a coding assignment must be explainable in at most a couple of pages. Each individual problem needs to be explainable in at most a few paragraphs. You know, the size of a typical LLM prompt.</p><p>Writing problem statements that are both precise and concise requires considerable skill and experience. Indeed, I would not be surprised to find that the authors of homework problems turn out to be amongst the best authors of prompts for LLMs.</p><p>Even with that skill, however, the truth is that coming up with a clear, concise problem statement is usually <strong>not</strong> possible at all. Most real-world problems simply cannot be explained in a way that is both precise and concise: they simply require a great deal of background that takes a lot of time and space to explain. It is unusual to find problems that can be described precisely and concisely. Even for homework, there may only be a handful that allow short, precise descriptions.</p><h3>3. There Aren’t That Many Truly-Different Problems</h3><p>In addition to allowing a short, precise description, the first problems that students tackle when they are learning a new area also need to be <strong>easy</strong>. When you put all of those constraints together — easy problems that allow a short, precise description — there are simply not that many problems that meet all the requirements.</p><p>To pick one example, suppose that students are learning introductory programming. They might be asked to write a loop that processes a list of numbers and returns a number as a result. For example, they could be asked to add them up. Alternatively, they might be asked to write a loop that returns a new list of numbers as a result. For example, they could be asked to return the list containing the numbers half as big as the numbers in the original list or return the list containing only the positive numbers from the original list.</p><p>Those three examples are fairly different tasks, but almost any simple problem you can think of will be a variation or combination of them. Those three are examples the classes of list operations known as “reduce”, “map”, and “filter” operations, respectively, and it is a well-known programming fact that almost any simple operation on list can be written as some combination of these three operations.</p><p>The fact that these categories all have a well-known names probably tells you, on its own, that are special. A similar phenomenon occurs in other areas of introductory computer science. In circuit theory, the simplest, universal logic gates have names (NAND and NOR). If we move to slightly less simple (three input) logic gates, most of the universal gates again have well-known names. In propositional logic, most of the simple tautologies have well-known names.</p><p>If I’m going to ask students to process a list of numbers, then the problem is going to be a map, filter, or reduce or possibly two of those put together. If I’m going to ask students to prove that a gate is universal or prove that a proposition is a tautology and my example is required to be <em>simple</em>, then it’s almost certainly one of the well-known examples. It might have a fake mustache on it, but it will be a thin disguise.</p><p>I can avoid repeating myself from one semester to the next by switching between those handful of different examples. This quarter, I could use a filter+reduce, and next quarter, I could use map+reduce. That would prevent this semester’s students from getting the answer from last semester’s students. However, I will eventually repeat myself because there’s only a handful of alternatives.</p><p>That makes life a lot simpler for an LLMs who is asked to solve such a problem. It isn’t necessary for the LLM to learn how to solve all coding problems. If they can learn how to solve all problems that are just a map, filter, or reduce or maybe two of those put together, then they can successfully solve all the introductory programming problems on list processing. If the LLM can learn how to show that NAND and NOR are universal, then they can solve any homework problem asking to show universality of a 2-input gate because that gate is either NAND or NOR.</p><p>The problem of proving an arbitrary logical statement is a tautology is provably hard for any computer program, including an LLM. But an LLM does need not do that to be able to solve almost any homework problem on tautologies. If the LLM can learn to output a truth table showing that any of the well-known, simple tautologies are always true, then they can solve just about any homework problem on tautologies because that problem is almost certainly one of those.</p><h3>4. Problems Have Numerous Training Examples</h3><p>The difficulties that I have in finding new problems each semester are not unique. The same difficulties are faced by every teacher of these subjects on every college campus around the country. The same difficulties are faced by every author of a textbook on these subjects.</p><p>While each of us individually might do a good job of avoiding repetition, it is impossible for all of us to do so collectively. There are simply not enough truly-different examples to do so. As a result, if someone could look across all the homework problems used in all introductory computer science courses ever posted on the internet and all textbooks on introductory computer science, then would definitely see a great deal of repetition.</p><p>If the internet has a thousand examples of simple list programming problems and there are only a handful of truly distinct categories of problems, then every category likely has hundreds of examples.</p><p>In fact, “hundreds” is likely a huge underestimate. Lots of people outside of college campuses are interested in learning introductory computer science. As a result, the internet is filled with articles explaining these topics. YouTube is filled with videos explaining them as well. You might have to go to a college campus to learn advanced quantum computing or aerospace engineering, but anyone with a computer can get more educational material on introductory topics than they could ever read.</p><p>More than a <em>human</em> could ever read, I mean. An LLM on the other hand, can happily learn from all of this material. Due to the small number of truly unique introductory problems and the unusually large amount of educational material on introductory topics, every class of unique problem probably has tens of thousands of examples for the LLM to learn from, and every additional example likely improves its accuracy.</p><p>For a human being, the most efficient way to solve a homework problem is to develop an <em>understanding</em> of the course material. Looking at ten thousand similar but not identical problems is not likely to help them. LLMs, on the other hand, are fundamentally designed for pattern matching, and they do it with super-human skill. Given that, we should expect that an LLM, when given tens of thousands of examples of similar problems, will be able to see the patterns needed to generate the solution, even when it can make no progress at all on real-world problems.</p><h3>5. Answers Don’t Need to be Fully Correct</h3><p>Solutions to most real-world problems must satisfy a very high standard of correctness. It wouldn’t be acceptable if Excel only filled in 90% of the cells correctly. It wouldn’t be acceptable if a lawyer wrote a contract where only 90% of the clauses made sense. It wouldn’t be acceptable if a doctor only performed the right surgery 90% of the time. Homework assignments are the only place in life where “90% is an ‘A’”.</p><p>The purpose of an homework assignment is to let students develop and then demonstrate their <em>understanding</em> of the course material. They can do that successfully without getting every detail of the solution right.</p><p>When doing a calculus problem, for example, you demonstrate your understanding by performing the right substitutions so that you can apply the right formula to calculate the answer. If you happen to make some arithmetic errors in the process, that doesn’t show a lack of understanding, so it should not result in a significant point deduction.</p><p>Likewise, in a coding problem about lists, you demonstrate your understanding by writing a loop with the right structure. If you made some small mistakes that cause the code to not work at all, that doesn’t show a lack of understanding, so it should not result in a significant deduction.</p><p>This way of grading makes sense when grading the work of a human. As noted above, the simplest way for a human to solve a problem is by understanding the course material. Hence, work that a <em>human</em> could only produce if they understood the material is good enough demonstration for an ‘A’, even if the final answer is wrong or the code doesn’t fully work.</p><p>As we noted above, the situation is quite different real-world problems. There, people expect correct answers and code that works almost always.</p><h3>Grading With LLMs</h3><p>The situation is different once LLMs are involved. When given plenty of similar examples, we should expect LLM to be able to generate answers with the right shape simply by pattern matching — even if they lack understanding. If you don’t believe me, consider this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*hnpS2OqdLDL1jGL-rjPZpw.png" /></figure><p>ChatGPT has noticed the similarity between this problem and a class of riddle that appears many times on the internet. (The user even said it was a “riddle”.) It then produces an answer that looks like the answer to such a riddle, even though that answer is obviously wrong: the man and woman can simply get in the boat and row across.</p><p>No human being that could correctly answer true riddles of this kind would be unable to figure out this one. “Understanding” does not explain what we see here at all, but “pattern matching” does: the LLM sees that this matches the pattern of a class of common riddles and so it generates something that looks like an answer to such a riddle.</p><p>When you see an LLM solve a riddle, it is natural to assume that it understands. With humans, that would certainly be true! However, once we take bad answer also into account, pattern matching is a better explanation for what we are seeing.</p><p>I don’t bring this up to laugh at LLMs. The point is that an LLM’s pattern matching is an extremely powerful tool! It can solve riddles that most humans would find extremely difficult.</p><p>Despite the fact that LLMs are built for pattern matching and have enough parameters to memorize a good fraction of the internet, we should not be <em>confident</em> that pattern matching will work unless there are many examples similar to the problem we are looking at.</p><p>For the reasons we discussed above, however, we should expect that to be the case for almost any homework problem on almost any introductory topic due to the fact there are only a handful of classes of truly distinct problems, and for each class, there are thousands of examples of how to solve them. As a result, we should expect LLMs to be able to solve all such problems, whether or not they have true understanding.</p><p>“90% is an ‘A’” is a grading structure that makes sense when the point is to check that a human being understands the material, but it no longer makes sense when that human has an LLM at their disposal. Human beings without LLMs couldn’t solve these problems until they understood the course material, but with an LLM, they now can.</p><h3>It’s Happening Now</h3><p>In recent benchmarks that were careful to ensure that their problems were truly different from all those on the internet, current models do <a href="https://garymarcus.substack.com/p/five-quick-updates-about-that-apple">very poorly</a>. However, more breakthroughs could be coming. As a result, it’s hard to know with any certainty when LLMs will be able to solve most real-world problems that humans are now paid to solve.</p><p>On the other hand, we know that students are using LLMs to solve homework problems <strong>right now</strong>. In late 2024, <a href="https://marcwatkins.substack.com/p/recapping-openais-education-forum">Open AI said</a> that the <strong>majority</strong> of their weekly active users were students. In early 2025, more than a quarter of all <a href="https://www.npr.org/2025/01/18/g-s1-43115/chatgpt-teen-school-homework-classroom-ai">teens admit</a> that they use ChatGPT for homework.</p><p>While LLMs can’t solve the majority of my homework problems, as of Spring 2025 (I know because I tried), it can certainly solve many of them. For the reasons we discussed above, I expect that to number to exceed 50% very soon, possibly next year, and certainly well before LLMs can solve the majority of all real-world problems.</p><p>While huge benefits of LLMs for worker productivity are not here yet, the problems for education are here now. Educators will adapt to work around this, but it will take time. Even if we knew the answers now (which we don’t), it takes years to change curricula and write new textbooks.</p><p>In the meantime, some current students think that they’ve been given a great gift. Most recently, this UCLA graduate was purportedly showing off how he used an LLM to do his final project for him:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mdmaQIMY2lKf5P0uv6VnWg.png" /><figcaption><a href="https://x.com/fearedbuck/status/1935334136073404438">from X</a></figcaption></figure><p>Sadly, I think this will most likely be a curse. Hiring managers will know soon, if they don’t already, that students who graduated in 2025 shouldn’t be assumed to have actually learned anything in their senior year. Hiring managers in 2026 may not assume that recent graduates learned anything at all.</p><p>Even though it is only a fraction of students who are using LLMs, I fear that all degrees granted in these next few years may end up being viewed with suspicion. If that does happen, students who graduate soon may have to prove themselves anew every time they apply for a job because their degrees don’t prove it for them. That would be a sad outcome for those students who didn’t cheat, who worked hard for years only to earn a degree that society counts for little, but that does seem to be where we are headed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea0c13eb77d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aggregation Distortion]]></title>
            <link>https://kczat.medium.com/aggregation-distortion-3a83c185f665?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a83c185f665</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Sun, 22 Sep 2024 05:39:42 GMT</pubDate>
            <atom:updated>2024-09-22T05:39:42.659Z</atom:updated>
            <content:encoded><![CDATA[<p>I continue to be surprised by how aggregating multiple subgroups into one can distort the picture and make understanding more difficult.</p><p>In machine learning, it is possible for two variables that are related in one direction in the whole group to be related in the <em>opposite</em> way within a subgroup. A familiar example to me is that, while faster wide receivers are obviously more likely to be successful in the NFL, once you narrow in on those drafted in the early rounds, the relationship reverses: slower wide receivers are, on average, more likely to be successful.</p><p>This presumably occurs because speed is already taken into account by the decision to draft the receiver. Once we know they are drafted, we are not really looking at whether speed makes the receiver more likely to be successful but whether speed is over-appreciated or under-appreciated by the NFL general managers who make the draft picks, and the data suggests that, historically, it was over-appreciated.</p><p>If we looked at the non-drafted wide receives, I would expect to see that speed is predictive of success, so it is only within one subgroup that the relationship changes direction. However, it is actually possible for the relationship to be reversed within <em>every subgroup</em>, a phenomenon known as “<a href="https://en.wikipedia.org/wiki/Simpson%27s_paradox">Simpson’s Paradox</a>”.</p><p>Even if relationships do not reverse direction, aggregation can still distort the picture in ways that make understanding significantly more difficult.</p><p>I ran into a stark example of this just recently, when looking at polling data for the upcoming U.S. presidential election. The ABC/Ipsos poll released about a week ago showed Donald Trump with a 53% to 45% lead over Kamala Harris among <em>white voters</em>. Further down the cross-tabs, we see that Trump’s lead is 62% to 36% among white voters without college degrees. If we are aware that about half of all white voters have college degrees, then we can infer that Harris likely has a <strong>small</strong> lead among white voters with college degrees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*LBMMmn9-TVVnDlWfLFzpBA.png" /></figure><p>None of that is shocking. The relationship between voting and college degrees is well known. Indeed, the Washington Post has recently written about how the <a href="https://www.washingtonpost.com/opinions/2023/10/01/understanding-electorate-diploma-divide/">diploma divide “dominates” politics</a>.</p><p>However, the cross-tabs also include this, much more startling number:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RvMaAqBR-Y2pfhV-i1w5JQ.png" /></figure><p>That might not seem so impressive if you don’t realize how large the group of “white evangelicals” is. According to the New York Times, white Evangelicals were 42% of white voters in 2020:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f5caChksvLpYVzRr" /></figure><p>If you assume the same number in 2024, then Harris leads 65% to 33% amongst <em>non-Evangelical</em> white voters. Donald Trump is +63 among Evangelicals, while Harris is +32 among the non-Evangelicals, an enormous disparity. The comparable for college degrees are <strong>much</strong> smaller.</p><p>I should note that number could be an overestimate because the Ipsos cross-tab restricts to “protestants” and some white voters classify themselves as both “Catholic” and “Evangelical” (strange as that may seem).</p><p>Adjusting for that, this is my best guess for what the cross-tabs would look like this if we split white voters into Evangelical protestants and the rest:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*dJe5NQt94a-d21wYaO9dzw.png" /></figure><p>This shows Harris leading <em>every</em> subgroup except white Evangelical protestants. It also shows white, Hispanic, and Asian voters with <strong>similar</strong> numbers. The difference that remains between those subgroups correlates almost perfectly with the percentage of Catholic voters in those three subgroups, so attempting to adjust for “Catholic Evangelicals” would likely bring the three numbers even closer together.</p><p>This final picture, I think, explains in a much clearer way what the electorate looks like at the moment. We have two subgroups — black voters and white Evangelical protestants — who strongly back one candidate, while the rest of the voters as a whole have a large lean toward Harris (over +15). Within this third group, race is no longer useful to predict voter preference.</p><p>In my view, to give an accurate explanation, polls should, at present, always record white Evangelicals and non-Evangelicals as separate groups.</p><p>The arguments for separating white voters by, say, college degrees are not nearly as strong, in my view, both because (1) the effect is much smaller and (2) the effect of applies similarly <em>within all subgroups </em>(not just white voters). In fact, even within Evangelicals, we see an effect of college degree (chart from <a href="https://www.brookings.edu/articles/biden-trump-and-the-4-categories-of-white-votes/">here</a>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dwMhd2T3bDEUuRSH" /></figure><p>The effect of a college degree was around a 7–10 point move toward Biden, but note how much smaller that is than the split between the Evangelical and non-Evangelical groups. Non-Evangelical voters <strong>without college degrees</strong> were still almost +20 for Joe Biden.</p><p>To say that, “Trump’s support came from those with no college degree” is misleading. The primary reason why those without college degrees, as a group, supported Trump is not that they do not have degrees but rather than so many of them are Evangelicals.</p><p>To make sure we are being fully objective, we can always turn back to our machine learning toolkit. One way to do so is to use all of the demographic data available — gender, age, race, education, income, religion, marital status, and sexuality — and build an optimal decision tree for predicting Trump vs Biden vote in 2020 with the <a href="https://apnorc.org/projects/ap-votecast-2020-general-elections/">AP VoteCast survey data</a>.</p><p>When we do that, we indeed find that religion, not race, is the most predictive variable. The optimal decision tree first splits Protestants and Catholics from Other / None. Only within that first subgroup, does it turn to race, separating black and white voters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*V3IJOvkVx-tLNlHLU0dj2w.png" /></figure><p>In 2020, Trump had a sizable advantage with white Protestants &amp; Catholics, while Biden had an enormous advantage with all other groups. The polling data suggests the same trend is, if anything, even stronger in 2024, with Trump’s advantage lying almost entirely with white Evangelicals.</p><p>I think polls would do well to follow the model above, splitting first by religion, when presenting polling results. The usual practice of splitting by race aggregates Evangelicals and <em>non</em>-Evangelicals into one subgroup of “white voters”, which makes the information less predictive of voter preference and, hence, less useful for <strong>understanding</strong> the electorate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a83c185f665" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Better, Simpler Model of Running Back Success]]></title>
            <link>https://kczat.medium.com/building-a-better-simpler-model-of-running-back-success-275fb0ddb73e?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/275fb0ddb73e</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Mon, 20 May 2024 18:36:27 GMT</pubDate>
            <atom:updated>2024-05-20T18:36:27.125Z</atom:updated>
            <content:encoded><![CDATA[<p>For several years, I’ve been publishing predictions of NFL rookie success odds for wide receivers and running backs over at <a href="https://www.4for4.com/">4for4</a>. The wide receiver model, in particular, has an exceptional <a href="https://www.4for4.com/2022/preseason/forecasting-2022-nfl-rookie-wr-success-3-year-model">track record</a> of identifying undervalued rookie receivers.</p><p>While the predictions incorporate the output of a more sophisticated machine learning model (a Support Vector Machine), the core of the predictions come from an incredibly simple logistic regression model built on just <strong>two</strong> metrics about the player: what draft pick they were and how much of their college team’s yards were they responsible for over their full career. It turns out that you can identify undervalued receivers pretty well with just those two variables because fantasy drafters frequently undervalue them.</p><p>The results for the running back (RB) model, on the other hand, have been less satisfactory. The best logistic regression models I could find required 3–4 variables and still were not as good as the 2-variable receiver model. An SVM was no better. A couple years ago, I built a model that first put running backs into clusters and then applied simpler logistic regression models within each cluster. That improved results, but still did not match the receiver model in accuracy (let alone simplicity!).</p><p>Given that, I put some more time in this spring trying to come up with a better model using what I’ve learned in recent years. In particular, I wanted to see if using over-parameterized models could improve the results.</p><h3>Over-Parameterization in RB Models</h3><p>As I’ve <a href="https://medium.com/@kczat/why-do-we-teach-under-parameterized-models-890360d599bb">discussed before</a>, my default strategy nowadays is to build an over-parameterized model, that is, a model whose number of tunable parameters exceeds the number of examples it was trained on. Despite having more ability to “over-fit” the training data, such models can (and usually do) have reliably good performance.</p><p>With running backs, it is especially easy to over-parameterize. There have been fewer than 400 drafted running backs since 2001. (It’s hard to go back much further than that because the nature of the game changes over time.) With fewer than 400 examples, it doesn’t take much work to build a model with more parameters than examples.</p><p>With tabular data like this, the natural option would be a Random Forest model. Even if we restrict the individual trees to 4 just nodes, a random forest consisting of 1000 trees would be over-parameterized. For this problem, such models do indeed give reliably, solid performance. Unfortunately, however, they do not give performance on par with my simple wide receiver model.</p><h3>Choosing Metrics for the RB Model</h3><p>One aspect of predicting rookie performance that is probably unusual for machine learning is that the number of metrics used to predict success (the “features” of the examples) exceeds the number of training examples.</p><p>As noted above, we have fewer than 400 examples on which to train an RB model. Meanwhile, <a href="https://www.patreon.com/posts/pahowdy-prospect-63253587">Peter Howard’s database</a> includes over 400 different metrics that have been calculated to try to predict success. My own database has over 100 more. Having more metrics for each example than total number of examples is, I think, fairly unusual. It also seems to make the problem quite a bit more complicated.</p><p>One strong clue that wouldn’t be so simple as just building a standard Random Forest model came early on. After sorting all of Peter Howards metrics by correlation with future success, I decided to see how valuable the best metric was by building a second model without that metric included. Much to my surprise, the results were better! Removing from the data the individual metric that was best predicts future success gives a Random Forest model that is <strong>more</strong>, not less, accurate.</p><p>Pairing down the data to just the top 20 or so most predictive metrics (but without the single most predictive metric) improved results further. From this sort of experimentation, it became clear that, even with Random Forest models, metric selection would be important and that using fewer metrics generally worked better.</p><p>Fortunately, my own database was not so ill-behaved as Peter Howard’s. The most predictive metric in my database is draft pick, and removing that <strong>definitely</strong> makes results worse.</p><p>Results got better as I shrunk the number of metrics further. I ended up trying every choice of 3 metrics out of the top-25 most predictive ones. Interestingly, all of the best combinations shared the same two metrics: draft pick and age. Reducing to just those two metrics gave the best performance of all.</p><h3>Understanding and Simplifying the Model</h3><p>Now that the number of metrics (variables) in the model was small, I could start using pictures to try to understand the model better. I did the same thing most recently in <a href="https://medium.com/@kczat/what-happened-to-value-in-2010-d92ba2750375">this article</a>, where it allowed us to get a handle on why value investing has underperformed in recent years.</p><p>Here are predictions of the 2-metric random forest model (with 1000 trees):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*bm8oqMQSPHTtYNdt2awyHQ.png" /></figure><p>Two things stand out to me in this picture. First, the success odds decrease in a <strong>step-wise fashion</strong> as the pick increase, with clear drop-offs after certain picks (rather than, say, a slow and steady decrease as players are picked later and later). Second, age is largely just a cut-off: players that are 22.5 or so before their first NFL season get higher odds across the board than those who are older than 22.5.</p><p>Broadly speaking, the plot breaks the inputs up into about 10 regions based on pick and age, but within those regions, the predictions are relatively flat. For that reason, it seemed like I could summarize this model with a simple table that gave a single prediction for each of the 10 buckets as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*MyafJO0AfIJWzH_8JS8cyQ.png" /></figure><p>Surprisingly, this simple table is actually <strong>more accurate</strong> than the Random Forest that gave us the plot above! So this is the new model I settled on.</p><h3>Conclusions</h3><p>In the end, I got what I hoped for: a simple 2-variable running back model whose performance nearly matches that of the simple 2-variable model for wide receivers. Of course, I must not forget the only free lunch in machine learning is to build ensemble models, so while this will be the primarily model for this year’s predictions, I will also incorporate the clustered linear regression model, an SVM model, and a larger Random Forest model into the final predictions.</p><p>The journey to get this final model also reiterates the usefulness of the techniques we used along the way. Starting with an over-parameterized Random Forest model was a good idea once again. Drawing pictures of model predictions on small numbers of variables at a time once again led to useful insights.</p><p>What was new, this time, was that the end result of a path that worked through over-parameterized models eventually ended with something even simpler than linear regression: just a simple table. This shows that our default option of starting with over-parameterized models doesn’t preclude the possibility of ending up at the other extreme in the end.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=275fb0ddb73e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Myths and Reality of AI Writing Code]]></title>
            <link>https://kczat.medium.com/myths-and-reality-of-ai-writing-code-5094862dbedc?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/5094862dbedc</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 04:23:00 GMT</pubDate>
            <atom:updated>2025-06-21T23:52:32.147Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m a big fan of Jensen Huang, and it is obviously silly for me to try to give him any kind of advice, but if I were in his shoes, I would avoid telling people that AI will soon do things that Alan Turing knew, almost 100 years ago, were impossible for any computer program to accomplish.</p><p>His most recent, <a href="https://tech.yahoo.com/ai/articles/nvidia-ceo-says-future-coding-124534339.html">headline-grabbing claim</a>, is that children should no longer learn to code. “This is the miracle of <a href="https://www.hindustantimes.com/world-news/us-news/worst-us-airports-revealed-amid-complaints-about-hygiene-food-and-poor-amenities-101708952024951.html">AI</a>…. You now have a computer that will do what you tell it to do.” All humans need to do explain what they want and the AI will figure out the program that makes it happen.</p><h3>Programming is Hard in Theory</h3><p>Turing famously proved the impossibility of solving the <a href="https://en.wikipedia.org/wiki/Halting_problem">Halting Problem</a>, which asks the computer to simply answer whether a program it is given will eventually stop or if it will run forever when executed. No computer can answer correctly about all programs.</p><p>The Halting Problem might seem like a special case, but it turns out to have extremely broad implications. As most computer scientists are aware, almost any <em>interesting</em> problem involving computer programs is provably impossible to solve. (This is best formalized in <a href="https://en.wikipedia.org/wiki/Rice%27s_theorem">Rice’s Theorem</a>.) As a simple example, if you’d like a program that can tell you “Is there a bug in this program?” (or “Where is the bug in this program?”), you are out of luck! There is no program that will always answer correctly.</p><p>For non-programmers, here is some simple intuition for why the problem of writing correct code is in some sense “maximally hard” amongst problems we might like AI to solve. It cannot be the case that AI <em>would not</em> be able to solve your favorite problem X but <em>would</em> be able to write any program correctly. If that were the case, you could simply ask the AI to write a program that solves problem X! It can’t be the case, for example, that full self-driving is too hard for AI but writing code is not because we could just ask the AI to give us code for full self-driving.</p><h3>Programming is Hard in Practice</h3><p>One of the dead giveaways, to me, that these discussions about having AI program for us are not serious is the complete lack of discussions about correctness — how important it is and how AI can possibly achieve it.</p><p>I assume most readers are aware of the many ways that AI has already been seen to produce incorrect output: making up untrue facts, making illegal citations in legal briefs, making illegal moves while playing chess, and even driving a car into wet cement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5-S1ewmZv6aQnbO1vC43TQ.png" /><figcaption>(from <a href="https://twitter.com/Name_Is_Nobody/status/1691554070908268755?s=20/">here</a> on X)</figcaption></figure><p>I imagine that readers not worried about these examples think of them as rare cases. If most programming tasks do not have such dire consequences as full-self driving or writing legal briefs, then it would not be necessary to worry so much about correctness. Sadly, that is not the case.</p><p>I think that most people who hold that view do so because they live in a world surrounded by software that works properly 99+% of the time. They simply haven’t given any thought to what it would be like if the software only worked properly, say, 90% of the time.</p><p>If Excel did not correctly compute the right answer 10% of the time, huge amounts of money could be lost. If a database missed some matching records 10% of the time, we could reach incorrect conclusions on all manner of important questions. In both of those cases, there would likely be lawsuits. People depend on enterprise software to always be correct.</p><p>Even for low-stakes software, users demand correctness. If Spotify randomly played the wrong song 10% of the time or jumped back and forth between songs in the middle of playing them, people would stop using it. If clicking on a menu item resulted in the wrong action being taken 10% of the time, the software would be too frustrating to use.</p><p>Games probably have the lowest stakes for correctness, and even there we know it is hugely important. CD Projekt saw its <a href="https://gamerant.com/cd-projekt-stock-falls-75-percent-since-cyberpunk-2077-release/">market cap drop 75%</a> after they released a game that users found too buggy, namely, Cyberpunk 2077. Watching ChatGPT make illegal moves makes for a fun YouTube reaction video, but it is simply not fun to play chess against an AI that can’t make a legal move 10% of the time.</p><p>Contrast this with AlphaZero, which was best chess player in history when it was released. It also uses AI at its core, but only to evaluate potential moves. Regular ol’ code, written by humans, generates the set of legal moves for the AI to consider. This ensures that illegal moves are never considered, much less made.</p><p>That same structure is used in AlphaGo, AlphaFold, and AlphaGeometry. AlphaGeometry never generates incorrect proofs because it includes regular code, written by humans, that produces only valid inferences. While ChatGPT can conceivably tell us that the amino acid sequence we need to generate a protein that will fight off some disease is A-R-N-D-cat-clown-rainbow, AlphaFold will never even consider such a thing because its regular code limits to only valid sequences of amino acids.</p><p>In these systems, AI is used but only as a substitute for <em>intuition</em>, and the rest of the code is written with the understanding that intuition can be wrong. The regular code in these systems is what guarantees correctness.</p><p>I have read that full self-driving systems are being engineered similarly, with over a million lines of regular code trying to keep the AI from doing anything too stupid (and even that doesn’t seem to be enough)!</p><p>Another approach along these lines called Retrieval Augmented Generation (RAG) is currently being attempted to try to fix the problem of inaccuracies in generated text. Here, regular code is used to try to ensure the accuracy of claims made by the AI. While it remains to be seen whether RAG will work (there are <a href="https://garymarcus.substack.com/p/no-rag-is-probably-not-going-to-rescue">some skeptics</a>), the key point for me is that, it seems, researchers have largely given up on the idea that hallucinations will disappear if you just train on enough data. Instead, they are turning to regular code (in the form of RAG) to ensure correctness.</p><p>The evidence so far says, to me, that correctness is a key weakness of AI, whereas creativity, pattern matching, and other skills brought to bear by intuition are key strengths. That weakness are particularly at issue for the problem of writing code, where correctness is paramount. It doesn’t have to be driving a car or writing a legal brief — almost all software would fail to be useful if it did not operate properly 99.9% of the time.</p><p>The evidence so far says to me that we will continue to need human programmers to write correct code for usable programs. Making sure that the code will operate correctly in all cases is what programmers are paid for and what they spend most of their time thinking about while coding.</p><h3>English is a Bad Programming Language</h3><p>A key reason that programming is hard is that computers actually do what you tell them to do. While a human driver would not follow your instructions to drive into wet cement, the computer will do it. To make sure the program always works properly you have to foresee and <em>think through </em>every case that might happen in order to make sure they will all work. That difficult mental task is the core skill of programming, in my opinion.</p><p>Thankfully, one problem programmers do not face is ambiguity about what words mean. Programming languages have precise specifications so that the programmer and the computer always agree on what is being asked. Human languages, on the other hand, are often ambiguous. Phrases like “I saw her duck” and “slow children at play” have multiple valid meanings. Using human languages to try to describe what you want the computer to do would make correctness harder, not easier, in my opinion.</p><p>In addition to being imprecise, human languages are also not especially concise, particularly when it comes to mathematical operations. Sure, I could write “subtract b from a, then add c to d, and then multiply those two numbers together”, but I prefer to write just “(a – b) x (c + d)”.</p><p>Being able to use English might feel like a win, initially, because you could program without learning any new syntax, but the loss of productivity due to imprecision and verbosity would eventually catch up to you.</p><p>That said, I suspect that the appeal of English as a programming language is not primarily about avoiding some learning. Rather, I think the appeal is in imagining an AI to which we can explain in English only <em>what</em> we want done, leaving it up to the AI to figure out <em>how </em>to do it. Sadly, that is another problem that computer scientists have long known to be impossible. Alan Perlis once quipped “When someone says, ‘I want a programming language in which I need only say <em>what</em> I want done,’ give him a lollipop.”</p><p>To remind you how large the gap is between <em>what</em> and <em>how</em>, remember that the only things a CPU can do out of the box is read, write, compare, and perform arithmetic on <strong>numbers</strong>. The colors of each pixel on your monitor come from reading the numbers written down in video memory, where each color is encoded as a specific number. Each time a key is pressed, the program is allowed to run and is handed a number indicating which key was pressed. Likewise for when the mouse is clicked.</p><p>Ultimately, it is up to the programmer to figure out how to update the numbers in video memory, each time a key is pressed, so that the user sees the right image on the screen. The only tools at their disposal initially are the abilities to (1) read and write numbers from memory, (2) to perform arithmetic on numbers, and (3) to compare numbers to each other. Everything else, they have to figure out on their own.</p><p>Excel, for example, uses some of the space in memory to write down all of the formulas that the user has typed into various cells as well as the numbers being shown in those cells. Formulas are text, but just like key presses, they can be encoded as numbers. When someone enters a number into a cell, Excel goes through each of the formulas that might have changed (it arranges them cleverly in memory so that it can quickly figure out which ones those are) and re-calculates the values of those formulas. Then, for each cell that changed, it finds the part of video memory that is displaying the pixels that trace out the number in the cell and updates them. Each step of that process is a thousand times more complex than I have just described, but that is the basic idea.</p><p>If Jensen is suggesting you can just tell the computer, in English, what you want the program to do and it will write a program to do that, then he is imagining not only that the AI will perfectly understand what you mean but also that it will figure out on its own what information should be kept in memory; how that information should be encoded as numbers; how those numbers should be arranged so it can quickly figure out, after each key press, which ones to update; and finally, how to translate those new numbers into a new picture in video memory. There is no fixed formula for how to do these things. Each requires ingenuity and careful planning.</p><p>Let me note that that description also assumes we are writing a simple, desktop application that has no communication with any other computers. If we want to talk to the internet or, even worse, write a program that runs on a server on the internet, then it becomes vastly more complicated.</p><p>Hopefully, that description helps explain what an extraordinary claim it would be to suggest that AI could translate an English description of <em>what</em> you want done into a working program. Once again, this is something that is likely not only impossible in theory (provably impossible to do correctly in all cases) but also likely impossible in practice.</p><h3>AI and the Senior Programmer</h3><p>When writing non-trivial programs, other properties beyond correctness become important. If we are thinking about using AI to write programs, we would need to consider those other properties as well.</p><p>One such property is changeability. Most programs in use are constantly being changed, (hopefully) to improve them. Senior programmers know this, so they write their code in such a way that the most likely kinds of changes they will need to make are easy to make.</p><p>So far, code generated by AI in response to prompts scores very poorly in this metric. Rather than being changeable, it appears very hard to change:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yGVuBUlTQzVwWiUW.png" /></figure><p>Another important property is understandability. It may not matter how the code works as long as it works, but sometimes it doesn’t work. Finding the bug in those cases requires a holistic understanding of the program. Senior programmers know this so they write code that is simple and easy to understand.</p><p>I think I can speak for all senior programmers when I say that the idea of debugging a large program made up of code that no human understands sounds like one of the circles of hell from Dante’s Inferno. While liars hang by their tongues in the eighth circle, the ninth circle houses all the bad programmers who must spend eternity debugging a program that is an alien amalgamation of all the buggy functions they wrote during their lives. (Shudders)</p><h3>AI as a Junior Programmer</h3><p>While AI seems unlikely to write large programs on its own or to operate at the level of a senior programmer any time soon, I don’t mean to say that AI can’t be of any use in writing programs. AI could plausibly operate as a junior programmer to whom you give small programming tasks and whose work you need to double-check. (Indeed, I’m working on a research project right now that fits within this framework.)</p><p><a href="https://kczat.medium.com/something-to-see-here-ac3213e56057">In an article</a> I wrote last year, I included a tweet from Ben Hunt (<a href="https://twitter.com/epsilontheory">EpsilonTheory</a> on X) who said that ChatGPT makes junior knowledge workers “obsolete”. That is a nice generalization what I’m seeing with regard to programming: AI is useful in cases where it saves you time after accounting for having to carefully double-check its work.</p><p>As I said in the article, however, this raises concerns over how we train the next generation of senior programmers. The current generation became senior by first working as junior programmers. How are new entrants able to gain the experience of a junior programmer if we replace them with AI?</p><p>I previous thought the solution might simply be more time in school, but quite frankly, the problems ChatGPT is causing for schools are equally if not more difficult. Nowadays, I would summarize the situation as follows:</p><h3>Homework is the Killer Application of ChatGPT</h3><p>Above, we discussed the problems AI has with correctness. That’s a big problem in most areas of life, but school is the one area where you can submit work filled with errors and still get most of the credit! Teachers are used to reading answers that lack an understanding of key ideas, and yet, they still give lots of credit because making mistakes is part of learning.</p><p>Most of the problems we need humans to solve are new and novel. AI, on the other hand, works best on problems that are similar to lots of solved examples on the internet. Most of the problems we need humans to solve require understanding of their unique context. Internet examples, on the other hand, tend to be problems that are easy to state. The main category of problem that are both easy to state and have lots of solved examples on the internet are homework problems.</p><p>Last summer, we saw evidence that a notable amount of ChatGPT’s usage is for homework:</p><h3>François Chollet on Twitter: &quot;The answer is of course summer break.&quot;Producing homework&quot; remains the #1 application of LLMs.Which is remarkable, because the point of homework is to do it yourself -- the actual deliverable has zero value to anyone. / Twitter&quot;</h3><p>The answer is of course summer break.&quot;Producing homework&quot; remains the #1 application of LLMs.Which is remarkable, because the point of homework is to do it yourself -- the actual deliverable has zero value to anyone.</p><p>Looking beyond the sheer number of searches, the text of the search queries for ChatGPT also suggest homework as a top use case.</p><p>It feels to me that, outside of teachers, most of society has not fully grasped the impact that ChatGPT is having on education and training. To help with that, try imagining a world where all students have access to a tool that can adequately solve any homework problem but is largely useless otherwise. Education would obviously be hugely impacted by that, and it’s not far off from our current reality. AI for writing code, for example, will likely be able to perfectly solve most homework problems long before it will be of use for helping non-programmers write complete applications.</p><h3>Conclusion</h3><p>According to some, the days where we no longer need programmers are just around the corner. Soon, you’ll be able to describe in English what you <em>want</em> the program to do and the AI will magically figure out <em>how</em> to do it. As I discussed above, we are unlikely to ever see such days. In fact, creating such an AI is likely impossible, not only in theory and but also in practice.</p><p>In contrast, the days when we still need human programmers to solve most problems but AI exists that can perfectly solve any homework problem are probably just around the corner. Those days will be significantly challenge for the education and training of new programmers, and at present, it is unclear how we will cope with the challenge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5094862dbedc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happened to Value in 2010?]]></title>
            <link>https://kczat.medium.com/what-happened-to-value-in-2010-d92ba2750375?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/d92ba2750375</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 19:59:27 GMT</pubDate>
            <atom:updated>2024-02-16T19:59:27.991Z</atom:updated>
            <content:encoded><![CDATA[<p>Last month was another good one for growth stocks, continuing the trend that started in <a href="https://www.threads.net/@kczat/post/C2_wZYdrjwn">early 2023</a>. Like many investors, however, I am on the lookout for a reversal in favor of value. Jeremy Siegel, based on valuations, expects we will see that some time this year. Josh Brown, based on the euphoria in some growth names, thinks that the Nasdaq has <a href="https://www.youtube.com/watch?v=A9X4_tj6X5U&amp;t=710s">topped for the year</a>, which suggests we will see that some time this quarter.</p><p>In the meantime, I’m sticking with my strategy of <a href="https://kczat.medium.com/trend-following-multi-factor-value-7c195704a161">trend following</a> value versus growth, which continues to work nicely. Instead of trying to pick a bottom for value, then, I’ve also been spending some time looking back at value’s glory days and trying to better understand what changed and when.</p><p>As I wrote about in <a href="https://www.osam.com/Commentary/ml-investing-linear-regression-to-decision-stumps">this article</a> for OSAM, I find machine learning (ML) techniques extremely valuable not only for making predictions but also for understanding and visualizing data. Rather than trying to summarize momentum and value as purely linear effects (slopes), we can use ML to describe and summarize more general relationships.</p><h3>Visualizing Returns From 1988–2009</h3><p>For example, if we build a random forest to predict returns in the <strong>S&amp;P 100 </strong>between 1988 and 2009, using O’Shaughnessy’s composite value and momentum scores as input, we get the following picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*KfmhmbjtDMrWSm99CemjTg.png" /></figure><p>Overall, the returns to momentum (bottom axis) and value (right axis) are fairly linear overall, but a linear model would miss interesting details. In particular, the highest returns came to stocks with <strong>high value</strong> and <strong>low</strong> <strong>momentum</strong> (and vice versa). That is, I think, conventional wisdom among traditional value investors, but that is not what a linear model would predict. Instead, the linear model would predict the highest returns for stocks with high value <strong>and</strong> high momentum, where you get exposure to both factors. The latter is not what we see in the data from 1988–2009.</p><p>To emphasize just how great the glory days were for value investors, let me point out that these are <strong>monthly</strong> returns! You didn’t even need to hold for 3 months (let alone years) to achieve alpha. You could rebalance your portfolio every single month and pick up surprisingly consistent alpha.</p><h3>Visualizing Returns From 2010–2020</h3><p>Anyone with even the faintest belief in the efficiency of markets would expect a source of consistent alpha to be arbitraged away once it is well known, as value and momentum certainly were by 2010.</p><p>What would that look like? Well, instead of having a chart that slopes up as you move right or up in the picture, the chart would be completely flat.</p><p>What if, despite the fact that the strategy was well known, people continued to pour large amounts of money into it? In that case, we could even start to see some reversal. For example, the highest value stocks could actually underperform or, if there is also lots of shorting, low momentum stocks could actually outperform. In short, the results would be consistent with most of what you see in the following picture, visualizing returns to value and momentum in the S&amp;P 100 from 2010–2023:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*_3auaQVP64qRRM3HX6DgzQ.png" /></figure><p>The dip at the top of the picture shows the underperformance of high value stocks, while the bump on the left shows the outperformance of low momentum stocks. The right side (high momentum) is broadly flat, but on average underperforms. All of these are reversals from 1988–2009. In short, overall, the results are <strong><em>consistent with</em></strong> the idea that these strategies were not only arbitraged away but, in some areas, overcrowded.</p><p>Let me me note that the large spike in returns near the bottom right is essentially just due to Tesla, which had several 40+% return months when in the lowest quintile of value. Without those Tesla months, these returns would look like the rest, so let’s set those aside.</p><p>The low value stocks along the bottom are the one place where we see a continuation of the earlier trends. That is, we see generally higher returns as we move up in momentum along the lowest value decile. However, we see lower returns in the highest decile of momentum. That and the fact that moving up just a tiny bit in value, from the lowest decile to the next lowest, increases returns are consistent with overcrowding.</p><h3>Asset-Heavy and Asset-Light Companies</h3><p>We can get a slightly clearer picture by splitting up returns by different types of companies. The cleanest way that I found to do this is to split up companies in terms of their Novy-Marx “profitability”, which is defined to be gross profits divided by assets. This number will be lower for asset-heavy companies and higher for asset-light ones.</p><p>Returns from 2010–2020 look like the following if we restrict ourselves to just the quartile of asset-heaviest companies, many of which are traditional value-type stocks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9Tu4lyLOBg_37R2j-Ci-0w.png" /></figure><p>Here, in the bottom-left, we see a continuation of prior trends: low value and low momentum asset-heavy companies did poorly, as expected. Returns generally increase as we add momentum. However, the highest decile of value stocks in this group did worse.</p><p>In short, the lessons from 1988–2009 that we should avoid stocks with poor value or poor momentum held up. The only part that changed is that piling into the highest value decile did not deliver outperformance.</p><p>When we look at the three quartiles outside of the most asset-heavy, we also get clearer picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*wGBvwFC2eSrbSc62vJngSQ.png" /></figure><p>Here, the picture is a complete reversal of the value trend, with the highest value stocks doing the worst and the lowest value stocks doing the best. Meanwhile, momentum shows little effect outside of the most expensive.</p><p>The first picture of the 2010–2020 period that we saw above simply looked like overcrowding in the value and momentum trades. However, when we see that it is the amalgamation of these last two pictures, which are <em>so different</em> from one another, I think we learn that there is more going on. ML tools not only help us see what happened but also see when we are missing something, in this case, that there was a strong difference between asset-heavy and and non-asset-heavy companies.</p><h3>Conclusions</h3><p>These last two pictures, I think, tell a more correct story of what happened from 2010–2020. We can see that value did continue to work within traditional, asset-heavy companies. That is backed up by the fact that sector-neutral value strategies also continued to work.</p><p>The fact that the highest quintile of value within this group underperformed is consistent with overcrowding, but it is also consistent with the market under-appreciating how fast the world was changing and how fast their business models were deteriorating — a rare case of market under-reaction rather than over-reaction to bad times.</p><p>Within the non-asset-heavy companies, the complete reversal of prior trends does not look, to me, like overcrowding. Instead, it looks like a failure of our value metrics to properly capture value. As I wrote about before, the market did not appreciate <a href="https://kczat.medium.com/lies-damn-lies-and-accounting-75b69f62de05">how cheap Google</a>, Facebook, and the other tech companies were due to how software costs are expensed.</p><p>These accounting problems are much more acute for fast-growing companies. With Google et al. growing over 20% per year at this time, their measured P/E ratios could easily be 50% higher than they should have been (e.g., 27 rather than 18) if their expenses were associated with revenues over the next 5 years rather than just the same year.</p><p>The fact that we are looking at the S&amp;P 100 in this study, rather than the S&amp;P 500, makes these issues more prominent. We probably did not see many of the 100 largest companies growing 20+% per year prior to 2010. That said, if I had to bet, I’d guess that the 2020s and beyond look more like the 2010s in that respect than earlier decades, so these lessons are important to keep in mind.</p><p>While it requires work to dig into the accounting and discover the issues just mentioned, ML tools can help us by discovering for us automatically the fact that these two very different pictures were hidden within the original one. And they can make this information easier to understand, even when the effects are non-linear, by displaying it to us visually. In the modern era, these are tools any data analyst should have in their toolbox.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d92ba2750375" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adjusting for Strength of Schedule]]></title>
            <link>https://kczat.medium.com/adjusting-for-strength-of-schedule-9dcf5f8230da?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dcf5f8230da</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Sat, 06 Jan 2024 05:41:48 GMT</pubDate>
            <atom:updated>2024-01-06T05:41:48.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Anyone who knows me knows how closely tied I am to the University of Washington: I’m an alum, my wife is an alum, my parents are alums, my eldest child currently attends, and I teach there! I’m also a third generation UW football season ticket holder. With the Huskies playing for a national championship on Monday, this has been me all week:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*6dTVtkYC6Mmn9EYk19seVQ.png" /></figure><p>Of course, I have no intention of turning this site into a sports blog. However, as I noted <a href="https://medium.com/@kczat/a-more-american-college-football-playoff-system-55f0ffa8af0d">last time</a>, when, in following my interests, I see opportunities to bring machine learning to bear, I feel motivated to write about it. And, this week, in the embarrassingly number of hours I have spent studying the statistics about UW’s opponent, the Michigan Wolverines, I ran into another such opportunity.</p><h3>The Statistical Matchup</h3><p>Many commentators seem to make their initial assessment of a team (whose games they probably haven’t watched) by looking at their season-long stats. A reasonable place to start is to look at the total yards gained by that team’s offense and allowed by that team’s defense.</p><p>On that metric (<a href="https://www.ncaa.com/stats/football/fbs/current/team/21">see here</a>), Washington has the 10th ranked offense and Michigan has the 70th ranked. On defense, however, Michigan ranks 1st, while Washington ranks <strong>94th out of 130</strong> <strong>teams</strong>. That seems quite bad. Indeed, many have noted that no team with such a poorly ranked defense has ever won the championship during the CFP era.</p><p>Some see those statistics as evidence that these teams (particularly Washington) are not very good. However, I see it as evidence that these <em>statistics</em> are not very good. The odds of a team with the 10th best offense and 94th ranked defense going 14–0 are extremely low. It’s much more plausible that these statistics are just not good ways of measuring the quality of these two teams.</p><p>One way to make the rankings more sensible is to switch from total yards to <strong>yards per play</strong>. Obviously, there will be fewer yards gained when there are <em>fewer plays in the game</em>, all else equal, but that is not strong evidence that the offense is worse or the defense better. With Washington having a pass-heavy offense, their games generally had more plays, making their defense appear worse by total yards allowed. Contrariwise, with Michigan having a run-heavy offense, their games generally had fewer plays, making their defense appear better by this metric.</p><p>If we switch to yards per play, the rankings change as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*DesuLCU_Kt-fKca7I9k_Aw.png" /></figure><p>We can see that three of the four rankings improve, giving results that are more sensible. These are clearly two of the best football teams in America, so we should expect the rankings to be high. It is much more reasonable to that believe that a team who is top-5 on one side of the ball and middle-of-the-road on the other could go 14–0 than a team that is 10th in offense and objectively bad on defense. However, we can make the rankings even more reasonable with a bit more work.</p><h3>Strength of Schedule</h3><p>The number of yards allowed depends not only on the defense but also on the offense they faced. A defense would be expected to give up more yards if they are playing better opponents, all else equal.</p><p>While, in many cases, the difference in quality of offense played is not large enough to matter, the difference in the quality of offenses that Washington and Michigan played were stark. Here are the rankings of the opponents played by each team in their 14 games so far:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*IhqhiQ8I9p3eDmAnPWWyfA.png" /></figure><p>Those in the top 30 (the best offenses) are drawn in red, and those in the bottom 30 (the worst offenses) are drawn in green. As you can see, Michigan played <strong>half its schedule</strong> against <em>bottom-30 offenses</em>, while Washington played half its schedule against <em>top-30 offenses</em>.</p><p>As a result, you would expect that the quality of Washington’s defense is better than it appears from the their statistics. To figure out <em>how much</em> better, we can turn to the simplest of machine learning tools, namely, linear regression.</p><h3>A Linear Model of Offense and Defense</h3><p>We will model each team’s offense and defense as separate entities. That seems fairly reasonable given that they are never on the field at the same time: one team’s offense plays the other team’s defense and vice versa when possession changes. An individual game is, thus, made up of two separate competitions that take turns playing out.</p><p>Our linear model will have a variable for each of the 130 FBS offenses and each of the 130 FBS defenses. Each game gives us two equations from the two competitions described above. For example, when Washington played Texas in the Sugar Bowl, Washington’s offense generated 7.60 yards per play versus Texas’s defense, which translates to the equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*7PSTEeQffakbCYHamELHfw.png" /></figure><p>In the same game, Texas’s offense generated 7.01 yards per play versus Washington’s defense, which translates to this equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*kilHy7x0DTo-nLqytBsx3Q.png" /></figure><p>The constant term (c) in these equations is meant to represent the yards per play for an average team so that the variable for Washington’s offense represents how much it <em>increases</em> the yards per play <em>above average</em> and the variable for Texas’s defense represents how much it <em>decreases</em> the yards per play <em>below average</em>. We can enforce that representation by adding two more equations that force the average offense and defense value to be 0:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*aDQ1Vn29sZyAxW_-SS0uIw.png" /></figure><p>During the regular season, there were 739 games between FBS teams, so we end up with 1480 equations in 262 variables. With 5.65 data points per variable, we should be fine using ordinary regression. (There is no need to introduce more sophisticated tools like Lasso regression.)</p><h3>Results</h3><p>Ranking offenses and defenses by the model output, we get a much more sensible result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*IqNmHtRBLXcZYbUX25K13g.png" /></figure><p>Both teams are now top-25 in <strong>both</strong> offense and defense. That is much more consistent with the fact that both teams went 14–0.</p><p>The largest changes above are that the mediocre / poor parts (Washington’s defense and Michigan’s offense) show up as much better than before when accounting for the level of the competition. Also, Washington’s offense, which started out top-10, is now ranked top-5.</p><p>The one ranking that went in the opposite direction is Michigan’s defense. They started out ranked #1. That dropped to 4th once we accounted for how few plays they had to defend (due to Michigan’s run-heavy offense). After accounting for the weaknesses of the offenses they played, however, they drop to 11th.</p><h3>Predicting the Championship Game</h3><p>The final results make clear that this should be a close game, and I think that is right. Anyone making definitive claims about who will win is probably just seeking attention….</p><p>That said, since we are here, I imagine you want to know what the model says. It predicts that Washington’s offense will put up 6.34 yards per play against Michigan’s defense, while Michigan’s offense will put up 5.94 yards per play against Washington’s defense, giving a slight edge to the Huskies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BO4D9qj8t5eMbVzteLmQQ.png" /></figure><p>Go dawgs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dcf5f8230da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A More American College Football Playoff System]]></title>
            <link>https://kczat.medium.com/a-more-american-college-football-playoff-system-55f0ffa8af0d?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/55f0ffa8af0d</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 21:44:42 GMT</pubDate>
            <atom:updated>2023-12-06T21:44:42.081Z</atom:updated>
            <content:encoded><![CDATA[<p>Like many sports fans, I was shocked by the College Football Playoff (CFP) Committee’s decision to leave out Florida State, the undefeated ACC champion. Florida State did what anyone would have expected would be enough to earn their way in, but despite what they accomplished, they are no longer, after the injury of their starting quarterback, one of the four best college football teams according to the committee.</p><p>While someone want to argue about what criteria the committee should have used instead to make their decision, I personally dislike the entire idea of having a committee pick the teams who qualify. As I put it on Threads:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g8WqOzMFi3kY6G_gPHBF9g.png" /></figure><p>(For those on Threads, I’m <a href="https://www.threads.net/@kczat">here</a> by the way.)</p><p>The CFP Committee presumably made sense when it was created because it fixed the problems of what came before. The BCS system that preceded it used computer rankings, and those rankings also caused controversy when they disagreed with consensus. However, in that case, the reason for its errors was easy to describe: the computer lacked the “common sense” that only a human can provide. Hence, we get a committee.</p><p>Of course, human judgement is no panacea. Humans have biases and make mistakes as well. This week’s events are a demonstration of that.</p><p>I bring up this topic not to vent my displeasure but rather to offer suggestions for improvement. My posts here mainly focus on investing, but one frequent element in those posts are ideas on how to use data analysis and machine learning to improve results. And I think there is an easy way to remove the need for the CFP committee with only a tiny amount of data analysis, certainly nothing as sophisticated and black-box as the BCS rankings, let alone modern machine learning.</p><p>I’ll describe that idea below. First, however, we need to think about what criteria we should use to judge potential systems for picking playoff teams.</p><h3>A Matter of Principle</h3><p>The BCS rankings and the CFP committee each have their own advantages and disadvantages. I think that is to be expected. The search for a ranking system that is perfect in every dimension is probably futile. Instead, choosing between ranking systems comes down to the importance we place on the various dimensions.</p><p>Most arguments I have heard focus on two particular areas: does the system usually pick the 4 teams most likely to win (the “best” teams) and does the system usually pick the teams that were the most accomplished during the season (the “most deserving” teams).</p><p>Implicit in my comment on Threads is that I put equal if not more weight on a different principle: every team knows what needs to happen for them to win the championship. Both the BCS rankings and CFP committee fail in this area. Both the black-box computer rankings and the committee meeting behind closed doors make decisions that can’t always be understood or predicted. Under neither system could Florida State know, going into its final game, whether a win would get them into the playoff.</p><p>Some believe the move from a 4- to a 12-team playoff will solve this problem, but I think it simply replaces one controversy with others. Even with 12 teams included, the top 4 teams gain a special advantage — a bye week — so who is ranked 4th still matters. Furthermore, we now get argue over which team was left out at 13th rather than at 5th.</p><p>Below, I want to propose a system that lives up to this third principle. A system with clear rules about who gets in and who is out, where every team know exactly what they need to do to make the playoff.</p><p>As I said above, however, no system is perfect. I don’t contend that this system will always put the four teams most likely to win into the top four rankings, but I can live with that. The four best teams will know what they need to do to win, and if they are truly the best, then they can prove it on the field.</p><h3>A Conference-Focused Ranking System</h3><p>My system starts with the following idea: to be the best team in America, you first need to be the best team in your own conference.</p><p>Each conference has its own rules for picking a winner (and none of them involve committees!). Each conference lays out, at the beginning of the season, what needs to happen for a team to win. We will lean on those existing rules (which most seem to be happy with) as the first part of our ranking system. Unlike the BCS and the CFP, we will not override the conference’s rankings based on the “eye test” or anything else. The best team in the conference may not always win the conference, but they know what they need to do win, and it’s up to them to do it.</p><p>We allocate the 12 playoff spots between conferences as follows. The top 4 conferences each get two teams into the playoffs: their winner and the runner up. The next 4 best conferences get the remaining 4 playoff spots for their winning teams.</p><p>Of course, this begs the question, how do we decide which are the top four conferences? After the Pac-12 merges into the Mountain West next year, I think there is a clear consensus on which are the top four conferences: they are the SEC, the Big Ten, the Big 12, and the ACC. A consensus is not enough, though, I want to have clear rules for this part as well.</p><p>This is where some simple data analysis is useful. Let me describe a simple way to rank the conferences.</p><p>Every year, each college team plays 3–4 games against teams in other conferences. Ignoring the individual teams, just focusing on the conferences, we can build a simple logistic regression model to predict the outcomes of these games. When I do that on all inter-conference games from 2018–22 (5 years of data), I get the following model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*CUsRThOrxAEAxG6dHxOa2g.png" /></figure><p>The results, I think, are very reasonable. The “power 5” conferences are clearly better than the rest, just as the consensus believes. With 2 Pac-12 teams merging with 11 Mountain West teams, a simple 2–11 combination of the coefficients above gives a coefficient of 0.114 for the new conference, making it clearly the 5th best after the SEC, Big Ten, Big 12, and ACC.</p><p>Applying the system described above, with two playoff spots for the top four conferences and one playoff spot for the next four conferences, and then seeding the conference winners by the rankings above, we get the following 12 team playoff bracket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*MUDqkyEn19Dv6HbSKyCiUA.png" /></figure><p>Again, to my eye, this looks very reasonable. The highest seeding goes to teams that will quite often be the best.</p><p>You could reasonably complain that even this logistic regression is a black-box for many people. We could replace it with something like a conference Elo rating to make it more transparent.</p><p>In either case, however, it is important to note that these rankings are done <strong>before the season starts</strong>. Going into each season, the playoff seeding is already set. Each team knows what it needs to do to make the playoffs: finish in the top two of your conference rankings, if your conference is top four, or win the conference, if your conference ranks 5–8. (Those in the Mid-American conference also know where they stand: they need to win some inter-conference games to improve their ranking.)</p><p>Another nice thing about this system is that all the games still matter. The regular season conference games matter for getting to the playoff. The inter-conference games matter for the future seeding of your conference.</p><p>Again, I don’t claim that this system is perfect in every way, but I do claim that it accomplishes the goal of letting every team start the season knowing what needs to happen for them to win the championship. And while the model used to rank conferences isn’t trivial, it gives the analysts something to write about. Sports junkies can spend the offseason arguing about how the conference ranking system could be changed to help their conference, but when the whistle blows to start the first game, the rules for that season are clear to everyone.</p><p>That should matter to every college football fan since this is, after all, <strong>American</strong> football, not association football (soccer) or rugby football. Replacing the committee with this system would not only make the playoff rankings more predictable, it would make them more American because this is a system based on “laws, not men”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55f0ffa8af0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflections on Ben Graham]]></title>
            <link>https://kczat.medium.com/reflections-on-ben-graham-ba9e8412bb0f?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba9e8412bb0f</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Mon, 18 Sep 2023 18:18:02 GMT</pubDate>
            <atom:updated>2023-09-18T18:18:02.493Z</atom:updated>
            <content:encoded><![CDATA[<p>A couple weeks ago, Ben Claremon of the Compounders podcast <a href="https://compounderspod.substack.com/p/saying-goodbye-to-benjamin-graham">wrote an article</a> about his investing journey that started with the approach advocated by Ben Graham but eventually turned toward Buffett’s, away from deep value and toward “compounders”. The outlines of this story are probably fairly common. I say that because they match parts of my own investing journey as well.</p><p>Having read about Claremon’s journey, I felt inspired to write down some of my thoughts on Graham’s contributions, where they may differ from what has been written many times before. To do so, I need to split the analysis into two parts, one for his quantitative strategy and one for his approach to discretionary stock picking.</p><h3>Graham for Quantitative Strategies</h3><p>Without question, Graham contributions were critical to our understanding of quant strategies. In fact, I still think Graham doesn’t get enough credit.</p><p>In my opinion, there is stronger evidence for quantitative value investing in Graham’s book, <em>The Intelligent Investor</em>, than in the French &amp; Fama paper that defined the “value factor”. I say that primarily because the second edition of the book included an <strong>out-of-sample</strong> study, showing that buying low P/E stocks outperformed even after the publication of the first edition! In contrast, the value factor has had approximately zero return since French &amp; Fama published their paper. Finding a strategy that not only outperformed in the past but also continued to work for decades after publication is the <strong>holy grail</strong>, and Graham achieved that in the 1950s.</p><p>While Graham’s basic strategy no longer seems to work today, some simple variations of it do work. I wrote about <a href="https://kczat.medium.com/the-value-factor-trends-b56f79dc9be3">one of those</a> before, and I know of a couple of others as well. While you have to do a little more work to outperform now than what Graham described over 50 years ago, the success of these quantitative strategies remains a remarkable achievement.</p><h3>Graham for Discretionary Strategies</h3><p>Ben Claremon’s criticism of Graham was not for his quantitative strategies but rather with his approach to discretionary stock picking. Like Ben, I no longer find myself leaning on these tools, instead converting toward a more Buffett-like approach.</p><p>Here are the key points about value investing that, looking backward, I wish I had realized earlier and which would have pointed me toward Buffett’s approach instead of Graham’s:</p><ol><li><strong>The Logical Conclusion of Fundamental Analysis</strong></li></ol><p>Any time you plan to hold a stock for even 1–3 years, you are ultimately making a bet on <em>what other people will think </em>about the stock. Listening to some value investors, you instead get the impression that you can send your DCF spreadsheet to the New York Stock Exchange and, as long as the math checks out, you get to sell at that price. Sadly, that is not how it works. Instead, the only price you can sell at is what others are willing to pay.</p><p>Some value investors like to say that their spreadsheet calculates an “intrinsic value” that is a “source of gravity” to which the stock price is drawn, but absent some sort of arbitrage mechanism, I see no reason to believe that this is true. To me, this sounds more like the investing version of <a href="https://en.wikipedia.org/wiki/The_Secret_(Byrne_book)">The Secret</a> (the “law of attraction”) than an accurate description of how the stock market works. In reality, there is no such thing as an objective intrinsic value, only different people’s opinions of intrinsic value. If you are planning to sell in a few years, you are still making a bet about other people’s future opinions.</p><p>Still, some argue that, if the price is <em>very far</em> from their estimate of intrinsic value, then it is safe to assume that it will revert at least somewhat toward the mean. Personally, I have seen no evidence that this is true. Stocks always seem able to get <em>even further</em> from my estimate of fair price. See Tesla or any meme stock for a recent example of this. Buying the stock amounts to a bet that other people will “come to their senses” within 1–3 years, and in most cases, nothing forces them to do so.</p><p>I see two sensible responses to this fact.</p><p>First, you could bite the bullet and accept that you are betting on what others will think in the future. In that case, there is no a priori reason to believe that a DCF spreadsheet is the most accurate way to predict it. You could apply any manner of prediction mechanism — machine learning, for example. You could look at new data sources. The most obvious data source, when trying to predict future transaction prices, is past transaction prices, but that means straying into the realm of technical analysis, which is anathema to fundamental analysts.</p><p>If your goal is to stay purely within fundamental analysis, then I think you are forced into the second option: <strong>never sell</strong>. If you hold until the eventual liquidation of company assets, collecting dividend payments along the way, then it doesn’t matter what anyone else is willing to pay for the stock. As far as I can tell, that is the <em>one and only way</em> that you avoid betting on other people’s opinions about the stock. In short, Buffett’s approach of having an ideal holding period of “forever” is the <strong>logical conclusion</strong> of a commitment to using fundamental analysis to pick stocks.</p><p><strong>2. Outperforming Requires Looking (Far) Into the Future</strong></p><p>If you never sell, then as is well known, probably 90% or more of the value you are buying comes from cash flows arriving more than five years in the future. Thus, the inevitable conclusion, I think, is that fundamental analysts must be willing to make predictions about company fundamentals more than five years in the future. Once again, logic requires us to do something that is anathema to some value investors.</p><p>Rather than looking forward, these value investors pride themselves on how far they look backward. For example, they prefer last year’s earnings to analyst estimates of next year’s earnings, despite how accurate the latter usually are: each quarter, most companies’ earnings come within a few percentage points of the estimates. Academic research has <em>consistently</em> found that P/E multiples using next year’s earnings better explain stock prices than those using last year’s earnings.</p><p>Some prefer to look even further backward, not using just last year’s earnings but instead an average of several prior year’s earnings (often calling these “normalized earnings”). The CAPE ratio is one metric that uses this approach for valuing the entire market. Its poor recent track record doesn’t seem to diminish enthusiasm for using it. While the CAPE ratio worked well in prior centuries, it is theoretically unsound. I have yet to find any valuation textbook that includes past earnings in calculations of intrinsic value. They all include only future earnings.</p><p>Value investors usually justify their reluctance to look forward with beliefs about the strongly mean-reverting nature of company fundamentals, especially growth. I wrote <a href="https://kczat.medium.com/how-i-became-a-bad-investor-f171434d2ce9">an article</a> two years ago about how that very idea led me astray for many years as an investor and how more recent data demonstrates there is less mean reversion than claimed: the top quintile of growers continue to grow faster than average for over a decade!</p><p>Buffett, of course, was one of the first to identify this phenomenon. He explained how companies with “moats” can maintain superior fundamentals for an extremely long time and encouraged investor to focus on identifying and buying those companies, even though they are typically more expensive by standard metrics like P/E. (Also, it’s not hard to update these metrics to work better. I explained one way in another <a href="https://kczat.medium.com/adjusting-p-e-ratios-for-growth-4280e17d9a50">past article</a>.)</p><p>Some value investors incorporate moats into their strategy, identifying them with historical data, but maintaining their hesitancy to look forward. In my opinion, outperformance requires looking forward even after you own the stock: you must make the hard decision to sell before the market prices-in deteriorating fundamentals.</p><p>Just as stocks with improving fundamentals will usually appear overpriced, because the market prices some of that in, stocks with deteriorating fundamentals will usually appear underpriced. If they deteriorate for years, the stock could be underpriced for years, possibly all the way to zero. (This tendency of the market to price in a few years of future fundamentals is probably why “no stock in an up-trend has ever gone bankrupt”, as Walter Deemer likes to say.)</p><p>For myself, I will admit that much of the allure of the strong mean-reversion hypothesis is that it makes investing easy, but beating the market isn’t supposed to be easy, and Buffett’s outperformance is no evidence to the contrary. His insane work ethic — the hours invested in reading, learning, and thinking — point firmly in favor of hard work being required, with much of that hard work being thinking about the future.</p><p><strong>3. Accounting Matters</strong></p><p>The value of a business comes not from its revenue but from the part of profits that could be paid out as a dividend. The calculation of “profit”, however, requires a careful matching of revenues with the expenses paid to produce <strong>those</strong> revenues, the result of careful accounting.</p><p>Some value investors have a deep distrust of accounting. They prefer instead to look only at cash flows. However, as I <a href="https://kczat.medium.com/how-accounting-is-making-value-investing-harder-b3924fe77e06">wrote about</a> in the past, that does not solve the problem. Comparing cash inflows and outflows in a given year is only matching revenues with the corresponding expenses for companies that are <strong>not growing</strong>. This sort of “cash accounting” undervalues growing business and overvalues shrinking ones, making it a sure fire recipe for underperformance.</p><p>In recent years, parts of the value investing community have brought attention to this issue, particularly in response to the rise of the largest tech companies whose software development costs are routinely expensed in a different year than when they generate revenue. <a href="https://www.osam.com/Commentary/negative-equity-veiled-value-and-the-erosion-of-price-to-book">OSAM found</a> that trying to restore matching (by “capitalizing intangibles”) would have generated superior returns.</p><p>As usual, Buffett, I think, has been onto this for decades. While other value investors prefer “free cash flow” as their calculation of potential dividend, Buffett’s metric is “owner’s earnings”. The two are conceptually similar, but the latter notably relies on accounting earnings, not cash flows.</p><p>I would also point out that, while Charlie Munger may take the occasional shot at non-GAAP metrics, Berkshire Hathaway itself likes to report non-GAAP metrics. They have noted the GAAP’s requirement that they mark their investment portfolio to market every quarter makes their accounting earnings essentially meaningless. (This is a perfect example of the accounting problems I discussed in the article mentioned above.) Instead, they report earnings without those changes, a non-GAAP metric.</p><p>For myself, I will admit that the allure of cash accounting is, once again, simply that it is easier. But as I said above, beating the market isn’t supposed to be easy. We should expect outperformance to require us to do the (hard) accounting work necessary to understand the true profitability of each business.</p><p><strong>4. The Market Rewards Optimism</strong></p><p>Owning a stock for the long term requires optimism about the future prospects of the business. Even owning an S&amp;P 500 index fund requires faith in the long term prospects of the US economy. For over a hundred years, that optimism has been rewarded.</p><p>Investors, though, are not only interested in the part of the returns that come from the overall growth of the stock market, so-called “beta”, but also in the outperformance of the investment, its so-called “alpha”. An analogy that is silly but nonetheless useful for me is thinking of beta as coming from <strong>optimism</strong> and alpha as coming from <strong>contrarianism</strong>. To gain alpha, you need to buy stocks that the market is underpricing (or short stocks that the market is overpricing), which requires a contrary view to the market.</p><p>By this analogy, an outperforming investment, beta + alpha, comes from <strong>contrarian optimism</strong>. The most basic way to outperform is to buy the S&amp;P 500 when market sentiment is extremely poor, when others think the good times will never return. You are rewarded not only with the beta of the growing US economy but also with the alpha of being right that things were not so bad as they seemed.</p><p>Value investing requires having a contrary view, but some value investors, I think, have a contrary view not because they are contrarian optimists but because they are <strong>pessimists</strong>. Perpetually convinced that a recession is just around the corner, they always have one foot out the door. The strategy of pessimists is not beta + alpha: it is –beta.</p><p>Pessimism is a recipe for continual underperformance because, despite all our focus on alpha, beta is a much larger component of returns than alpha. Even if the pessimists are occasionally right and collect some alpha, over the long term –beta + alpha &lt; beta. That is, pessimists will underperform a basic strategy of simply betting on the US economy via an index fund.</p><p>It always shocks me that many pessimistic value investors are also fans of Warren Buffett because Buffett is a relentless optimist. If that wasn’t clear enough from his cheery demeanor, just a few years ago, he spelled it out in clear and simple terms: “Never bet against America.” No one could say it any more simply: –beta is a losing strategy.</p><p>Obviously, I’m not adding anything by saying that Buffett knows what he is doing, but the four points described above are probably the key insights that caused me to move away from Ben Graham’s toward something closer to Buffett’s approach for discretionary stock picking.</p><h3>Final Thoughts</h3><p>In our discussion above, it should not surprise us that we needed distinguish between quantitative and discretionary investing strategies. Those are two very different areas of investing. As I’ve <a href="https://kczat.medium.com/matching-goals-with-strategies-4b148b67397e">written about</a> before, it usually doesn’t even make sense to use the same metrics to measure performance for both types: quantitative strategies are probably best measured with relative performance, while discretionary strategies are probably best measured with absolute performance.</p><p>In the end, I come away with opinions of Graham’s approaches to quantitative and discretionary investing that point in opposite directions. While Graham’s approach to discretionary investing is, in my mind, overvalued and more investors should be taking Buffett’s lessons to heart, I continue to think that Graham’s approach to quantitative investing is undervalued, especially in terms of its influence and track record. While Buffett is undoubtedly the GOAT of discretionary stock picking, Graham is one who is in the discussion for GOAT of quantitative investing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba9e8412bb0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do We Teach Under-Parameterized Models?]]></title>
            <link>https://kczat.medium.com/why-do-we-teach-under-parameterized-models-890360d599bb?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/890360d599bb</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 00:49:13 GMT</pubDate>
            <atom:updated>2023-08-31T00:49:13.198Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first studied machine learning, over 20 years ago, the course started with classical statistical techniques (so-called “maximum likelihood”) and used that as a jumping-off point for machine learning (ML) approaches to prediction. I used the same approach in <a href="https://www.osam.com/Commentary/ml-investing-linear-regression-to-decision-stumps">an article</a> I wrote for OSAM about applying ML to investing. Even though the classical statistical approach is clearly inferior to ML in actual prediction tasks, it is useful as a stepping stone toward understanding ML.</p><p>In addition to the critical distinction between classical statistics and ML that has been around for decades, these days, there is a similarly important distinction between conventional / classical and deep-learning approaches or, perhaps more to the point, between “under-parameterized” and “over-parameterized” ML models. Just as with statistics vs ML, these two approaches require thinking about the prediction problem in distinct ways and the newer approach has clearly superior prediction accuracy. The winning solutions to Kaggle competitions, I am told, <em>almost always</em> use approaches that build over-parameterized models.</p><p>That similarity leads me to think that, while under-parameterized models may be useful as a step to understanding over-parameterized ones, our ML courses should make clear to students that over-parameterized models are what they will almost always want to use in practice.</p><h3>From Statistics to Conventional ML</h3><p>The goal in any supervised learning problem is to use training data (examples) to build a model that can make accurate predictions on new data. The universe of possible models are split up into “classes”, each containing models that are identical except for some number of parameters (a.k.a. “weights”). An ML approach comes with an algorithm for finding the choice of parameters — the model within that class — that will do the best job of accurately predicting unseen examples.</p><p>In classical statistics, we are taught to choose the model that <strong>best fits</strong> the training data, the “maximum likelihood” model for those data. Conventional ML starts with the empirical observation that the maximum likelihood model is <strong>usually not</strong> the most accurate on unseen examples.</p><p>Almost always, you can improve accuracy by choosing the weights, not by naively minimizing errors on the training data (maximizing the likelihood of the predictions), but by minimizing a function that also includes a penalty on models that are <strong>too complex</strong>, essentially Occam’s Razor.</p><p>In practice, the results look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*mteN0eGG0GKt9W1yza4kmQ.png" /><figcaption>from <a href="https://arxiv.org/abs/1812.11118">arxiv:1812.1118</a></figcaption></figure><p>Here, the dashed curve shows the training error and the solid curve shows the error on unseen (“test”) examples, as we consider more and more complex models. Initially, test error decreases along with error on the training data, but beyond some point (the “sweet spot” above), a model that is complex enough to improve accuracy further on training data actually gives <strong>worse</strong> predictions on test data.</p><p>Models past the sweet spot are said to “over-fit” the training data. Usually, we understand this by considering that the training data itself is rarely perfect but instead contains some noise. Once you give your model too much complexity — too much <strong>capacity</strong> to learn — it will learn the random noise as well the signal present in the training data. Learning the noise reduces errors on the training data but can (and usually does) cause more errors on the test data because the latter has <em>different</em> random noise.</p><p>To find a model at the sweet spot, we introduce a complexity penalty into our calculations that causes models capable of fitting the random noise to score worse than models that do not fit the noise, even though they have lower error on the training data.</p><p>For classical statistical problems, the maximum likelihood approach works well because it is used with models that are <em>so simple</em> that their capacity to learn is <em>never</em> past the sweet spot. If we want to improve accuracy further, though, we need to consider more complex models. Since we don’t start out knowing where the sweet spot is, we need to consider models that are sufficiently complex to over-fit and then add in a complexity penalty in order to push back to the sweet spot.</p><h3>From Conventional to Over-Parameterized Models</h3><p>The incredible observation made in the last decade is that this is only half of the picture. Something miraculous often happens if you keep going, letting your models be more and more complex:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*XA4scqQHrmM4Rfgf49xwPQ.png" /><figcaption>from <a href="https://arxiv.org/abs/1812.11118">arxiv:1812.1118</a></figcaption></figure><p>Continuing to make the models more complex can <em>eventually</em> improve performance again! For these problems, the picture ends up with two different dips in error rate, a so-called “double descent” curve.</p><p>Once again, there is a particular model complexity where the error rate changes direction. Unlike the “sweet spot”, whose location is initially unknown, we actually know where this second location is: it is the point where the error rate on the training data becomes <strong>zero</strong>! This second point is called the “interpolation threshold” because the model now interpolates the training data, hitting every data point exactly without error.</p><p>Prior to the last decade, it was widely known that zero training error was a bad: “A model with zero training error is overfit to the training data and will typically generalize poorly” (The Elements of Statistical Learning, 2009, quote <a href="https://arxiv.org/abs/2005.08054">here</a>). For various reasons (e.g., computational limitations), no one tried continuing to increase the complexity anyway. Those who finally did try made the incredible discovery shown in the picture above, that overfit models can be even more accurate.</p><p>This new picture gives us two reasons why over-parameterized models are preferable to under-parameterized ones in practice. First, they usually (though not always) have better performance. We see in the picture that the second dip drops further down than the first. Second, they are much easier to tune. Rather than searching for a sweet spot, we simply keep increasing the model complexity until the training error is zero and then continue beyond that as long as the performance improvements give a worthwhile improvement in test error rate. (Bigger models have higher computational costs, so not all improvements in accuracy are worthwhile.)</p><h3>Two Distinct Approaches</h3><p>One problem with the picture above is that it makes the regime of over-parameterized models seem like a straightforward extension of the under-parameterized regime: “just do the same thing but now let the models get even more complex”? In reality, working with over-parameterized models requires a change in approach, as was needed to move from statistical models to ML.</p><p>One way to think about the under-parameterized regime is that we find our model by limiting ourselves to models of a certain complexity and then, within that space, find the one that reduces the training error as much as possible. Once the models have enough capacity to achieve zero training error, however, this approach no longer makes sense. There are many models (infinitely many) that can achieve zero error, so which do we pick?</p><p>What we do instead, then, is limit ourselves to models with zero training error and then, within that space, find the one that is least complex. We will consider models with as many parameters as we our machines can handle, and our model searching algorithm will find the one that uses those parameters the least in order to achieve zero error.</p><p>If I can get slightly more technical for a moment, we can see further distinctions between the two regimes in the mathematics. With under-parameterized models, it usually works best to measure model complexity with the L1 norm because that tends toward models that <em>don’t use</em> some of the parameters at all (setting them to zero). With over-parameterized models, it usually works best to measure model complexity with the L2 norm, which uses all of the parameters but simply keeps their values small.</p><p>Indeed, another one of the remarkable discoveries of the last decade is that it is often unnecessary to <em>explicitly</em> minimize model complexity. It appears that this is the case because the standard model fitting algorithm, gradient descent, naturally finds the solution with the smallest L2 norm. The algorithm itself is implicitly finding the “simplest” model in that sense.</p><h3>Why Do Over-Parameterized Models Work?</h3><p>Understanding when and why over-parameterization works is an area of active research, but let me mention a couple of likely suspects.</p><p>The first suspect is <strong>averaging models</strong>. Even with under-parameterized models, it was known that averaging together many complex models can actually produce a simpler model. In the following picture, think of a more complex model as one that allows more bend in the curve dividing blue dots from orange dots (a classification problem). Averaging together many wavy curves could actually produce a curve that is fairly straight. (Credit to Pedro Domingos, who drew a picture like this one of his lectures.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ReGmnFSlUvN_IOwbvOOZg.gif" /><figcaption>The average of complex models can be a simpler model.</figcaption></figure><p>The most important class of over-parameterized models are deep neural networks. The large language models powering ChatGPT, for example, are said to have more parameters than the number of examples used to train them! That is enough space to <strong>memorize</strong> the input, so there is little question that they are working in the over-parameterized regime.</p><p>Deep neural networks are often trained using “dropout”, which implicitly causes the algorithm to build an average of many different models. Each iteration, some parameters are left out, requiring the algorithm to train a model using just the remaining parameters. The final result is an average of all of the models built in different iterations.</p><p>The other important class of over-parameterized models are ensembles of trees such as Random Forests. The latter are explicitly an average of trees. Each individual tree is usually large enough to perfectly fit the training data, meaning they are almost certainly over-fit, but the forest combines them all together by averaging. Adding each new tree actually makes the model more complex, in terms of parameter count, but on almost every problem, more complexity combined with more averaging produces a more accurate model.</p><p>The other suspect I want to mention is related to the fact that models with zero training error are definitely learning the noise in the training data. Specifically, this suspect is the idea that more complex models are able to fit the noise with <strong>less damage</strong> to the rest of the model.</p><p>For example, suppose that we are trying to learn this curve that separates the blue dots from the orange ones but the data has been corrupted in such a way that one blue dot was turned orange. Here, the dark blue / orange dots are training data and light blue / orange dots are test data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ag_2eSHYGMvtXbSLMQ6gVg.png" /></figure><p>If we restrict ourselves to models of medium complexity — only a small amount of “bend” — then we can pick off this one orange point without affecting the rest of the training data, but the “bulge” we introduced is so large that, unbeknownst to us, it includes a couple of the test data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5rcxptvkyD1mxTr3Y_duQ.png" /></figure><p>In contrast, if we use even more complex models, that allow even more bend, we can pick off that one point without taking any test data points with them, giving us less error in the test data as well as the training data. The resulting model <em>looks like a line</em> nearly everywhere, except for the small spot where it has to fit the noisy data point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_eapr9flqx8pyMcLscGsQ.png" /></figure><p>As I said above, researchers are still trying to figure out which of these suspects (or other ones) best explains the success of over-parameterized models, but both of these make sense to me and give me enough confidence to believe what the data is already telling us: that over-parameterized models are almost always best. As noted above, the winners of Kaggle competitions are almost always over-parameterized, specifically, deep neural networks or ensembles of trees.</p><h3>Revisiting the Wide Receiver Data Model</h3><p>The <a href="https://www.osam.com/Commentary/ml-investing-linear-regression-to-decision-stumps">OSAM article</a> I cited above looked at the problem of predicting the success of college wide receivers in the NFL using very simple ensembles of trees. Recently, I revisited this problem to see if I could demonstrate the same “double descent” behavior that others had seen with trees. Sure enough, you can see it here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*by2Qu3nJam3kNNF0xQBGMQ.png" /></figure><p>The vertical axis is the error rate (labelled “accuracy”) on test data. The horizontal axis is a measure of complexity: the label N/M means an ensemble of M trees, each containing N nodes.</p><p>The first part of the curve shows the behavior for ensembles of 10 trees as we increase the complexity of the individual trees from 5 nodes to 50. There, we see the traditional first descent of the under-parameterized regime. Moving from 1 to 5 to 10 nodes in the trees makes them more accurate, but moving from 10 nodes up to 50 makes the results worse.</p><p>However, using 50 nodes per tree works fine if we average enough of them together. The second part of the curve shows how the error rate drops as we average together 30, 50, up to 250 trees, each containing 50 nodes. As we can see, the final result is much better than what we would get if we stopped at the initial “sweet spot” of 10 trees containing 10 nodes each.</p><p>You might wonder, since 10 nodes was best when we averaged together only 10 trees, would it work better to stick to 10 nodes as we build ensembles of 30, 50, up to 250 trees? The answer is no.</p><p>The orange curve in this picture shows the results with trees containing only 10 or fewer nodes, rather than 50 nodes. The results are clearly worse. As we can see, we want more nodes in the trees as well (50 or more nodes, not just 10) as we do more averaging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2cQqgGzeco7LWnzYNcx-vA.png" /></figure><p>It is worth pointing out that my wide receiver data set is extremely small: only several hundred examples. This problem thus shows that over-parameterization is beneficial even on “small data” learning problems.</p><h3>Conclusion</h3><p>The results of Kaggle competitions and even my own experiments (not just wide receiver data but also factor models) suggest that, in practice, over-parameterized models give more accurate predictions on most problems. They are also easier to fine tune since there is no search for a “sweet spot”. While under-parameterized models remain useful for explaining the core ideas of machine learning, they seem hard to recommend for practical use. Like statistical models, they seem best as a stepping stone, this time to the better models of the over-parameterized regime.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=890360d599bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Limits to Super-Intelligence]]></title>
            <link>https://kczat.medium.com/limits-to-super-intelligence-a0c7b5ff22e6?source=rss-23a569c90e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0c7b5ff22e6</guid>
            <dc:creator><![CDATA[Kevin Zatloukal]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 19:38:28 GMT</pubDate>
            <atom:updated>2023-04-03T19:38:28.699Z</atom:updated>
            <content:encoded><![CDATA[<p>While the community struggles to sort out how the capabilities of LLMs compare to those of humans, it may be easier to put limits on the capabilities of LLMs by comparing them to other AIs. In fact, I think it is provably true that GPT[x] will <strong>never be better</strong> at chess than AlphaZero.</p><p>As I will explain below, this claim does not require any prediction about what capabilities will emerge in future version of GPT. Rather, it follows from that the fact that the capabilities of AlphaZero <strong>subsume</strong> those of ChatGPT when playing chess. While it is logically possible (though unlikely) that ChatGPT could match the ability of AlphaZero, it cannot ever be better at chess because AlphaZero can do anything that ChatGPT can do (and in reality, it can almost certainly do more).</p><h3>ChatGPT versus AlphaZero</h3><p>As a quick reminder, ChatGPT can take a text description of a chess game, feed that through its deep neural network, and output the most likely next move. The picture looks like this (albeit with <strong>many</strong> more hidden layers):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYDdPNx1-8EGmQStKrHAGQ.png" /></figure><p>AlphaZero also contains a deep neural network. When you feed it a chess position — now encoded in some sort of internal representation, rather than text — it will also spit out the probabilities of the next move:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5Ex-ypFc5eoq3q8ilgJlA.png" /></figure><p>For AlphaZero, however, that is just the beginning. That is only <strong>one step</strong> of its chess calculation. Next, it calculates (in its internal representation) the board position after each of those moves, and then recursively examines each of those board positions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RR0b-Cb0oaFX4lsidE1N4Q.png" /></figure><p>It continues in this manner, performing a deep tree search of the space of possible moves, often looking 20 or even 30 moves ahead.</p><p>In AlphaZero terms, ChatGPT and all future GPTs <strong>only think “one move ahead”</strong>. They could potentially analyze an individual position at the same level as future AlphaZeros, but they will never be able to exceed its capabilities because AlphaZero’s deep neural network can do the same. In all likelihood, AlphaZero will remain substantially better at chess than future GPTs due to its ability to analyze many moves ahead.</p><h3>Caveats</h3><p>Since I’ve made a bold claim, let me add the appropriate caveats. In this analysis, I am assuming that future AlphaZeros are able to increase the size of their neural networks as much as future GPTs and able to change their neural network architectures as well. I’m also assuming that future AlphaZeros are trained on all the same data, specifically, the same set of chess games.</p><p>One might argue that future GPTs have an advantage from being trained on text as well. (Perhaps something it learns from Shakespeare will give it an edge in chess!) However, I will again assume the same is data is available to future AlphaZeros, and in that case, you could train a larger model on text and chess positions and then simply not use the text inputs at runtime. Under this configuration, future AlphaZeros’ neural networks for analyzing individual moves remain equally capable to anything future GPTs can do.</p><h3>Internal Representations</h3><p>The ability of humans to think ahead is not limited to chess, and in all cases, doing so depends on having an <em>internal representation</em> for the state of the world after potential moves have been made.</p><p>Some people like to argue that LLMs lack an internal representation, but this is hard to know for sure. Some bits of its hidden layers could, in principle, be encoding the chess position in the same way as AlphaZero:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ebzp2Hzr9jzrUyxi8Yl5wg.png" /></figure><p>Later hidden layers might even be calculating the position after potential moves. I can’t say one way or the other.</p><p>Here’s what I can say. First, ChatGPT cannot look arbitrarily far into the future because it does not do a tree search. Its architecture does not allow for that. No amount of training will make a tree search magically appear inside its neural network. Second, whatever calculation ChatGPT’s neural network can do, AlphaZero’s can also do… and then it adds tree search on top of that.</p><p>The discussion above is also missing some extra difficulties for ChatGPT. Its architecture considers any possible word coming next, including ones that are not chess moves, illegal chess moves, etc. ChatGPT must be trained to avoid illegal moves. (And this appears to be difficult given how often it makes illegal moves now!) In contrast, AlphaZero has ordinary software that calculates all moves that could follow, and that code does not produce any that are illegal. The humans that built it made sure that illegal moves are not possible. No training necessary.</p><h3>Super-Intelligence?</h3><p>Some are claiming that LLMs will, once large enough and trained on enough data, become “super-intelligences”. Such a thing should, I think, be able to play chess better than any human. Since future GPTs will always, in the sense described above, think only one move ahead, the claim that super-intelligence will emerge is a claim that single move analysis will eventually become so good that there is no need to do a tree search. I think that is a very bold claim, and not a bet I would make myself.</p><p>Experience with chess engines using deep neural networks, trained on massive data sets, is contrary to this. As far as I know, no one has ever found evidence that tree search did not hugely improve performance.</p><p>It is also interesting to note that, if some future GPT was able to figure out that a certain position was, say, mate in 14, the “thinking” to figure that out must happen at <strong>training time</strong> not at run time (since it lacks a tree search). If you consider the number of possible positions that are mate in 10+ moves and the amount of calculation that would need to happen at training time to analyze those all, I imagine we would discover that it greatly exceeds the amount of training we could ever do for an LLM. If that is true, then real LLMs will be strictly worse than AlphaZero for that reason alone.</p><h3>Conclusion</h3><p>As we have seen, while comparing LLMs to human reasoning remains difficult, comparing LLMs to other deep neural networks allows us to find limitations fairly easily. We know that AlphaZero will never make illegal moves, while future GPTs will need to be trained not to. We know that whatever analysis future GPTs can do of a chess position, that is only thinking “one move ahead” for future AlphaZeros.</p><p>Finally, we can see that the claim of super-intelligence emerging within an LLM implies the claim that LLMs will eventually do single position chess analysis so well that they do not need to apply a tree search. That is, in my opinion, a very bold claim that is not supported by experience and, even if logical possible (a big “if”), it would likely would require computational resources exceeding those that will ever exist. If that assessment is correct, then we can rule out the emergence of such super-intelligences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0c7b5ff22e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>