Article complete

Inside PyTorch Tabular, A Deep Learning Framework For Tabular Data

PyTorch Tabular is designed to make the standard modelling pipeline easy enough for practitioners and standard enough for production deployment.

Colorful cubes arranged in a display with the PyTorch Tabular logo prominently featured in the center.

Key takeaways

  • PyTorch Tabular v0.7.0 enhances accessibility for deep learning with tabular data in real-world applications.
  • The library prioritises low resistance usability, easy customisation, and seamless deployment.
  • Despite advancements, deep learning still faces challenges in popularity compared to gradient boosting for tabular data.
  • Developed by Manu Joseph, the library integrates state-of-the-art models like NODE and TabNet with a unified API.
  • PyTorch Tabular directly works with pandas data frames, streamlining the modelling process for practitioners.

Takeaways drafted with AI from the article text.

Earlier this month, PyTorch Tabular v0.7.0 was released on PyPI. This latest version of PyTorch Tabular aims to make deep learning with tabular data easy and accessible to real-world use cases and research. The core principle behind the library's design includes low resistance useability, easy customisation, and easy deployment and scalability. The source code is available on GitHub. 

Why PyTorch Tabular? 

Despite the unreasonable effectiveness in modalities like image and text, deep learning has always lagged gradient boosting in tabular data, both in popularity and performance. But, in the last few years, newer models have been explicitly created for tabular data, pushing the performance of deep learning models. However, when it comes to popularity, there still exist challenges as there aren't ready-to-use libraries such as Sci-Kit Learn for deep learning. 

Developed by Manu Joseph, PyTorch Tabular is a new deep learning library that makes working with deep learning and tabular data easy and fast. The library has been built on frameworks PyTorch and PyTorch Lightning, and it works on pandas data frames directly. In addition, many state-of-the-art models like NODE and TabNet have already been integrated and implemented in the library with a unified API. 

Besides PyTorch Tabular, other availability models include: 

  • FeedForward Network is a simple FF network with embedding layers for the categorical columns.  
  • Neural oblivious decision ensembles (NODE) for DL on tabular data was presented in ICLR 2020. On many datasets, it has beaten the well-tuned gradient boosting models. 
  • TabNet: Developed by Google Research, attentive interpretable tabular learning is another model which uses 'sparse attention' in various steps of decision making to model the outcome.
  • Mixture density networks use 'Gaussian components' to approximate the target function and provide a probabilistic prediction. 
  • AutoInt: Automatic feature interaction learning using self-attentive neural networks is a model that attempts to learn interactions between the features and creates a better representation. Later, this representation is used in the downstream scenario.  
  • An adaptation of the transformer model for tabular data, TabTransformer creates contextual representations for categorical features. 

PyTorch Tabular Design

According to the author, PyTorch Tabular is designed to make the standard modelling pipeline easy enough for practitioners and standard enough for production deployment, alongside its focus on customisation to enable wide usage in research. To satisfy these objectives, PyTorch Tabular has adopted a 'config-driven' approach. It includes five config files to drive the whole process: DataConfig, ModelConfig, TrainerConfig, OptimizerConfig, and ExperimentConfig. These config files are set programmatically and through YAML files, making it easy for data scientists and ML engineers. 

In addition to this, PyTorch Tabular uses BaseModel. This abstract class implements the standard part of any model definition like loss and metric calculation, etc., alongside Data Module and TabularModel. PyTorch Tabular uses a Data Module to unify and standardise the data processing, and TabularModel to bring together the configs, initialise the right model, the data module, and handle the train and prediction functions with methods like 'fit' and 'predict.' 

Structure of PyTorch Tabular (Source: arXiv)
Structure of PyTorch Tabular (Source: arXiv) 

Wrapping up 

Deep learning for tabular data is gaining popularity in the research community and the industry. With the rise in popularity, it becomes essential to have a unified and easy to use API for tabular data, similar to what sci-kit learn has done for classical machine learning algorithms. 

PyTorch Tabular plans to reduce the entry barriers in using new SOTA deep learning model architectures and reduce the 'engineering' work for researchers and developers.

In the coming days, PyTorch Tabular looks to: 

  • Add more contributors 
  • Add GaussRank as Feature Transformation
  • Add ability to use custom activations in CategoryEmbeddingModel
  • Add differential dropouts (layer-wise) in CategoryEmbeddingModel
  • Add Fourier Encoding for cyclic time variables
  • Integrate Optuna Hyperparameter Tuning
  • Add Text and Image Modalities for mixed modal problems
  • Add Variable Importance
  • Integrate SHAP for interpretability

Published

Spotted an error? Tell our editors. Read our editorial standards and corrections.

More in this story

fourier transform machine learning · 5 stories
  1. Using Deep Learning For Sound Classification: An In-Depth Analysis
  2. To Infinity And Beyond: Hunting For Exoplanets With Machine Learning & Kepler Data
  3. The Never Ending Fascination Of The Gaussian Distribution
  4. IBM’s AI Classifies Seizures With 98.4% Accuracy
  5. You are here: Inside PyTorch Tabular, A Deep Learning Framework For Tabular Data
About the author

Editor

Amit Raja Naik, known as the 'AI Human,' serves as the editor at AIM Media House, where he leads a team of talented tech journalists who are driving and shaping technology conversations across India and around the world.

All stories
Belamy · Daily

The day’s AI news, before your first meeting.