SBCJuly 31Flashbots

Latency-optimized LLMs for trading_

Sam Green starts from a sentiment-trading result whose apparent edge decayed as traders caught up. His proposed response combines knowledge distillation with a news-labeling corpus, then uses neural architecture search to put latency directly into the optimization objective. The goal is not another large general model, but a smaller hardware-aware model fast enough to compete for time-sensitive signals.

speaker Sam Greenruntime 15:19format talk + Q&Areading time ~9 min

Watch on Youtube

tl;dr

›
A public model signal becomes a latency race once others exploit it.

Sam connects a roughly three Sharpe-ratio sentiment study with a separate slide showing reported accuracy falling from 62 percent toward no edge by late 2025.

›
Train the capable model first, then compress its behavior.

Sam’s PPO example records a large teacher’s observations and outputs as supervised data for smaller students; the proposed LLM adaptation would turn news labels into the same kind of corpus.

›
Latency can be an optimization cost rather than an afterthought.

By assigning costs to candidate operations and adding them to the loss, architecture search exposes a knob between model size, resource use, and an acceptable performance threshold.

If you're new to any of this

The trading problem is a race between model quality and response time. A large language model may extract a useful signal from news yet act too slowly after many traders pursue the same opportunity. The talk proposes two compression levers: teach a smaller model from a stronger one, then search for an architecture shaped by the target hardware. The goal is a testable latency–performance trade-off.[4][5][6][7]

›A bit more background

The cited sentiment study is one bounded experiment: it uses an OPT model described as GPT-3-based, converts news sentiment into long, neutral, or short decisions, and reports classification and backtest results under stated assumptions. A Sharpe ratio relates excess return to variability; it is not a latency measure. Backtests also depend on fees, market impact, data selection, and timing, so the result motivates the problem without establishing a durable production edge.[4]

The optimization methods address different stages. Knowledge distillation trains a smaller student from a larger teacher’s outputs; in the cited reinforcement-learning work, PPO trains the teacher policy. Neural architecture search instead chooses a model structure, and resource-aware search can include hardware cost or latency in its objective. Together they suggest a pipeline from teacher-labeled news to a hardware-aware student, but the cited papers test separate components rather than this complete trading system.[5][6][7]

Show slides
01

Sentiment trading turns latency into the edge

I came across an article about an academic study showing that you could have used GPT-3 to build a long-short strategy that stayed profitable for several years. So yes, alpha from LLMs has definitely been done. But if you use it naively now, the edge is squeezed out. I think one reason you cannot naively use GPT to get alpha is the latency that it takes. Once traders share the same signal, getting the classification first becomes part of the strategy.

The strategy looked at whether sentiment was positive, neutral, or negative. Positive meant long, neutral meant no change, and negative meant short. GPT-3's cutoff preceded the backtest news, and the reported Sharpe ratio was three.

Sentiment strategy maps positive news to long, neutral to hold, and negative to short positions.
slide 03Positive, neutral, and negative news map to long, hold, and short.

Backtesting always has a problem with fees and cross-impact, so I do not treat that result as a ready-made trading system. More important, later researchers duplicated the study with GPT-4. In Q1 2024, a long-short sentiment model was right sixty-two percent of the time. By Q4 2025, all that alpha had been squeezed out—the edge decayed over time—with the implication that large traders were already using the technique in production. Unless your system is highly optimized, you will not be able to capture it.

“By Q4 2025, all that alpha had been squeezed out. So the strategy stopped working over time.”

— Sam Green
Chart shows reported sentiment-trading accuracy declining from 62 percent toward chance by late 2025.
slide 04Speaker-reported accuracy falls from 62 percent toward chance by late 2025.
02

Large policies learn faster than small ones

This got me thinking about my PhD work on efficient models and distillation. In those experiments I took large, medium, and small convolutional policy networks and trained them from scratch on Atari game environments. The larger the model, the faster it would learn and the better it would do in general. The red large-policy network almost always learned faster and reached a higher score than the medium and small networks. The chart's summary is direct: model size accelerated learning.

“Large models learn faster. They reach a higher plateau than smaller models.”

— Sam Green

By default, a small model learned more slowly and reached a lower plateau. It was cheaper to run, but weaker when learning the policy from scratch.

The technique separates learning from execution. Start with a large policy, let it interact with the environment, and get it to high performance. Then have it interact again while you record the states and actions—or the logits from the teacher network—to a database. That database of observations lets smaller networks learn without doing the original exploration. The large model does the hard learning; the compact model inherits its behavior for faster deployment.

Learning curves compare large, medium, and small policy networks across Atari tasks.
slide 06Larger Atari policy networks generally learn faster and reach higher scores.
03

Distill the teacher into the student

After the large policy becomes high performance, I let it interact with the environment and record the states and actions, or the logits that come out of the teacher network. Those observations go into a big database. You can then treat it like a supervised training problem and use that information with smaller networks. The teacher has already learned from the environment; its recorded outputs become the examples the student needs.

The student learns from the teacher, not through its own exploration. It treats the recorded observations and outputs as a supervised training problem.

Teacher policy generates states and action outputs that become supervised training data for students.
slide 07A teacher’s recorded outputs become supervised data for smaller students.

It works really well. The table compares the final teacher scores with the student scores. Those students never actually got to experience the environment during training; they just learned from the teacher, with no fine-tuning after distillation. When they later interacted with the environment, their scores were about the same or better. That is evidence for this particular experiment, not a claim that every teacher and student pair will transfer equally well.

Score table compares distilled student policies with teacher and directly trained baselines.
slide 08Distilled students match or exceed several directly trained baselines.
04

Turn news labels into a training corpus

To apply this technique with LLMs, get tons of news and start building a corpus of news for the assets that you are interested in trading.

Then use an open model to do sentiment analysis on all of it. You can create embedding vectors for the model's output, pair them with the news as input, and create a supervised training corpus. With that corpus, start experimenting with smaller models. The teacher's output supplies the labels while the expensive model is off the live execution path. This is the same pattern as recording the states and actions of a reinforcement-learning teacher, only the observations are news stories and the targets are language-model judgments.

You want smaller models because you want hardware-optimized models for latency. Distillation supplies the behavior to imitate; it does not choose which operations run fastest. The next question is how to design an architecture with hardware constraints, including response time, built into the search.

06

Which optimization method trained each stage?

Audience

Is there an optimization method behind it?

Sam Green

The RL one was all PPO. The architecture-search example used gradient descent.

Audience

Has anyone studied how manipulatable sentiment-analysis-based training is?

Sam Green

I have not seen that exact study. Related work gave the same prompt to many different models and calculated the distance between embedded output vectors; the outputs were basically identical. I duplicated the comparison with my own data and saw nearly identical text across models. If you learn to manipulate one, it might translate to others—a useful direction for further study.

A

Slides discussed indirectly or skipped

The cited sentiment paper identifies its classifier more precisely as OPT, described by the authors as GPT-3-based, and reports 74.4% classification accuracy plus a long-short Sharpe ratio of 3.05. The talk rounds this to “GPT-3” and a Sharpe ratio of three. This correction identifies the cited experiment; it does not validate the separate Q1 2024-to-Q4 2025 alpha-decay series or turn the backtest into a production recipe.[4]

Slide 12 contains GBNAS pseudocode that alternates model-weight updates with architecture updates under a resource-aware objective. Sam explains operation costs and the penalty knob in the surrounding talk but does not verbally walk through this algorithm page. The slide names that alternating schedule explicitly. It is retained as slide-sourced implementation context, not as a separately explained method or a claimed production system.

GBNAS algorithm pseudocode alternates model-weight and architecture updates under a resource-aware objective.
slide 12GBNAS alternates weight and architecture updates under explicit resource constraints.

Glossary

sentiment trading — A strategy that converts text-derived views such as positive, neutral, or negative sentiment into positions. The cited paper reports 74.4% classification accuracy and evaluates a long-short portfolio built from those labels. Signals can decay as markets adapt.[4]

Sharpe ratio — A risk-adjusted performance measure comparing excess return with return variability. The cited sentiment paper reports 3.05 for its long-short strategy; that backtest result depends on its data, fees, and assumptions. It does not measure execution latency.[4]

knowledge distillation — Training a smaller student model from a larger teacher’s outputs. Sam Green and co-authors evaluate policy students that match or exceed some lower-capacity direct-training baselines on the tasks they report. Generalization beyond those tasks remains unproven.[5]

Proximal Policy Optimization (PPO) — A policy-gradient reinforcement-learning method that alternates collecting experience with optimizing a surrogate objective. The original paper defines the clipped update; the Q&A identifies PPO as the teacher-training method in the example.[7]

neural architecture search — An automated search over model structures. Resource-aware differentiable methods such as RAPDARTS place performance and resource constraints inside the search, but the cited paper does not establish a production trading latency.[6]

References

  1. [01]Flashbots at SBC 2026 — Flashbots CollectiveFlashbots’ event recap lists the Agentic MEV agenda, speakers, and recordings.
  2. [02]Team — CambrianCambrian’s team page lists Sam Green as founder and CEO.
  3. [03]Financial intelligence for evolving markets — CambrianCambrian provides real-time and historical financial data through an API.
  4. [04]Sentiment Trading with Large Language Models — Original paper authors / arXivStudy testing whether LLM sentiment analysis can predict U.S. stock returns.
  5. [05]Distillation Strategies for Proximal Policy Optimization — Sam Green et al. / arXivStudy transferring PPO policies from larger teacher networks into smaller students.
  6. [06]RAPDARTS: Resource-Aware Progressive Differentiable Architecture Search — Sam Green et al. / arXivRAPDARTS searches for neural architectures under latency and resource constraints.
  7. [07]Proximal Policy Optimization Algorithms — John Schulman et al. / arXivOriginal paper introducing Proximal Policy Optimization for reinforcement learning.