Deep learning models have achieved impressive prediction performance but often sacrifice interpretability, a critical consideration in high-stakes domains such as healthcare or policymaking. In contrast, generalized additive models (GAMs) can maintain interpretability but often suffer from poor prediction performance due to their inability to effectively capture feature interactions. In this work, we aim to bridge this gap by using pre-trained neural language models to extract embeddings for each input before learning a linear model in the embedding space. The final model (which we call Emb-GAM) is a transparent, linear function of its input features and feature interactions. Leveraging the language model allows Emb-GAM to learn far fewer linear coefficients, model larger interactions, and generalize well to novel inputs. Across a variety of natural-language-processing datasets, Emb-GAM achieves strong prediction performance without sacrificing interpretability.

Features

  • For finer control, you can instead clone and install this repo from source
  • Interpretable linear model that leverages a pre-trained language model to better learn interactions
  • One-line fit function
  • Emb-GAM uses a pre-trained language model to extract features from text data
  • Combines features in order to extract out a simple, linear model
  • The best way to use Emb-GAM is through the imodelsx package
  • Emb-GAM achieves strong prediction performance without sacrificing interpretability

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Emb-GAM

Emb-GAM Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Emb-GAM!

Additional Project Details

Programming Language

Python

Related Categories

Python Large Language Models (LLM), Python Natural Language Processing (NLP) Tool, Python Generative AI

Registered

2023-03-22