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
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:
10
"CA"
560
(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 todelinquencies_in_the_last_6_months
. This won't change the column names of your dataframe.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.Generate the embedding and assign it to a new column in your dataframe. In this example we named it
"tabular_embedding_vector"
.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.
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