How TabICL works (In-Context Learning)
mainTabICL is a transformer-based foundation model that uses in-context learning. Instead of traditional training, it learns the mapping between features and targets from a provided training set during a single forward pass.
The Process:
fit(X, y): Preprocesses training data, creates multiple transformed dataset views (e.g., by shuffling features), and optionally pre-computes KV caches for the training data (controlled by thekv_cacheparameter during initialization) to speed up inference.predict(X): Processes test data and forwards each dataset view through the model. The final prediction is the average across all ensemble members.
Architecture: It uses a three-stage Transformer architecture:
- Column-wise Transformer: Embeds each feature.
- Row-wise Transformer: Aggregates features into row representations.
- Dataset-wise Transformer: Performs in-context learning over training and test samples.