nielsr HF Staff commited on
Commit
5929262
·
verified ·
1 Parent(s): b2b3916

Add model card for ShapPFN

Browse files

This PR adds a comprehensive model card for the ShapPFN model, providing a link to the original research paper and the official GitHub repository. It also includes information regarding the model's architecture and setup instructions based on the provided documentation.

Files changed (1) hide show
  1. README.md +32 -1
README.md CHANGED
@@ -1 +1,32 @@
1
- Checkpoint for the ShapPFN model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: other
3
+ ---
4
+
5
+ # ShapPFN
6
+
7
+ ShapPFN is a foundation model for tabular data that integrates Shapley value regression directly into its architecture, producing both predictions and explanations in a single forward pass. On standard benchmarks, ShapPFN achieves competitive performance while producing high-fidelity explanations ($R^2 \approx 0.96$, cosine $\approx 0.99$) over 1000x faster than KernelSHAP.
8
+
9
+ - **Paper:** [Real-Time Explanations for Tabular Foundation Models](https://huggingface.co/papers/2603.29946)
10
+ - **GitHub Repository:** [kunumi/ShapPFN](https://github.com/kunumi/ShapPFN)
11
+
12
+ ## Architecture
13
+
14
+ ShapPFN combines several key components:
15
+ - **PFN-style tabular transformers:** Uses alternating attention over rows and features (similar to TabPFN / nanoTabPFN).
16
+ - **Additive decomposition:** Separate decoder heads for `base` and per-feature contributions.
17
+ - **Shapley value regression:** Training explanations as part of the model output (ViaSHAP-style) rather than as a post-hoc procedure.
18
+
19
+ ## Setup
20
+
21
+ To use the code and the model from the official repository, you can install it via:
22
+
23
+ ```bash
24
+ pip install -e .
25
+ ```
26
+
27
+ ## Quickstart
28
+
29
+ The official repository provides scripts for various tasks:
30
+ - **Data Generation:** `bash scripts/generate_data.sh`
31
+ - **Training:** `bash scripts/train_shappfn.sh`
32
+ - **Evaluation:** `bash scripts/eval_openml.sh` (OpenML suite) and `bash scripts/eval_shap.sh` (KernelExplainer comparison)