Skip to content

How BaseModel Works

BaseModel uses a two-stage approach to build predictive models from your event data.

The Two Stages

Two Stages

Benefits

  1. Efficiency — Train the foundation once, reuse for unlimited downstream tasks
  2. Accuracy — The foundation learns rich behavioral patterns that benefit all predictions
  3. Consistency — All downstream models share the same learned representations
  4. Speed — New prediction tasks take dramatically less time than building from scratch

Inputs: Behavioral Data & Attributes

Unlike traditional ML that requires hand-crafted features, BaseModel learns directly from behavioral data, i.e. timestamped, entity-bound events such as:

  • Purchase histories
  • Click streams
  • Session logs
  • Subscription events
  • Support history etc.

In addition to events, BaseModel ingests entity attributes — static or slowly changing properties such as demographics, account type, or region — to enrich the behavioral context.

The foundation model combines these raw event sequences and attributes, learning meaningful patterns on its own — no feature engineering required.

Stage 1: Training Foundation Model

The foundation model builds the understanding of how entities (customers, users, accounts) behave over time. See below for an intuition of what it learns:

Pattern Type Example
Temporal A customer who buys weekly has a different rhythm than one who buys monthly
Sequential Browse → Cart → Purchase follows a recognizable progression
Behavioral Some entities are consistently high-value while others are price-sensitive
Cross-event A spike in support tickets often precedes a drop in engagement

These patterns are captured automatically and encoded into dense entity representations that power all downstream tasks.

Stage 2: Fine-Tuning for Prediction Tasks

The Timeline Split

During training, past data is time-split into:

  • History — Events before the split point, used as model input
  • Future — Events after the split point, used to generate the prediction target

The split point moves randomly during training for robust generalization.

Entity Timeline

Target for Transfer Learning

Once the foundation model is trained, you define a target function — a simple Python function that specifies what to predict.

Python
def churn_target(history, future, attributes, ctx):
    """
    history  = events before the split (model input)
    future   = events after the split (used to generate labels)
    """
    if len(future["transactions"]) == 0:
        return 1  # Churned
    return 0      # Active

The foundation model handles everything else — no additional feature work, no retraining from scratch.

Technical Details

Foundation Model Training

The foundation model automatically examines your data types, then builds entity representations using a combination of:

  • Cleora — generates entity embeddings from relational data at scale, learning how entities relate to each other through their interactions
  • EMDE (Efficient Manifold Density Estimator) — builds compact "sketch" representations that capture the density of an entity's behavior across learned manifolds, encoding what kinds of actions an entity performs and how frequently
  • Open-source models for encoding additional modalities such as text, images, and time-series data

Self-Supervised Learning

The model learns without labels by training on the structure of the event data itself — discovering patterns, regularities, and relationships across the full history of entity behavior.