← Latest papers
💻 computer science

Scaling Laws for Behavioral Foundation Models over User Event Sequences

This paper establishes scaling laws for behavioral foundation models trained on user event sequences, revealing that a small feature-based embedder is consistently compute-optimal, that optimal training strategies shift with budget and evaluation metrics, and that negative sampling constraints eventually transition from FLOPs to memory limits.

Original authors: Rickard Brüel Gabrielsson

Published 2026-06-05
📖 6 min read🧠 Deep dive

Original authors: Rickard Brüel Gabrielsson

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a massive, high-speed recommendation engine for a giant online store. Every time a customer clicks, buys, or searches, it leaves a digital footprint. Your goal is to build an AI that predicts what a customer will do next based on their history.

This paper is like a massive, scientific "recipe book" for building that AI. The authors ran about 600 different experiments, tweaking the AI's brain in every possible way, to figure out the most efficient way to spend their computing power (which costs a lot of money and electricity).

Here is the breakdown of their findings, using simple analogies:

1. The Two-Part Brain: The Librarian and the Storyteller

Most of these AI models have two distinct parts working together:

  • The Librarian (The Embedder): This part looks at a specific item (like a pair of shoes or a transaction) and figures out what it is. It reads the text, the price, the color, and the category.
  • The Storyteller (The Transformer): This part looks at the sequence of events. It remembers that you looked at shoes, then a hat, then a jacket, and tries to guess what you'll buy next.

The Big Discovery: The authors found that the "Librarian" should be tiny.

  • The Analogy: Imagine you are hiring a team to write a novel. You have a limited budget. You might think you need a huge team of researchers (the Librarian) to look up facts for every word. But the authors found that you only need a tiny team of researchers (about 2% of your total staff).
  • Why? The "Librarian" sees the same popular items (like "Nike sneakers") thousands of times. It gets bored and learns them quickly. The "Storyteller," however, sees unique combinations of events that rarely repeat. The Storyteller needs the big brain; the Librarian just needs a small, efficient one.

2. The "Batch Size" Dilemma: How Many Students in the Classroom?

When training the AI, you don't show it one example at a time; you show it a "batch" of examples.

  • The Analogy: Think of a teacher teaching a class. If the class is too small (batch size 64), the teacher gets distracted by individual quirks. If the class is huge (batch size 2048), the teacher might get overwhelmed or the lesson becomes too generic.
  • The Discovery: The "sweet spot" depends on what you are measuring.
    • If you care about accuracy (did we get the right answer?), the sweet spot is a medium-sized class (around 570 students).
    • If you care about ranking (is the top result the best one?), the sweet spot is a smaller class (around 200–275 students).
    • Takeaway: You can't just pick one batch size for everything. The "best" size changes depending on what you are trying to optimize.

3. The Data vs. Model Trade-off: Big Brain or Big Library?

You have a fixed amount of money (Compute Budget). Do you buy a super-smart AI (more parameters) and feed it less data? Or a slightly less smart AI and feed it a massive library of data?

  • The Discovery:
    • At small budgets: You should feed the AI massive amounts of data. The AI is like a sponge; it needs to soak up as much information as possible because it's not smart enough to generalize on its own yet.
    • At huge budgets: As you get richer (more computing power), the balance shifts. You start needing a smarter AI and less data, eventually reaching a point where the ratio looks similar to how Large Language Models (like the ones that write text) are trained.
    • The Trend: It starts as a "data-heavy" strategy and slowly moves toward a "balanced" strategy as you get more powerful computers.

4. The "Negative" Sampling: How Many Wrong Answers to Show?

When the AI learns, it doesn't just see the correct answer; it also sees "distractors" (wrong answers) to learn what not to pick.

  • The Analogy: Imagine a multiple-choice test. If you only show the student 3 wrong answers, they might get lucky. If you show them 1,000,000 wrong answers, they learn the pattern perfectly.
  • The Discovery:
    • Small budgets: You need a moderate number of wrong answers (hundreds of thousands).
    • Huge budgets: You want as many wrong answers as possible. In fact, at the very largest budgets tested, the limit wasn't computing power anymore; it was memory. The system wanted to show 2 million wrong answers, but the computer ran out of space to hold them.
    • The Catch: The "best" number of wrong answers depends on whether you are measuring simple accuracy or complex ranking. They don't agree on the number.

5. The Most Important Lesson: The Goalpost Moves

The paper's most critical warning is about metrics (how you measure success).

  • The Analogy: Imagine you are training a race car. If you measure success by "top speed," you tune the engine one way. If you measure success by "fuel efficiency," you tune it a completely different way.
  • The Discovery: In these behavioral models, the metric you choose changes the recipe.
    • If you train the AI to minimize "loss" (mathematical error), you get one set of settings.
    • If you train it to maximize "ranking" (putting the best item first), you get a different set of settings.
    • Crucial Point: The AI that is best at minimizing math errors is not always the AI that is best at ranking items correctly. You have to decide exactly what you want to optimize before you start building the model, because the "optimal" model changes based on that choice.

Summary

To build the most efficient "Behavioral Foundation Model" (an AI that understands human actions):

  1. Keep the "item understanding" part (Embedder) very small (about 2% of the total size).
  2. Use a medium batch size, but adjust it based on whether you care about accuracy or ranking.
  3. Start with huge amounts of data, but as you get more powerful computers, shift toward a smarter model.
  4. Use as many "wrong answer" examples as your computer's memory can hold.
  5. Most importantly: Decide exactly what "success" looks like (the metric) before you start, because that decision dictates the entire architecture of your AI.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →