group_col for repeated
observations of the same animal.
Setup
Install the client and dependencies (group_col requires tabpfn-client 0.6.0+).
In Colab, add TABPFN_TOKEN to Secrets; elsewhere, use your usual client authentication.
Choose the objective
Enable Thinking withthinking_effort="high" and set thinking_metric to match
your task: ROC AUC for binary ranking, or log-loss for class probabilities.
See the Thinking mode guide
for supported settings.
We use TabPFN 3.5 throughout. The helper reports the chosen metric and elapsed
time, including fitting, prediction, and API overhead.
NATICUSdroid: malware detection
Predict whether an Android app is malicious from 86 permission and intent flags. Both models use the same stratified 75/25 split. Higher ROC AUC is better.
Thinking changes ROC AUC from 0.9890 to 0.9910 on this split.
Mice proteins: use group_col for groups
The UCI Mice Protein Expression dataset
contains 77 protein measurements and eight experimental classes, with
15 observations per mouse across 72 mice.
We use the BeyondArena
version, which removes target-defining columns and provides animal identifiers
and grouped splits. This is a selected example of grouped data.
Credit: Higuera, Gardiner, and Cios (2015), CC BY 4.0.
Evaluate on unseen mice
Use the three folds of BeyondArena’s first grouped repetition. Each fold holds out entire mice, with no animal shared between training and test data.Pass the group column
For grouped data, use Thinking withgroup_col="MouseID" and keep that column
in both training and prediction DataFrames. Compare against standard TabPFN
using the protein features alone. Both use the same held-out mice;
thinking_metric="log_loss" selects our metric (lower is better).
Results on unseen mice
Bars show mean log-loss across the three folds; dots show individual folds.
Thinking with group_col="MouseID" changes mean log-loss from 0.7563 to 0.7339 across the three folds, a 3.0% reduction.
Takeaways
- Set
thinking_metricto match your task. - For grouped data, use
group_coland retain it at prediction time. - Evaluate on held-out data; for repeated observations, hold out whole groups.