Embeddings for Tabular Data (Multivariate Drift)

Use Embeddings to Catch Multivariate Drift in Tabular Data

Check out an example of how to create tabular embeddings here!

What are Tabular Embeddings?

Tabular Embeddings are embeddings that are generated from a row of tabular data. Each row of your dataframe will be represented by 1 embedding vector.

Why is it useful?

We can use our embeddings from tabular data to monitor multivariate drift. Multivariate drift catches drift across combinations of multiple features that may not be present when looking at a single feature level.

Conceptual Example: There's an abnormal increase of tall people with small shoe size, but not obvious just looking at increase in average height or decrease in shoe size.

Steps to Generate Tabular Embeddings

  1. Select the columns in your data that you want to convert to embeddings. If you're not sure which columns would work best, start with using all of your feature and prediction columns. In addition, we suggest not selecting columns that contain incomprehensible strings, e.g., hashed fields, user ids, etc.

Example Row:

age (feature 1)state (feature 2)credit_score




  1. (Optional) You can also provide a dictionary mapping your column names to more verbose versions of them. This helps the embedding generator understand what each column means, in case the dataframe has column names that are not found in the vocabulary. For example: delinq_6mnths can be mapped to delinquencies_in_the_last_6_months. This won't change the column names of your dataframe.

  2. Choose a model type for generating embeddings. Read about supported models here. In this example, we've chosen distilbert-base-uncased for performance and simplicity.

  3. Generate the embedding and assign it to a new column in your dataframe. In this example we named it "tabular_embedding_vector".

  4. Log the whole dataframe to Arize. This means Arize will receive your data in both tabular and embedding formatting, which will assist in debugging and analysis in the platform. An example is presented below but refer to our SDK documentation for a complete list of attributes.

from arize.pandas.embeddings import EmbeddingGenerator, UseCases

# Instantiate the embeddding generator
generator = EmbeddingGeneratorForTabularFeatures(

# Select the columns from your dataframe to consider
selected_cols = [...]

# (Optional) Provide a mapping for more verbose column names
column_name_map = {...: ...}

# Generate tabular embeddings and assign them to a new column
df["tabular_embedding_vector"] = generator.generate_embeddings(
    col_name_map=column_name_map # (OPTIONAL, can remove)

# Create embedding features dictionary
tabular_embedding_features = {
    # Dictionary keys will be name of embedding feature in the app
    "arize_tabular_embedding": EmbeddingColumnNames(

# Log to Arize using the Arize pandas logger
response = arize_client.log(
    schema = Schema(

Viewing your tabular embeddings

Once your embedding is logged to Arize, you can monitor for multivariate drift. To learn more about Embedding Drift, visit here.

Click on a point on the drift over time graph above to visualize data points using UMAP. To learn more about UMAP, visit here.

Last updated

Copyright © 2023 Arize AI, Inc