<?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 Eric Clower on Medium]]></title>
        <description><![CDATA[Stories by Eric Clower on Medium]]></description>
        <link>https://medium.com/@eclow?source=rss-291732250ca2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wMKMHMuvsHl1XuBBzeAmCg.jpeg</url>
            <title>Stories by Eric Clower on Medium</title>
            <link>https://medium.com/@eclow?source=rss-291732250ca2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:08:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eclow/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[Moving for Your Rights Has a Price Tag]]></title>
            <link>https://medium.com/@eclow/moving-for-your-rights-has-a-price-tag-00673cf91d7f?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/00673cf91d7f</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[lgbtq]]></category>
            <category><![CDATA[cost-of-living]]></category>
            <category><![CDATA[democracy]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Sun, 15 Nov 2026 03:28:55 GMT</pubDate>
            <atom:updated>2026-11-15T03:28:55.570Z</atom:updated>
            <content:encoded><![CDATA[<p>In 2019 my wife and I moved from Seattle, WA to Kansas City, MO. The first question we got when we told people was, “Why?”. We always tried to sprinkle a few positive sentiments about KC culture, landscape, etc. However, the primary driver for us leaving Seattle (and landing in KC) was cost of living (don’t get me wrong KC has a lot of great qualities this just happened to be the driver for us).</p><p>Being an LGBTQ family, we had concerns moving from the West Coast to the Midwest (and not the Illinois/Minnesota Midwest but Missouri). These concerns were amplified by uncertainty surrounding our federal protections. But the reality is that the rights and safety we found in Seattle come at a price tag we can’t afford.</p><p>This personal experience has always left me frustrated with the “Just move if you don’t like it here” message. What an insulting oversimplification of reality.</p><p>Suppose you live in a state that ranks near the bottom in electoral democracy and legal protections for LGBTQ people, and you’re considering a move to one that ranks near the top. Plenty goes into a decision like that, but cost of living is one of the biggest factors. In some cases it’s not even about what sacrifices you’re willing to make but rather that there aren’t even enough sacrifices to make it a possibility. To put it in economics terms, consumer demand comes not just from a willingness to pay but an ability to pay also.</p><p>Since these thoughts have always been more experiential than anything else, I dug into the data on home values, state democracy scores, and LGBTQ legal protections. Admittedly, housing prices are not the only component of cost of living but they’re a pretty substantial one.</p><p>I started first by looking if there was a causal relations between democracy scores and housing prices. This was spurred in part by a statement I made to a colleague (half-jokingly) that increases in democracy increase home prices. The initial correlations were stronger than I expected, but they mostly disappeared once I accounted for differences in income, education, and urbanization.</p><p>I could have stopped there, but causation is not really the issue. Even if democracy doesn’t make housing expensive, does the distinction matter to someone thinking about moving? Whatever explains the price differences, a household relocating still has to pay them. So I shifted my focus from what drives housing prices to what those prices mean for people considering a move to a state with stronger democratic institutions and LGBTQ protections.</p><h3>First, the Pattern</h3><p>To see whether my initial observation held up, I started with three measures.</p><p>For electoral democracy, I used the UC Berkeley State Democracy Index (SDI 2.0), which evaluates states across a range of indicators, including voter registration, election administration, and redistricting. For LGBTQ legal equality, I used the Movement Advancement Project’s state policy tallies, which assess laws and policies affecting LGBTQ people, including nondiscrimination protections, relationship recognition, and health care. For housing prices, I used the Zillow Home Value Index, which estimates the value of a typical home in each state.</p><p>These measures capture different things. The democracy index focuses on how elections and democratic institutions function, while the LGBTQ policy tally reflects the legal protections and restrictions in each state. Neither is meant to measure human rights more broadly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EgVgz8hEDaG1aoxEe-tCvQ.png" /></figure><p>The initial results supported my observation. In 2023, states with higher electoral democracy scores tended to have higher home values. A one-standard-deviation increase in the democracy index was associated with roughly 20% higher home values, with a 95% confidence interval of approximately 10% to 31%. The correlation was 0.50.</p><p>LGBTQ legal equality showed a similar, slightly stronger relationship with home values, with a correlation of 0.61. The two policy measures were also closely related to each other, which makes it hard to separate their associations with housing prices using only 50 states.</p><p>But I wanted to know whether these relationships would hold up after accounting for other differences between states. States with stronger democratic institutions also tend to have higher incomes, more college-educated residents, and larger urban populations, and each of those can be associated with housing prices independently of a state’s political institutions or laws.</p><p>Once I controlled for household income, educational attainment, and urbanization, the relationship between democracy and home values shrank considerably. The original 20% estimate fell to about 2%, with a confidence interval of -6% to +11%, so I could no longer distinguish it from zero. LGBTQ legal equality followed the same pattern.</p><p>I also checked whether changes within individual states over time were associated with changes in home values. If improvements in democracy were closely tied to rising housing prices, I’d expect to see some sign of it within states, not only when comparing different states. The estimated relationship was small, about 1%, with a confidence interval of -1% to +3%.</p><p>Another useful comparison came from looking beyond housing. States with higher democracy scores also tended to have higher prices for goods generally, as measured by the Bureau of Economic Analysis’s regional price levels. That suggests the pattern reflects broader differences in the cost of living and isn’t specific to housing markets.</p><p>Taken together, the results suggest the initial correlation mostly reflects economic and demographic differences between states. Higher-income, more educated, and more urban states tend to have both higher housing prices and stronger democratic institutions and LGBTQ protections.</p><p>There are some qualifications. Two alternative measures of democracy retained a modest association with prices even after the same controls, so I wouldn’t conclude that income, education, and urbanization explain everything. Still, the evidence doesn’t offer much support for the idea that stronger democracy or LGBTQ protections independently drive higher housing prices.</p><p>That answered the question that started this project. It also made me realize that explaining a price difference and understanding what it means for someone considering a move are two different problems.</p><h3>Why That Doesn’t Settle the Question</h3><p>This is where the question changed for me. Statistical controls help explain how housing prices relate to other state characteristics, but they don’t make anything cheaper. If you’re considering a move from Mississippi to Minnesota, you don’t get a discount because Minnesota’s higher prices can largely be accounted for by income, education, and urbanization. You still have to pay them.</p><p>For someone moving because of a state’s voting laws or LGBTQ protections, that cost gap can matter a great deal. Whether those policies caused the higher prices is a separate matter from whether you can afford to live in a state that offers them.</p><p>That led me to a more practical question: how much does it cost to move from a state with relatively weak democratic institutions and LGBTQ protections to one with stronger ones?</p><h3>How I Set Up the Comparison</h3><p>To get a sense of what a move might cost, I started by dividing states into groups based on their electoral democracy scores and LGBTQ legal protections. I ranked states on each measure separately, then identified those that fell in the top third or the bottom third on both. That gave me two groups:</p><ul><li><strong>Low-ranked states: </strong>Alabama, Arkansas, Georgia, Idaho, Indiana, Louisiana, Mississippi, Missouri, Oklahoma, South Carolina, Tennessee, Texas, and Wyoming.</li><li><strong>High-ranked states:</strong> California, Colorado, Connecticut, Illinois, Maine, Minnesota, New Jersey, New Mexico, New York, Oregon, Vermont, and Washington.</li></ul><p>The groups simply separate states that performed relatively well on both measures from those that performed relatively poorly. They say nothing about whether any individual state is democratic or undemocratic.</p><p>To estimate what moving between these groups would mean for housing costs, I used a hypothetical household earning $68,000 a year, about the median household income in the low-ranked states. I assumed income would stay the same after the move, which is a reasonable scenario for someone working remotely or retiring. It also keeps the comparison focused on housing costs without bringing in changes in earnings.</p><p>For the homebuying calculations, I assumed a 10% down payment and a 30-year fixed-rate mortgage at 6.81%, the average rate in 2023, and I included each destination state’s typical property tax rate. These calculations leave out homeowners insurance, maintenance, and closing costs, so they understate the full cost of buying a home.</p><p>For a consistent definition of affordability, I used the conventional threshold of housing costs equal to 30% of gross household income. Households spending more than that are generally classified as housing-cost burdened. It’s an imperfect measure, particularly because it ignores other household expenses, but it works as a benchmark for comparing locations.</p><p>With those assumptions in place, I could ask a fairly straightforward question: if a typical household from a low-ranked state moved to a high-ranked state without changing its income, how much of that income would go toward housing?</p><h3><strong>The Typical Home: Out of Reach Everywhere</strong></h3><p>The difference in home values between the two groups is substantial. In 2023, the typical home value in the high-ranked states was about $412,000, compared with $240,000 in the low-ranked states, a gap of roughly 70%. For the hypothetical household earning $68,000 a year, buying a typical home in any of the 12 high-ranked states would push housing costs above the 30% affordability threshold.</p><p>How far above depends on the destination. Illinois and New Mexico come closest to the benchmark, with estimated monthly housing costs of about 33% of income. Minnesota, Maine, Connecticut, and Vermont fall between 39% and 48%. In New York, Oregon, Colorado, New Jersey, and Washington, the estimated costs exceed half of household income. California stands out even among the more expensive states, with estimated housing costs reaching 83% of income.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*waCWFqd1YSi8mAzWhxv0CQ.png" /></figure><p>For comparison, buying a typical home in the household’s original state would take about 28% of income. That’s already close to the conventional affordability limit, which shows how hard buying a home was at 2023 mortgage rates. Moving to a high-ranked state would push the household over the threshold in every case, sometimes by a wide margin.</p><p>Housing affordability is also a challenge for people who already live in these states. Using each high-ranked state’s own median household income, buying a typical home would still take a median of about 42% of gross income, so higher local incomes don’t fully offset higher prices. The difference for someone relocating is that their income may not rise along with their housing costs.</p><p>That comparison has an important limitation, though: someone moving to a new state doesn’t have to buy the typical home.</p><h3>But Nobody Has to Buy the Typical Home</h3><p>Statewide home values have a limitation when you’re evaluating a move. Prices vary considerably within a state, and someone relocating doesn’t have to buy in its most expensive areas. California’s home values are heavily influenced by its coastal markets, and New York’s by the New York City area, but neither state consists entirely of those markets.</p><p>That matters for this analysis because many of the laws I’m interested in apply statewide. Someone living in Peoria generally receives the same statewide legal protections as someone living in Chicago, and the same is true of Ithaca and Manhattan. Local conditions and experiences can differ, but moving to a less expensive county doesn’t mean giving up the statewide protections that motivated the move.</p><p>I wanted to see how much the affordability picture changed if households looked beyond the typical home. To do that, I calculated a lower-cost housing benchmark for each state, which I’ll call the entry point. I ranked counties from least to most expensive based on home values, then included counties until they accounted for at least 10% of the state’s population. That gave me a meaningful lower-cost portion of each state’s housing market instead of its single cheapest county, which might have very few residents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPYCDuVrfe7CeotQVtLVPA.png" /></figure><p>At these entry points, five of the 12 high-ranked states fall below the 30% affordability threshold for the hypothetical household earning $68,000 a year. Illinois has the lowest estimated housing cost, at about 18% of income, followed by New Mexico at 20% and Maine at 24%. Minnesota and New York both come in at about 26%. All five exceeded the threshold when I used typical home values, so their lower-cost counties change the picture considerably.</p><p>The other seven states still exceed the 30% threshold: Connecticut, Vermont, New Jersey, Oregon, Colorado, Washington, and California. Estimated housing costs at their entry points range from 38% to 46% of household income.</p><p>Even at these entry points, buying takes substantial upfront cash. A 10% down payment ranges from about $13,000 in Illinois to $41,000 in California, before closing costs or moving expenses.</p><p>The low-ranked states also have less expensive counties, though. When I compare entry points in both groups instead of comparing a destination state’s entry point with its typical home, the gap remains substantial. Home values in the high-ranked states are still about 1.8 times those in the low-ranked states. Cheaper counties can make buying more manageable in some high-ranked states, but they don’t close the broader gap in housing costs. (I also want to acknowledge that despite having statewide protections, cultural differences between urban and rural areas can mean large differences in safety and acceptance).</p><p>For someone already living in an inexpensive part of Alabama, moving to a relatively inexpensive county in a high-ranked state could still mean paying considerably more for housing.</p><h3>Renting Is a Much Lower Bar</h3><p>Many people moving to a new state rent first, and that changes the affordability picture considerably. The difference in rental costs between the two groups of states is also smaller than the difference in home values. Median rents in the high-ranked states are about 1.4 times those in the low-ranked states, compared with 1.7 for typical home values.</p><p>For the hypothetical household earning $68,000 a year, renting at the state median would fall below the 30% affordability threshold in nine of the 12 high-ranked states. The exceptions are California, Colorado, and Washington, where median rents would take about 31% to 35% of household income.</p><p>As with homeownership, statewide figures don’t tell the whole story, so I also looked at rental costs in the least expensive county with a population of at least 100,000 in each high-ranked state. The population requirement helps avoid comparisons based on very small counties, although it doesn’t guarantee that suitable rental housing is available.</p><p>Across these lower-cost counties, median rents were only about 10% higher than the median rent in the low-ranked states. In every one of the 12 high-ranked states, the least expensive qualifying county had a median rent below 30% of the household’s income. That’s a substantial change from the homeownership results, and it suggests that a household earning around $68,000 and keeping that income could manage a move to any of the high-ranked states by renting in a lower-cost county.</p><p>That doesn’t mean moving would be easy for everyone. Rental availability, household size, transportation, and other living expenses still matter. But the affordability barrier looks very different depending on whether a household plans to buy or rent.</p><h3><strong>Who It’s Out of Reach For</strong></h3><p>The results so far depend heavily on how much income a household has. Up to this point, I’ve focused on a household earning about $68,000 a year, the median income used in the relocation scenarios, but the picture changes substantially for households earning more or less.</p><p>For households at the 20th percentile of income in the low-ranked states, about $29,000 a year, none of the housing options I examined in the high-ranked states meet the 30% affordability threshold. That includes renting in the lower-cost counties.</p><p>At the other end, households earning about $132,000 a year, around the 80th percentile, face a very different situation. Buying a typical home would meet the benchmark in eight of the 12 high-ranked states, and buying at the lower-cost entry points would meet it in all 12.</p><p>A move that looks financially manageable for one household can be far more difficult for another, and that’s easy to miss when the analysis centers on median incomes. Renting substantially improves affordability for a household earning $68,000, but it doesn’t provide an affordable option for households at the 20th percentile.</p><p>That matters when thinking about the cost of relocating for stronger democratic institutions or LGBTQ legal protections. A household’s ability to absorb higher housing costs depends heavily on its financial circumstances, whatever its reason for moving.</p><h3><strong>What These Numbers Don’t Show</strong></h3><p>This analysis has some important limitations, and I want to be careful about what the results actually show.</p><p>First, I haven’t shown that housing costs prevent people from moving to states with stronger democratic institutions or LGBTQ protections. I don’t have data on who wants to relocate, who has tried, or whether housing costs influenced their decisions. What I’ve shown is that certain housing options exceed a conventional affordability threshold for households at different income levels. A home that costs more than 30% of household income isn’t necessarily impossible to afford, and a home below that threshold may not be affordable once other expenses are considered.</p><p>Second, the differences in housing costs shouldn’t be read as the price of democracy or LGBTQ equality. The states in these groups differ in many ways, and the analysis doesn’t establish that their political institutions or legal protections are responsible for higher housing prices.</p><p>The affordability calculations also rest on simplifying assumptions. They leave out homeowners insurance, maintenance, closing costs, and moving costs, and they assume a household keeps the same income after relocating. Someone moving for a higher-paying job could face a very different affordability picture.</p><p>The state groupings are another limitation. I selected states in the top and bottom thirds of both measures after an initial look at the data, and different cutoffs would change which states are included and could alter the results. Not every state fits the broader pattern, either. Idaho, for example, ranks relatively low on both measures but has comparatively expensive housing.</p><p>Finally, all of the calculations use 2023 data. Housing prices, rents, and mortgage rates have changed since then, so these figures don’t estimate what a move would cost today.</p><p>Taken together, these limitations mean the analysis is best read as a comparison of hypothetical relocation costs. It doesn’t measure actual migration decisions, and it doesn’t provide a causal estimate of what political and legal protections cost.</p><h3><strong>The Takeaway</strong></h3><p>I started this project wondering whether states with higher housing prices also tended to have stronger democratic institutions. The answer was fairly simple. The two are correlated, but most of that correlation appears to reflect differences in income, education, and urbanization instead of a direct connection between democracy or LGBTQ protections and housing prices.</p><p>What interested me more was the question that followed: if someone wants to move to a state with stronger democratic institutions and LGBTQ legal protections, what does that mean for their housing costs? The answer depends heavily on income and the type of housing they’re willing or able to consider.</p><p>For a household earning the median income in the low-ranked states, buying a typical home in any of the high-ranked states would exceed the conventional affordability threshold. Looking at less expensive counties makes buying more manageable in some states, and renting opens up far more options. For lower-income households, though, even the cheaper options I examined remain above that threshold.</p><p>This analysis can’t say whether housing costs prevent people from relocating or whether stronger democratic institutions and LGBTQ protections are responsible for higher prices, but it does suggest that a household’s financial circumstances can play a substantial role in determining which places are realistically within reach. Because the protections that motivate a move apply statewide, where in a state a household settles, and whether it buys or rents, are some of the most important parts of the decision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00673cf91d7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are You Confident Your Optimization Is Really the Maximum?]]></title>
            <link>https://medium.com/@eclow/are-you-confident-your-optimization-is-really-the-maximum-b91d5b0c020f?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b91d5b0c020f</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistical-modeling]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[econometrics]]></category>
            <category><![CDATA[panel-data-analysis]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 12:57:49 GMT</pubDate>
            <atom:updated>2026-11-03T18:15:59.589Z</atom:updated>
            <content:encoded><![CDATA[<h4>How GAUSS 27’s Kernel Procs Made Convergence Checking Affordable</h4><p>I’m not proud to admit this but I usually take an optimization solution as given when I estimate my models. I take a quick glance at gradients, make sure the estimates make theoretical sense, and call it day. If the gradients are small, the iterations have stopped, and the log likelihood looks reasonable, I write it up. Admitedly, this was part laziness and part praticality.</p><p>Robust optimization checking requires repeating the optimization from different starting points and comparing the results. That takes time, though. If one run takes several minutes and you have dozens of series to estimate, followed by a bootstrap, trying many starting values can become expensive. It’s tempting to try one or two and move on.</p><p>I ran into this problem while estimating a Markov-switching model across a panel series of 77 countries. I wanted to check how much the estimates depended on the starting values, but the time required made an extensive comparison difficult.</p><p>This is changing with the upcoming GAUSS 27 release and it’s new compiled kernel procedures. The tools is simple; adding kernel before proc allows GAUSS to compile the procedure to machine code. Combined with vectorization, this made a single likelihood evaluation roughly <strong>15–20 times faster </strong>than in my original code.</p><p>With the faster code, I could repeat the estimation from many more starting points. In 58 of the 77 countries, those additional runs found higher likelihoods than the original run. The optimizer’s convergence report alone hadn’t revealed those better solutions. Not a result I was happy to see but an important one for improving my model.</p><h3>Why starting values matter</h3><p>I’m estimating a Markov-switching model of current account balances using an unbalanced panel of quarterly data for 77 countries. The model allows the average balance, volatility, and persistence of imbalances to change over time. That flexibility makes estimation more challenging, because different combinations of regimes can produce competing explanations of the data. I fit the model separately for each country using maximum likelihood in <a href="https://www.aptech.com/">GAUSS</a>.</p><p>Evaluating the likelihood means working through the observations in order. At each quarter, a Hamilton filter predicts the probability of each of the eight regimes from the previous quarter’s probabilities, then updates them using the new observation. Each quarter’s result feeds the next, so the recursion has to stay a loop even when everything else is vectorized, and that loop is where most of the time goes.</p><p>The likelihood can also have multiple local maxima. Different parameter combinations may explain the same observations in different ways. For example, a high-variance regime might capture a few unusual quarters or a longer period of volatility. These explanations can lead to different likelihood values, and a gradient-based optimizer can settle at different solutions depending on where it starts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofyT8iNZHWtOsAUacVBXNQ.png" /><figcaption>Different starting values can lead to different solutions on the same likelihood surface. Additional starts may reveal a higher peak, but do not guarantee finding the global maximum. Illustrative example. Illustration created with AI-assisted Python code. Toy likelihood surface; not empirical results.</figcaption></figure><p>Simply exchanging regime labels can also produce equivalent solutions. For convergence checking, though, the concern is whether another starting point finds a higher likelihood.</p><blockquote>A convergence report tells us that the optimizer met its stopping criteria. It doesn’t establish that a better solution couldn’t be found from a different starting point.</blockquote><p>Checking additional starts requires many more likelihood evaluations. In this implementation, each numerical gradient requires about 21 evaluations, and an optimization can take hundreds of iterations. The bootstrap repeats the estimation roughly 1,000 times per country.</p><p>In the code I started with, all the calculations were inside the per-quarter loop. A full bootstrap was projected to take <strong>18–22 days of serial computation</strong>, using one starting point per estimate. Repeating those estimates from multiple starting points would have extended an already lengthy run.</p><h3>Making the likelihood faster</h3><p>To make a broader search practical, I needed to reduce the time spent evaluating the likelihood. This could partly be done just by reorganizing the existing calculations. Beyond that, the new GAUSS kernel feature (coming in GAUSS 27) allowed me to compile the filtering loop and, eventually, the whole likelihood. In this case, the larger percentage gains game purely from vectorization but the kernel feature gave an extra boost and is going to be a game changer moving forward.</p><h4>Step one: vectorize the density calculations</h4><p>The original code calculated the eight state densities separately within each quarter of the filtering loop. Those calculations don’t depend on the filter’s updated regime probabilities, so I moved them outside the loop and computed the densities for all quarters at once.</p><p>That left only the sequential filtering operations inside the loop:</p><ul><li>Predict the regime probabilities.</li><li>Update them using the current observation.</li><li>Accumulate the log likelihood.</li><li>Carry the updated probabilities into the next quarter.</li></ul><p>Across the 77-country workload, this made each log-likelihood evaluation <strong>6.4 times faster.</strong> The procedure returning per-observation likelihood contributions, used to calculate gradients, became<strong> 5.4 times faster</strong>.</p><p>As a robustness check, I compared the revised code against the original at 616 parameter vectors. These included the saved estimates for all 77 countries, randomly selected vectors, and deliberately chosen cases that exercise the density cutoff and penalty branches. The estimations were nearly identical with the largest scaled difference equal to 1.4 × 10⁻¹⁵.</p><h4>Step two: compile the filtering loop</h4><p>With the density calculations vectorized, I turned to the filtering loop that still had to run one quarter at a time. To use GAUSS’s new kernel feature, I moved that recursion into a self-contained procedure, passing in the matrices it needed rather than accessing global variables.</p><p>Once the loop was organized this way, I could compile it by adding kernel before proc. This gave me a direct comparison between ordinary and compiled versions of the same filtering code.</p><p>On a simulated example with 200 quarters and a fixed random seed, the results were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vreOD5RHpupUROPOD2DnA.png" /><figcaption>Compiling the filtering loop reduced optimization time from 0.79 to 0.48 seconds, while preserving the iteration count and final likelihood in this simulated example.</figcaption></figure><p>Compiling the loop cut the total optimization time from 0.79 to 0.48 seconds, about 1.6 times faster than the vectorized version. I compared the two versions at 616 different sets of parameter values, and with GAUSS’s default exact mode their outputs were identical down to the last digit.</p><p>To see where the time savings come from, think of the optimizer as a hiker climbing toward a summit in fog. After each step, the hiker stops to check the map and decide where to go next. Each map check means evaluating the likelihood dozens of times. The total time depends on two things: how many steps the hiker takes, and how long each map check takes.</p><ul><li><strong>Vectorizing</strong> mostly made the map checks faster, cutting the total time from 5.32 to 0.79 seconds. It also happened to reach the summit in slightly fewer steps (98 instead of 106), but that was luck rather than design. The two versions agree to about 15 digits. Even differences that small can nudge the optimizer onto a slightly different route, and on real data I saw the step count go up as well as down. Nearly all of the gain came from faster map checks.</li><li><strong>Compiling</strong> didn’t change the route at all. Both versions took exactly 98 steps and reached the same summit, with a log likelihood of −269.717143. So the 1.6× speed-up from compiling comes entirely from faster map checks.</li></ul><p>On the real 77-country workload, compiling the loop sped up the likelihood calculations by about 1.4 times. That’s less than in the demo because only part of each calculation was compiled: the loop that updates the regime probabilities quarter by quarter. The rest, which computes how likely each observation is under each regime, was still ordinary GAUSS code. Compiling only speeds up the part you compile.</p><h4>Step three: compile the whole likelihood</h4><p>An engineer at Aptech suggested going one step further: put everything, the regime calculations and the quarter-by-quarter loop, into a single compiled procedure, written with plain loops throughout.</p><p>That runs against the usual GAUSS advice. In step one, I got most of my speed-up by getting rid of loops and working on whole columns at once. But that advice exists because ordinary GAUSS loops are slower than vectorized computations. <em>Once code is compiled, simple loops are fast, and they can even beat the vectorized version because they skip the overhead of building intermediate matrices.</em></p><p>On the real 77-country workload, the fully compiled version made each likelihood calculation about twice as fast as the version where only the loop was compiled, and each optimizer step 1.6 to 2.2 times faster. The benchmark on simulated data showed a larger gain, about 3.5 times, which is a reminder that speed-ups depend on the problem.</p><p>This time, the answers were not quite identical. At 548 of the 616 test points they matched exactly. At the rest, they differed only around the 16th digit, because the compiled loops add numbers up in a different order. That’s far too small to matter for any single calculation.</p><p>But remember the hiker: tiny differences can still send the optimizer down a different route. And on real data they did. Starting from the same point, the two versions sometimes reached the same summit by a different number of steps, and sometimes ended on different summits altogether. Neither version is wrong. The likelihood surface simply has many peaks, and small differences can decide which one the hiker reaches. That’s why the speed mattered so much in the end, as the next section shows.</p><h4>What the faster code let me check</h4><p>The speed-up mattered less for any single estimate than for what it let me check. A run covering all 77 countries with ten different starting points each took 288 seconds. The projected time for the full bootstrap <strong>fell from 18–22 days to roughly 1–1.5 days</strong>. (That’s still a projection; the bootstrap hasn’t been run yet.)</p><p>The ten-start run was sobering. In 58 of the 77 countries, only one of the ten starts reached the highest likelihood found. Going back to our hiker analogy: the fog hides many summits, and where the hiker ends up depends on where they start. So I widened the search to 100 random starts per country plus five “perturbation chains” that repeatedly nudge the best solutions and keep any improvement. That took three to four hours for all 77 countries, which would have been impractical with the original code.</p><p>Checking the results along the way turned up three surprises.</p><p><strong>Some summits were fake.</strong> A few end points had the highest likelihoods of all, but their gradients were around 10⁰⁹: far from flat, so not genuine peaks. In these, one regime had shrunk to fit a handful of quarters almost perfectly, which can push the likelihood up without limit. Picking “the highest likelihood” blindly would have selected exactly these runs. So every end point has to pass the same convergence checks before it’s ranked, and I added a small penalty that stops a regime from shrinking onto a handful of points.</p><p><strong>The same run could give different answers.</strong> In one country, repeating a run from the same starting point gave different results. The cause was OPTMUM’s recovery step: when a line search fails, it takes a small random step, drawn from GAUSS’s global random-number generator. Its outcome depended on whatever had run before. Setting a seed before each optimizer call, separately for each country and start, made every run exactly repeatable.</p><p>The lesson applies to any optimizer, not just OPTMUM: many draw random numbers somewhere you might not expect, such as a fallback step, a random restart or an initial search pattern. If they share a global generator, a run’s result can depend on what ran before it, so results change when you reorder runs, split them across sessions or resume after an interruption. A single seed at the top of a script doesn’t fix this. Seed each optimizer call on its own, and test repeatability by running the same start twice in different orders.</p><p><strong>Different code could reach different summits.</strong> Even with that fixed, the original and vectorized likelihoods, which agree to about 15 digits, sometimes led the optimizer from the same start to different peaks. With many summits close together, a rounding-level difference early on can be enough to tip the hiker onto another path. So agreement between two individual runs isn’t the right test. The right test is whether a thorough search recovers the same best answer. That’s also why I’d rerun the comparison after any change that alters the arithmetic, such as the full kernel version or floating-point reordering.</p><p>Even the wider search isn’t a guarantee. In some countries, running it again from the best points found so far still turned up higher summits, so I now repeat the search until it stops improving.</p><p>None of this is specific to current accounts. Models with mixtures or switching regimes often have many plausible solutions, and an optimizer’s “converged” message doesn’t tell you which one you’ve found. Faster code bought me the time to find out.</p><h3>A practical guide for evaluating convergence</h3><p>Making the likelihood faster gave me time to investigate the estimates more thoroughly. To make those comparisons useful, I also needed a consistent way to assess each result. The following checks apply beyond this particular model, followed by a few GAUSS-specific considerations for compiling your own code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDZtzUXpJytc5qm3nq-P4Q.png" /></figure><h4>Preparing and checking GAUSS kernel procedures</h4><p>Separating the numerical calculations from data loading, file output, and other setup made the kernel conversion easier. These are the main considerations from the prerelease build I tested and subsequent guidance from Aptech.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2OKzaGTN5Ou7-PvE3xP0lw.png" /></figure><p>Official kernel procedure documentation was still forthcoming when I tested the code. Check the release documentation for the supported inputs, functions, and compilation behavior in your installed version.</p><h3>Conclusion</h3><p>I started this project wanting to check whether my estimates depended on their starting values. Faster likelihood evaluation made that investigation practical: I could try more starts, compare the solutions, and examine results that an optimizer’s convergence report alone wouldn’t have led me to question. This connects with a question I explored in <a href="https://medium.com/@eclow/can-your-forecast-predict-the-effect-of-a-decision-7205e481a0d9">an earlier post on evaluating forecasts</a>: what evidence do we need before relying on a model’s results?</p><p>Vectorization provided the largest initial gain. The new GAUSS kernel procedures reduced computation time further, first by compiling the filtering loop and then by compiling the whole likelihood. Together, those changes made a more thorough estimation workflow possible.</p><p>Time is money, especially when a calculation is repeated across countries, starting points, and bootstrap samples. For a workload like this, the time saved makes a strong case for the GAUSS 27 upgrade paying for itself. The value extends beyond finishing sooner: it gives me more opportunity to check the results before relying on them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b91d5b0c020f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can Your Forecast Predict the Effect of a Decision?]]></title>
            <link>https://medium.com/@eclow/can-your-forecast-predict-the-effect-of-a-decision-7205e481a0d9?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7205e481a0d9</guid>
            <category><![CDATA[control-theory]]></category>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[foundation-models]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 14:35:32 GMT</pubDate>
            <atom:updated>2026-10-21T14:35:32.314Z</atom:updated>
            <content:encoded><![CDATA[<p>In my <a href="https://medium.com/@eclow/transformers-vs-arima-do-more-complex-models-produce-better-forecasts-28ca372052d4">recent forecasting posts</a>, I’ve focused on how well pretrained models predict new observations and whether they offer enough improvement over simpler methods to justify their complexity. A recent paper on heat-pump control led me to consider a different question: how well do those forecasts hold up when we use them to choose an action?</p><p>Suppose a model accurately predicts a room’s temperature while a thermostat manages the heating. Before using that model to decide how much heat to supply, we need to know whether it can also predict what would happen if we changed the heater’s settings. Accuracy under the existing thermostat’s behavior doesn’t establish that.</p><p>The distinction matters whenever we use a forecast to compare possible actions. I wanted to explore it in a small system where I could change the control input, calculate the resulting outcomes, and check whether the model’s predictions captured the difference.</p><h3>The paper that started this</h3><p>In <a href="https://arxiv.org/abs/2610.06447">“Time-series Foundation Models for Predictive Control: The Role of Excitation,”</a> Amria et al. (2026) examine this distinction using residential heat-pump control. Their forecaster is <a href="https://arxiv.org/abs/2510.15821">Chronos-2</a>, the same <a href="https://medium.com/@eclow/what-if-a-forecasting-model-could-learn-before-seeing-your-data-38193659f594">time-series foundation model</a> I’ve used in earlier posts.</p><p>Given historical measurements and future control and weather inputs, Chronos-2 produces accurate temperature forecasts. The authors then test whether it predicts the effect of changing the heat pump’s supply-temperature setpoint. Starting from the same conditions, they compare forecasts under alternative control sequences with outcomes generated by a building simulator.</p><p>With historical context collected under normal controller operation, Chronos-2 forecasts the nominal temperature trajectory well but shows little response to changes in the proposed control sequence. Its response improves when the historical context includes deliberately varied control inputs.</p><p>The authors describe this variation as <strong>excitation</strong>. Understanding what that means helps explain why a model might forecast accurately while struggling to predict the effect of an action.</p><h3>What is excitation?</h3><p>Suppose you want to learn how strongly a heater affects room temperature. You collect several weeks of observations, recording both the temperature and the heater input.</p><p>There is a complication: the thermostat turns up the heat when the room gets cold and turns it down as the room warms. The heater input is responding to the temperature you are trying to explain. A simple comparison might even show that the heater runs hardest when the room is coldest.</p><p>To learn the heater’s effect, you need observations that help separate its influence from the conditions that caused it to turn on. One approach is to deliberately vary the heater input and observe the resulting temperature changes.</p><p>In system identification, <strong>excitation means varying an input so that the observed response reveals information about the system’s dynamics</strong>.</p><p>To be useful variation needs to:</p><ul><li>Be large enough to distinguish from noise.</li><li>Occur over time scales relevant to the response.</li></ul><p>For a room that warms slowly, rapidly switching the heater may reveal less than holding several input levels long enough to observe their effects.</p><p>There are several methods for creating insightful variations:</p><ul><li>Randomized inputs.</li><li>Scheduled steps.</li><li>Pulses.</li><li>Designed patterns can also be useful.</li></ul><p>Adding random measurement noise would not accomplish the same thing because the variation needs to enter through the input whose effect we want to learn.</p><p>The same issue arises in other settings:</p><ul><li><strong>Pricing.</strong> A retailer may lower prices when demand is weak. Historical sales then reflect both the price change and the conditions that prompted it. A designed price experiment across comparable stores or periods can help distinguish the demand response.</li><li><strong>Marketing.</strong> A business may increase advertising before periods when it already expects strong sales. Varying spending across comparable markets can provide more information about advertising’s contribution than observing the usual seasonal spending pattern.</li><li><strong>Inventory management.</strong> A replenishment rule may order more whenever stock runs low. Deliberate changes to order timing or quantity in a controlled pilot can help reveal how the system responds through deliveries, stock availability, and subsequent orders.</li></ul><p>These examples require different experimental designs. Randomization alone does not resolve issues such as delayed effects, differences between stores, or spillovers between markets. The shared question is whether the observed input variation lets us distinguish its effect from other influences.</p><p>Deliberate experimentation also has a cost. Changing heater settings can affect comfort; changing prices or advertising can affect revenue. The aim is to obtain informative observations within acceptable operating limits.</p><p>For the experiment below, I use randomized heater inputs to create a clear comparison with ordinary thermostat operation.</p><h3>Why use a simulated system?</h3><p>My earlier demonstrations used observed time series, including electricity demand and stock prices. For this experiment, I needed to compare outcomes under different control inputs while holding the starting conditions and external influences fixed.</p><p>An observational record gives us the outcome under the actions that were actually taken. It doesn’t directly show what would have happened under an alternative. Real-world experiments can help answer that question, but the datasets I’ve used in this series weren’t collected for that purpose.</p><p>A simulated system gives me a way to make those comparisons. I can start from the same state, apply several control sequences, and calculate the outcome under each one. That lets me check whether the forecast captures the effect of changing the input.</p><p>The source paper takes a similar approach, relying primarily on a building simulator to evaluate intervention responses. My example uses a much simpler system to make the experiment easier to follow.</p><h3>The toy system</h3><p>Consider a simple model of a room with a heater. The temperature in the next period depends on the current temperature, the heater input, and the weather outside:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uTrNmZzitlKIdSgK0pB94A.png" /></figure><p>Here, (T_t) is room temperature, (U_t) is the controllable heater input, and (D_t) represents outdoor conditions. The final term adds a small amount of random noise.</p><p>The coefficients are chosen for this demonstration rather than estimated from a real building. The model provides a simple setting where I know how the input affects temperature and can calculate the response to alternative heating plans.</p><p>I generate historical observations under two control rules:</p><ul><li><strong>Thermostat control, without added excitation.</strong> The heater responds to the difference between the room temperature and a slowly changing target. This creates feedback: temperature affects the heater input, which then affects subsequent temperature. Such observations can contain useful information, but separating the heater’s effect from the controller’s response can be difficult.</li><li><strong>Randomized control, with excitation.</strong> The heater input follows a sequence of randomly chosen levels, holding each level for a randomly chosen duration before changing again. These changes are selected independently of room temperature, making the response to the heater input easier to distinguish.</li></ul><p>For the randomized rule, I use two amplitudes to compare weaker and stronger excitation. Together with the thermostat rule, this gives three types of historical context for the same underlying system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kDpxVkDyajV2qFUy_-yHBg.png" /></figure><p>The figure shows how the histories differ. Under thermostat control, heater input follows the controller’s response to temperature and its target. Under randomized control, the imposed changes give the forecaster examples of how temperature responds when the heater input varies independently.</p><h3>Measuring the response to a change in control</h3><p>To test whether the forecaster captures the heater’s effect, I give it several candidate heating plans. Each starts from the same room temperature and historical context, with the same future weather. Only the heater input changes.</p><p>For each plan, I calculate the temperature path from the simulated system and ask the forecasting model to predict it. These matched comparisons let me examine whether the predicted temperatures separate in the same way as the simulated outcomes.</p><p>I summarize that comparison using the paper’s <strong>response gain</strong> metric.</p><p>At each forecast step, I subtract the average temperature across candidate plans from each simulated outcome. I do the same for the predictions, using their own average. This removes the temperature level shared across plans and focuses the comparison on the differences associated with changing the heater input.</p><p>I then regress the predicted deviations on the simulated deviations, pooling across plans and forecast steps. The resulting slope is the response gain:</p><ul><li><strong>Gain near 1</strong> indicates that the predicted response has approximately the right scale along the simulated response.</li><li><strong>Gain near 0</strong> indicates little agreement with the simulated response. This can happen because the forecast barely changes or because it changes incorrectly.</li><li><strong>Gain above 1</strong> indicates an exaggerated response along that direction.</li></ul><p>Gain does not capture every aspect of prediction quality. A model can have gain near one while making errors in the timing or shape of its response. Because the calculation removes components shared across plans, it also excludes errors in the common temperature level.</p><p>For that reason, I examine response gain alongside forecast error on the nominal heating plan — the reference plan before any intervention. Together, they help distinguish a model that forecasts well under the reference conditions from one that also predicts the effect of changing the input.</p><h3>Forecast accuracy and control response tell different stories</h3><p>I compared Chronos-2 with a linear model estimated separately on each historical window. Chronos-2 received the heater input and weather as covariates, including their candidate future values. Both models were evaluated using historical contexts of 50, 100, 200, 400, and 800 steps, with 20 repetitions per setting.</p><p>The experiment used three types of history: thermostat control without added excitation, low-amplitude excitation, and high-amplitude excitation.</p><p><strong>Without added excitation, Chronos-2’s response gain remained close to zero.</strong> Across all five context lengths, the mean gain ranged from approximately −0.01 to −0.02. Increasing the amount of history from 50 to 800 observations did little to improve its response to changes in the heating plan.</p><p><strong>With excitation, response gain increased substantially.</strong> Under low excitation, gain rose from 0.10 at the shortest context to 0.70 at the longest. Under high excitation, it rose from 0.21 to approximately 0.80. The values at 400 and 800 steps were very similar, suggesting little additional improvement over that interval.</p><p>Nominal forecast accuracy gave a different impression. At a context length of 400 steps, the reported results were:</p><p>Historical contextNominal forecast MAEResponse gainThermostat control, without added excitation0.20−0.01High excitation0.980.80</p><p>The thermostat history produced the lowest nominal forecast error, yet Chronos-2 captured little of the response to changing the heater input. With high excitation, nominal error was larger, but the predicted response was much closer to the simulated response.</p><p>These errors describe forecasting performance under the respective context regimes. They should be read alongside response gain, rather than treated as a ranking of overall model usefulness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFGU1_Sp5K_DLFhKOAulVQ.png" /><figcaption><em>Response gain and nominal MAE by context length and excitation regime.</em></figcaption></figure><p>The individual forecasts help explain the difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJj-NeLn9qwAczKypMMj_Q.png" /><figcaption><em>Predicted and simulated temperature paths under five candidate heating plans</em></figcaption></figure><p>With the unexcited history, the predicted temperature paths remain close together even though the simulated outcomes separate under the different heating plans. With excited history, the predictions separate in the same direction as the simulated outcomes, although they still underestimate the size of the response.</p><p>In this experiment, adding more observations from thermostat operation did little to improve Chronos-2’s control response. Historical inputs that varied independently of room temperature were much more useful for that task.</p><h3>What the linear baseline tells us</h3><p>The linear model recovered the control response across all three historical regimes, with gain close to one even without added excitation. That result deserves attention because it shows that the thermostat histories contained enough information for this estimator to recover the heater’s effect.</p><p>The baseline has a substantial advantage: its functional form matches the system I built. It estimates three coefficients relating next-period temperature to current temperature, heater input, and weather. Chronos-2 receives those variables as context, but is not explicitly given that equation.</p><p>This makes the linear model a useful reference. It shows what can be recovered from these histories when the model structure is correctly specified. It also limits the conclusion we can draw about excitation. The experiment does not show that the thermostat data are inherently uninformative, or that every estimator needs randomized inputs. It shows that Chronos-2, in the configuration tested here, makes much better use of histories containing those inputs.</p><p>The baseline’s success is also a practical reminder to consider <a href="https://medium.com/@eclow/the-future-of-forecasting-is-selectively-hybrid-94a4baab500c">a simple model when the system’s structure is reasonably well understood</a>. In this example, that knowledge allows a small estimator to recover a response that the pretrained model largely misses under normal thermostat operation.</p><h3>What this experiment does (and doesn’t ) show</h3><p>This experiment illustrates how nominal forecast accuracy can miss a weakness in predicting the response to an intervention. It also shows that, for Chronos-2 in this setup, the type of historical variation mattered more than simply adding observations.</p><p>The scope is limited, however. The simulated system is linear, with three known coefficients and directly observed inputs. Real buildings have more complex dynamics, measurement errors, and unobserved influences. The results here do not establish how large the same gap would be in a building, a retail pricing application, or another operational setting.</p><p>I tested Chronos-2 in zero-shot mode, supplying historical observations and known future covariates without updating its parameters. I did not test the fine-tuning or additional control features explored in the source paper.</p><p>The reported results summarize 20 repetitions per setting. Repetition helps assess variation within this simulation, but it does not establish robustness across different systems, control rules, or model configurations.</p><p>Finally, I evaluated forecasts under candidate heating plans. I did not use those forecasts to select and execute actions in a rolling control loop. That would require a separate evaluation of outcomes such as temperature regulation and energy use. Response gain is a useful diagnostic, but it does not establish that a model will make good control decisions.</p><h3>Conclusion</h3><p>My earlier forecasting comparisons focused on how accurately models predicted held-out observations. That remains useful, but this experiment adds a question I would now ask before using a forecast to compare actions: can the model predict the effect of changing the input?</p><p>In the simulated room, Chronos-2 forecast the nominal temperature trajectory accurately under thermostat operation while capturing little of the response to alternative heating plans. Histories containing independently varied heater inputs improved that response substantially. The linear baseline recovered it under all three regimes, showing how much a correctly specified model can contribute in this simple setting.</p><p>For me, the practical lesson is to make the evaluation match the intended use. If a model will help choose a heating plan, price, or spending level, its response to those changes needs its own evidence. A good forecast under the existing operating rule is a useful starting point, but it leaves that question open.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7205e481a0d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revisiting and Rebuilding My Grad Thesis, Twenty Years Later]]></title>
            <link>https://medium.com/@eclow/revisiting-and-rebuilding-my-grad-thesis-twenty-years-later-8d608f03b665?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d608f03b665</guid>
            <category><![CDATA[artifical-intellegence]]></category>
            <category><![CDATA[carbon-sequestration]]></category>
            <category><![CDATA[scientific-research]]></category>
            <category><![CDATA[ai-applications]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 12:21:14 GMT</pubDate>
            <atom:updated>2026-10-02T13:11:54.820Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*j6YZK7SLYflpqhiO4La2Rg.png" /></figure><p>In the summer of 2002, I turned in my master’s thesis to Stanford’s then Department of Petroleum Engineering. It focused on ocean sequestration of carbon dioxide and nitrogen mixtures, asking if you could release impure flue gas directly into the deep ocean and let it dissolve, avoiding the cost of separating and liquefying pure CO₂ first. I explored that question with a bubble-dissolution model and an economic comparison against another proposed disposal system.</p><p>I have many fond memories of that time in the Bay Area. I met amazing people, started playing rugby (which stayed a big part of my life for many years ) and soaked in the beauty and culture of the area.</p><p>Through all of that, I lugged a computer nearly everywhere I went, plugging away at what became this thesis. I was fortunate enough to work with researchers at the Monterey Bay Aquarium Research Institute (MBARI). I still remember sitting queasy and seasick, watching gas bubbles rise on a little screen while we rocked back and forth on a small research ship in Monterey Bay.</p><p>After graduation, my life took a different path. I went on to pursue my interest in economics, something I had always felt drawn to, but even more strongly after the findings of this thesis. The thesis itself sat gathering dust on a shelf. The field moved on, I moved on, and many years and many computers later, I didn’t even have a copy of the work (don’t worry Claude was able to find one for me).</p><p>This year, I got curious and decided to revisit it in the era of AI. Part of me wanted to see what still held up. But I was more curious to see what Claude would do with my work.</p><p>Spoiler alert: more held up than I expected. Much of the methodology survived the review and replication, though some parts needed revisiting. And with Claude doing most of the legwork, replicating and improving the work took us less than 24 hours.</p><h3>What still held up</h3><p>The first finding wasn’t about my calculations. It was about what had happened to the idea while I was away from the field.</p><p>An amendment to the London Protocol in 2006 opened a legal route for storing captured CO₂ beneath the seabed. Releasing it into the open water, as my thesis had explored, was outside that allowance. The field had moved in a direction that left my proposed approach behind.</p><p>That changed the purpose of the exercise. I still wanted to revisit the numbers, but now I also wanted to understand what remained useful in work whose intended application had been left behind.</p><p>Claude rebuilt my model in Python. That meant working through the equations, reconstructing missing pieces, and replacing an outdated seawater toolbox. We kept track of those changes so I could distinguish my original work from what we had added.</p><p>Along the way, the reconstruction uncovered a problem. Under some deep-ocean conditions, the code could treat a CO₂-rich mixture as a gas when it should behave more like a dense liquid. My thesis had described that distinction, but the calculation didn’t consistently follow it.</p><p>Much of the original framework held up. Rebuilding it also revealed a place where the code needed correcting , a useful reminder that understanding the physics and getting a computer to represent it faithfully are two separate challenges.</p><h3>The question I left unanswered</h3><p>Near the end of my thesis, I had flagged something I couldn’t explain. Different studies reported very different rates at which CO₂ dissolved into seawater. This mattered because my model needed to estimate how quickly a rising bubble would dissolve. If the measurements disagreed so much, which ones should I trust?</p><p>That question had stayed in the conclusion for more than twenty years. Now, with Claude helping gather and compare the studies, we could give it another look.</p><p>The first step made the discrepancy look even worse. Across the studies we assembled, the reported rates covered a much wider range than I had described. But grouping all those numbers together hid important differences in the conditions under which they had been measured. We weren’t always comparing like with like.</p><p>As we sorted through those differences, one detail became especially useful: bubble shape.</p><p>My model treated bubbles as spheres. But bubbles of the size I had studied can flatten and wobble as they rise. That changes how water moves around them and how quickly the gas dissolves.</p><p>Accounting for that behavior brought the calculation much closer to a published measurement, using a bubble size plausible for the experiment. It gave us a possible explanation for part of the discrepancy I had left unresolved. When we added it to the main model, it also narrowed a gap my thesis had identified.</p><p>This was the part of the exercise I hadn’t anticipated. I had started by asking Claude to revisit old work. Now we were following a question from its conclusion far enough to make progress on it.</p><h3>Where we reached the limit</h3><p>The bubble-shape result led us to another question. Under deep-ocean conditions, CO₂ can develop an ice-like coating called a hydrate shell (not a new finding, in fact my interest in gas hydrates was how I started this research). However, Claude did propose a new question of it water moving around that coating could help explain patterns in the published measurements.</p><p>Claude found research on how these coatings grow and built a calculation to test one possible explanation. This time, the result fell well short. The mechanism we tested accounted for only a small fraction of the observed effect.</p><p>We had to leave that question open. The calculation didn’t rule out every possible explanation, but it showed that the one we had tested wasn’t enough.</p><p>That became part of the story too. Returning to the thesis had helped us correct a problem and make progress on an old discrepancy. It had also brought us to another unanswered question. Having better tools made it easier to investigate; it didn’t guarantee we would find an answer.</p><h3>Watching the Bubbles Again</h3><p>I also wanted a way to see what we had rebuilt. That led to <a href="https://claude.ai/artifact/NgkgWj6FXAknZCoZAJDtna">Bubble Ascent Lab</a>, an interactive dashboard where you can choose a starting depth and CO₂ fraction and explore how the model predicts a bubble will rise and dissolve.</p><p>There’s a connection there to sitting seasick on that research ship, watching bubbles on a little screen. More than twenty years later, I was watching them again, this time through a model I could revisit and change.</p><p>I had wondered how much of the thesis would survive the exercise. Much of its framework held up. Some calculations needed correcting, one unresolved question became clearer, and another remained open. The proposed application had been left behind, but there was still something to learn from the work.</p><p>Claude made it possible to cover that ground in less than 24 hours. The original research had taken months of reading, programming, conversations, and fieldwork. Returning to it so quickly was remarkable, though interpreting the results still meant understanding the assumptions and checking what had changed.</p><p>What started as curiosity about what Claude could do with an old thesis became a chance to pick up work I thought I had finished. Over the years, I’ve sometimes wondered what I might have accomplished with a little less time on the rugby pitch and a little more time in the lab (though I wouldn’t trade the friendships and lessons I took from playing). This experiment gave me a different question: what might I have accomplished if I were starting that research today?</p><p>So much of my thesis work involved tasks like formatting the final document to meet Stanford’s requirements, measuring bubble sizes image by image, and writing and debugging code. Some were administrative; others were essential parts of the research. All took time and concentration.</p><p>Today, an AI agent could help with much of that work, though I would still need to check the measurements, understand the code, and judge the results. I wonder what I could have done with the time that freed up: which questions I might have followed further, which assumptions I might have tested, and whether that unexplained discrepancy would have stayed in the conclusion for twenty-four years. (Let’s be honest, though, 23-year old me likely would have just used the spare time to play more.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d608f03b665" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let the LLM Be the Forecasting Coach, Not the Player]]></title>
            <link>https://medium.com/@eclow/let-the-llm-be-the-coach-not-the-player-c823ca89b1f4?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c823ca89b1f4</guid>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[llm-applications]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 13:10:19 GMT</pubDate>
            <atom:updated>2026-10-02T11:01:52.842Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Look at CTRL for Time Series Forecasting</h4><p>Large language models (LLMs) can interpret written information and suggest changes to a model, but precise arithmetic remains a weakness. Many LLM-based forecasting approaches nevertheless ask them to produce numerical predictions directly.</p><p><a href="https://arxiv.org/pdf/2609.23257">CTRL</a>, a new approach from a team at Yonsei University, gives the LLM a different job. A conventional forecasting model produces the initial predictions. The LLM acts as a coach: it examines the model’s recent errors and suggests corrections. For example, it might identify a daily cycle that is too flat and recommend increasing its amplitude. A small model then translates those instructions into numerical adjustments.</p><p>The authors report that this approach helps forecasts adapt when patterns in the data change, with lower computational costs than the other LLM-based methods they evaluated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Y8y2v-SUrx8yH7gjgMHww.png" /></figure><p>To understand the approach, we’ll look at the difficulties of forecasting directly with LLMs, how CTRL uses feedback to correct predictions, and a toy example you can run yourself.</p><h3>LLMs Meet Time Series</h3><p>Forecasting electricity demand, store sales, or financial prices means using past observations to predict what comes next. Researchers have explored several ways to bring language models into that process.</p><p>Broadly, these approaches fall into three groups:</p><ul><li><strong>Forecasting as text completion.</strong> Write the observations as text (&quot;12.1, 12.4, 12.9, ...&quot;) and ask the model to continue the sequence. Examples include LLMTime and PromptCast.</li><li><strong>Adapting a pretrained language model.</strong> Convert time-series observations into representations that a language model can process, then adapt the model or its surrounding components for forecasting. Examples include Time-LLM and GPT4TS.</li><li><strong>Connecting numerical and language representations.</strong> Train components that connect patterns in time-series data with representations from a language model. Some approaches also separate the series into trend, seasonality, and a residual component. Examples include TEMPO, CALF, and TimeCMA.</li></ul><p>The motivation is understandable. A language model may recognize context that a numerical forecasting model does not: what an event means, why demand might change, or which explanation fits an observed pattern. The question is whether that ability leads to more accurate forecasts.</p><h3>Where LLM-based Forecasters Fall Short</h3><p>The paper’s authors identify two problems with existing LLM-based forecasting approaches.</p><p><strong>The LLM is responsible for producing numerical predictions.</strong> The authors question whether this is the best use of a language model. They cite studies, including Tan et al. (2024), “Are Language Models Actually Useful for Time Series Forecasting?”, and Park et al. (2025), that examine whether LLMs improve forecasting and how sensitive their predictions are to noise. Their argument is that an LLM may be more useful for interpreting a model’s errors and suggesting changes than for generating the forecast values itself.</p><p><strong>Changes in the data can undermine the forecast.</strong> When an LLM directly generates predictions, errors in its output carry through to the forecast. The authors argue that this becomes particularly troublesome when the data’s underlying behavior changes — for example, when a trend shifts or a seasonal pattern becomes stronger. They also question whether methods that align time-series and language representations can maintain accuracy when future observations differ from the training data.</p><p>Changing patterns are a familiar problem in econometrics. Differencing can address some forms of non-stationarity, while models with structural breaks or time-varying parameters address other kinds of change. CTRL proposes a different response: use an LLM’s assessment of recent forecast errors to guide numerical corrections.</p><h4>The practical costs</h4><p>The paper also reports computational costs for the LLM-based methods it evaluates:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrrQ0iRDeXIrjnXGWWWC9g.png" /></figure><h4>Comparing the approaches</h4><p>How does CTRL fit alongside classical statistical models and time-series foundation models? It helps to distinguish how each approach produces a forecast. This is background for interpreting CTRL, rather than a comparison tested in the paper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qeKc2FD_Mt8QFXvzsMthVg.png" /></figure><p>CTRL’s appeal is this division of work. The forecasting model supplies the initial predictions, while the LLM helps identify how those predictions might need to change.</p><p>Whether this improves on classical models or time-series foundation models remains an open question. The paper benchmarks CTRL against deep-learning and LLM-based methods. It does not test classical statistical models, and comparisons with foundation models such as TimesFM are left for future work.</p><h3>How CTRL Works</h3><p>CTRL stands for <strong>Control-Based Time Series Forecasting with LLM-Guided Residual Learning</strong>. Its basic structure is:</p><blockquote><strong><em>Final forecast = initial forecast + a learned correction.</em></strong></blockquote><p>A conventional forecasting model produces the initial forecast. An LLM examines summaries of that model’s past errors and recommends adjustments. A small neural network learns how to use those recommendations to correct the forecast.</p><p>Before looking at the components, a few definitions help. A <strong>frozen</strong> model has fixed parameters: it continues making predictions, but those parameters are no longer updated. A <strong>residual</strong> is the difference between an observed value and its forecast.</p><p>CTRL also separates time-series patterns into <strong>trend</strong>, <strong>seasonality</strong>, and an <strong>irregular component</strong>. The trend describes the longer-term direction, seasonality captures recurring patterns, and the irregular component contains what remains after the other two are removed.</p><h4>The initial forecasting model</h4><p>The authors call this model the <strong>backbone</strong>. They train it first, then freeze its parameters before adding CTRL. The paper evaluates two backbones: DLinear and PatchTST.</p><p>CTRL’s correction layer is trained using data withheld from backbone training. These observations provide examples of how the backbone’s predictions differ from actual outcomes. Because CTRL uses them to learn corrections, they are separate from the final test data used to evaluate performance.</p><h4>The LLM controllers</h4><p>Three LLM agents examine different aspects of the backbone’s errors:</p><ul><li><strong>The Trend agent</strong> looks for errors in direction, slope, and level.</li><li><strong>The Seasonal agent</strong> examines repeating patterns, including cycles that are too flat or mistimed.</li><li><strong>The Irregular agent</strong> assesses the remaining fluctuations, including excessive smoothing or noise amplification.</li></ul><p>The agents receive statistical summaries rather than raw time-series observations or dataset names. A summary might indicate that the backbone underestimates the trend slope by 15%, for example.</p><p>The authors argue that this reduces the concern that the LLM is simply recalling benchmark observations encountered during pretraining. Its instructions are based on errors produced by a particular backbone on a particular set of observations.</p><h4>The control signals</h4><p>The Trend and Seasonal agents each return four numerical signals:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Y8kwM07D9gfHtpswzIEnQ.png" /></figure><p>These signals are inputs to the correction model. The decoder learns how to use them; a scale recommendation does not automatically multiply the forecast by that amount.</p><p>The Irregular agent instead produces a short written assessment. A frozen GPT-2 encoder converts that assessment into a numerical representation the decoder can process.</p><p>hese signals are inputs to the correction model. The decoder learns how to use them; a scale recommendation does not automatically multiply the forecast by that amount.</p><p>The Irregular agent instead produces a short written assessment. A frozen GPT-2 encoder converts that assessment into a numerical representation the decoder can process.</p><h4>The correction model</h4><p>The <strong>residual decoder</strong> is a small neural network with approximately 400,000 parameters. It takes the backbone’s forecast components and the control signals, then produces a numerical correction.</p><p>During training, the decoder learns to reduce the difference between the corrected forecast and the observed outcome. The backbone and LLM remain frozen. The authors report that decoder training took less than two minutes in their experimental setup.</p><h4>Adapting when new data arrives</h4><p>CTRL periodically checks whether incoming observations differ from the data used during setup. It compares statistics describing the trend and seasonal patterns against their earlier distributions.</p><p>When a monitored statistic moves beyond a threshold of approximately two standard deviations, CTRL asks the relevant LLM controller to update its signals. The forecasting model and decoder keep their existing parameters.</p><p>This check uses observations already available at forecast time. It does not require the future outcomes the system is trying to predict.</p><p>The signals are cached and reused across forecasts. The authors report 3–24 LLM calls in their experiments, rather than a separate call for every prediction. A longer deployment could require additional calls as further changes occur.</p><p>The process has three stages:</p><ol><li><strong>Generate guidance:</strong> examine the backbone’s errors on withheld training observations and obtain control signals from the LLM agents.</li><li><strong>Train the correction layer:</strong> teach the decoder to combine those signals with the backbone’s forecasts.</li><li><strong>Forecast and monitor:</strong> produce corrected predictions, check incoming observations for changes, and update the signals when needed.</li></ol><h4>What the paper found</h4><p><strong>Improvements varied by dataset and backbone.</strong> The authors highlight ETTh2 and ETTm2, datasets recording electricity-transformer measurements, as examples where CTRL helped under changing patterns. Their discussion reports MSE reductions of up to approximately 12%. However, Table 1 contains larger reductions for some configurations: for DLinear on ETTh2 at the longest horizon, MSE falls from 0.650 to 0.501, a reduction of approximately 23%. That discrepancy makes a single headline percentage difficult to interpret.</p><p><strong>CTRL did not lead every comparison.</strong> Gains were generally smaller on datasets the authors characterized as more stable. On Weather, CALF performed better at some horizons. The authors interpret this as evidence that adaptation offers less benefit when the underlying patterns change little.</p><p><strong>The comparison with direct LLM forecasting favored CTRL.</strong> Against LLMTime using GPT-4, CTRL’s reported MSE was 19.6%–44.3% lower. This comparison covered two datasets and the DLinear backbone, so it provides limited evidence rather than a general ranking of the approaches.</p><p><strong>The correction layer was relatively inexpensive to train.</strong> CTRL used approximately 0.4 million trainable parameters, compared with 12.4 million for TEMPO and 18.2 million for CALF. Reported training times were under two minutes for CTRL and roughly one to two hours for those alternatives. These figures describe correction-layer training, not the full cost of the system: CTRL also requires a pretrained backbone, a frozen text encoder, and LLM access.</p><p><strong>The LLM signals helped, but the decoder also contributed.</strong> Replacing the signals with random numbers or random text produced results similar to supplying no signal. The decoder still improved forecasts without LLM guidance. A learned, non-LLM controller was approximately 3%–4% worse in MSE than full CTRL in the reported ablation experiments.</p><p>These tests support a contribution from the LLM-generated guidance, while showing that some of the improvement comes from learning a correction layer.</p><h4>Limitations</h4><p>The authors state that improvements diminish at longer forecast horizons, although the results table does not show that pattern consistently. The benefit should therefore be assessed for each dataset, backbone, and horizon.</p><p>The evaluation uses academic benchmark datasets rather than a live deployment. It also leaves open whether CTRL would improve forecasts from time-series foundation models such as TimesFM.</p><p>The practical question is whether the additional accuracy justifies maintaining the correction layer, monitoring incoming data, and accessing a capable LLM. The reported experiments are encouraging, but they do not yet answer that question for a production forecasting system.</p><h3>A Simple Example</h3><p>To illustrate the process, I built a small simulation with an initial forecast, a controller, and a learned correction layer. The script, toy_ctrl.py, requires Python, NumPy, statsmodels, and Matplotlib and runs in about 10 secs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufXlNMXnWprstZl1gAWPKg.png" /></figure><h4>The data and initial forecast</h4><p>The synthetic data is an hourly series with a steady upward trend and a daily cycle. The training and held-out periods follow the same pattern. During the test period, the daily cycle’s amplitude increases by 60%, while the underlying trend remains unchanged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1PEeNnjc_lkfw75STEc8A.png" /></figure><p>The backbone learns the average daily pattern from the training data. I then deliberately reduce its seasonal amplitude by 20% and make it underestimate the trend. Its parameters remain fixed throughout the correction and test stages.</p><h4>Step 1: Review the forecast errors</h4><p>On the held-out observations, the controller receives a summary along these lines:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E26v4LyQmLKHpVQ6eCWSRA.png" /></figure><p>These values use the simulation’s arbitrary units. The controller recommends increasing the seasonal component, with a scale of approximately 1.25, a gate of 0.6, and confidence of 0.8. It also recommends increasing the trend component, although that scale reaches the allowed maximum of 1.5.</p><h4>Step 2: Learn the correction</h4><p>The decoder uses the held-out observations to learn how to combine the control signals with the backbone’s forecast. This produces a correction for errors already present before the seasonal pattern changes.</p><h4>Step 3: Detect the seasonal change</h4><p>During the test period, the simulation compares incoming trend and seasonal statistics with those recorded during setup.</p><p>The trend shift score is approximately zero. The seasonal shift score is approximately 19, well above the threshold of 2. The controller therefore updates only the seasonal signal: it increases the scale to the maximum, increases the gate, and lowers confidence. The trend signal stays unchanged.</p><p>This illustrates the component-specific adaptation described in CTRL: a change in the seasonal pattern triggers a seasonal adjustment.</p><h4>Results</h4><p>The table reports test-period mean squared error (MSE), where lower values indicate better forecasts. “Without adaptation” uses the correction learned before the seasonal change. “With adaptation” also updates the seasonal control signal after detecting the change.</p><p>For reference, I included an <strong>oracle rescaling</strong>. It uses the actual test outcomes to choose the best rescaling of the trend and seasonal components. That information would be unavailable when making a real forecast, so this row is a comparison within the simulation, not a deployable method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6mCu_fB0C0bv99ESRZV89w.png" /><figcaption>Source: Author’s simplified simulation; not a replication of CTRL</figcaption></figure><p>Across 20 random seeds, the correction without adaptation reduced MSE by an average of 34%, with reductions ranging from 30% to 38%. With adaptation, the average reduction was 61%, ranging from 59% to 63%. Oracle rescaling reduced MSE by approximately 78% on average.</p><p>The adapted version outperformed the version without adaptation in all 20 runs. The seasonal shift score averaged approximately 18, while the trend score remained below 0.3.</p><p>A single 24-hour forecast shows what those corrections look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NxJhnH7aph7hEhInKlfxZA.png" /><figcaption>Source: Author’s simplified simulation; not a replication of CTRL</figcaption></figure><p>The backbone forecast, shown in dashed red, underestimates the daily cycle. The corrected forecasts, shown in orange and blue, move closer to the observed values in black. The adapted version captures more of the increased seasonal amplitude, although it still underestimates the peak.</p><h4>What this example shows</h4><p>The simulation demonstrates how a correction layer can use past forecast errors and respond when incoming patterns change. It identifies the seasonal change while leaving the trend signal alone.</p><p>The size of the improvement reflects the example’s design. Both the backbone’s errors and the seasonal change were deliberately chosen to make the correction useful. Repeating the simulation across random seeds checks whether the result depends on one noise realization; it does not establish performance across different datasets or types of change.</p><p>The example also cannot establish the value of an LLM. Its controller calculates straightforward ratios, so a conventional recalibration rule could provide similar guidance. The paper’s comparison with a learned, non-LLM controller is more relevant to that question.</p><p>To experiment with LLM guidance, the script’s controller() and adapt_controller() functions are the places to replace the rules with model calls. The existing rule-based version would provide a useful comparison. You can also set the SEED environment variable to try different noise realizations.</p><h3>Takeaways</h3><p>CTRL offers a way to use an LLM’s assessment of forecast errors to guide a numerical correction model. The backbone produces the initial forecast, the LLM recommends adjustments, and the decoder learns how to apply them.</p><p>The authors report improvements on several benchmarks, with relatively little additional training and few LLM calls. Results vary by dataset, backbone, and forecast horizon, and some of the improvement comes from the correction layer even without LLM guidance.</p><p>For me, the most interesting feature is adaptation without waiting for future outcomes. CTRL monitors incoming observations and updates its guidance when patterns change. That could be useful where forecast errors become measurable only after a delay.</p><p>The remaining comparisons matter. The paper does not establish whether CTRL improves on classical statistical models or whether it would help time-series foundation models. Those tests would help determine when the added complexity is worthwhile.</p><h3>References and further reading</h3><h4><strong>Main paper</strong></h4><p>Kim, M., Ji, D., Lee, Y., Kim, B., &amp; Jang, B. (2026). <em>CTRL: Control-Based Time Series Forecasting with LLM-Guided Residual Learning.</em> Findings of the Association for Computational Linguistics: ACL 2026, 21952–21968. <a href="https://aclanthology.org/2026.findings-acl.1104/">Published paper</a> · <a href="https://arxiv.org/abs/2609.23257">arXiv version</a>.</p><p><a href="https://github.com/mfriendly/CTRL">Authors’ code repository</a>. As of October 1, 2026, the repository contains only a README announcing a future code release; no implementation is available.</p><h4><strong>Studies on the limitations of LLM-based forecasting</strong></h4><p>Tan, M., Merrill, M. A., Gupta, V., Althoff, T., &amp; Hartvigsen, T. (2024). <em>Are Language Models Actually Useful for Time Series Forecasting?</em> Advances in Neural Information Processing Systems, 37. <a href="https://proceedings.nips.cc/paper_files/paper/2024/hash/6ed5bf446f59e2c6646d23058c86424b-Abstract-Conference.html">Published paper</a>.</p><p>Park, J., Lee, H., Lee, D., Gwak, D., &amp; Choo, J. (2025). <em>Revisiting LLMs as Zero-Shot Time Series Forecasters: Small Noise Can Break Large Models.</em> Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), 906–922. <a href="https://aclanthology.org/2025.acl-short.71/">Published paper</a>.</p><h4><strong>Other forecasting methods mentioned</strong></h4><ul><li><strong>LLMTime:</strong> <a href="https://arxiv.org/abs/2310.07820">Large Language Models Are Zero-Shot Time Series Forecasters</a>.</li><li><strong>PromptCast:</strong> <a href="https://arxiv.org/abs/2210.08964">PromptCast: A New Prompt-based Learning Paradigm for Time Series Forecasting</a>.</li><li><strong>Time-LLM:</strong> <a href="https://arxiv.org/abs/2310.01728">Time-LLM: Time Series Forecasting by Reprogramming Large Language Models</a>.</li><li><strong>GPT4TS:</strong> <a href="https://arxiv.org/abs/2302.11939">One Fits All: Power General Time Series Analysis by Pretrained LM</a>.</li><li><strong>TEMPO:</strong> <a href="https://arxiv.org/abs/2310.04948">TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting</a>.</li><li><strong>CALF:</strong> <a href="https://arxiv.org/abs/2403.07300">CALF: Aligning LLMs for Time Series Forecasting via Cross-modal Fine-Tuning</a>.</li><li><strong>TimeCMA:</strong> <a href="https://arxiv.org/abs/2406.01638">TimeCMA: Towards LLM-Empowered Multivariate Time Series Forecasting via Cross-Modality Alignment</a>.</li><li><strong>PatchTST:</strong> <a href="https://arxiv.org/abs/2211.14730">A Time Series Is Worth 64 Words: Long-term Forecasting with Transformers</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c823ca89b1f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Token Problem Isn't How Much Context You Use. It's What's In It.]]></title>
            <link>https://medium.com/@eclow/the-token-problem-isnt-how-much-context-you-use-it-s-what-s-in-it-7df2a6dc351f?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7df2a6dc351f</guid>
            <category><![CDATA[token-optimization]]></category>
            <category><![CDATA[token-usage]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 11:48:13 GMT</pubDate>
            <atom:updated>2026-09-21T11:48:13.981Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Token Problem Isn’t How Much Context You Use. It’s What’s In It.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxqZcbVAU3ozAeaztL3oGA.png" /></figure><p>I bump up against my token usage limits almost daily. It’s a frustrating interruption, and one that had me considering whether I should just upgrade my subscriptions. Ever the economist, though, I decided that before I jump straight to handing over more of my paycheck, I should first figure out whether I could be using those tokens more efficiently.</p><p>I should say upfront that I’m not an AI engineer or a computer scientist. I use these tools every day for real work, and what follows is an everyday user’s account of getting more out of them, not a look inside how the models or the infrastructure actually work.</p><p>One of my “bad” habits has been keeping conversations running for a long time. On any given day, I might have two or three coding projects open in Visual Studio Code, each with a Claude conversation that has been running for days. To me, this felt like a good way to maintain continuity. Claude already knows what I’m building, which files we’ve changed, what decisions we’ve made, which approaches failed, and what I want to do next. In theory, that should save time and reduce the need to constantly re-explain the project.</p><p>Yhat habit had me curious about where those tokens were actually going. The clue was sitting right in my usage report: 96% of my recent usage was happening with more than 150,000 tokens of context. No matter how much I tried to optimize my individual prompts, those prompts were still landing inside a very large body of existing context. My first assumption was that long-running conversations were the obvious culprit. Claude has been warning me about it all along, and it seemed reasonable that keeping conversations open for days was dragging old, irrelevant history into every new prompt. That sounds ideal at first because more context should mean better answers, right? Not always. As a conversation grows, the model may also need to process a growing collection of previous messages, code, file contents, tool results, debugging output, and earlier decisions. Some of that information is still useful and some of it stopped being relevant hours (or even days) ago. Whether that was actually what was driving my number, and whether fixing it would move it, turned out to be a more interesting question than I expected.</p><p>In this post, the first in a planned series on AI token optimization, I’ll dig into where that context was actually coming from and what, if anything, I could do about it. The goal isn’t to minimize context. It’s to manage it deliberately. The best AI workflow isn’t the one that gives the model the least information possible, or the most. It’s the one that gives the model the right information for the current task, which means being honest about what’s actually driving a token bill instead of assuming the first obvious culprit is the real one.</p><h3>Why continuity is an illusion</h3><p>The instinct behind keeping a conversation open for days makes sense on paper. Claude has already seen the codebase, the failed approaches, the reasoning behind a design choice I made on Tuesday. Closing that conversation and starting fresh feels like throwing away an asset I already paid for.</p><p>But I started asking myself what I actually used from that history on any given day. When I went back through a few of my longer-running conversations, the pattern was clear. Most of my prompts referenced something from the last hour or two: the function I just wrote, the error I just hit, the file I just opened. Almost none of them reached back to something from three days ago. And when I did need something from further back, I usually remembered the gist of it myself. I didn’t need Claude to have the full transcript. I needed the one decision or the one piece of code that mattered, and I could have just told it directly.</p><p>That’s the part I’d been getting wrong. I was treating the conversation as the memory, when really the conversation was just the delivery mechanism for a much smaller set of facts I actually needed on hand. Every message in between was overhead I paid for on every single turn, whether or not it was relevant to what I was asking.</p><p>So the fix isn’t to cram less into each prompt. It’s to stop treating a single conversation as a multi-day project log. I’ve started splitting my work into task-scoped sessions instead: a conversation covers one feature, one bug, one focused unit of work, and it ends when that unit is done. Before I close it, I write down the few things that actually need to carry forward, usually a short summary of what changed, what I decided, and what’s still open. The next session starts with that summary instead of the full transcript.</p><p>The context window shrinks, but the useful information in it doesn’t. That’s the trade I was missing.</p><h3>What task-scoped sessions look like in practice</h3><p>In practice, task-scoping means asking one question before I open a new conversation: what is the actual unit of work here? Not “what project am I working on,” but what’s the smallest thing I can finish, verify, and close out.</p><p>A bug fix is the easy case. I open a conversation, describe the bug, work through it with Claude, confirm the fix, and close the conversation. There’s no reason that session should still be open three days later when I’m working on something unrelated in the same codebase. If a related bug shows up next week, it gets its own session, with just enough context handed over to explain what changed and why.</p><p>A multi-day feature is trickier, because it’s tempting to treat the whole feature as one unit of work and keep the conversation open until it ships. I’ve started breaking those up too. If I’m building something that touches data pipeline changes, model retraining, and a reporting layer, that’s not one task, it’s three, and each one gets its own scoped session. The feature still has a through-line, but the through-line lives in my notes, not in an unbroken chat transcript.</p><p>The test I use now is simple: if I closed this conversation right now, could I pick the work back up tomorrow with a short written summary instead of the full history? If the answer is yes, the conversation has already outlived its usefulness and I should have closed it. If the answer is no, that tells me what actually needs to survive into the next session, which is a much smaller list than “everything we talked about.”</p><h3>What to carry forward between sessions</h3><p>I’ve landed on a two-file system for this, and the reason it works is that it separates two kinds of information that people tend to lump together.</p><p>CLAUDE.md holds what’s stable. The project’s architecture, the conventions I’m following, the libraries and versions in play, the things that stay true whether I’m working on this project today or three weeks from now. I don’t rewrite this often. When I do, it’s because something genuinely structural changed, not because I finished a task.</p><p>PROJECT_STATUS.md holds what’s volatile. What’s done, what’s in progress, what I tried that didn’t work and why, what the next step is. This file gets rewritten constantly, sometimes multiple times in a single day. It’s disposable in a way CLAUDE.md isn’t, and treating it that way is the point. I’m not trying to preserve a history in it. I’m trying to capture a current state.</p><p>The habit I’ve added on top of both files is asking the current session to write the handoff prompt for the next one before I close it out. That step matters more than it looks like it should. Writing a handoff forces a kind of compression that a running transcript never does. The session has to decide what actually matters enough to carry forward, and that decision is worth more than the raw history, because the raw history doesn’t know what mattered. It just accumulated.</p><p>The failure mode I watch for is letting PROJECT_STATUS.md grow the same way the old conversations did, into a log of everything that ever happened on the project instead of a snapshot of where it stands right now. A status file that never gets pruned is just a slower version of the same problem. I try to update it, not append to it. It’s also worth remembering that these files aren’t free. They load at the start of every session alongside the system prompt and whatever tool definitions are active, so a bloated CLAUDE.md is competing for the same window as everything else. Keeping both files lean isn’t just good hygiene. It’s part of the same budget I’m trying to manage everywhere else.</p><h3>The cost/benefit, revisited</h3><p>Coming back to the question I opened with: should I just upgrade my subscription? The honest answer is that I still might, eventually. But that decision should follow from actual usage, not from friction.</p><p>I want to be straight about something before I go further. After scoping my sessions and setting up CLAUDE.md and PROJECT_STATUS.md, I checked my usage report expecting that 96% figure to have moved. It hadn’t. If anything, the share of my usage happening above 150,000 tokens of context stayed roughly the same. My first reaction was that the whole exercise had been a wash.</p><p>It wasn’t, once I understood what that number was actually measuring. It’s tracking the context attached to individual API calls, not how long a conversation has been open. A single well-scoped session, working through a real bug with file reads, test runs, and debugging output, can cross 150,000 tokens in an afternoon on its own. Scoping sessions solves a different problem than that one. It keeps stale, no-longer-relevant information out of the window. It doesn’t reduce the token cost of the file reads and tool calls a task genuinely requires.</p><p>That’s a distinction I hadn’t drawn clearly enough going in. I’d conflated two separate costs: the cost of dragging old, irrelevant history into a new task, and the cost of the tools and context a task legitimately needs in order to get done. Scoping sessions addresses the first. It has no effect on the second.</p><p>What did change, even without the percentage moving, was the quality of what was sitting in that context. When I hit 150,000 tokens now, it’s mostly recent, relevant work: the files I’m actually touching, the errors I’m actually debugging, the decisions I actually made for this task. Before, a good chunk of it was leftover history from something I’d finished days earlier. The number looks the same. What’s behind the number doesn’t.</p><p>As an economist, that’s a reframe I should have expected. I’d been treating tokens as a single undifferentiated cost, when really I was paying for two different things and only one of them was wasteful. Scoping sessions didn’t lower my bill. It made sure more of what I was paying for was actually worth having.</p><h3>Conclusion</h3><p>So where does that leave me relative to the upgrade question I started with? Scoping my sessions didn’t shrink my token bill. It made me a lot more confident that the tokens I am spending are being spent on something real, which is a different kind of answer than I expected to land on, and honestly a more useful one. If I upgrade now, it’ll be because the work genuinely needs more room, not because I was renting space for information that had already stopped earning its keep.</p><p>That still leaves the other half of the cost sitting there unexamined. Every session I open pays a fixed price before I’ve typed a single word: the system prompt, the tool definitions, whatever MCP servers happen to be connected. I haven’t touched that side of the ledger at all, and early on it looked like it could be substantial. That’s where I’m headed next in this series, figuring out, as a user rather than someone building any of it, what’s actually loaded into a session by default, what of it I need, and what I’m paying for without ever using.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7df2a6dc351f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What If a Forecasting Model Could Learn Before Seeing Your Data?]]></title>
            <link>https://medium.com/@eclow/what-if-a-forecasting-model-could-learn-before-seeing-your-data-38193659f594?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/38193659f594</guid>
            <category><![CDATA[tsfm]]></category>
            <category><![CDATA[time-series-modeling]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[foundation-models]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 18:10:08 GMT</pubDate>
            <atom:updated>2026-09-20T18:10:08.350Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gPd_Cd4pwSApM_mQMIIKrQ.png" /></figure><p>In a review of recent forecasting research, I came across Tabby. I was drawn to it because not only provides an unusually transparent look at how time-series foundation models are trained, but also highlights why classical models still matter in the age of transformers. If you follow my work, you know this is a topic I am particularly interested in.</p><p>Most forecasting projects begin in roughly the same place: with a dataset and a problem. A retailer wants to predict next month’s demand or an energy provider needs an hourly load forecast. The model is then built, selected, and trained for that particular series or a closely related group of series.</p><p>Time-series foundation models, like Tabby, turn that sequence around. Instead of starting from scratch with one forecasting problem, they are pretrained on enormous collections of <a href="https://medium.com/@eclow/introduction-to-the-fundamentals-of-time-series-data-and-analysis-aptech-7d937a982797">time series</a> drawn from many settings. The goal is to learn recurring patterns from trends, seasonal cycles, persistence, shocks, changing volatility, and abrupt shifts before the model ever encounters the particular series we want to forecast. As an economist, the basic idea feels intuitive to me: a model that has already encountered a wider range of behavior should have a better starting point when it meets a new series.</p><p>That idea has already produced a growing collection of models, including TimeGPT, Chronos, TimesFM, Lag-Llama, and Moirai. <strong>Tabby</strong> joins that list, but its most interesting contribution may not be a radically different architecture or a claim to dominate every forecasting benchmark. Tabby is valuable because its creators have released an unusually complete account of how the model was built: the data, synthetic generators, sampling decisions, training schedule, checkpoints, evaluation pipeline, and model itself.</p><p>For a field increasingly populated by large pretrained models, that transparency matters. Tabby gives us a chance to look beyond the leaderboard and ask a more useful question: What does a time-series foundation model actually need to learn, and how do we teach it?</p><h3>What is a time-series foundation model?</h3><p>A foundation model is a model trained broadly enough that it can become a starting point for many later tasks. Large language models are the most familiar example. They are not trained separately from scratch every time someone asks for a summary, a translation, or a line of code. They first learn general patterns from a huge body of text and then use that pretrained knowledge for new tasks.</p><p>A time-series foundation model applies the same general philosophy to ordered numerical data. Instead of learning from sentences made of words, it learns from sequences of measurements: daily sales, hourly electricity demand, monthly inflation, heart-rate readings, web traffic, sensor output, and many others.</p><p>The analogy is useful, but it should not be taken too literally. Time series are not simply another language. Their scale matters. Their sampling frequency matters. A value of 100 may be unusually high in one series and completely ordinary in another. Timing, seasonality, missing observations, structural breaks, and the difference between a temporary shock and a lasting change all affect what the numbers mean.</p><p>Still, very different series often share recognizable behaviors. Retail sales and electricity use may both have seasonal cycles. Financial returns and energy prices may both experience volatility clustering. Industrial output and website traffic may both suffer sudden level shifts. A foundation model attempts to learn representations of those shared structures and transfer that knowledge to data it has never seen before.</p><p>That transfer is what makes <strong>zero-shot forecasting</strong> possible. In a zero-shot setting, a pretrained model receives the history of a new series and produces a forecast without first being retrained on that particular dataset. It is roughly the forecasting equivalent of giving a language model a new passage and asking it to summarize it without teaching the model how to read all over again.</p><h3>How did we get here?</h3><p>For much of forecasting history, the usual approach was local and problem-specific. An analyst might fit an exponential-smoothing model, an <a href="https://www.aptech.com/blog/easier-arima-modeling-with-state-space-revisiting-inflation-modeling-using-tsmt-4-0/">ARIMA</a> model, or a <a href="https://medium.com/@eclow/unobserved-components-models-the-local-level-model-aptech-2661bb218cd">structural time-series model</a> to an individual series. These methods remain powerful because they impose useful structure, work with relatively modest amounts of data, and give analysts a clear way to reason about trend, seasonality, autocorrelation, and uncertainty.</p><p>The next major step was the rise of <strong>global forecasting models</strong>. Rather than fit a separate model to every product, store, or sensor, a global model could learn from many related series at once. A demand model, for example, might learn jointly from thousands of products. This allowed information to be shared across series, especially when any one series contained limited history.</p><p><a href="https://medium.com/@eclow/why-transformers-are-changing-time-series-forecasting-and-why-they-arent-magic-a1848f8fac16">Transformers</a> expanded that idea further. Originally developed for language, transformer architectures are good at identifying relationships within long sequences. In time-series applications, many models divide a series into short blocks, <a href="https://chatgpt.com/c/6aae81fa-d8e8-83ea-956c-407e09d8ef27">or “patches,”</a> much as a text model processes tokens. The transformer then learns how those patches relate to one another across time.</p><p>By 2023 and 2024, models such as TimesFM and Chronos helped establish the modern time-series foundation-model approach: pretrain at large scale, learn across heterogeneous datasets, and forecast previously unseen series with little or no task-specific training. Since then, the field has moved quickly toward longer contexts, probabilistic forecasts, multivariate inputs, and models that can support tasks beyond forecasting.</p><p>This progression does not mean that each new stage replaces the last. Foundation models inherit ideas from statistical forecasting, global models, representation learning, and transformers. Tabby makes that inheritance especially visible.</p><h3>How does a model like Tabby learn to forecast?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*slbe7tWQgStBHgFRFnu99Q.png" /><figcaption>Source: Reproduced unchanged from Xie et al. (2026), Figure 1, under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/?utm_source=chatgpt.com">CC BY-NC-ND 4.0</a></figcaption></figure><p>Tabby is a 145-million-parameter transformer that can examine as many as 8,192 observations at a time. During training, sections of a time series are hidden and the model learns to reconstruct the missing values. Sometimes the missing section is inside the observed history. Sometimes it is at the end, which makes the exercise resemble forecasting the future.</p><p>Before the series enters the transformer, Tabby normalizes its values and divides the sequence into patches. Those patches become the model’s basic units of analysis. By repeatedly seeing parts of many series and learning to fill in what is missing, the model gradually becomes sensitive to temporal patterns that recur across datasets.</p><p>Tabby is also <strong>probabilistic</strong>. It does not limit its output to a single best guess. It produces quantile forecasts that describe a range of possible outcomes. That distinction is important <a href="https://medium.com/@eclow/the-most-important-part-of-a-forecast-isnt-the-forecast-f72caa874d3d">because a useful forecast should communicate not only what is most likely, but also how uncertain the future is.</a></p><p>Once pretrained, the same underlying model can support forecasting, time-series classification, and anomaly detection. It can also be adapted to a particular data distribution through a lightweight prompt-tuning process while leaving the main pretrained model unchanged. In practical terms, that creates a spectrum between using the model exactly as provided and rebuilding it for a specific problem.</p><h3>What makes Tabby different?</h3><p>Tabby’s architecture is not the main story. Its creators explicitly concentrate on two less glamorous but often more consequential ingredients: <strong>the training data and the training recipe</strong>.</p><p>That emphasis is refreshing. When two large models differ, it is tempting to credit the newest architectural feature. But performance can also depend heavily on which datasets were included, how often each source was sampled, how sequences were normalized, what portions were hidden during training, how the learning rate changed, and which checkpoint was ultimately evaluated. Those decisions are expensive to reproduce and are often incompletely documented.</p><p>Tabby opens much more of that process. The project releases the corpus-construction recipe, synthetic-data generators, distributed training pipeline, checkpoint-continuation process, evaluation tools, and trained model. The paper also reports controlled tests of several important design choices. This makes Tabby more than another model to download. It makes it a research object that others can inspect, challenge, and extend.</p><p>Three aspects stand out.</p><h4>1. It learns from real and deliberately simulated worlds</h4><p>Tabby’s training mixture combines large collections of real-world time series with synthetic series. The real data provide authentic patterns and messiness from actual applications. The synthetic data provide something the real world cannot guarantee: controlled exposure to a deliberately broad range of behavior.</p><p>One of Tabby’s generators, CauKerV2, draws from ten families of temporal processes. These include trend and seasonality, ARIMA dynamics, regime switching, change points, spikes and shocks, long memory, GARCH-style volatility, and chaotic systems. It then combines those ingredients in varying ways to create more complex series.</p><p>This is not simply a matter of manufacturing more data. It is closer to designing a curriculum. If the available real-world corpus contains too few clean examples of regime changes or volatility clusters, the generator can create them. If some dynamics are overrepresented and others are rare, synthetic data can help broaden the model’s experience.</p><p>Importantly, part of this synthetic data is created continuously during training rather than drawn repeatedly from one fixed collection. The model therefore keeps receiving new variations instead of eventually memorizing a finite bank of simulated series. In the authors’ controlled comparison, replacing this synthetic component with more real-world samples made both point and probabilistic forecast performance worse. That does not prove every synthetic process is helpful, but it does suggest that carefully designed simulations contribute something beyond sheer data volume.</p><h4>2. Classical forecasting models become teachers, not just competitors</h4><p>The inclusion of ARIMA and GARCH processes is one of the most interesting features of Tabby. Forecasting discussions are often framed as contests: classical statistics versus machine learning, or <a href="https://medium.com/@eclow/transformers-vs-arima-do-more-complex-models-produce-better-forecasts-28ca372052d4">ARIMA versus transformers</a>. Tabby points toward a more productive relationship.</p><p>An ARIMA process encodes particular forms of dependence, persistence, differencing, and seasonality. A GARCH process represents changing volatility and clustered periods of calm and turbulence. By generating training examples from these processes, Tabby uses decades of statistical modeling knowledge to shape what a transformer sees during pretraining.</p><p>The transformer is not being asked to reproduce one fixed ARIMA specification. It is exposed to many variations and to mixtures that also contain nonlinearities, shocks, structural changes, and other behavior. Classical models become part of the training environment: compact ways to generate examples of patterns we already understand.</p><p>That changes the relationship between old and new methods. Statistical models do not disappear when foundation models arrive. They can provide structure, diagnostics, benchmarks, and, in this case, training data. The future of forecasting may be less about choosing one camp and more about <a href="https://medium.com/@eclow/the-future-of-forecasting-is-selectively-hybrid-94a4baab500c">deciding how these tools can reinforce</a> one another.</p><h4>3. It exposes the recipe</h4><p>Tabby also introduces training techniques intended to make the model’s learning process more useful and reproducible. Its progressive training schedule produces intermediate checkpoints that have been deliberately settled rather than captured at arbitrary moments. Its “deep quantile supervision” asks intermediate layers — not only the final layer — to make useful probabilistic predictions as the data move through the network.</p><p>Those details may sound technical, but their purpose is intuitive. A checkpoint should be a dependable version of the model that researchers can evaluate or continue training. And if a deep model is made of many stages, it may learn more effectively when useful forecasting information is encouraged throughout the network instead of only at the very end.</p><p>The paper reports that both choices improved performance in controlled comparisons. More importantly, the code and procedures are available for others to test. In a field where training a foundation model can require vast data preparation and substantial computing resources, a documented recipe lowers the barrier to meaningful follow-up work.</p><h3>What Tabby does not solve</h3><p>Openness should not be confused with universality. Tabby processes each variable independently, so it does not explicitly learn relationships among multiple variables or use outside predictors. A sales forecaster who needs to incorporate price, promotions, holidays, and competitor activity would still face modeling needs that Tabby does not directly address.</p><p>Its synthetic curriculum also reflects human choices. Researchers decided which process families to include and how to combine them. Those choices are reasonable, but they embed assumptions about which patterns matter. The authors also note that their experiments do not fully isolate the benefit of every individual generator, and many controlled tests used a smaller version of the model under a fixed computing budget.</p><p>Finally, competitive benchmark performance does not eliminate the need for baseline models or domain judgment. A seasonal-naive forecast, exponential smoothing, or ARIMA model may still be more accurate, more interpretable, cheaper, or easier to maintain for a particular problem. Zero-shot convenience is valuable, but it is not a waiver from evaluation.</p><h3>The larger lesson</h3><p>Tabby is interesting because it makes a time-series foundation model less mysterious. Its performance comes not from a single clever trick, but from a system of choices: a patch-based transformer, a large and balanced collection of real data, a synthetic curriculum covering diverse temporal behavior, probabilistic training objectives, and a schedule designed to create reusable checkpoints.</p><p>The most important of those choices may be the decision to show the work.</p><p>As time-series foundation models mature, the central questions will not be limited to which model tops the next benchmark. We will also need to ask what the models were taught, which assumptions were built into their training data, how well they transfer to genuinely unfamiliar settings, and when their broad prior knowledge is more useful than a model designed for one specific series.</p><p>Tabby does not settle those questions. It gives researchers and practitioners a better way to investigate them. And perhaps its clearest lesson is that the next generation of forecasting models will not leave classical time-series thinking behind. They may learn from it before they ever see our data.</p><h3>References</h3><p>Ansari, A. F., Stella, L., Turkmen, C., Zhang, X., Mercado, P., Shen, H., Shchur, O., Rangapuram, S. S., Arango, S. P., Kapoor, S., Zschiegner, J., Maddix, D. C., Wang, H., Mahoney, M. W., Torkkola, K., Wilson, A. G., Bohlke-Schneider, M., &amp; Wang, Y. (2024). <em>Chronos: Learning the language of time series</em>. arXiv. <a href="https://arxiv.org/abs/2403.07815">https://arxiv.org/abs/2403.07815</a></p><p>Das, A., Kong, W., Sen, R., &amp; Zhou, Y. (2023). <em>A decoder-only foundation model for time-series forecasting</em>. arXiv. <a href="https://arxiv.org/abs/2310.10688">https://arxiv.org/abs/2310.10688</a></p><p>Kottapalli, S. R. K., Hubli, K., Chandrashekhara, S., Jain, G., Hubli, S., Botla, G., &amp; Doddaiah, R. (2025). <em>Foundation models for time series: A survey</em>. arXiv. <a href="https://arxiv.org/abs/2504.04011">https://arxiv.org/abs/2504.04011</a></p><p>Xie, S., Abdessalem, B., Xiao, Z., El Hili, Y. A., Odonnat, A., Dong, Z., Zan, L., Palpanas, T., Zhang, J., Pan, L., Zhang, K., &amp; Tiomoko, M. (2026). <em>Tabby: An open pretraining recipe for time series foundation models</em>. arXiv. <a href="https://arxiv.org/abs/2609.13956">https://arxiv.org/abs/2609.13956</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38193659f594" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Forecasting Is Selectively Hybrid]]></title>
            <link>https://medium.com/@eclow/the-future-of-forecasting-is-selectively-hybrid-94a4baab500c?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/94a4baab500c</guid>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[econometrics]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 13:22:33 GMT</pubDate>
            <atom:updated>2026-09-13T13:22:33.589Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why better forecasting may depend less on picking a side between classical and moden statistics, and more on deciding what each one should actually do.</h4><p>Forecasting conversations have often been framed as a contest pitting classical models against modern machine learning models. On the classical side are models like autoregressions, ARIMA, exponential smoothing, VARs, and the broader econometric toolkit built around them. On the other side: transformers and time-series foundation model (pretrained neural networks), trained on enormous collections of data and able to forecast a new series without being fit from scratch.</p><p>This is something I’ve explored in a previous blog, looking to answer the usual question of which side wins. However, what if it wasn’t one side versus the other, but instead we let them work together? This changes the question from “<em>Which is the better one?</em>” to “<em>What and when should each approach contribute to the forecasting process?</em>”</p><p>There has been a wave of recent research looking at just this idea. It emphasizes selective hybridization: not the claim that every forecast needs a complicated ensemble, but the idea that modern forecasting systems can keep the strongest parts of classical time-series practice (structure, diagnostics, disciplined evaluation, domain knowledge) while bringing in neural models specifically where flexibility, scale, or transfer learning offer a real advantage.</p><p>That distinction matters. Hybridization shouldn’t mean adding complexity just because you can. It should mean giving each method the job it’s actually suited for.</p><h3>The Two Traditions are Solving the Same Problem</h3><p>A useful starting point comes from Likai Chen and Weining Wang’s review, <em>From Vector Autoregressions to AI-based Time Series Forecasting</em>. They place classical and modern methods inside the same basic forecasting problem: estimating what the future may look like given the information available today. The methods just differ in how they represent that relationship.</p><p>A traditional autoregression uses a stable set of estimated coefficients. A transformer uses attention weights that can shift with the input window. A time-series foundation model goes a step further, learning patterns across many series before it ever encounters the specific one you actually want to forecast.</p><p>That flexibility opens up new possibilities, especially when the data are high-dimensional, nonlinear, or spread across many related series. But it also changes what the model naturally gives you back. <a href="https://medium.com/@eclow/introduction-to-the-fundamentals-of-time-series-data-and-analysis-aptech-7d937a982797">Classical time series</a> models come with a mature language for stationarity, cointegration, <a href="https://www.aptech.com/structural-breaks/">structural breaks</a>, lag selection, uncertainty, and hypothesis testing, and their parameters can often inform economic relationships as well as prediction. <a href="https://medium.com/@eclow/why-transformers-are-changing-time-series-forecasting-and-why-they-arent-magic-a1848f8fac16">Transformer-based forecasters</a> are usually optimized for predictive performance alone. They don’t automatically hand you structural identification, stable coefficients, impulse responses, or testable long-run restrictions.</p><p>None of this means one tradition is better than the other. It’s just a reminder that they were built to do partly different jobs.</p><h3><strong>A Pretrained Model is a Starting Point, not a Verdict</strong></h3><p>Foundation models make an attractive promise: train once on a very large corpus, then forecast a new series immediately. That zero-shot capability can cut development time and give you a strong starting benchmark, but it shouldn’t end the model comparison there.</p><p>In <a href="https://arxiv.org/abs/2609.06656">Assessing Covariate-Informed Grid Load Forecasting with a Time-Series Foundation Model</a>, researchers test Chronos-2 on real-world electricity-load forecasting problems involving multiple targets and external covariates. The model improves substantially with task-specific fine-tuning and performs well at shorter horizons. Its zero-shot version, however, trails models trained specifically for the task, and its errors grow faster as the forecast horizon extends. (This was a far more extensive and sophisticated study than <a href="https://medium.com/@eclow/transformers-vs-arima-do-more-complex-models-produce-better-forecasts-28ca372052d4">my experiment presented in an earlier blog</a>.)</p><p>That result is more useful than a flat declaration that foundation models work or don’t. It tells you the answer depends on how the model is used and which horizon you actually care about. Zero-shot performance can establish a fast baseline. Fine-tuning can adapt a general model to local behavior. A classical model can provide another benchmark, grounded entirely in the target series. From there, a production decision can rest on rolling out-of-sample evidence instead of on how novel the architecture looks.</p><p>This is another form of selective hybridization: <em>combining general pretrained knowledge with task-specific estimation and evaluation</em>, where the foundation model brings transfer learning and the local data still get the final say.</p><h3>Residuals can Become Part of the Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibabl1woPv6eZt7I6KVxHQ.png" /></figure><p>Classical forecasting workflows don’t stop when the fitted values appear. You <a href="https://medium.com/@eclow/the-most-important-part-of-a-forecast-isnt-the-forecast-f72caa874d3d">examine the residuals</a> to see what the model missed, whether the errors are correlated over time, whether they shift during volatile periods, or whether there’s a recurring bias at particular horizons. A residual pattern like that is evidence the original model left predictable structure behind.</p><p><a href="https://arxiv.org/abs/2609.03937">RATL: Learning from Retrieved Residuals for Robust Multivariate Time-Series Forecasting</a> pushes that logic somewhere new. Instead of using residuals only for diagnostics or loss minimization, RATL stores historical forecast-error trajectories. When making a new forecast, it searches for earlier contexts that resemble the current one, retrieves the errors the frozen base model made in those contexts, and uses them to adjust the new forecast. The specific implementation relies on a learned retrieval and routing system, but the core idea is easy to recognize: <em>similar situations tend to produce similar model failures.</em></p><p>That turns residual analysis from a postmortem into an actual correction mechanism, and it’s a good illustration of why hybridization doesn’t have to live inside one architecture. A base model can stay completely unchanged while a second layer learns when and how to correct it.</p><p>Worth flagging the discipline this requires, though: any historical residual used for correction has to have been available at the forecast origin, and the strength of the correction has to be selected out of sample. Skip that, and a clever hybrid can quietly turn into a leakage mechanism. The more adaptive the system gets, the more the evaluation design has to carry the weight of proving it’s actually working.</p><h3><strong>Complexity Still has to Earn its Place</strong></h3><p>Selective hybridization includes the option not to hybridize at all.</p><p><a href="https://arxiv.org/abs/2602.09869">Statistical Benchmarking of Transformer Models in Low Signal-to-Noise Time-Series Forecasting</a> is a valuable paper because it actually asks when transformer architectures help. (Consistent with what we saw in my <a href="https://medium.com/@eclow/transformers-vs-arima-do-more-complex-models-produce-better-forecasts-28ca372052d4">earlier blog</a>). Using controlled data-generating processes, the authors vary signal strength along with the kinds of temporal and cross-sectional relationships in the data, and the results aren’t a blanket win for either side. A sparse linear model performs best when the underlying relationship is straightforwardly linear. Transformers get more compelling once the problem involves nonlinear effects or complicated dependence across series, and even then, some combined temporal and cross-sectional patterns stay difficult no matter which model you throw at them.</p><p>That’s the heart of selective hybridization. The relevant question was never whether a transformer is more advanced than ARIMA or regression. It’s whether the forecasting problem actually contains structure that a more flexible model can exploit, and whether you have enough data and a strong enough evaluation design to prove that advantage is real rather than assumed.</p><p>A simple model isn’t just a box to check before moving on to something more interesting. It sets the minimum improvement that any added complexity actually has to deliver.</p><h3><strong>A More Useful Forecasting Workflow</strong></h3><p>Rather than starting with a favorite architecture, a selective-hybrid workflow starts with a sequence of decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e00h_QuvptPMF8TsI5-exw.png" /></figure><h3><strong>The Future is not Classical or Modern</strong></h3><p>The most interesting development in forecasting isn’t that modern models are making classical methods disappear. It’s that classical ideas keep reappearing inside modern systems, just wearing new clothes: spectral decomposition shows up as a structured prompt, residual analysis becomes retrievable memory, local estimation turns into adaptation of a pretrained model, sparse regularization becomes selective attention. Rolling-origin evaluation is still the referee through all of it.</p><p>That’s what makes selective hybridization more than a compromise between two camps. It’s a design principle: preserve the structure you actually understand, add flexibility only where it solves a demonstrated problem, and make every additional layer earn its place out of sample.</p><p>The best forecasting system probably isn’t the one with the most advanced individual model. It’s the one that’s clearest about what each piece is actually there to do.</p><h3>References</h3><ul><li>Pendyala, V., Fu, Y., Yan, W., &amp; Virani, N. (2026). <a href="https://arxiv.org/abs/2609.06656">Assessing Covariate-Informed Grid Load Forecasting with a Time-Series Foundation Model</a>. <em>Chronos-2 improves substantially with fine-tuning but trails task-specific models zero-shot, especially at longer horizons.</em> <strong>Topic: foundation model fine-tuning vs. zero-shot</strong></li><li>He, Y., Cang, Y., Ning, Z., Wang, N., &amp; Shi, L. (2026). <a href="https://arxiv.org/abs/2609.03937">RATL: Learning from Retrieved Residuals for Robust Multivariate Time-Series Forecasting</a>. <em>Retrieves historical forecast errors from similar past contexts to correct new forecasts, turning residual analysis into an active correction mechanism.</em> <strong>Topic: residual-based correction</strong></li><li>Choi, S., Kim, H., Lee, J.-G., &amp; Park, C. (2026). <a href="https://arxiv.org/abs/2609.02093">Compositional Spectral Prompts for LLM-based Online Time Series Forecasting</a>. <em>Keeps a pretrained language model frozen while adapting it through prompts tied to frequency-domain components.</em> <strong>Topic: spectral prompting</strong></li><li>Chen, L., &amp; Wang, W. (2026). <a href="https://arxiv.org/html/2607.14279v1">From Vector Autoregressions to AI-based Time Series Forecasting: A Review</a>. <em>Places classical and modern forecasting methods inside the same estimation problem, comparing how each represents the relationship between past and future.</em> <strong>Topic: unifying framework</strong></li><li>Garcia, C., &amp; Remy, G. (2026). <a href="https://arxiv.org/abs/2602.09869">Statistical Benchmarking of Transformer Models in Low Signal-to-Noise Time-Series Forecasting</a>. <em>Uses controlled data-generating processes to test exactly when transformer architectures actually outperform simpler models.</em> <strong>Topic: controlled benchmarking</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94a4baab500c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Almost Ideal Demand System]]></title>
            <link>https://medium.com/@eclow/the-almost-ideal-demand-system-65b9bcf2b1c0?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/65b9bcf2b1c0</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[consumer-behavior]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[econometrics]]></category>
            <category><![CDATA[demand-modeling]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 11:46:13 GMT</pubDate>
            <atom:updated>2026-09-11T11:46:13.780Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>What people buy, and how that changes when prices and paychecks move.</em></h4><h3>What is the Almost Ideal Demand System?</h3><p>Every household budget is a small allocation problem. A given amount of money has to be split across groceries, rent, gas, doctor’s visits, and everything else and that split shifts, sometimes a little and sometimes a lot, whenever prices or income change. The Almost Ideal Demand System, or AIDS, is the economics profession’s workhorse tool for describing that split mathematically, in a way that’s both realistic and internally consistent.</p><p>AIDS was introduced by Angus Deaton and John Muellbauer in 1980, and its central object is the budget share: the fraction of total spending that goes to each good, not the dollar amount. Instead of asking “how many pounds of beef did this household buy,” it asks “what share of the grocery budget went to beef” . This is a quantity that’s naturally bounded, naturally comparable across households of different sizes and incomes, and, required to add up to exactly 100% across every good in the budget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vx-wi-3K7S340n2gYYzS1A.png" /></figure><p>The model writes each good’s budget share as a function of every good’s price and of total spending. That sounds like an ordinary regression, but AIDS is built to satisfy the mathematics of rational consumer choice by construction, not by accident.</p><p>None of the last three are automatic in an off-the-shelf regression. They’re what happens when a demand system is derived from an actual utility function . In AIDS’s case, one written directly over budget shares (a “share equation”), rather than derived after the fact from an arbitrary statistical curve. That derivation is also what earns the model its name: economists call this kind of specification a flexible functional form, and “almost ideal” is Deaton and Muellbauer’s own dry pun on it.</p><h4>The quadratic extension: QUAIDS</h4><p>AIDS has one built-in simplification: it assumes each good’s budget share moves in a straight line against <em>log</em> income. For many goods, over a wide enough income range, that’s not quite right. A household’s spending on restaurant meals or medical care doesn’t just rise with income , the <em>rate</em> at which it rises can itself change as income grows. A good can behave like a luxury at low income and something closer to a necessity at high income, or the reverse.</p><p>Banks, Blundell and Lewbel’s 1997 extension, the Quadratic AIDS, or QUAIDS, adds one extra term that lets budget shares bend, rather than run straight, as a function of income. It nests AIDS exactly: set the new term to zero and QUAIDS collapses back to the original model. That nesting turns out to matter a great deal in practice, it means you can directly test, on your own data, whether the extra bend is actually there before you commit to the more complicated model.</p><h3>Why is the Almost Ideal Demand System useful?</h3><p>A demand system earns its keep by turning a description of spending patterns into numbers that are directly usable for a decision and by being honest about when the underlying theory does, and doesn’t, hold up against real data.</p><h4>It produces elasticities, not just correlations</h4><p>The direct output of an AIDS or QUAIDS fit is a set of <em>elasticities. </em>It helps us identify how much a good’s consumption moves, in percentage terms, for a 1% move in income (an income elasticity) or in its own or another good’s price (a price elasticity).</p><p>These are the numbers that answer fundamental demand questions. Is this good a necessity or a luxury? Will raising its price actually raise revenue, or just push spending elsewhere? How much of a subsidy would it take to offset a price shock? A correlation from an ordinary regression can’t answer any of these cleanly, because it isn’t forced to respect the fact that a dollar spent on one good is a dollar not spent on another.</p><h4>It handles the chicken-and-egg problem in spending data</h4><p>Total expenditure isn’t really an “input” to a household’s grocery decisions, rather it’s chosen alongside them, in the same breath. A household that happens to buy more meat this month is also, mechanically, a household that spent more in total this month. Treating total spending as if it were an innocent, pre-determined explanatory variable biases the results. AIDS estimation handles this with an instrumental-variables step baked into the core estimator, rather than leaving it to the analyst to remember.</p><h4>It gives you a dollar-denominated answer to “so what”</h4><p>Because the model is derived from an actual utility function, it doesn’t stop at elasticities. It can also answer, in real currency, “how much worse off is a typical household after this price change,” using a formal measure called <em>compensating variation</em>. That is the direct language of tax incidence analysis, tariff impact studies, cost-of-living adjustments, and consumer-welfare arguments in antitrust and regulatory economics.</p><h4>Its assumptions are testable, not assumed</h4><p>If you’ve taken an advanced microeconomics course, you’ve probably encountered the familiar demand-system restrictions of homogeneity, symmetry, and curvature. In the AIDS these aren’t taken on faith. Instead, each has a standard statistical test built around the fitted model, so a given dataset can confirm, or fail to confirm, that real households actually behave the way the theory predicts. Example 3 below is a case where the data quite clearly say <em>no</em> to one of these restrictions, which is itself a useful, honest finding, not a failure of the exercise.</p><h3>How to know you might need the Almost Ideal Demand System?</h3><p>A demand system is the right tool for a specific shape of problem. A few signals are worth checking for before reaching for one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lv4GrVvx6boyl6sy7Z_BA.png" /></figure><h3>Three real-world applications of the Almost Ideal Demand System</h3><p>All three examples below run on the same underlying dataset: annual U.S. per-capita consumption expenditure and price indices, 1947–1978, compiled by Blanciforti, Green &amp; King (1986) for the USDA and reused widely since as a standard teaching and replication dataset for demand-system estimation. Every figure below is a genuine model output. It’s been fitted, tested, and direct estimation results are reported.</p><h4>Example 1: What’s actually driving the grocery bill?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*enxn7k6Q2pgl__ch97_TFQ.png" /></figure><p>A simple food-budget example shows why demand systems are useful. Households are not deciding how much to spend on meat, produce, cereal, and other foods in isolation. Those choices are made together, within the same overall food budget.</p><p>Estimating the categories as a system lets us see not only where the food dollar goes, but how that allocation changes as total spending rises. The income elasticities below make that especially clear: some categories gain a larger share of the budget as households spend more, while others remain relatively stable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*j8qigA2rA6MCvlO_jKj0cA.png" /></figure><p>The results above provide interesting insight into consumer grocery behavior betweeen 1947–1978:</p><ul><li>Meats (1.85) and fruits &amp; vegetables (1.55) behave like luxuries within the food budget: as households had more to spend, a disproportionate share of the extra dollar went there.</li><li>Cereal &amp; bakery products (0.01, statistically indistinguishable from zero) is about as close to a pure staple as this dataset shows. Its share of the food budget barely moved with income at all.</li></ul><p>Though note shown here, the results also show that every good’s own-price elasticity is negative, as demand theory requires.</p><ul><li>Meats are the most price-responsive at −1.14 (a 10% price rise cuts quantity demanded by roughly 11%).</li><li>Cereal &amp; bakery, again the staple, is comparatively insensitive at −0.74.</li></ul><h4>Example 2: Putting a dollar value on a price shock</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*lqrWlt5-NNNSp4dIC8qCWg.png" /></figure><p>Elasticities are often the first thing we want from a demand model, but they are not necessarily the final thing. Once we have estimated how consumers substitute across goods, we can use the same demand system to answer a more policy-relevant question: <strong>what does a price increase actually cost consumers?</strong></p><p>A price elasticity tells us how strongly demand responds to a price change, but it does not tell us the welfare cost of that change in dollars. Consumers can respond by shifting spending toward relatively cheaper goods, so the burden of a price increase depends on the full pattern of substitution across the system.</p><p><strong>Compensating variation</strong> gives us one way to translate those responses into a dollar measure. It asks how much additional money a consumer would need after a price change to be just as well off as before.</p><p>Using the fitted food-demand system, we can compare three hypothetical 20% price shocks evaluated at 1978 expenditure levels:</p><ul><li>A rise in meat prices.</li><li>A rise in cereal and bakery prices.</li><li>A rise in all food prices at once.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*L9Q3I5OfizTCqM1ksqqw9w.png" /></figure><p>A 20% increase in meat prices costs the representative consumer about <strong>$61</strong>, or <strong>6.1% of the total food budget</strong>. Meat accounts for roughly a third of food spending, and consumers have limited ability to fully substitute away from it. The same 20% increase applied to cereal and bakery products costs only about <strong>$23</strong>, or <strong>2.3% of the food budget</strong>.</p><p>The comparison highlights an important point: <strong>which good becomes more expensive can matter just as much as the size of the price increase.</strong> A demand system lets us move beyond saying that consumers will buy less and instead quantify how costly a price shock is after accounting for substitution across the rest of the budget.</p><h4>Example 3: When the Simpler Model Wins</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*sAOnsJh0EzYiiQb2oSQyqw.png" /></figure><p>The final example shifts from closely related food categories to four much broader areas of household spending: food, housing, transportation, and medical care. Together, they account for nearly half of total consumption spending in the sample. That makes this a useful setting for asking a different kind of question: not just what the elasticities are, but whether the structure imposed by a standard demand system actually fits categories this different from one another.</p><p>The goal here is therefore as much diagnostic as descriptive. We first test whether the added flexibility of QUAIDS is warranted, then examine whether standard theoretical restrictions such as homogeneity and symmetry are supported by the data, before deciding which specification to use for the reported elasticities.</p><p><strong>First, the diagnostic<br></strong>Before interpreting any elasticities, it is worth asking whether the extra flexibility of QUAIDS is actually needed. QUAIDS adds a quadratic expenditure term to the standard AIDS model, allowing spending patterns to bend in ways that a simpler specification cannot. But more flexibility is only useful if the data support it.</p><p>The first test asks exactly that question. Here, the quadratic term is nowhere close to significant, so the data provide no evidence that QUAIDS improves on the simpler AIDS specification. The remaining tests ask a different question: whether the fitted demand system is consistent with standard microeconomic restrictions such as homogeneity and symmetry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*ZM5IwuzocehOyNZGicXtTQ.png" /></figure><p>The diagnostics point in two different directions. The quadratic term adds essentially nothing, so there is little reason to prefer QUAIDS over AIDS on flexibility alone. Homogeneity is comfortably not rejected, but symmetry is rejected very strongly.</p><p>That matters because symmetry is not just a statistical convenience. It is one of the restrictions implied by utility-maximizing demand. In this case, the broad spending categories appear too structurally different for that restriction to fit the data well. Rather than force the estimated cross-price relationships to satisfy symmetry, I therefore leave those parameters free to be determined by the data.</p><p>The income elasticities below come from that unconstrained AIDS specification. They do not themselves show the symmetry violation; the diagnostic test above tells us that. Instead, they show what the model estimates once we choose not to impose a restriction the data do not support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*z6uPY6cHE6YOKd--ALw72w.png" /></figure><p>The resulting elasticities suggest very different spending responses across categories. Food, with an estimated elasticity of 0.59, behaves clearly as a necessity: spending rises with the household budget, but less than proportionately. Housing and medical care have estimates above one, while transportation sits almost exactly at unit elasticity. These differences are what we want the demand system to reveal without forcing unsupported structure onto the data.</p><p>But the estimates are not equally precise. Medical care is the clearest example: its point estimate is 1.47, but the uncertainty band is wide. With only 32 annual observations, the model can tell us considerably less about its exact magnitude than the point estimate alone might suggest. Showing that uncertainty alongside the estimate is part of reporting the result honestly.</p><p><strong>Did these elasticities actually move as postwar incomes grew?</strong></p><p>AIDS does not imply that income elasticities must stay fixed over time. Because each elasticity depends in part on the good’s budget share, changes in spending patterns can change the estimated elasticity even when the underlying functional form remains the same. That distinction matters here: movement in the elasticities does not, by itself, imply that the quadratic term in QUAIDS is needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*3Cygg4GVi-KJ9HwOs7Ft7Q.png" /></figure><p>Across the sample, three of the four categories become somewhat less income-elastic. Food falls from 0.68 to 0.49, housing from 1.58 to 1.38, and medical care from 1.64 to 1.33. Transportation is essentially unchanged at about unit elasticity.</p><p>The important point is not that the demand relationships are fixed, but that they can evolve even within the simpler AIDS framework. As budget shares shift over time, the implied elasticities shift with them. That is different from finding evidence that the expenditure relationship itself needs the additional quadratic structure of QUAIDS.</p><p>It’s also worth noting that this is not evidence of a time-varying-parameter model. The AIDS coefficients themselves are held fixed; the elasticities change because they are functions of budget shares and expenditure, both of which evolve over time. More elaborate demand models can go a step further and allow the underlying parameters themselves to change.</p><h3>Conclusion</h3><p>Across these examples, the demand system did three different jobs. It showed how categories compete within a shared budget, translated price changes into economically meaningful welfare costs, and helped determine how much model complexity the data could actually support.</p><p>That last point may be the most important. The value of a demand system is not that it guarantees the data will behave exactly as economic theory predicts. In the final example, symmetry was strongly rejected, and that is a useful result. Theory gives us restrictions that can be tested rather than simply assumed, which means the model can tell us when the economic structure fits the data and when it does not.</p><p>The examples also show why demand-system modeling is about more than estimating a collection of elasticities. Budget shares evolve, implied elasticities can change even when the underlying coefficients are fixed, welfare effects depend on substitution across goods, and more flexible specifications such as QUAIDS are only useful when the data actually support the added complexity.</p><p>The dataset used here is intentionally small and transparent: 32 annual observations from 1947 through 1978. That makes it useful for demonstrating the mechanics of AIDS and QUAIDS, but modern applications often involve much richer household survey data, along with complications such as zero expenditures, survey weights, clustered sampling, and much larger cross sections.</p><p>The estimates in this post were produced with an <a href="https://github.com/ec78/gauss-aids-model">open-source GAUSS implementation of AIDS and QUAIDS</a>. The library includes the core demand-system models along with tools for applied estimation, diagnostics, survey-data complications, and welfare analysis. I have kept the focus here on the economics rather than the code, but the repository contains the implementation behind the examples for anyone who wants to explore further.</p><h4>Sources &amp; further reading</h4><p>Deaton, A. &amp; Muellbauer, J. (1980). “An Almost Ideal Demand System.” <em>American Economic Review</em>, 70(3), 312–326.<br>Banks, J., Blundell, R. &amp; Lewbel, A. (1997). “Quadratic Engel Curves and Consumer Demand.” <em>Review of Economics and Statistics</em>, 79(4), 527–539.<br>Blanciforti, L., Green, R. &amp; King, G. (1986). <em>U.S. Consumer Behavior Over the Postwar Period: An Almost Ideal Demand System Analysis.</em> Giannini Foundation Monograph №40.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65b9bcf2b1c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Does a Black Box Become Trusted Product Behavior?]]></title>
            <link>https://medium.com/@eclow/when-does-a-black-box-become-trusted-product-behavior-4e4a073cf2a9?source=rss-291732250ca2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e4a073cf2a9</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[customer-education]]></category>
            <category><![CDATA[product-trust]]></category>
            <category><![CDATA[customer-experience]]></category>
            <dc:creator><![CDATA[Eric Clower]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 11:36:40 GMT</pubDate>
            <atom:updated>2026-09-07T11:36:40.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmdLFqvNeNZBicWa-Ygayg.png" /></figure><p>I’ve spent the last 15 years working in analytical and quantitative software, and “can I trust this?” is a question I’ve heard in one form or another more times than I can count. Someone runs a model, gets an estimate, sees a forecast, or watches an optimization routine converge on an answer, and the first instinct is often not “is this right?” but “how do I know this isn’t just a black box doing something I can’t see?” I’ve fielded that question from clients, from students, from colleagues who trust the math but not the software running it.</p><p>With the rise of AI tools, we’re all circling some version of the same thing now, just at a much larger scale. The specifics change (AI-generated text, a recommendation, a forecast, a summary, search results, a decision made by a system I can’t fully inspect) but the underlying concern is the same one I’ve been hearing for over a decade: a tool is doing something useful, and I don’t completely understand what’s happening inside it.</p><p>That’s usually where the phrase “black box” enters the conversation. A system takes an input, produces an output, and something happens in between that’s hard for most people to see, explain, or evaluate. That makes people uneasy, reasonably so. But it raises a more practical question: do you actually need to understand every internal mechanism of a tool before you can trust it?</p><p>I don’t think you do.</p><p>Think about a power drill. Most people who use one don’t understand the physics behind the motor, the relationship between torque and speed, the battery chemistry, or the engineering tradeoffs inside the gearbox. They don’t need to. They trust the drill because it behaves in a way they can understand at the level that actually matters to them: press the trigger and it turns, release it and it stops, change the bit and the task changes. Apply too much pressure or use the wrong bit, and the tool gives them feedback. Over time, they learn what it’s good for, where it struggles, and when to be more careful.</p><p>The drill is a black box in one sense, but it’s not mysterious in use. That distinction is the one I want to spend this post on, and it’s the same one I’ve been explaining, in different forms, for most of my career.</p><h3>Trust Is Built at the Level of Use</h3><p>The power drill example is simple, but I think it points to something important. You usually don’t trust a tool because you understand every internal mechanism. You trust it because you understand how to use it, what to expect from it, and what to do when something doesn’t go as planned.</p><p>A drill earns trust through behavior: it responds predictably, it gives immediate feedback, its controls make sense, and its limits become familiar over time. It also gives you a way to intervene. You can stop pressing the trigger, change the bit, adjust the pressure, or decide the tool isn’t right for the material in front of you. That’s very different from trusting something blindly. You may not understand the internal engineering, but you’re not helpless either. You have enough visibility and control to build confidence through experience.</p><p>I think this is where the black box conversation usually needs more nuance. A black box isn’t automatically untrustworthy. Plenty of useful products are black boxes to most of the people using them. What actually matters is whether the product gives you enough practical understanding to decide when and how to rely on it: whether you can tell what it’s doing, recognize when something seems off, adjust the input, evaluate the output, recover from a mistake, and learn from repeated use.</p><p>Those questions matter because trust isn’t just about what happens inside the system. It’s also about what the product makes visible to you. A product becomes more trustworthy when it helps you have enough understanding to know what the tool is for, where it’s reliable, where it’s risky, and what judgment you still need to bring yourself. That’s why onboarding, documentation, interface design, examples, warnings, defaults, and recovery paths aren’t secondary details. They’re part of the trust experience itself.</p><p>For AI products especially, this matters because the output can feel confident even when the underlying work is uncertain. A polished answer, summary, forecast, recommendation, or classification can look reliable well before it’s actually earned that. That doesn’t mean AI products can’t be trusted, it means they have to earn trust differently: by helping you understand not just what the system produced, but how to think about that output. What source material did it draw on? What assumptions might be baked in? How much confidence is warranted? What needs a second look before you act on it? Where does your own judgment still matter?</p><h3><strong>A Useful Lens for Product Trust</strong></h3><p>One helpful way to think about this is <a href="https://www.hbs.edu/faculty/Pages/item.aspx?num=59724">Frances Frei’s triangle of trust</a>. Frei describes trust as resting on three drivers: logic, empathy, and authenticity. In a human relationship, people tend to trust you when they believe your reasoning is sound, when they believe you care about their interests, and when they believe you’re being honest about who you are. I think that framework translates surprisingly well to product behavior.</p><h4>For a product, logic means the experience makes sense.</h4><p>It behaves consistently enough that you can form a reasonable mental model. You may not understand every internal process, but you can understand the relationship between what you do and how the product responds.</p><h4>Empathy means the product feels designed around your actual situation.</h4><p>It considers your workflow, the stakes involved, the mistakes you’re likely to make, and the moments where you need guidance instead of just output. An empathetic product doesn’t just ask whether it can produce an answer. It asks what you’ll actually need to do with that answer, and what could go wrong if the product makes that harder than it needs to be.</p><h4>Authenticity means the product is honest about what it’s built on and where its limits are.</h4><p>In a product context, that’s not just tone or branding or sounding transparent, it shows up in the substance around the product: clear documentation, accurate help content, transparent release notes, useful examples, sensible warnings, and honest explanations of what it can and can’t do. A product gets harder to trust when it hides too much, not because you need to understand every technical detail, but because you need enough truth to make good decisions. You need to know what data it depends on, what assumptions it’s making, what it does well, where it struggles, and what you should check before relying on the output.</p><p>When a product answers those questions clearly, it becomes more authentic. It stops asking you to treat the system as magic and starts giving you a more honest relationship with the tool. That’s also why technical documentation carries so much weight in product trust. It’s often treated as something that comes after the product, a support asset, a help center article, a training resource, but for anything complex, documentation is part of the product’s trust layer. It’s what helps you understand what you’re actually working with, how much confidence to place in it, and how to use it responsibly.</p><p>That’s where product trust gets concrete. A trusted product doesn’t just produce a useful answer, it helps you gauge how much confidence to place in it. It doesn’t just complete a task, it helps you know whether the task was actually completed well. And it doesn’t just feel intelligent, it behaves in a way that respects your goals, your context, and your need to stay in control.</p><p>This matters even more for AI products, because AI can create a strong illusion of trustworthiness: fluent output, a clean interface, an answer that arrives quickly and confidently. But confidence isn’t the same as trust. A product earns trust when the experience gives you enough logic, empathy, and authenticity to rely on it appropriately, not blindly.</p><h3><strong>Where AI Products Lose Trust</strong></h3><p>AI products don’t usually lose trust because they’re complex. Most people are willing to work with something they don’t fully understand, as long as it gives them enough signals to use it well. The problem usually isn’t that the system is a black box, it’s that the experience around it doesn’t give you enough logic, empathy, or authenticity to trust it completely: an answer without enough context, a recommendation without enough reasoning, a prediction without enough sense of uncertainty. It hands you confidence in the form of polished output, but not confidence in the form of usable evidence, and that’s where trust starts to break down.</p><p>You don’t need to understand the model architecture or the statistical assumptions underneath it. But you do need enough to decide whether the output is appropriate for the task in front of you: can you see the source material, tell whether the system is summarizing or guessing, spot where it’s confident versus uncertain, and recover when it gets something wrong? A technically impressive system can still feel untrustworthy if you can’t work with it. It becomes trustworthy once it gives you real ways to inspect, verify, and recover.</p><p>Most of what I’ve described so far is really about logic and authenticity: does the product behave in a way you can reason about, and is it honest about what it’s built on and where it stops. Empathy is the harder one, and it’s the easiest to skip. A product can cite its sources, show a confidence score, and document its limits, and still fail on empathy if it treats every use of the tool the same way. A quick, low-stakes question and a decision that affects someone’s job, health, or finances shouldn’t come with identical friction, identical warnings, identical review. A genuinely empathetic product recognizes the difference and adjusts, more caution and explanation when the stakes are high, less friction when they’re not.</p><p><em>Logic and authenticity tell you the product is honest. Empathy is what tells you it actually understands what you’re using it for.</em></p><p>This is something I used to argue about constantly earlier in my career, working on analytical software. The economists, biologists, or analysts using our software weren’t computer programmers and didn’t really want to be. They wanted to use the tool, one they could trust, to get to whatever bigger objective actually mattered to them: an estimate, a model, a result they could stand behind.</p><p>I think the same is true of AI tools now, just at a much larger scale. Most people don’t want to become AI engineers, and they shouldn’t have to. They don’t want to understand how the LLMs underlying their favorite AI agents are working. They want to be able to trust AI as a tool for the task in front of them.</p><h3><strong>The Shift From Explainability to Product Trust</strong></h3><p>A lot of conversations about AI trust focus on explainability, and that makes sense. If a system is shaping a decision, a recommendation, or someone’s next action, you want to understand how it got there. But explainability becomes too narrow if it’s treated as the only path to trust. For most people, the better question isn’t “can we explain exactly how the system works?” It’s “can we help the user rely on the system appropriately?” A full technical explanation is useful for engineers, auditors, and regulators, but most people need something closer to operational trust: what the product is doing in plain terms, and what kind of review it still deserves.</p><p>That’s why trust isn’t built inside the model alone. <em>It’s built across the whole product experience, in the onboarding, the documentation, the interface choices, the warnings, and the recovery paths, and that work belongs to product, education, and support teams just as much as it belongs to whoever built the model. </em>Those details may not feel as exciting as the underlying technology, but they’re often what determines whether people actually adopt it.</p><p>That may be one of the most important trust challenges for AI products right now: not making every system perfectly explainable, and not asking people to blindly accept whatever it produces, but designing the product around it so people know when, where, and how to trust the work.</p><h3><strong>What Product Teams Can Do About It</strong></h3><p>If trust is built through product behavior, it can’t be solved by a single feature. It has to be designed into the experience, and for AI products, that starts with being clear about the relationship between the user, the system, and the output. Is the product producing a final answer, a draft, a recommendation, a summary, a prediction, or a starting point for review? Those distinctions matter because each one asks for a different level of trust: a draft invites revision, a recommendation invites judgment, a prediction invites uncertainty, a summary invites source-checking, a decision invites accountability. When products blur those categories, people are left to guess how much confidence they should have, and that’s where misuse becomes more likely.</p><p>The signals discussed above (source links, confidence indicators, documentation, recovery paths, plain language about limits) are how products actually draw those distinctions instead of leaving them implicit. None of this requires turning every product into a technical textbook; too much explanation creates its own burden. The goal is the right information at the right moment, matched to what kind of output the person is actually looking at.</p><p>The best product experiences don’t ask users to choose between blind trust and total skepticism. They create a middle ground where people can rely on the system, question it when needed, and understand their own role in the outcome.</p><h3><strong>Trust Is an Adoption Problem</strong></h3><p>This is why I think trust belongs in the product adoption conversation. People don’t adopt products just because the technology is impressive. They adopt them when they understand where the product fits, what it helps them do, and how much confidence they should place in it. That’s especially true for complex products: you might try something because it’s powerful, but you keep using it because it becomes dependable in your workflow. You know what it’s good for, what to check, how to recover, and where the boundaries are. <em>That’s when a black box starts to become trusted product behavior, not because the box disappears, but because you have enough experience and support to work with it responsibly.</em></p><p>This is where customer education, documentation, onboarding, support, and product design all start to overlap. They’re usually treated as separate functions, but from the user’s side they’re one experience, and together they teach you what kind of trust is actually appropriate. A product can’t behave opaquely, communicate vaguely, document lightly, and then expect confidence just because the technology is advanced. It has to be earned in the actual moments where someone is deciding whether to rely on it: whether to use an answer, share a summary, act on a recommendation, or let it override their own judgment.</p><p>For AI products, those may be the most important adoption moments there are. The products that win trust won’t necessarily be the ones that explain every internal detail. They’ll be the ones that help people make better decisions about when and how to rely on the system. That’s the difference between a black box that feels risky and one that becomes part of trusted work.</p><h3><strong>A Better Question Than “Do We Trust It?”</strong></h3><p>So maybe the question shouldn’t be “do we trust AI?” That’s too broad to be useful. It treats trust like an on/off switch, when in practice trust is usually specific: you trust certain tools for certain tasks, under certain conditions, with certain kinds of review. I might trust a power drill to make a pilot hole in a piece of wood. That doesn’t mean I trust it for every material, every bit, every angle, or every job. The trust is real, but it’s bounded by experience, context, and judgment. AI products need that same kind of bounded trust.</p><p>The better question isn’t whether you trust the system. It’s trust it for what, under what conditions, with what level of review, based on what source material, and with what recovery path if it’s wrong. That framing moves the conversation away from blind optimism and blanket skepticism, and gives product teams something more practical to aim for: not convincing users the black box is harmless, but helping them understand the conditions under which the product is useful, reliable, limited, or not appropriate at all.</p><p>That kind of trust is more honest, and more durable. People don’t need products to pretend uncertainty doesn’t exist. They need products that help them work intelligently with it: enough logic to understand the product’s behavior, enough empathy to feel supported in their actual workflow, and enough authenticity to know what it’s built on and where its limits are. That’s when trust stops being a feeling and becomes part of how the product actually works.</p><h3><strong>Black Boxes Are Not Going Away</strong></h3><p>The future isn’t one where every user understands every system they rely on. It’s one where more products contain complex systems: models, automation, AI, layers of software most people will never look inside. That trend makes product trust more important, not less.</p><p>Full technical transparency isn’t always realistic, and it isn’t always useful even when it is possible. Most people don’t want a manual for the model. They want to know if they can rely on it, and for what. That’s exactly the kind of practical understanding documentation, onboarding, and customer education exist to build, which is why I think of them as trust infrastructure now rather than support functions that come after the real work is done.</p><p>The challenge in front of product teams isn’t eliminating complexity. It’s making complexity usable: giving people enough logic, empathy, and authenticity to work with a system they’ll never fully see inside.</p><p>A black box becomes trusted product behavior when people don’t have to understand everything happening inside it, but they do have enough evidence, guidance, and control to use it well. That’s true of a power drill. It’s going to be true of AI products too, whether or not any of us ever really open the box.</p><h3>References</h3><p>Frei, Frances, and Anne Morriss. “Trust: The Foundation of Leadership.” Leader to Leader 99 (Winter 2021): 20–25.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e4a073cf2a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>