group_col, and TabPFN treats the rows of a group as related.
group_col without Thinking requires tabpfn-client 0.10.0 or later. Automatic grouping of test rows into requests requires 0.11.2 or later.Two kinds of grouped data
In both cases the rows of a group are not independent: visits of one patient share the patient’s health, age and history. Naming the group lets TabPFN use that structure instead of treating every row as a separate case. Keep it in mind for evaluation too: hold out whole groups, as with sklearn’s
GroupShuffleSplit, or a test score measures how well the model recognises groups it has already seen.
One label per row
group_coltakes a column name, or a list of columns whose joint value is the group.Xpassed tofitand topredictmust be a pandas DataFrame that holds the named columns. Pass column names, not indices.- The model replaces the group columns with one categorical feature that holds the group.
- Leave out the
groupedpreset here: it would give every visit of a patient the same prediction, while their outcomes differ.
One label per group
grouped preset does two things:
- It adds per-group summaries of the features, so the model sees each row together with what the rest of its group looks like.
- It averages the predictions of all rows of a group, so each group gets one prediction.
inference_config then shows APPEND_GROUP_AGGREGATES. Each row still gets its own prediction. Setting APPEND_GROUP_AGGREGATES in inference_config or passing any presets turns this automatic choice off.
The summaries and the averaging use only the rows sent in one predict call. All rows of a group must be in the same call; otherwise each part of the group gets its own prediction. The preset has no effect without group_col.
Large test sets
Fromtabpfn-client 0.11.2, predict() splits a test set that exceeds the API’s per-request limits across several requests and returns the predictions in row order. With group_col, the client packs whole groups into each request. If a single group has more test rows than one request accepts, predict() raises ValueError naming the group before sending anything; predict fewer rows of that group.
One request takes at most 1,000,000 test rows on TabPFN-4 and 1,100,000 on TabPFN-3.5, and fewer when the training set is large: training rows × test rows may not exceed 10 trillion on TabPFN-4 and 250 billion on TabPFN-3.5. With 1 million training rows, that is 1,000,000 test rows per request on TabPFN-4 and 250,000 on TabPFN-3.5. A fit with fit_mode="fit_with_cache" takes 10,000 test rows per request, and very wide test sets are also capped by their cell count. To check before predicting:
submit_predict() sends a single request and raises ValueError when the test set needs several.
Grouped and time-ordered rows with Thinking
Thinking mode also accepts time columns. Specifying group and time columns can improve predictions on data with related rows or a time sequence.
Rules, checked by the client before any data is uploaded. A violation raises
ValueError:
time_colandgroup_time_colwork only with Thinking.group_colandtime_colcannot be combined.group_time_colrequiresgroup_col.Xpassed tofitand topredictmust be a pandas DataFrame that holds every named column.
REST API
Without Thinking, setgroup_col and presets in task_config.tabpfn_config:
thinking_config instead. Thinking rejects group_col in tabpfn_config.
Thinking mode
Spend more compute on the fit for better predictions.
Sample weights
Weight training rows and mark uncertain labels.