From 6d2602ff26880ac02bb2f736617ef5acb09a8932 Mon Sep 17 00:00:00 2001 From: Jiarui Xu <39042389+jxudata@users.noreply.github.com> Date: Mon, 5 Oct 2026 09:08:34 -0700 Subject: [PATCH 1/3] Fix explainer routing and clarify single-pass inference --- materials/tabicl-explainer/README.md | 18 +++--- .../src/components/AttentionMatrix.svelte | 6 +- .../src/components/Sankey.svelte | 20 ++++--- .../src/components/textbook/Textbook.svelte | 12 ++-- materials/tabicl-explainer/src/lib/tabicl.ts | 4 +- .../tabicl-explainer/src/routes/+page.svelte | 57 ++++++++++--------- materials/website/index.html | 29 +++++----- materials/website/js/site.js | 16 +++++- materials/website/js/tabicl/nanotabicl.js | 2 +- materials/website/model/PROVENANCE.md | 14 +++-- tests/tabicl-browser-runtime.test.mjs | 12 ++++ 11 files changed, 117 insertions(+), 73 deletions(-) diff --git a/materials/tabicl-explainer/README.md b/materials/tabicl-explainer/README.md index ae022cf..93af9f6 100644 --- a/materials/tabicl-explainer/README.md +++ b/materials/tabicl-explainer/README.md @@ -3,9 +3,11 @@ Interactive visualization of TabICLv2 inference on fixed UCI Iris examples. The 12-row context is intentionally compact for tracing. It is outside the -officially documented TabICLv2 pretraining range of 300 to 48K rows, and the -upstream authors state that sub-300-row generalization has not been tested. -Treat its measured output as an out-of-regime illustration, not a quality claim. +officially documented TabICLv2 pretraining range of 300 to 48K rows. The revised +paper includes sub-300-row few-shot evaluations +([Appendix L.3–L.4, September 2026 revision](https://arxiv.org/html/2602.11139v2#A12.SS3)). +Those results do not establish the quality of this particular 12-row Iris demo. +Treat its measured output as an illustration of computation, not a quality claim. The interface adapts the MIT-licensed [Transformer Explainer](https://github.com/poloclub/transformer-explainer) layout while replacing GPT-2 generation with tabular in-context learning. @@ -55,10 +57,12 @@ The original interface is used under the MIT License reproduced in This adaptation preserves the interface composition while replacing GPT inference and examples with fixed UCI Iris records and a browser TabICLv2 -checkpoint. The explorer uses a nanoTabICL-derived bridge for selected-view -inspection with the released TabICLv2 checkpoint's feature-group offsets. It is -not the standalone nanoTabICL model and does not expose every preprocessing and -ensemble option in the official `TabICLClassifier`. +checkpoint. The explorer uses a nanoTabICL-derived bridge for fixed single-pass +core inspection with the released TabICLv2 checkpoint's feature-group offsets. It is +not the standalone nanoTabICL model. It uses context-only z-score standardization, +original feature and class order, and softmax temperature 1. It is not a selected +view of the main playground's eight-view `TabICLClassifier`, which applies its own +preprocessing, permutations, and temperature 0.9. Checkpoint source, hashes, runtime behavior, and limitations are documented in [`../website/model/PROVENANCE.md`](../website/model/PROVENANCE.md). TabICL code diff --git a/materials/tabicl-explainer/src/components/AttentionMatrix.svelte b/materials/tabicl-explainer/src/components/AttentionMatrix.svelte index 62d28f8..2f3aef0 100644 --- a/materials/tabicl-explainer/src/components/AttentionMatrix.svelte +++ b/materials/tabicl-explainer/src/components/AttentionMatrix.svelte @@ -27,8 +27,7 @@ return (value: number) => (Number.isFinite(value) ? scale(value) : '#f3f4f6'); }; - $: signedColor = createSignedColor(raw ?? []); - $: scaledColor = createSignedColor(scaled ?? []); + $: signedColor = createSignedColor([...(raw ?? []), ...(scaled ?? [])]); const weightColor = (value: number) => Number.isFinite(value) ? d3.interpolateRgb('#ffffff', '#6d28d9')(Math.min(1, value * 4)) : '#f3f4f6'; @@ -39,6 +38,7 @@ class:expanded on:click={() => (expanded = !expanded)} aria-expanded={expanded} + aria-label={expanded ? 'Collapse attention calculation; logits share a color scale' : 'Expand attention calculation'} > {#if expanded}
QASSMax(Q) · Kᵀ / √d
TFM note: its boundary is a single-view preview for speed; its - displayed probability is the full 8-view ensemble. This 20-row context is an - out-of-regime illustration: TabICLv2 was pretrained on 300 to 48K rows, and the - official authors have not tested generalization below 300 rows. - See the official FAQ ↗ + displayed probability is the full 8-view ensemble. This 20-row context is below + TabICLv2's documented 300 to 48K-row pretraining range. The revised paper reports + few-shot evaluations below 300 rows; this demo illustrates computation, not model quality. + See the paper's few-shot evaluation ↗
- The embedded explorer runs mapped upstream TabICLv2 classifier weights locally. + The embedded explorer runs quantized upstream TabICLv2 classifier weights locally. Select a query, follow the context rows through the model, and inspect real - selected-view attention and output probabilities. + single-pass attention and output probabilities.
Scope: its 12-row Iris context is deliberately small for tracing and @@ -1152,9 +1152,10 @@
Implementation note: The main playground runs the complete - eight-view browser classifier. This embedded inspector uses the selected-view - nanoTabICL-shaped bridge adapted to the released TabICLv2 checkpoint so its - intermediate tensors remain traceable. It is not the standalone nanoTabICL model. + eight-view browser classifier. This embedded inspector runs a fixed single core pass through a + nanoTabICL-shaped bridge adapted to the released TabICLv2 checkpoint: context-only + standardization, original feature and class order, and softmax temperature 1. + It is neither a selected ensemble view nor the standalone nanoTabICL model.