<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Debabrot Bhuyan</title>
    <description>The latest articles on DEV Community by Debabrot Bhuyan (@debabrot_bhuyan).</description>
    <link>https://dev.to/debabrot_bhuyan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4048093%2Facef51b7-a52b-4ec7-a941-334fc45b3ae6.jpg</url>
      <title>DEV Community: Debabrot Bhuyan</title>
      <link>https://dev.to/debabrot_bhuyan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debabrot_bhuyan"/>
    <language>en</language>
    <item>
      <title>Can Zero-Shot Models Beat XGBoost and LightGBM?</title>
      <dc:creator>Debabrot Bhuyan</dc:creator>
      <pubDate>Sat, 17 Oct 2026 09:47:18 +0000</pubDate>
      <link>https://dev.to/debabrot_bhuyan/can-zero-shot-models-beat-xgboost-and-lightgbm-468j</link>
      <guid>https://dev.to/debabrot_bhuyan/can-zero-shot-models-beat-xgboost-and-lightgbm-468j</guid>
      <description>&lt;p&gt;I kept hearing about the performance of zero-shot models. At first, the idea that a model could outperform one fitted to a dataset without updating its own weights sounded like science fiction.&lt;/p&gt;

&lt;p&gt;Curiosity got the better of me. I benchmarked &lt;strong&gt;Mitra v2&lt;/strong&gt; and &lt;strong&gt;TabPFN-3.5-Fast&lt;/strong&gt; against &lt;strong&gt;XGBoost&lt;/strong&gt; and &lt;strong&gt;LightGBM&lt;/strong&gt; across three public datasets. Would the pretrained models come out ahead? Would feature engineering help? Could I run everything on a laptop GPU?&lt;/p&gt;

&lt;p&gt;Each experiment has a notebook, saved predictions, and a report generated from the measured results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Datasets, Three Prediction Tasks
&lt;/h2&gt;

&lt;p&gt;I chose three UCI datasets covering different kinds of supervised learning:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dataset&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Rows&lt;/th&gt;
&lt;th&gt;Original Features&lt;/th&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Online Shoppers Purchasing Intention&lt;/td&gt;
&lt;td&gt;Will a browsing session end in a purchase?&lt;/td&gt;
&lt;td&gt;12,330&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;Binary classification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Seoul Bike Sharing Demand&lt;/td&gt;
&lt;td&gt;How many bikes are rented in an hour?&lt;/td&gt;
&lt;td&gt;8,760&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;Regression&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dry Bean&lt;/td&gt;
&lt;td&gt;Which of seven bean varieties does a sample belong to?&lt;/td&gt;
&lt;td&gt;13,611&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;Multiclass classification&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The primary metrics were &lt;strong&gt;ROC-AUC&lt;/strong&gt; for Online Shoppers, &lt;strong&gt;RMSE&lt;/strong&gt; for Seoul Bike, and &lt;strong&gt;macro-F1&lt;/strong&gt; for Dry Bean, with supporting metrics recorded in the notebooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the Comparison Consistent
&lt;/h2&gt;

&lt;p&gt;Every model used the same &lt;strong&gt;60% training, 20% validation, and 20% test split&lt;/strong&gt;, with seed 42. Classification splits preserved class proportions, and all source rows were retained.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Training data&lt;/strong&gt; fitted the classical models, supplied context for foundation models, and fitted learned preprocessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation data&lt;/strong&gt; selected classical hyperparameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test data&lt;/strong&gt; evaluated each predeclared model and feature setting after selection.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each classical search tested four configurations with 80 trees, varying learning rate and either tree depth or leaf count. This kept reproduction practical, though broader tuning could improve the baselines. A dummy model provided a reference score.&lt;/p&gt;

&lt;h2&gt;
  
  
  What “Zero-Shot” Means Here
&lt;/h2&gt;

&lt;p&gt;Here, &lt;strong&gt;zero-shot means frozen pretrained weights with no task-specific fine-tuning&lt;/strong&gt;. The foundation models still received labeled training examples as context and used native preprocessing. Their inference settings were not tuned on validation scores.&lt;/p&gt;

&lt;p&gt;I evaluated each foundation model twice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Raw:&lt;/strong&gt; original features with the formatting required for the model to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Engineered:&lt;/strong&gt; original features plus documented, handcrafted features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Including both tree models and the dummy baseline gave &lt;strong&gt;seven variants per dataset: 21 overall&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Feature Engineering Still Help?
&lt;/h2&gt;

&lt;p&gt;Both classical models used engineered features. Foundation models were evaluated with and without these additions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dataset&lt;/th&gt;
&lt;th&gt;Added Features&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Online Shoppers&lt;/td&gt;
&lt;td&gt;Total pages, total browsing duration, time per page, product-page fraction, and exit-minus-bounce rate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Seoul Bike&lt;/td&gt;
&lt;td&gt;Cyclical hour and day-of-year features, weekday, month, and a weekend indicator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dry Bean&lt;/td&gt;
&lt;td&gt;Logarithms of area, perimeter, major-axis length, and minor-axis length&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These features use only information within each row. For example, cyclical hour features place 11 p.m. and midnight close together, capturing a relationship that an ordinary hour column leaves implicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;All 21 variants completed on the full datasets. These are their primary test scores:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Online Shoppers ROC-AUC ↑&lt;/th&gt;
&lt;th&gt;Seoul Bike RMSE ↓&lt;/th&gt;
&lt;th&gt;Dry Bean Macro-F1 ↑&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dummy baseline&lt;/td&gt;
&lt;td&gt;0.5000&lt;/td&gt;
&lt;td&gt;636.0166&lt;/td&gt;
&lt;td&gt;0.0591&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XGBoost&lt;/td&gt;
&lt;td&gt;0.9294&lt;/td&gt;
&lt;td&gt;179.4589&lt;/td&gt;
&lt;td&gt;0.9334&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightGBM&lt;/td&gt;
&lt;td&gt;0.9321&lt;/td&gt;
&lt;td&gt;182.8140&lt;/td&gt;
&lt;td&gt;0.9336&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TabPFN - Raw&lt;/td&gt;
&lt;td&gt;0.9350&lt;/td&gt;
&lt;td&gt;111.7418&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.9390&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mitra v2 - Raw&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.9366&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;205.1263&lt;/td&gt;
&lt;td&gt;0.9370&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TabPFN - Engineered&lt;/td&gt;
&lt;td&gt;0.9348&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;104.7439&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.9381&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mitra v2 - Engineered&lt;/td&gt;
&lt;td&gt;0.9353&lt;/td&gt;
&lt;td&gt;125.4689&lt;/td&gt;
&lt;td&gt;0.9372&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Higher ROC-AUC and macro-F1 are better; lower RMSE is better. Compare scores within each column.&lt;/p&gt;

&lt;h3&gt;
  
  
  Online Shoppers: Close Scores, Different Tradeoffs
&lt;/h3&gt;

&lt;p&gt;Mitra v2 with raw features led ROC-AUC at &lt;strong&gt;0.9366&lt;/strong&gt;, versus &lt;strong&gt;0.9321&lt;/strong&gt; for LightGBM. TabPFN led average precision with raw features and F1 with engineered features, showing why the operating goal and decision threshold matter.&lt;/p&gt;

&lt;p&gt;Feature engineering did not improve either foundation model's ROC-AUC on this split.&lt;/p&gt;

&lt;h3&gt;
  
  
  Seoul Bike: The Largest Performance Differences
&lt;/h3&gt;

&lt;p&gt;TabPFN with engineered features achieved an RMSE of &lt;strong&gt;104.7439&lt;/strong&gt;, versus &lt;strong&gt;179.4589&lt;/strong&gt; for XGBoost. Calendar features also helped Mitra, reducing its RMSE from &lt;strong&gt;205.1263&lt;/strong&gt; to &lt;strong&gt;125.4689&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This used a &lt;strong&gt;random split with observed weather&lt;/strong&gt;, so nearby hours could fall in different partitions. The task was retrospective prediction. Forecasting would require a chronological split and inputs available at forecast time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dry Bean: Small Differences at the Top
&lt;/h3&gt;

&lt;p&gt;TabPFN with raw features led macro-F1 at &lt;strong&gt;0.9390&lt;/strong&gt;; other foundation settings scored &lt;strong&gt;0.9370–0.9381&lt;/strong&gt;, and tree models scored around &lt;strong&gt;0.9335&lt;/strong&gt;. Feature engineering had mixed effects, and these small gaps come from a single split.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Took to Run
&lt;/h2&gt;

&lt;p&gt;The reference runs used Python 3.12 and an NVIDIA RTX 3050 Laptop GPU with 6 GB of memory. Classical models ran on CPU, while foundation models ran on GPU.&lt;/p&gt;

&lt;p&gt;Recorded wall times per variant were roughly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;XGBoost and LightGBM:&lt;/strong&gt; 3–5 seconds, including the small validation search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TabPFN:&lt;/strong&gt; 12–21 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mitra v2:&lt;/strong&gt; 38–230 seconds, depending on the dataset and feature setting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Timings include startup, loading, prediction, and classical tuning. They reflect one run with different hardware for each model family.&lt;/p&gt;

&lt;p&gt;All experiments fit on the laptop GPU. Full training partitions exceed TabPFN's default CPU row limit, so small CPU setup checks do not establish full-data feasibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Run the Project
&lt;/h2&gt;

&lt;p&gt;Clone the &lt;a href="https://github.com/debabrot/tabular-foundation-model-benchmark" rel="noopener noreferrer"&gt;benchmark repository&lt;/a&gt; and create a Python 3.12 environment in Linux or WSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/debabrot/tabular-foundation-model-benchmark.git
&lt;span class="nb"&gt;cd &lt;/span&gt;tabular-foundation-model-benchmark
python3.12 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
.venv/bin/python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
.venv/bin/python &lt;span class="nt"&gt;-m&lt;/span&gt; pip check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the &lt;a href="https://github.com/debabrot/tabular-foundation-model-benchmark/blob/main/docs/model-runtime.md" rel="noopener noreferrer"&gt;runtime guide&lt;/a&gt; for PyTorch setup and model access. If required, accept TabPFN's terms and supply an authorized &lt;code&gt;HF_TOKEN&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Download the pinned weights and check them on small synthetic examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv/bin/python scripts/smoke_models.py &lt;span class="nt"&gt;--models&lt;/span&gt; tabpfn mitra &lt;span class="nt"&gt;--device&lt;/span&gt; cpu &lt;span class="nt"&gt;--download&lt;/span&gt; &lt;span class="nt"&gt;--timeout&lt;/span&gt; 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the three notebooks sequentially using a CUDA GPU:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv/bin/python scripts/execute_notebook.py notebooks/01_binary_classification.ipynb &lt;span class="nt"&gt;--device&lt;/span&gt; cuda
.venv/bin/python scripts/execute_notebook.py notebooks/02_regression.ipynb &lt;span class="nt"&gt;--device&lt;/span&gt; cuda
.venv/bin/python scripts/execute_notebook.py notebooks/03_multiclass_classification.ipynb &lt;span class="nt"&gt;--device&lt;/span&gt; cuda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Datasets download automatically. Each run saves notebook outputs, metrics, predictions, splits, and plots.&lt;/p&gt;

&lt;p&gt;Finally, rebuild the report and run the verification checks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv/bin/python scripts/build_report.py
.venv/bin/python scripts/build_report.py &lt;span class="nt"&gt;--check&lt;/span&gt;
.venv/bin/python &lt;span class="nt"&gt;-m&lt;/span&gt; unittest discover &lt;span class="nt"&gt;-s&lt;/span&gt; tests &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The report builder verifies metrics from saved predictions without refitting. Tests requiring missing dataset or weight caches skip.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Take Away from This Benchmark
&lt;/h2&gt;

&lt;p&gt;The answer to the title's question is &lt;strong&gt;yes, on these recorded splits&lt;/strong&gt;: a foundation-model setting led each primary metric. Feature engineering still mattered, especially for Seoul Bike.&lt;/p&gt;

&lt;p&gt;That does not establish a universal winner. Each dataset used one split, without significance tests. The classification datasets contain duplicates, further grouping information is unavailable, and possible pretraining overlap has not been audited. Online Shoppers also uses session-derived information whose availability at a live prediction time needs checking.&lt;/p&gt;

&lt;p&gt;Repeated splits, broader classical tuning, and a separate chronological bike-demand experiment would make useful follow-ups. The &lt;a href="https://github.com/debabrot/tabular-foundation-model-benchmark/blob/main/results/benchmark_results.md" rel="noopener noreferrer"&gt;full results report&lt;/a&gt; includes supporting metrics and limitations; the notebooks trace each experiment from loading data to evaluation.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>mitrav2</category>
      <category>tabpfn</category>
    </item>
  </channel>
</rss>
