"Mastering Tabular Deep Learning: Embeddings for Numerical Features"

Harnessing the Power of On-Embeddings for Numerical Features in Tabular Deep Learning

In the realm of deep learning, tabular data presents a unique set of challenges. Unlike image or text data, tabular data is structured, often containing a mix of categorical and numerical features. While deep learning has traditionally excelled with grid-like data, it's not inherently equipped to handle tabular data's structured nature. This is where on-embeddings for numerical features come into play, offering a powerful solution to bridge this gap.

Understanding Tabular Data and Deep Learning

Tabular data, with its rows representing instances and columns representing features, is ubiquitous in fields like finance, healthcare, and e-commerce. Deep learning, with its ability to learn complex patterns, has shown remarkable success in various domains. However, the traditional deep learning approach often struggles with tabular data due to its lack of spatial structure and the presence of mixed data types.

Numerical Features: A Unique Challenge

Numerical features in tabular data present a particular challenge. Unlike categorical features, numerical features have an inherent order and scale. Simply feeding these features into a neural network can lead to suboptimal performance, as the network may not effectively learn from the order or scale of the data.

a poster with an image of numbers and fractions on the back side of it
a poster with an image of numbers and fractions on the back side of it

Why Not Use Traditional Feature Engineering?

Traditional feature engineering techniques, such as normalization or log transformations, can help mitigate these issues. However, these methods are manual, domain-specific, and do not scale well with the increasing complexity of modern datasets. Moreover, they do not capture the complex, non-linear relationships that deep learning can uncover.

Enter On-Embeddings: A Deep Learning Solution

On-embeddings, introduced by the AutoML-MLPL library, offer a deep learning-based solution to this challenge. They transform numerical features into high-dimensional, learnable embeddings, capturing both the order and scale of the data. This transformation enables deep learning models to effectively learn from tabular data, unlocking its full potential.

How Do On-Embeddings Work?

On-embeddings use a combination of positional encoding and a multi-layer perceptron (MLP) to transform numerical features. The positional encoding captures the order of the data, while the MLP learns the complex, non-linear relationships. The resulting embeddings can then be fed into a deep learning model, such as a neural network or a transformer, for further processing.

a poster with numbers on it and the words'natural numbers'in different languages
a poster with numbers on it and the words'natural numbers'in different languages

Benefits of Using On-Embeddings

  • Automatic Feature Engineering: On-embeddings automate the feature engineering process, eliminating the need for manual, domain-specific preprocessing.
  • Improved Performance: By capturing the order and scale of numerical features, on-embeddings can lead to improved performance on tabular learning tasks.
  • Interpretability: The learned embeddings can provide insights into the relationships between numerical features, offering a degree of interpretability to the deep learning process.
  • Flexibility: On-embeddings can be used with a variety of deep learning architectures, including neural networks and transformers, offering flexibility in model selection.

Practical Implementation

Implementing on-embeddings in your tabular deep learning pipeline is straightforward. Here's a simple example using PyTorch and the AutoML-MLPL library:

Python Code Explanation
from automl_mlpl import OnEmbedding Import the OnEmbedding class from the AutoML-MLPL library.
embedding = OnEmbedding(input_dim=10, output_dim=16) Create an OnEmbedding instance with 10 input dimensions (features) and 16 output dimensions (embeddings).
embedded_data = embedding(X_train) Transform the training data using the OnEmbedding instance.
model = NeuralNetwork(embedded_data.shape[1], ...) Create a neural network with the correct input dimension (equal to the number of embeddings).

With on-embeddings, you can seamlessly integrate numerical features into your tabular deep learning pipeline, unlocking the full potential of your data.

an image of a triangle with numbers on it
an image of a triangle with numbers on it
on embeddings for numerical features in tabular deep learning
on embeddings for numerical features in tabular deep learning
someone is writing on a piece of paper with numbers written in the form of letters
someone is writing on a piece of paper with numbers written in the form of letters
an image of a number line with numbers in each row and the same number on it
an image of a number line with numbers in each row and the same number on it
the fibonaci sequence poster is shown with numbers and symbols in red, white, and blue
the fibonaci sequence poster is shown with numbers and symbols in red, white, and blue
a poster with fraction numbers and fractions on the front, including one hundredths
a poster with fraction numbers and fractions on the front, including one hundredths
Mode Explained | Easy Statistics Guide for Students
Mode Explained | Easy Statistics Guide for Students
a blackboard with numbers on it and the words beautiful pattern of maths written below
a blackboard with numbers on it and the words beautiful pattern of maths written below
One, Two, Buckle My Shoe: Understanding Number Development in Young Children
One, Two, Buckle My Shoe: Understanding Number Development in Young Children
Mean, Median & Mode Explained πŸ“Š | Statistics Made Easy
Mean, Median & Mode Explained πŸ“Š | Statistics Made Easy
a table with numbers and symbols on it
a table with numbers and symbols on it
Mean Formula Explained | Easy Average Math Guide for Students
Mean Formula Explained | Easy Average Math Guide for Students
5 Place Value Activities for Deep Understanding (Grade 3–5)
5 Place Value Activities for Deep Understanding (Grade 3–5)
TLM for tables #creativeteaching #schoolactivities #education #tlm#maths tlm
TLM for tables #creativeteaching #schoolactivities #education #tlm#maths tlm
an image of a whiteboard with numbers and fractions written on it that says factorization tricks
an image of a whiteboard with numbers and fractions written on it that says factorization tricks
Formula 🫢🌷of maths #mathtricks
Formula 🫢🌷of maths #mathtricks
a wooden table topped with lots of cards next to a bin filled with letters and numbers
a wooden table topped with lots of cards next to a bin filled with letters and numbers
NUMBER SYSTEM
NUMBER SYSTEM
how we use numicon to teach counting
how we use numicon to teach counting
Place Value Teaching Tens and Ones
Place Value Teaching Tens and Ones
some calculations are shown in the form of numbers and letters, including one that is written as
some calculations are shown in the form of numbers and letters, including one that is written as
the front cover of a book with numbers and symbols on it, including three different functions
the front cover of a book with numbers and symbols on it, including three different functions
All number system
All number system