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.

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.

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.






















