feat: dark mode, LaTeX math, Lato/LeteSansMath/JetBrainsMono fonts, granular method modal, and primary metrics cross-task view
Browse files- .gitattributes +2 -0
- fonts/LeteSansMath-Bold.otf +3 -0
- fonts/LeteSansMath.otf +3 -0
- index.html +588 -138
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
fonts/LeteSansMath-Bold.otf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
fonts/LeteSansMath.otf filter=lfs diff=lfs merge=lfs -text
|
fonts/LeteSansMath-Bold.otf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aef72571b177115730a3fb0fcda07196697b3b1750c7ad97983b6293ee1ce091
|
| 3 |
+
size 149428
|
fonts/LeteSansMath.otf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b3783217068d4d08f079f197c7d87bc02589180fe3ad721d71c1404062840b2
|
| 3 |
+
size 482204
|
index.html
CHANGED
|
@@ -1,21 +1,75 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>COAST —
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
<style>
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
--bg: #ffffff;
|
| 10 |
--bg-subtle: #fbfbfb;
|
|
|
|
| 11 |
--border: #e4e4e7;
|
| 12 |
--border-dark: #18181b;
|
| 13 |
--text: #18181b;
|
| 14 |
-
--text-muted: #
|
| 15 |
--text-faint: #a1a1aa;
|
| 16 |
--row-highlight: #f4f4f5;
|
| 17 |
-
--
|
| 18 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
* {
|
|
@@ -25,16 +79,22 @@
|
|
| 25 |
}
|
| 26 |
|
| 27 |
body {
|
| 28 |
-
font-family:
|
| 29 |
background: var(--bg);
|
| 30 |
color: var(--text);
|
| 31 |
-webkit-font-smoothing: antialiased;
|
| 32 |
line-height: 1.4;
|
| 33 |
-
padding: 28px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
|
| 36 |
.container {
|
| 37 |
-
max-width:
|
| 38 |
margin: 0 auto;
|
| 39 |
}
|
| 40 |
|
|
@@ -42,10 +102,10 @@
|
|
| 42 |
header {
|
| 43 |
display: flex;
|
| 44 |
justify-content: space-between;
|
| 45 |
-
align-items:
|
| 46 |
-
padding-bottom:
|
| 47 |
border-bottom: 1px solid var(--border);
|
| 48 |
-
margin-bottom:
|
| 49 |
gap: 16px;
|
| 50 |
flex-wrap: wrap;
|
| 51 |
}
|
|
@@ -58,32 +118,52 @@
|
|
| 58 |
}
|
| 59 |
|
| 60 |
h1 {
|
| 61 |
-
font-size: 1.
|
| 62 |
-
font-weight:
|
| 63 |
letter-spacing: -0.01em;
|
| 64 |
color: var(--text);
|
| 65 |
}
|
| 66 |
|
| 67 |
.subtitle {
|
| 68 |
-
font-size: 0.
|
| 69 |
color: var(--text-muted);
|
| 70 |
}
|
| 71 |
|
| 72 |
-
.
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
border-radius: 4px;
|
| 77 |
padding: 5px 12px;
|
| 78 |
font-size: 0.78rem;
|
|
|
|
| 79 |
font-weight: 500;
|
| 80 |
cursor: pointer;
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
-
.btn-
|
| 86 |
-
|
| 87 |
}
|
| 88 |
|
| 89 |
/* Single-Line Minimal Toolbar */
|
|
@@ -91,12 +171,12 @@
|
|
| 91 |
display: flex;
|
| 92 |
flex-wrap: wrap;
|
| 93 |
align-items: center;
|
| 94 |
-
gap:
|
| 95 |
-
padding:
|
| 96 |
background: var(--bg-subtle);
|
| 97 |
border: 1px solid var(--border);
|
| 98 |
border-radius: 6px;
|
| 99 |
-
margin-bottom:
|
| 100 |
}
|
| 101 |
|
| 102 |
.toolbar-group {
|
|
@@ -110,7 +190,7 @@
|
|
| 110 |
text-transform: uppercase;
|
| 111 |
letter-spacing: 0.05em;
|
| 112 |
color: var(--text-muted);
|
| 113 |
-
font-weight:
|
| 114 |
margin-right: 2px;
|
| 115 |
}
|
| 116 |
|
|
@@ -118,13 +198,13 @@
|
|
| 118 |
width: 1px;
|
| 119 |
height: 20px;
|
| 120 |
background: var(--border);
|
| 121 |
-
margin: 0
|
| 122 |
}
|
| 123 |
|
| 124 |
/* Segmented Controls */
|
| 125 |
.segmented {
|
| 126 |
display: inline-flex;
|
| 127 |
-
background:
|
| 128 |
border-radius: 4px;
|
| 129 |
padding: 2px;
|
| 130 |
border: 1px solid var(--border);
|
|
@@ -135,21 +215,24 @@
|
|
| 135 |
border: none;
|
| 136 |
padding: 4px 10px;
|
| 137 |
font-size: 0.78rem;
|
|
|
|
| 138 |
font-weight: 500;
|
| 139 |
color: var(--text-muted);
|
| 140 |
border-radius: 3px;
|
| 141 |
cursor: pointer;
|
| 142 |
transition: all 0.1s ease;
|
|
|
|
| 143 |
}
|
| 144 |
|
| 145 |
.segmented button.active {
|
| 146 |
-
background: var(--
|
| 147 |
-
color:
|
|
|
|
| 148 |
}
|
| 149 |
|
| 150 |
-
/*
|
| 151 |
select {
|
| 152 |
-
background: var(--bg);
|
| 153 |
border: 1px solid var(--border);
|
| 154 |
border-radius: 4px;
|
| 155 |
padding: 4px 10px;
|
|
@@ -161,72 +244,90 @@
|
|
| 161 |
}
|
| 162 |
|
| 163 |
select:focus {
|
| 164 |
-
border-color: var(--text);
|
| 165 |
}
|
| 166 |
|
| 167 |
-
/*
|
| 168 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
display: flex;
|
| 170 |
align-items: center;
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
color: var(--text-muted);
|
| 175 |
flex-wrap: wrap;
|
| 176 |
}
|
| 177 |
|
| 178 |
-
.chip-
|
| 179 |
-
display:
|
| 180 |
align-items: center;
|
| 181 |
-
gap:
|
| 182 |
flex-wrap: wrap;
|
| 183 |
}
|
| 184 |
|
| 185 |
.chip {
|
| 186 |
-
background:
|
| 187 |
border: 1px solid var(--border);
|
| 188 |
border-radius: 3px;
|
| 189 |
padding: 2px 8px;
|
| 190 |
-
font-size: 0.
|
|
|
|
| 191 |
color: var(--text-muted);
|
| 192 |
cursor: pointer;
|
| 193 |
transition: all 0.1s;
|
| 194 |
}
|
| 195 |
|
| 196 |
.chip.active {
|
| 197 |
-
background:
|
| 198 |
color: var(--text);
|
| 199 |
-
border-color: var(--
|
| 200 |
-
font-weight:
|
| 201 |
}
|
| 202 |
|
| 203 |
.chip:hover {
|
| 204 |
-
border-color: var(--text-
|
| 205 |
}
|
| 206 |
|
| 207 |
-
/* Status
|
| 208 |
.status-summary {
|
| 209 |
display: flex;
|
| 210 |
justify-content: space-between;
|
| 211 |
align-items: center;
|
| 212 |
-
font-size: 0.
|
| 213 |
color: var(--text-muted);
|
| 214 |
-
margin-bottom:
|
| 215 |
padding: 0 2px;
|
| 216 |
}
|
| 217 |
|
| 218 |
.status-summary strong {
|
| 219 |
color: var(--text);
|
| 220 |
-
font-weight:
|
| 221 |
}
|
| 222 |
|
| 223 |
-
/*
|
| 224 |
.table-container {
|
| 225 |
border-top: 2px solid var(--border-dark);
|
| 226 |
border-bottom: 2px solid var(--border-dark);
|
| 227 |
overflow-x: auto;
|
| 228 |
-
max-height:
|
| 229 |
-
background:
|
| 230 |
}
|
| 231 |
|
| 232 |
table {
|
|
@@ -239,7 +340,7 @@
|
|
| 239 |
thead {
|
| 240 |
position: sticky;
|
| 241 |
top: 0;
|
| 242 |
-
background:
|
| 243 |
z-index: 2;
|
| 244 |
}
|
| 245 |
|
|
@@ -248,7 +349,7 @@
|
|
| 248 |
text-transform: uppercase;
|
| 249 |
letter-spacing: 0.05em;
|
| 250 |
color: var(--text-muted);
|
| 251 |
-
font-weight:
|
| 252 |
padding: 6px 12px 4px;
|
| 253 |
border-bottom: 1px solid var(--border);
|
| 254 |
text-align: center;
|
|
@@ -259,10 +360,16 @@
|
|
| 259 |
text-transform: uppercase;
|
| 260 |
letter-spacing: 0.05em;
|
| 261 |
color: var(--text);
|
| 262 |
-
font-weight:
|
| 263 |
padding: 6px 12px 8px;
|
| 264 |
border-bottom: 1px solid var(--border-dark);
|
| 265 |
text-align: right;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
}
|
| 267 |
|
| 268 |
thead tr.sub-header th.left,
|
|
@@ -271,11 +378,11 @@
|
|
| 271 |
}
|
| 272 |
|
| 273 |
tbody tr {
|
| 274 |
-
border-bottom: 1px solid
|
| 275 |
}
|
| 276 |
|
| 277 |
tbody tr:hover {
|
| 278 |
-
background:
|
| 279 |
}
|
| 280 |
|
| 281 |
tbody tr.coast-row {
|
|
@@ -283,33 +390,106 @@
|
|
| 283 |
}
|
| 284 |
|
| 285 |
tbody tr.group-boundary td {
|
| 286 |
-
border-top: 1px solid
|
| 287 |
}
|
| 288 |
|
| 289 |
td {
|
| 290 |
padding: 5px 12px;
|
| 291 |
text-align: right;
|
| 292 |
-
font-family:
|
| 293 |
font-size: 0.78rem;
|
| 294 |
font-variant-numeric: tabular-nums;
|
| 295 |
-
color:
|
| 296 |
}
|
| 297 |
|
| 298 |
td.left {
|
| 299 |
text-align: left;
|
| 300 |
-
font-family:
|
| 301 |
font-size: 0.79rem;
|
| 302 |
color: var(--text);
|
| 303 |
}
|
| 304 |
|
| 305 |
td.method-coast {
|
| 306 |
-
font-weight:
|
| 307 |
color: var(--text);
|
| 308 |
}
|
| 309 |
|
| 310 |
td.best-score {
|
| 311 |
font-weight: 700;
|
| 312 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
}
|
| 314 |
|
| 315 |
.hidden {
|
|
@@ -322,12 +502,18 @@
|
|
| 322 |
<header>
|
| 323 |
<div class="title-group">
|
| 324 |
<h1>COAST</h1>
|
| 325 |
-
<div class="subtitle">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
</div>
|
| 327 |
-
<button class="btn-export" id="exportBtn">Export CSV</button>
|
| 328 |
</header>
|
| 329 |
|
| 330 |
-
<!-- Toolbar:
|
| 331 |
<div class="toolbar">
|
| 332 |
<div class="toolbar-group">
|
| 333 |
<span class="toolbar-label">View</span>
|
|
@@ -343,7 +529,8 @@
|
|
| 343 |
<div class="toolbar-group" id="groupTrack">
|
| 344 |
<span class="toolbar-label">Track</span>
|
| 345 |
<div class="segmented" id="segTrack">
|
| 346 |
-
<button class="active" data-val="
|
|
|
|
| 347 |
<button data-val="Similarity (STS)">Similarity (STS)</button>
|
| 348 |
</div>
|
| 349 |
</div>
|
|
@@ -360,7 +547,7 @@
|
|
| 360 |
<div class="toolbar-group" id="groupDim">
|
| 361 |
<span class="toolbar-label">Dim</span>
|
| 362 |
<div class="segmented" id="segDim">
|
| 363 |
-
<button class="active" data-val="Full (k = d)">Full (k = d)</button>
|
| 364 |
<button data-val="Compression">Compressed</button>
|
| 365 |
</div>
|
| 366 |
</div>
|
|
@@ -374,6 +561,7 @@
|
|
| 374 |
<button data-val="Component Ablations">Ablations (8)</button>
|
| 375 |
<button data-val="All">All (17)</button>
|
| 376 |
</div>
|
|
|
|
| 377 |
</div>
|
| 378 |
|
| 379 |
<div class="divider hidden" id="divFormat"></div>
|
|
@@ -388,25 +576,33 @@
|
|
| 388 |
</div>
|
| 389 |
</div>
|
| 390 |
|
| 391 |
-
<!--
|
| 392 |
-
<div class="
|
| 393 |
-
<div class="chip-
|
| 394 |
<span class="toolbar-label">Benchmarks:</span>
|
|
|
|
|
|
|
| 395 |
</div>
|
| 396 |
|
| 397 |
-
<div class="chip-
|
| 398 |
-
<span class="toolbar-label">k:</span>
|
|
|
|
|
|
|
| 399 |
</div>
|
| 400 |
|
| 401 |
-
<div class="chip-
|
| 402 |
<span class="toolbar-label">Cols:</span>
|
| 403 |
-
<button class="chip active" id="chipColsAll">All
|
| 404 |
-
<button class="chip" id="chipColsModels">Models
|
| 405 |
-
<button class="chip" id="chipColsMeans">Means
|
|
|
|
|
|
|
|
|
|
|
|
|
| 406 |
</div>
|
| 407 |
</div>
|
| 408 |
|
| 409 |
-
<!--
|
| 410 |
<div class="status-summary">
|
| 411 |
<div id="statusInfo">Loading data...</div>
|
| 412 |
<div id="statusDims"></div>
|
|
@@ -421,32 +617,90 @@
|
|
| 421 |
</div>
|
| 422 |
</div>
|
| 423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
<script>
|
| 425 |
let DATA = null;
|
| 426 |
let exportRows = [];
|
| 427 |
let exportCols = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 428 |
|
| 429 |
const state = {
|
| 430 |
evalView: "Task Performance",
|
| 431 |
-
track: "
|
| 432 |
-
metric: "
|
| 433 |
dimMode: "Full (k = d)",
|
| 434 |
methodSet: "Main Methods",
|
| 435 |
compFormat: "Score (Retention %)",
|
| 436 |
activeDatasets: new Set(),
|
| 437 |
activeK: new Set(["512", "256", "128", "64"]),
|
| 438 |
-
colMode: "all",
|
|
|
|
|
|
|
| 439 |
};
|
| 440 |
|
| 441 |
function getDatasetPool() {
|
| 442 |
if (state.evalView === "Task Performance") {
|
| 443 |
-
|
|
|
|
|
|
|
| 444 |
}
|
| 445 |
return DATA.all_datasets;
|
| 446 |
}
|
| 447 |
|
| 448 |
function getMetricPool() {
|
| 449 |
if (state.evalView === "Task Performance") {
|
|
|
|
| 450 |
return state.track === "Retrieval (IR)" ? DATA.ir_metrics : DATA.sts_metrics;
|
| 451 |
}
|
| 452 |
if (state.evalView === "Intrinsic Geometry") {
|
|
@@ -455,6 +709,16 @@
|
|
| 455 |
return DATA.param_options;
|
| 456 |
}
|
| 457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 458 |
function syncState() {
|
| 459 |
const metrics = getMetricPool();
|
| 460 |
if (!metrics.includes(state.metric)) {
|
|
@@ -471,24 +735,16 @@
|
|
| 471 |
const isParam = state.evalView === "Spectral Parameters";
|
| 472 |
const isComp = state.dimMode === "Compression";
|
| 473 |
|
| 474 |
-
// Track
|
| 475 |
document.getElementById("divTrack").classList.toggle("hidden", !isTask);
|
| 476 |
document.getElementById("groupTrack").classList.toggle("hidden", !isTask);
|
| 477 |
|
| 478 |
-
//
|
| 479 |
-
|
| 480 |
-
document.getElementById("
|
| 481 |
-
|
| 482 |
-
// Method Set panel
|
| 483 |
-
document.getElementById("divMethodSet").classList.toggle("hidden", isParam);
|
| 484 |
-
document.getElementById("groupMethodSet").classList.toggle("hidden", isParam);
|
| 485 |
-
|
| 486 |
-
// Format panel
|
| 487 |
-
document.getElementById("divFormat").classList.toggle("hidden", !isTask || !isComp);
|
| 488 |
-
document.getElementById("groupFormat").classList.toggle("hidden", !isTask || !isComp);
|
| 489 |
-
|
| 490 |
-
// Metric dropdown
|
| 491 |
document.getElementById("labelMetric").textContent = isParam ? "Table" : "Metric";
|
|
|
|
| 492 |
const selMetric = document.getElementById("selectMetric");
|
| 493 |
selMetric.innerHTML = "";
|
| 494 |
getMetricPool().forEach(m => {
|
|
@@ -499,9 +755,24 @@
|
|
| 499 |
selMetric.appendChild(opt);
|
| 500 |
});
|
| 501 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
// Dataset chips
|
| 503 |
const chipsDs = document.getElementById("chipsDataset");
|
| 504 |
-
chipsDs.innerHTML =
|
| 505 |
getDatasetPool().forEach(ds => {
|
| 506 |
const btn = document.createElement("button");
|
| 507 |
btn.className = "chip" + (state.activeDatasets.has(ds) ? " active" : "");
|
|
@@ -518,10 +789,9 @@
|
|
| 518 |
chipsDs.appendChild(btn);
|
| 519 |
});
|
| 520 |
|
| 521 |
-
// K chips
|
| 522 |
const chipsK = document.getElementById("chipsK");
|
| 523 |
-
chipsK.
|
| 524 |
-
chipsK.innerHTML = '<span class="toolbar-label">k:</span>';
|
| 525 |
["512", "256", "128", "64"].forEach(k => {
|
| 526 |
const btn = document.createElement("button");
|
| 527 |
btn.className = "chip" + (state.activeK.has(k) ? " active" : "");
|
|
@@ -538,18 +808,21 @@
|
|
| 538 |
chipsK.appendChild(btn);
|
| 539 |
});
|
| 540 |
|
| 541 |
-
|
| 542 |
-
document.getElementById("chipsCols").classList.toggle("hidden", isParam);
|
| 543 |
}
|
| 544 |
|
| 545 |
function renderChips() {
|
| 546 |
-
|
|
|
|
| 547 |
document.querySelectorAll("#chipsDataset .chip").forEach(btn => {
|
| 548 |
btn.classList.toggle("active", state.activeDatasets.has(btn.textContent));
|
| 549 |
});
|
|
|
|
|
|
|
| 550 |
document.querySelectorAll("#chipsK .chip").forEach(btn => {
|
| 551 |
btn.classList.toggle("active", state.activeK.has(btn.textContent));
|
| 552 |
});
|
|
|
|
| 553 |
document.getElementById("chipColsAll").classList.toggle("active", state.colMode === "all");
|
| 554 |
document.getElementById("chipColsModels").classList.toggle("active", state.colMode === "models");
|
| 555 |
document.getElementById("chipColsMeans").classList.toggle("active", state.colMode === "means");
|
|
@@ -561,44 +834,69 @@
|
|
| 561 |
return m ? parseFloat(m[0]) : NaN;
|
| 562 |
}
|
| 563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
function renderTable() {
|
| 565 |
const isTask = state.evalView === "Task Performance";
|
| 566 |
const isGeom = state.evalView === "Intrinsic Geometry";
|
| 567 |
const isParam = state.evalView === "Spectral Parameters";
|
| 568 |
const isFull = state.dimMode === "Full (k = d)";
|
| 569 |
|
| 570 |
-
let
|
| 571 |
if (isTask) {
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 575 |
} else if (isGeom) {
|
| 576 |
-
key = isFull ? `geom_full::${state.metric}` : `geom_comp::${state.metric}`;
|
|
|
|
| 577 |
} else {
|
| 578 |
-
|
| 579 |
}
|
| 580 |
|
| 581 |
-
const
|
| 582 |
-
|
| 583 |
-
// Determine methods filter
|
| 584 |
-
let allowedMethods = null;
|
| 585 |
-
if (!isParam) {
|
| 586 |
-
const main = isFull ? DATA.full_main_methods : DATA.comp_main_methods;
|
| 587 |
-
const abl = isFull ? DATA.full_ablation_methods : DATA.comp_ablation_methods;
|
| 588 |
-
if (state.methodSet === "Main Methods") allowedMethods = new Set(main);
|
| 589 |
-
else if (state.methodSet === "Component Ablations") allowedMethods = new Set(abl);
|
| 590 |
-
else allowedMethods = new Set([...main, ...abl]);
|
| 591 |
-
}
|
| 592 |
|
| 593 |
// Filter rows
|
| 594 |
-
|
| 595 |
if (r.Dataset && !state.activeDatasets.has(r.Dataset)) return false;
|
| 596 |
if (!isParam && !isFull && r.k && !state.activeK.has(String(r.k))) return false;
|
| 597 |
-
if (allowedMethods && r.Method && !allowedMethods.has(r.Method)) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 598 |
return true;
|
| 599 |
});
|
| 600 |
|
| 601 |
-
// Filter columns
|
| 602 |
let cols = [];
|
| 603 |
if (isParam) {
|
| 604 |
cols = raw.length ? Object.keys(raw[0]) : [];
|
|
@@ -613,10 +911,24 @@
|
|
| 613 |
cols = [...baseCols, ...metricCols];
|
| 614 |
}
|
| 615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
exportRows = rows;
|
| 617 |
exportCols = cols;
|
| 618 |
|
| 619 |
-
//
|
| 620 |
const bestMap = {};
|
| 621 |
if (isTask || (isGeom && state.metric !== "All 5 Geometry Metrics")) {
|
| 622 |
const lowerIsBetter = isGeom && ["Centroid Norm ||μ||₂", "Average Cosine", "MEV (Top-1)"].includes(state.metric);
|
|
@@ -640,7 +952,6 @@
|
|
| 640 |
const leftCols = new Set(["Dataset", "k", "Model", "Method"]);
|
| 641 |
|
| 642 |
if (isTask || (isGeom && state.metric !== "All 5 Geometry Metrics")) {
|
| 643 |
-
// Double-decker academic header with column groups
|
| 644 |
let superHtml = '<tr class="super-header"><th colspan="3" class="left">Specification</th>';
|
| 645 |
if (state.colMode === "all") {
|
| 646 |
superHtml += '<th colspan="2">Dedicated Encoders</th><th colspan="2">Gemma-3-1B-pt</th><th colspan="2">Qwen3.5-0.8B-Base</th><th colspan="3">Category Means</th>';
|
|
@@ -659,19 +970,56 @@
|
|
| 659 |
if (c === "Dedicated Mean") label = "Ded.";
|
| 660 |
if (c === "Base-Mean") label = "Base-M";
|
| 661 |
if (c === "Base-Last") label = "Base-L";
|
| 662 |
-
|
|
|
|
| 663 |
});
|
| 664 |
subHtml += '</tr>';
|
| 665 |
thead.innerHTML = superHtml + subHtml;
|
| 666 |
} else {
|
| 667 |
let subHtml = '<tr class="sub-header">';
|
| 668 |
cols.forEach(c => {
|
| 669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
});
|
| 671 |
subHtml += '</tr>';
|
| 672 |
thead.innerHTML = subHtml;
|
| 673 |
}
|
| 674 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 675 |
// Build Body
|
| 676 |
const tbody = document.getElementById("tableBody");
|
| 677 |
let prevGroup = null;
|
|
@@ -687,7 +1035,7 @@
|
|
| 687 |
|
| 688 |
const gKey = `${r.Dataset}||${r.k}`;
|
| 689 |
const tds = cols.map(c => {
|
| 690 |
-
|
| 691 |
const cls = [];
|
| 692 |
if (leftCols.has(c)) cls.push("left");
|
| 693 |
if (c === "Method" && isCoast) cls.push("method-coast");
|
|
@@ -697,7 +1045,11 @@
|
|
| 697 |
cls.push("best-score");
|
| 698 |
}
|
| 699 |
}
|
| 700 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 701 |
}).join("");
|
| 702 |
|
| 703 |
return `<tr class="${trCls.join(' ')}">${tds}</tr>`;
|
|
@@ -711,18 +1063,76 @@
|
|
| 711 |
${!isParam ? ` | ${state.dimMode}` : ""}
|
| 712 |
`;
|
| 713 |
document.getElementById("statusDims").textContent = `${rows.length} rows × ${cols.length} cols`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
}
|
| 715 |
|
| 716 |
function initEvents() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
// Segmented control binds
|
| 718 |
document.querySelectorAll("#segEvalView button").forEach(btn => {
|
| 719 |
btn.onclick = () => {
|
| 720 |
document.querySelectorAll("#segEvalView button").forEach(b => b.classList.remove("active"));
|
| 721 |
btn.classList.add("active");
|
| 722 |
state.evalView = btn.dataset.val;
|
|
|
|
| 723 |
syncState();
|
| 724 |
renderToolbarControls();
|
| 725 |
-
renderChips();
|
| 726 |
renderTable();
|
| 727 |
};
|
| 728 |
});
|
|
@@ -734,7 +1144,6 @@
|
|
| 734 |
state.track = btn.dataset.val;
|
| 735 |
syncState();
|
| 736 |
renderToolbarControls();
|
| 737 |
-
renderChips();
|
| 738 |
renderTable();
|
| 739 |
};
|
| 740 |
});
|
|
@@ -749,8 +1158,8 @@
|
|
| 749 |
document.querySelectorAll("#segDim button").forEach(b => b.classList.remove("active"));
|
| 750 |
btn.classList.add("active");
|
| 751 |
state.dimMode = btn.dataset.val;
|
|
|
|
| 752 |
renderToolbarControls();
|
| 753 |
-
renderChips();
|
| 754 |
renderTable();
|
| 755 |
};
|
| 756 |
});
|
|
@@ -760,6 +1169,7 @@
|
|
| 760 |
document.querySelectorAll("#segMethodSet button").forEach(b => b.classList.remove("active"));
|
| 761 |
btn.classList.add("active");
|
| 762 |
state.methodSet = btn.dataset.val;
|
|
|
|
| 763 |
renderTable();
|
| 764 |
};
|
| 765 |
});
|
|
@@ -773,6 +1183,19 @@
|
|
| 773 |
};
|
| 774 |
});
|
| 775 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 776 |
document.getElementById("chipColsAll").onclick = () => {
|
| 777 |
state.colMode = "all";
|
| 778 |
renderChips();
|
|
@@ -789,6 +1212,34 @@
|
|
| 789 |
renderTable();
|
| 790 |
};
|
| 791 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 792 |
document.getElementById("exportBtn").onclick = () => {
|
| 793 |
if (!exportRows.length || !exportCols.length) return;
|
| 794 |
const esc = v => {
|
|
@@ -813,11 +1264,10 @@
|
|
| 813 |
.then(r => r.json())
|
| 814 |
.then(d => {
|
| 815 |
DATA = d;
|
| 816 |
-
state.activeDatasets = new Set(DATA.
|
| 817 |
initEvents();
|
| 818 |
syncState();
|
| 819 |
renderToolbarControls();
|
| 820 |
-
renderChips();
|
| 821 |
renderTable();
|
| 822 |
});
|
| 823 |
</script>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" data-theme="light">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>COAST — Text Embedding Post-Processing & Compression Explorer</title>
|
| 7 |
+
|
| 8 |
+
<!-- Google Fonts: Lato (text) and JetBrains Mono (monospace) -->
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&display=swap" rel="stylesheet" />
|
| 12 |
+
|
| 13 |
+
<!-- KaTeX for crisp LaTeX math rendering -->
|
| 14 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" />
|
| 15 |
+
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js"></script>
|
| 16 |
+
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js"></script>
|
| 17 |
+
|
| 18 |
<style>
|
| 19 |
+
/* Lete Sans Math font face (sans-serif math designed for Lato) */
|
| 20 |
+
@font-face {
|
| 21 |
+
font-family: 'Lete Sans Math';
|
| 22 |
+
src: url('fonts/LeteSansMath.otf') format('opentype');
|
| 23 |
+
font-weight: normal;
|
| 24 |
+
font-style: normal;
|
| 25 |
+
}
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'Lete Sans Math';
|
| 28 |
+
src: url('fonts/LeteSansMath-Bold.otf') format('opentype');
|
| 29 |
+
font-weight: bold;
|
| 30 |
+
font-style: normal;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
:root[data-theme="light"] {
|
| 34 |
--bg: #ffffff;
|
| 35 |
--bg-subtle: #fbfbfb;
|
| 36 |
+
--surface: #ffffff;
|
| 37 |
--border: #e4e4e7;
|
| 38 |
--border-dark: #18181b;
|
| 39 |
--text: #18181b;
|
| 40 |
+
--text-muted: #52525b;
|
| 41 |
--text-faint: #a1a1aa;
|
| 42 |
--row-highlight: #f4f4f5;
|
| 43 |
+
--row-hover: #fafafa;
|
| 44 |
+
--input-bg: #ffffff;
|
| 45 |
+
--seg-bg: #f4f4f5;
|
| 46 |
+
--seg-active-bg: #18181b;
|
| 47 |
+
--seg-active-text: #ffffff;
|
| 48 |
+
--chip-bg: #ffffff;
|
| 49 |
+
--chip-active-bg: #f4f4f5;
|
| 50 |
+
--chip-active-border: #71717a;
|
| 51 |
+
--best-color: #000000;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
:root[data-theme="dark"] {
|
| 55 |
+
--bg: #09090b;
|
| 56 |
+
--bg-subtle: #121215;
|
| 57 |
+
--surface: #121215;
|
| 58 |
+
--border: #27272a;
|
| 59 |
+
--border-dark: #fafafa;
|
| 60 |
+
--text: #fafafa;
|
| 61 |
+
--text-muted: #a1a1aa;
|
| 62 |
+
--text-faint: #52525b;
|
| 63 |
+
--row-highlight: #1c1c21;
|
| 64 |
+
--row-hover: #18181b;
|
| 65 |
+
--input-bg: #18181b;
|
| 66 |
+
--seg-bg: #1e1e24;
|
| 67 |
+
--seg-active-bg: #fafafa;
|
| 68 |
+
--seg-active-text: #09090b;
|
| 69 |
+
--chip-bg: #121215;
|
| 70 |
+
--chip-active-bg: #27272a;
|
| 71 |
+
--chip-active-border: #a1a1aa;
|
| 72 |
+
--best-color: #ffffff;
|
| 73 |
}
|
| 74 |
|
| 75 |
* {
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
body {
|
| 82 |
+
font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
| 83 |
background: var(--bg);
|
| 84 |
color: var(--text);
|
| 85 |
-webkit-font-smoothing: antialiased;
|
| 86 |
line-height: 1.4;
|
| 87 |
+
padding: 24px 28px 48px;
|
| 88 |
+
transition: background 0.15s ease, color 0.15s ease;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
/* Math typography uses Lete Sans Math */
|
| 92 |
+
.katex, .katex-html, .math {
|
| 93 |
+
font-family: 'Lete Sans Math', 'Lato', sans-serif !important;
|
| 94 |
}
|
| 95 |
|
| 96 |
.container {
|
| 97 |
+
max-width: 1480px;
|
| 98 |
margin: 0 auto;
|
| 99 |
}
|
| 100 |
|
|
|
|
| 102 |
header {
|
| 103 |
display: flex;
|
| 104 |
justify-content: space-between;
|
| 105 |
+
align-items: center;
|
| 106 |
+
padding-bottom: 14px;
|
| 107 |
border-bottom: 1px solid var(--border);
|
| 108 |
+
margin-bottom: 16px;
|
| 109 |
gap: 16px;
|
| 110 |
flex-wrap: wrap;
|
| 111 |
}
|
|
|
|
| 118 |
}
|
| 119 |
|
| 120 |
h1 {
|
| 121 |
+
font-size: 1.22rem;
|
| 122 |
+
font-weight: 700;
|
| 123 |
letter-spacing: -0.01em;
|
| 124 |
color: var(--text);
|
| 125 |
}
|
| 126 |
|
| 127 |
.subtitle {
|
| 128 |
+
font-size: 0.84rem;
|
| 129 |
color: var(--text-muted);
|
| 130 |
}
|
| 131 |
|
| 132 |
+
.header-actions {
|
| 133 |
+
display: flex;
|
| 134 |
+
align-items: center;
|
| 135 |
+
gap: 8px;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
/* Minimal buttons */
|
| 139 |
+
.btn {
|
| 140 |
+
background: transparent;
|
| 141 |
+
color: var(--text);
|
| 142 |
+
border: 1px solid var(--border);
|
| 143 |
border-radius: 4px;
|
| 144 |
padding: 5px 12px;
|
| 145 |
font-size: 0.78rem;
|
| 146 |
+
font-family: inherit;
|
| 147 |
font-weight: 500;
|
| 148 |
cursor: pointer;
|
| 149 |
+
display: inline-flex;
|
| 150 |
+
align-items: center;
|
| 151 |
+
gap: 6px;
|
| 152 |
+
transition: all 0.1s ease;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.btn:hover {
|
| 156 |
+
border-color: var(--text-muted);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.btn-primary {
|
| 160 |
+
background: var(--text);
|
| 161 |
+
color: var(--bg);
|
| 162 |
+
border-color: var(--text);
|
| 163 |
}
|
| 164 |
|
| 165 |
+
.btn-primary:hover {
|
| 166 |
+
opacity: 0.9;
|
| 167 |
}
|
| 168 |
|
| 169 |
/* Single-Line Minimal Toolbar */
|
|
|
|
| 171 |
display: flex;
|
| 172 |
flex-wrap: wrap;
|
| 173 |
align-items: center;
|
| 174 |
+
gap: 10px;
|
| 175 |
+
padding: 8px 12px;
|
| 176 |
background: var(--bg-subtle);
|
| 177 |
border: 1px solid var(--border);
|
| 178 |
border-radius: 6px;
|
| 179 |
+
margin-bottom: 12px;
|
| 180 |
}
|
| 181 |
|
| 182 |
.toolbar-group {
|
|
|
|
| 190 |
text-transform: uppercase;
|
| 191 |
letter-spacing: 0.05em;
|
| 192 |
color: var(--text-muted);
|
| 193 |
+
font-weight: 700;
|
| 194 |
margin-right: 2px;
|
| 195 |
}
|
| 196 |
|
|
|
|
| 198 |
width: 1px;
|
| 199 |
height: 20px;
|
| 200 |
background: var(--border);
|
| 201 |
+
margin: 0 2px;
|
| 202 |
}
|
| 203 |
|
| 204 |
/* Segmented Controls */
|
| 205 |
.segmented {
|
| 206 |
display: inline-flex;
|
| 207 |
+
background: var(--seg-bg);
|
| 208 |
border-radius: 4px;
|
| 209 |
padding: 2px;
|
| 210 |
border: 1px solid var(--border);
|
|
|
|
| 215 |
border: none;
|
| 216 |
padding: 4px 10px;
|
| 217 |
font-size: 0.78rem;
|
| 218 |
+
font-family: inherit;
|
| 219 |
font-weight: 500;
|
| 220 |
color: var(--text-muted);
|
| 221 |
border-radius: 3px;
|
| 222 |
cursor: pointer;
|
| 223 |
transition: all 0.1s ease;
|
| 224 |
+
white-space: nowrap;
|
| 225 |
}
|
| 226 |
|
| 227 |
.segmented button.active {
|
| 228 |
+
background: var(--seg-active-bg);
|
| 229 |
+
color: var(--seg-active-text);
|
| 230 |
+
font-weight: 600;
|
| 231 |
}
|
| 232 |
|
| 233 |
+
/* Dropdown */
|
| 234 |
select {
|
| 235 |
+
background: var(--input-bg);
|
| 236 |
border: 1px solid var(--border);
|
| 237 |
border-radius: 4px;
|
| 238 |
padding: 4px 10px;
|
|
|
|
| 244 |
}
|
| 245 |
|
| 246 |
select:focus {
|
| 247 |
+
border-color: var(--text-muted);
|
| 248 |
}
|
| 249 |
|
| 250 |
+
/* Search input */
|
| 251 |
+
.search-input {
|
| 252 |
+
background: var(--input-bg);
|
| 253 |
+
border: 1px solid var(--border);
|
| 254 |
+
border-radius: 4px;
|
| 255 |
+
padding: 4px 10px;
|
| 256 |
+
font-size: 0.78rem;
|
| 257 |
+
color: var(--text);
|
| 258 |
+
font-family: inherit;
|
| 259 |
+
outline: none;
|
| 260 |
+
width: 160px;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.search-input:focus {
|
| 264 |
+
border-color: var(--text-muted);
|
| 265 |
+
width: 220px;
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
/* Filter Row */
|
| 269 |
+
.filter-bar {
|
| 270 |
display: flex;
|
| 271 |
align-items: center;
|
| 272 |
+
justify-content: space-between;
|
| 273 |
+
gap: 12px;
|
| 274 |
+
margin-bottom: 12px;
|
|
|
|
| 275 |
flex-wrap: wrap;
|
| 276 |
}
|
| 277 |
|
| 278 |
+
.chip-section {
|
| 279 |
+
display: flex;
|
| 280 |
align-items: center;
|
| 281 |
+
gap: 6px;
|
| 282 |
flex-wrap: wrap;
|
| 283 |
}
|
| 284 |
|
| 285 |
.chip {
|
| 286 |
+
background: var(--chip-bg);
|
| 287 |
border: 1px solid var(--border);
|
| 288 |
border-radius: 3px;
|
| 289 |
padding: 2px 8px;
|
| 290 |
+
font-size: 0.74rem;
|
| 291 |
+
font-family: inherit;
|
| 292 |
color: var(--text-muted);
|
| 293 |
cursor: pointer;
|
| 294 |
transition: all 0.1s;
|
| 295 |
}
|
| 296 |
|
| 297 |
.chip.active {
|
| 298 |
+
background: var(--chip-active-bg);
|
| 299 |
color: var(--text);
|
| 300 |
+
border-color: var(--chip-active-border);
|
| 301 |
+
font-weight: 600;
|
| 302 |
}
|
| 303 |
|
| 304 |
.chip:hover {
|
| 305 |
+
border-color: var(--text-muted);
|
| 306 |
}
|
| 307 |
|
| 308 |
+
/* Status Bar */
|
| 309 |
.status-summary {
|
| 310 |
display: flex;
|
| 311 |
justify-content: space-between;
|
| 312 |
align-items: center;
|
| 313 |
+
font-size: 0.76rem;
|
| 314 |
color: var(--text-muted);
|
| 315 |
+
margin-bottom: 6px;
|
| 316 |
padding: 0 2px;
|
| 317 |
}
|
| 318 |
|
| 319 |
.status-summary strong {
|
| 320 |
color: var(--text);
|
| 321 |
+
font-weight: 700;
|
| 322 |
}
|
| 323 |
|
| 324 |
+
/* Table */
|
| 325 |
.table-container {
|
| 326 |
border-top: 2px solid var(--border-dark);
|
| 327 |
border-bottom: 2px solid var(--border-dark);
|
| 328 |
overflow-x: auto;
|
| 329 |
+
max-height: 72vh;
|
| 330 |
+
background: var(--surface);
|
| 331 |
}
|
| 332 |
|
| 333 |
table {
|
|
|
|
| 340 |
thead {
|
| 341 |
position: sticky;
|
| 342 |
top: 0;
|
| 343 |
+
background: var(--surface);
|
| 344 |
z-index: 2;
|
| 345 |
}
|
| 346 |
|
|
|
|
| 349 |
text-transform: uppercase;
|
| 350 |
letter-spacing: 0.05em;
|
| 351 |
color: var(--text-muted);
|
| 352 |
+
font-weight: 700;
|
| 353 |
padding: 6px 12px 4px;
|
| 354 |
border-bottom: 1px solid var(--border);
|
| 355 |
text-align: center;
|
|
|
|
| 360 |
text-transform: uppercase;
|
| 361 |
letter-spacing: 0.05em;
|
| 362 |
color: var(--text);
|
| 363 |
+
font-weight: 700;
|
| 364 |
padding: 6px 12px 8px;
|
| 365 |
border-bottom: 1px solid var(--border-dark);
|
| 366 |
text-align: right;
|
| 367 |
+
cursor: pointer;
|
| 368 |
+
user-select: none;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
thead tr.sub-header th:hover {
|
| 372 |
+
color: var(--text-muted);
|
| 373 |
}
|
| 374 |
|
| 375 |
thead tr.sub-header th.left,
|
|
|
|
| 378 |
}
|
| 379 |
|
| 380 |
tbody tr {
|
| 381 |
+
border-bottom: 1px solid var(--border);
|
| 382 |
}
|
| 383 |
|
| 384 |
tbody tr:hover {
|
| 385 |
+
background: var(--row-hover);
|
| 386 |
}
|
| 387 |
|
| 388 |
tbody tr.coast-row {
|
|
|
|
| 390 |
}
|
| 391 |
|
| 392 |
tbody tr.group-boundary td {
|
| 393 |
+
border-top: 1px solid var(--border-dark);
|
| 394 |
}
|
| 395 |
|
| 396 |
td {
|
| 397 |
padding: 5px 12px;
|
| 398 |
text-align: right;
|
| 399 |
+
font-family: 'JetBrains Mono', ui-monospace, monospace;
|
| 400 |
font-size: 0.78rem;
|
| 401 |
font-variant-numeric: tabular-nums;
|
| 402 |
+
color: var(--text);
|
| 403 |
}
|
| 404 |
|
| 405 |
td.left {
|
| 406 |
text-align: left;
|
| 407 |
+
font-family: 'Lato', sans-serif;
|
| 408 |
font-size: 0.79rem;
|
| 409 |
color: var(--text);
|
| 410 |
}
|
| 411 |
|
| 412 |
td.method-coast {
|
| 413 |
+
font-weight: 700;
|
| 414 |
color: var(--text);
|
| 415 |
}
|
| 416 |
|
| 417 |
td.best-score {
|
| 418 |
font-weight: 700;
|
| 419 |
+
color: var(--best-color);
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
/* Modal / Drawer for Granular Method Picker */
|
| 423 |
+
.modal-backdrop {
|
| 424 |
+
position: fixed;
|
| 425 |
+
top: 0;
|
| 426 |
+
left: 0;
|
| 427 |
+
width: 100vw;
|
| 428 |
+
height: 100vh;
|
| 429 |
+
background: rgba(0, 0, 0, 0.4);
|
| 430 |
+
display: flex;
|
| 431 |
+
justify-content: center;
|
| 432 |
+
align-items: center;
|
| 433 |
+
z-index: 999;
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
.modal {
|
| 437 |
+
background: var(--bg);
|
| 438 |
+
border: 1px solid var(--border);
|
| 439 |
+
border-radius: 8px;
|
| 440 |
+
width: 580px;
|
| 441 |
+
max-width: 92vw;
|
| 442 |
+
max-height: 80vh;
|
| 443 |
+
padding: 16px 20px;
|
| 444 |
+
display: flex;
|
| 445 |
+
flex-direction: column;
|
| 446 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
.modal-header {
|
| 450 |
+
display: flex;
|
| 451 |
+
justify-content: space-between;
|
| 452 |
+
align-items: center;
|
| 453 |
+
margin-bottom: 12px;
|
| 454 |
+
padding-bottom: 8px;
|
| 455 |
+
border-bottom: 1px solid var(--border);
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
.modal-title {
|
| 459 |
+
font-size: 0.95rem;
|
| 460 |
+
font-weight: 700;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.modal-body {
|
| 464 |
+
overflow-y: auto;
|
| 465 |
+
flex: 1;
|
| 466 |
+
display: grid;
|
| 467 |
+
grid-template-columns: 1fr;
|
| 468 |
+
gap: 6px;
|
| 469 |
+
padding-right: 4px;
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
.method-item {
|
| 473 |
+
display: flex;
|
| 474 |
+
align-items: center;
|
| 475 |
+
gap: 8px;
|
| 476 |
+
font-size: 0.8rem;
|
| 477 |
+
padding: 4px 6px;
|
| 478 |
+
border-radius: 4px;
|
| 479 |
+
cursor: pointer;
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.method-item:hover {
|
| 483 |
+
background: var(--row-hover);
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
.modal-footer {
|
| 487 |
+
display: flex;
|
| 488 |
+
justify-content: space-between;
|
| 489 |
+
align-items: center;
|
| 490 |
+
margin-top: 12px;
|
| 491 |
+
padding-top: 8px;
|
| 492 |
+
border-top: 1px solid var(--border);
|
| 493 |
}
|
| 494 |
|
| 495 |
.hidden {
|
|
|
|
| 502 |
<header>
|
| 503 |
<div class="title-group">
|
| 504 |
<h1>COAST</h1>
|
| 505 |
+
<div class="subtitle">Crowding-Orthogonal Adaptive Spectral Tempering Benchmark</div>
|
| 506 |
+
</div>
|
| 507 |
+
<div class="header-actions">
|
| 508 |
+
<button class="btn" id="themeToggleBtn">
|
| 509 |
+
<span id="themeIcon">◑</span>
|
| 510 |
+
<span id="themeLabel">Dark Mode</span>
|
| 511 |
+
</button>
|
| 512 |
+
<button class="btn btn-primary" id="exportBtn">Export CSV</button>
|
| 513 |
</div>
|
|
|
|
| 514 |
</header>
|
| 515 |
|
| 516 |
+
<!-- Toolbar: Primary Controls -->
|
| 517 |
<div class="toolbar">
|
| 518 |
<div class="toolbar-group">
|
| 519 |
<span class="toolbar-label">View</span>
|
|
|
|
| 529 |
<div class="toolbar-group" id="groupTrack">
|
| 530 |
<span class="toolbar-label">Track</span>
|
| 531 |
<div class="segmented" id="segTrack">
|
| 532 |
+
<button class="active" data-val="Primary Metrics">Primary (IR + STS)</button>
|
| 533 |
+
<button data-val="Retrieval (IR)">Retrieval (IR)</button>
|
| 534 |
<button data-val="Similarity (STS)">Similarity (STS)</button>
|
| 535 |
</div>
|
| 536 |
</div>
|
|
|
|
| 547 |
<div class="toolbar-group" id="groupDim">
|
| 548 |
<span class="toolbar-label">Dim</span>
|
| 549 |
<div class="segmented" id="segDim">
|
| 550 |
+
<button class="active" data-val="Full (k = d)">Full ($k = d$)</button>
|
| 551 |
<button data-val="Compression">Compressed</button>
|
| 552 |
</div>
|
| 553 |
</div>
|
|
|
|
| 561 |
<button data-val="Component Ablations">Ablations (8)</button>
|
| 562 |
<button data-val="All">All (17)</button>
|
| 563 |
</div>
|
| 564 |
+
<button class="btn" id="openMethodPickerBtn" style="padding: 2px 7px; font-size: 0.72rem;">Custom...</button>
|
| 565 |
</div>
|
| 566 |
|
| 567 |
<div class="divider hidden" id="divFormat"></div>
|
|
|
|
| 576 |
</div>
|
| 577 |
</div>
|
| 578 |
|
| 579 |
+
<!-- Filter Bar: Chips & Search -->
|
| 580 |
+
<div class="filter-bar">
|
| 581 |
+
<div class="chip-section">
|
| 582 |
<span class="toolbar-label">Benchmarks:</span>
|
| 583 |
+
<button class="chip active" id="chipDsAll">All</button>
|
| 584 |
+
<span id="chipsDataset"></span>
|
| 585 |
</div>
|
| 586 |
|
| 587 |
+
<div class="chip-section hidden" id="sectionK">
|
| 588 |
+
<span class="toolbar-label">Dimensions ($k$):</span>
|
| 589 |
+
<button class="chip active" id="chipKAll">All $k$</button>
|
| 590 |
+
<span id="chipsK"></span>
|
| 591 |
</div>
|
| 592 |
|
| 593 |
+
<div class="chip-section">
|
| 594 |
<span class="toolbar-label">Cols:</span>
|
| 595 |
+
<button class="chip active" id="chipColsAll">All</button>
|
| 596 |
+
<button class="chip" id="chipColsModels">Models (6)</button>
|
| 597 |
+
<button class="chip" id="chipColsMeans">Means (3)</button>
|
| 598 |
+
</div>
|
| 599 |
+
|
| 600 |
+
<div class="chip-section">
|
| 601 |
+
<input type="text" class="search-input" id="tableSearch" placeholder="Filter rows..." />
|
| 602 |
</div>
|
| 603 |
</div>
|
| 604 |
|
| 605 |
+
<!-- Status Bar -->
|
| 606 |
<div class="status-summary">
|
| 607 |
<div id="statusInfo">Loading data...</div>
|
| 608 |
<div id="statusDims"></div>
|
|
|
|
| 617 |
</div>
|
| 618 |
</div>
|
| 619 |
|
| 620 |
+
<!-- Custom Method Picker Modal -->
|
| 621 |
+
<div class="modal-backdrop hidden" id="methodModal">
|
| 622 |
+
<div class="modal">
|
| 623 |
+
<div class="modal-header">
|
| 624 |
+
<div class="modal-title">Select Methods / Operators</div>
|
| 625 |
+
<button class="btn" id="closeMethodModalBtn" style="padding: 2px 8px;">✕</button>
|
| 626 |
+
</div>
|
| 627 |
+
<div class="modal-body" id="modalMethodList"></div>
|
| 628 |
+
<div class="modal-footer">
|
| 629 |
+
<div>
|
| 630 |
+
<button class="btn" id="modalSelectAllBtn">Select All</button>
|
| 631 |
+
<button class="btn" id="modalClearBtn">Clear</button>
|
| 632 |
+
</div>
|
| 633 |
+
<button class="btn btn-primary" id="modalApplyBtn">Apply</button>
|
| 634 |
+
</div>
|
| 635 |
+
</div>
|
| 636 |
+
</div>
|
| 637 |
+
|
| 638 |
<script>
|
| 639 |
let DATA = null;
|
| 640 |
let exportRows = [];
|
| 641 |
let exportCols = [];
|
| 642 |
+
let sortCol = null;
|
| 643 |
+
let sortAsc = true;
|
| 644 |
+
|
| 645 |
+
// LaTeX mapping for method and metric labels
|
| 646 |
+
const LATEX_MAP = {
|
| 647 |
+
"Baseline": "Baseline",
|
| 648 |
+
"Standardization": "Standardization ($z$)",
|
| 649 |
+
"R1": "R1 ($x - \\mu$)",
|
| 650 |
+
"R2": "R2 ($P_\\perp$)",
|
| 651 |
+
"Soft-ZCA": "Soft-ZCA ($\\Sigma, \\gamma=1, 10^{-4}$)",
|
| 652 |
+
"COAST (Ours)": "$\\mathbf{COAST}\\text{ (Ours)}$",
|
| 653 |
+
"ABTT (D=1)": "ABTT ($D=1$)",
|
| 654 |
+
"ABTT (D=2)": "ABTT ($D=2$)",
|
| 655 |
+
"ABTT (D=3)": "ABTT ($D=3$)",
|
| 656 |
+
"Prefix (MRL)": "Prefix (MRL)",
|
| 657 |
+
"PCA-k": "PCA-$k$",
|
| 658 |
+
"Whitening-k": "Whitening-$k$ ($\\Sigma, \\gamma=1, 10^{-6}$)",
|
| 659 |
+
"SpecTemp": "SpecTemp ($\\Sigma, \\gamma_{\\text{SNR}}, 10^{-6}$)",
|
| 660 |
+
"Unreg. ZCA (Σ, γ=1, ε=1e-6)": "Unreg. ZCA ($\\Sigma, \\gamma=1, 10^{-6}$)",
|
| 661 |
+
"Centered + ε* (Σ, γ=1, ε*)": "Centered + $\\epsilon^*$ ($\\Sigma, \\gamma=1, \\epsilon^*$)",
|
| 662 |
+
"Centered + γ_crowd (Σ, γ_crowd, 1e-4)": "Centered + $\\gamma_{\\text{crowd}}$ ($\\Sigma, \\gamma_{\\text{crowd}}, 10^{-4}$)",
|
| 663 |
+
"w/o Orth. Proj. (Σ, γ_crowd, ε*)": "w/o Orth. Proj. ($\\Sigma, \\gamma_{\\text{crowd}}, \\epsilon^*$)",
|
| 664 |
+
"Orth. Soft-ZCA (Σ_⊥, γ=1, 1e-4)": "Orth. Soft-ZCA ($\\Sigma_\\perp, \\gamma=1, 10^{-4}$)",
|
| 665 |
+
"w/o Crowd. Exp. (Σ_⊥, γ=1, ε*)": "w/o Crowd. Exp. ($\\Sigma_\\perp, \\gamma=1, \\epsilon^*$)",
|
| 666 |
+
"Fixed γ=0.5 (Σ_⊥, γ=0.5, 1e-4)": "Fixed $\\gamma=0.5$ ($\\Sigma_\\perp, \\gamma=0.5, 10^{-4}$)",
|
| 667 |
+
"w/o Adaptive ε* (Σ_⊥, γ_crowd, 1e-4)": "w/o Adaptive $\\epsilon^*$ ($\\Sigma_\\perp, \\gamma_{\\text{crowd}}, 10^{-4}$)",
|
| 668 |
+
"Orth. PCA (Σ_⊥, γ=0, ε=0)": "Orth. PCA ($\\Sigma_\\perp, \\gamma=0, \\epsilon=0$)",
|
| 669 |
+
"Orth. SpecTemp (Σ_⊥, γ_SNR, 1e-6)": "Orth. SpecTemp ($\\Sigma_\\perp, \\gamma_{\\text{SNR}}, 10^{-6}$)",
|
| 670 |
+
"w/o Crowd. Floor (Σ_⊥, γ_SNR, ε*)": "w/o Crowd. Floor ($\\Sigma_\\perp, \\gamma_{\\text{SNR}}, \\epsilon^*$)",
|
| 671 |
+
"Fixed γ=0.5 (Σ_⊥, γ=0.5, ε*)": "Fixed $\\gamma=0.5$ ($\\Sigma_\\perp, \\gamma=0.5, \\epsilon^*$)",
|
| 672 |
+
"w/o SNR Sched. (Σ_⊥, γ_crowd, ε*)": "w/o SNR Sched. ($\\Sigma_\\perp, \\gamma_{\\text{crowd}}, \\epsilon^*$)",
|
| 673 |
+
"w/o Adaptive ε* (Σ_⊥, γ*, 1e-6)": "w/o Adaptive $\\epsilon^*$ ($\\Sigma_\\perp, \\gamma^*, 10^{-6}$)",
|
| 674 |
+
"w/o Rank Scale τ² (Σ_⊥, γ*, ε*(d))": "w/o Rank Scale $\\tau^2$ ($\\Sigma_\\perp, \\gamma^*, \\epsilon^*(d)$)",
|
| 675 |
+
"w/o Orth. Proj. (Σ, γ*, ε*)": "w/o Orth. Proj. ($\\Sigma, \\gamma^*, \\epsilon^*$)",
|
| 676 |
+
};
|
| 677 |
|
| 678 |
const state = {
|
| 679 |
evalView: "Task Performance",
|
| 680 |
+
track: "Primary Metrics",
|
| 681 |
+
metric: "Primary Metrics (Table 4 View)",
|
| 682 |
dimMode: "Full (k = d)",
|
| 683 |
methodSet: "Main Methods",
|
| 684 |
compFormat: "Score (Retention %)",
|
| 685 |
activeDatasets: new Set(),
|
| 686 |
activeK: new Set(["512", "256", "128", "64"]),
|
| 687 |
+
colMode: "all",
|
| 688 |
+
searchQuery: "",
|
| 689 |
+
customMethods: null, // null means use methodSet
|
| 690 |
};
|
| 691 |
|
| 692 |
function getDatasetPool() {
|
| 693 |
if (state.evalView === "Task Performance") {
|
| 694 |
+
if (state.track === "Retrieval (IR)") return DATA.ir_datasets;
|
| 695 |
+
if (state.track === "Similarity (STS)") return DATA.sts_datasets;
|
| 696 |
+
return DATA.all_datasets;
|
| 697 |
}
|
| 698 |
return DATA.all_datasets;
|
| 699 |
}
|
| 700 |
|
| 701 |
function getMetricPool() {
|
| 702 |
if (state.evalView === "Task Performance") {
|
| 703 |
+
if (state.track === "Primary Metrics") return ["Primary Metrics (Table 4 View)"];
|
| 704 |
return state.track === "Retrieval (IR)" ? DATA.ir_metrics : DATA.sts_metrics;
|
| 705 |
}
|
| 706 |
if (state.evalView === "Intrinsic Geometry") {
|
|
|
|
| 709 |
return DATA.param_options;
|
| 710 |
}
|
| 711 |
|
| 712 |
+
function getAllowedMethods() {
|
| 713 |
+
if (state.customMethods !== null) return state.customMethods;
|
| 714 |
+
const isFull = state.dimMode === "Full (k = d)";
|
| 715 |
+
const main = isFull ? DATA.full_main_methods : DATA.comp_main_methods;
|
| 716 |
+
const abl = isFull ? DATA.full_ablation_methods : DATA.comp_ablation_methods;
|
| 717 |
+
if (state.methodSet === "Main Methods") return new Set(main);
|
| 718 |
+
if (state.methodSet === "Component Ablations") return new Set(abl);
|
| 719 |
+
return new Set([...main, ...abl]);
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
function syncState() {
|
| 723 |
const metrics = getMetricPool();
|
| 724 |
if (!metrics.includes(state.metric)) {
|
|
|
|
| 735 |
const isParam = state.evalView === "Spectral Parameters";
|
| 736 |
const isComp = state.dimMode === "Compression";
|
| 737 |
|
| 738 |
+
// Track controls
|
| 739 |
document.getElementById("divTrack").classList.toggle("hidden", !isTask);
|
| 740 |
document.getElementById("groupTrack").classList.toggle("hidden", !isTask);
|
| 741 |
|
| 742 |
+
// Metric controls
|
| 743 |
+
const isPrimaryTrack = isTask && state.track === "Primary Metrics";
|
| 744 |
+
document.getElementById("divMetric").classList.toggle("hidden", isPrimaryTrack);
|
| 745 |
+
document.getElementById("groupMetric").classList.toggle("hidden", isPrimaryTrack);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 746 |
document.getElementById("labelMetric").textContent = isParam ? "Table" : "Metric";
|
| 747 |
+
|
| 748 |
const selMetric = document.getElementById("selectMetric");
|
| 749 |
selMetric.innerHTML = "";
|
| 750 |
getMetricPool().forEach(m => {
|
|
|
|
| 755 |
selMetric.appendChild(opt);
|
| 756 |
});
|
| 757 |
|
| 758 |
+
// Dim controls
|
| 759 |
+
document.getElementById("divDim").classList.toggle("hidden", isParam);
|
| 760 |
+
document.getElementById("groupDim").classList.toggle("hidden", isParam);
|
| 761 |
+
|
| 762 |
+
// Method Set controls
|
| 763 |
+
document.getElementById("divMethodSet").classList.toggle("hidden", isParam);
|
| 764 |
+
document.getElementById("groupMethodSet").classList.toggle("hidden", isParam);
|
| 765 |
+
|
| 766 |
+
// Format controls
|
| 767 |
+
document.getElementById("divFormat").classList.toggle("hidden", !isTask || !isComp);
|
| 768 |
+
document.getElementById("groupFormat").classList.toggle("hidden", !isTask || !isComp);
|
| 769 |
+
|
| 770 |
+
// Compression K section
|
| 771 |
+
document.getElementById("sectionK").classList.toggle("hidden", isParam || !isComp);
|
| 772 |
+
|
| 773 |
// Dataset chips
|
| 774 |
const chipsDs = document.getElementById("chipsDataset");
|
| 775 |
+
chipsDs.innerHTML = "";
|
| 776 |
getDatasetPool().forEach(ds => {
|
| 777 |
const btn = document.createElement("button");
|
| 778 |
btn.className = "chip" + (state.activeDatasets.has(ds) ? " active" : "");
|
|
|
|
| 789 |
chipsDs.appendChild(btn);
|
| 790 |
});
|
| 791 |
|
| 792 |
+
// K chips
|
| 793 |
const chipsK = document.getElementById("chipsK");
|
| 794 |
+
chipsK.innerHTML = "";
|
|
|
|
| 795 |
["512", "256", "128", "64"].forEach(k => {
|
| 796 |
const btn = document.createElement("button");
|
| 797 |
btn.className = "chip" + (state.activeK.has(k) ? " active" : "");
|
|
|
|
| 808 |
chipsK.appendChild(btn);
|
| 809 |
});
|
| 810 |
|
| 811 |
+
renderChips();
|
|
|
|
| 812 |
}
|
| 813 |
|
| 814 |
function renderChips() {
|
| 815 |
+
const allDs = getDatasetPool();
|
| 816 |
+
document.getElementById("chipDsAll").classList.toggle("active", state.activeDatasets.size === allDs.length);
|
| 817 |
document.querySelectorAll("#chipsDataset .chip").forEach(btn => {
|
| 818 |
btn.classList.toggle("active", state.activeDatasets.has(btn.textContent));
|
| 819 |
});
|
| 820 |
+
|
| 821 |
+
document.getElementById("chipKAll").classList.toggle("active", state.activeK.size === 4);
|
| 822 |
document.querySelectorAll("#chipsK .chip").forEach(btn => {
|
| 823 |
btn.classList.toggle("active", state.activeK.has(btn.textContent));
|
| 824 |
});
|
| 825 |
+
|
| 826 |
document.getElementById("chipColsAll").classList.toggle("active", state.colMode === "all");
|
| 827 |
document.getElementById("chipColsModels").classList.toggle("active", state.colMode === "models");
|
| 828 |
document.getElementById("chipColsMeans").classList.toggle("active", state.colMode === "means");
|
|
|
|
| 834 |
return m ? parseFloat(m[0]) : NaN;
|
| 835 |
}
|
| 836 |
|
| 837 |
+
function formatLatex(text) {
|
| 838 |
+
if (!text) return "";
|
| 839 |
+
return LATEX_MAP[text] || text;
|
| 840 |
+
}
|
| 841 |
+
|
| 842 |
+
function triggerMath() {
|
| 843 |
+
if (window.renderMathInElement) {
|
| 844 |
+
renderMathInElement(document.body, {
|
| 845 |
+
delimiters: [
|
| 846 |
+
{ left: "$$", right: "$$", display: true },
|
| 847 |
+
{ left: "$", right: "$", display: false },
|
| 848 |
+
],
|
| 849 |
+
throwOnError: false,
|
| 850 |
+
});
|
| 851 |
+
}
|
| 852 |
+
}
|
| 853 |
+
|
| 854 |
function renderTable() {
|
| 855 |
const isTask = state.evalView === "Task Performance";
|
| 856 |
const isGeom = state.evalView === "Intrinsic Geometry";
|
| 857 |
const isParam = state.evalView === "Spectral Parameters";
|
| 858 |
const isFull = state.dimMode === "Full (k = d)";
|
| 859 |
|
| 860 |
+
let raw = [];
|
| 861 |
if (isTask) {
|
| 862 |
+
if (state.track === "Primary Metrics") {
|
| 863 |
+
// Unified cross-benchmark view (Table 4 style: IR nDCG@10 + STS Spearman)
|
| 864 |
+
const irKey = isFull
|
| 865 |
+
? "task_full::Retrieval (IR)::nDCG@10"
|
| 866 |
+
: `task_comp::Retrieval (IR)::nDCG@10::${state.compFormat}`;
|
| 867 |
+
const stsKey = isFull
|
| 868 |
+
? "task_full::Similarity (STS)::Spearman (ρ × 100)"
|
| 869 |
+
: `task_comp::Similarity (STS)::Spearman (ρ × 100)::${state.compFormat}`;
|
| 870 |
+
raw = [...(DATA.tables[irKey] || []), ...(DATA.tables[stsKey] || [])];
|
| 871 |
+
} else {
|
| 872 |
+
const key = isFull
|
| 873 |
+
? `task_full::${state.track}::${state.metric}`
|
| 874 |
+
: `task_comp::${state.track}::${state.metric}::${state.compFormat}`;
|
| 875 |
+
raw = DATA.tables[key] || [];
|
| 876 |
+
}
|
| 877 |
} else if (isGeom) {
|
| 878 |
+
const key = isFull ? `geom_full::${state.metric}` : `geom_comp::${state.metric}`;
|
| 879 |
+
raw = DATA.tables[key] || [];
|
| 880 |
} else {
|
| 881 |
+
raw = DATA.tables[`param::${state.metric}`] || [];
|
| 882 |
}
|
| 883 |
|
| 884 |
+
const allowedMethods = getAllowedMethods();
|
| 885 |
+
const q = state.searchQuery.trim().toLowerCase();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 886 |
|
| 887 |
// Filter rows
|
| 888 |
+
let rows = raw.filter(r => {
|
| 889 |
if (r.Dataset && !state.activeDatasets.has(r.Dataset)) return false;
|
| 890 |
if (!isParam && !isFull && r.k && !state.activeK.has(String(r.k))) return false;
|
| 891 |
+
if (!isParam && allowedMethods && r.Method && !allowedMethods.has(r.Method)) return false;
|
| 892 |
+
if (q) {
|
| 893 |
+
const combined = [r.Dataset, r.k, r.Model, r.Method].filter(Boolean).join(" ").toLowerCase();
|
| 894 |
+
if (!combined.includes(q)) return false;
|
| 895 |
+
}
|
| 896 |
return true;
|
| 897 |
});
|
| 898 |
|
| 899 |
+
// Filter columns
|
| 900 |
let cols = [];
|
| 901 |
if (isParam) {
|
| 902 |
cols = raw.length ? Object.keys(raw[0]) : [];
|
|
|
|
| 911 |
cols = [...baseCols, ...metricCols];
|
| 912 |
}
|
| 913 |
|
| 914 |
+
// Column sort if active
|
| 915 |
+
if (sortCol && cols.includes(sortCol)) {
|
| 916 |
+
rows.sort((a, b) => {
|
| 917 |
+
const na = parseNumeric(a[sortCol]);
|
| 918 |
+
const nb = parseNumeric(b[sortCol]);
|
| 919 |
+
if (!isNaN(na) && !isNaN(nb)) {
|
| 920 |
+
return sortAsc ? na - nb : nb - na;
|
| 921 |
+
}
|
| 922 |
+
const sa = String(a[sortCol] || "");
|
| 923 |
+
const sb = String(b[sortCol] || "");
|
| 924 |
+
return sortAsc ? sa.localeCompare(sb) : sb.localeCompare(sa);
|
| 925 |
+
});
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
exportRows = rows;
|
| 929 |
exportCols = cols;
|
| 930 |
|
| 931 |
+
// Best score computation per (Dataset, k) group
|
| 932 |
const bestMap = {};
|
| 933 |
if (isTask || (isGeom && state.metric !== "All 5 Geometry Metrics")) {
|
| 934 |
const lowerIsBetter = isGeom && ["Centroid Norm ||μ||₂", "Average Cosine", "MEV (Top-1)"].includes(state.metric);
|
|
|
|
| 952 |
const leftCols = new Set(["Dataset", "k", "Model", "Method"]);
|
| 953 |
|
| 954 |
if (isTask || (isGeom && state.metric !== "All 5 Geometry Metrics")) {
|
|
|
|
| 955 |
let superHtml = '<tr class="super-header"><th colspan="3" class="left">Specification</th>';
|
| 956 |
if (state.colMode === "all") {
|
| 957 |
superHtml += '<th colspan="2">Dedicated Encoders</th><th colspan="2">Gemma-3-1B-pt</th><th colspan="2">Qwen3.5-0.8B-Base</th><th colspan="3">Category Means</th>';
|
|
|
|
| 970 |
if (c === "Dedicated Mean") label = "Ded.";
|
| 971 |
if (c === "Base-Mean") label = "Base-M";
|
| 972 |
if (c === "Base-Last") label = "Base-L";
|
| 973 |
+
const sortIndicator = sortCol === c ? (sortAsc ? " ↑" : " ↓") : "";
|
| 974 |
+
subHtml += `<th class="${leftCols.has(c) ? 'left' : ''}" data-col="${c}">${label}${sortIndicator}</th>`;
|
| 975 |
});
|
| 976 |
subHtml += '</tr>';
|
| 977 |
thead.innerHTML = superHtml + subHtml;
|
| 978 |
} else {
|
| 979 |
let subHtml = '<tr class="sub-header">';
|
| 980 |
cols.forEach(c => {
|
| 981 |
+
let headerMath = c;
|
| 982 |
+
if (c === "E_∥ (||μ||₂²)") headerMath = "$E_\\parallel = \\|\\mu\\|_2^2$";
|
| 983 |
+
if (c === "σ²_∥") headerMath = "$\\sigma_\\parallel^2$";
|
| 984 |
+
if (c === "E_⊥ (Tr(Σ_⊥))") headerMath = "$E_\\perp = \\operatorname{Tr}(\\Sigma_\\perp)$";
|
| 985 |
+
if (c === "E_∥ / E_⊥") headerMath = "$E_\\parallel / E_\\perp$";
|
| 986 |
+
if (c === "γ_crowd") headerMath = "$\\gamma_{\\text{crowd}}$";
|
| 987 |
+
if (c === "cos_unc") headerMath = "$\\cos_{\\text{unc}}$";
|
| 988 |
+
if (c === "cos_cen") headerMath = "$\\cos_{\\text{cen}}$";
|
| 989 |
+
if (c === "||U_tail^T μ̂||₂") headerMath = "$\\|U_{\\text{tail}}^\\top \\hat{\\mu}\\|_2$";
|
| 990 |
+
if (c === "k_knee (Σ_⊥)") headerMath = "$k_{\\text{knee}}(\\Sigma_\\perp)$";
|
| 991 |
+
if (c === "λ_knee [×1e-3]") headerMath = "$\\lambda_{\\text{knee}} [\\times 10^{-3}]$";
|
| 992 |
+
if (c === "k_knee (Σ)") headerMath = "$k_{\\text{knee}}(\\Sigma)$";
|
| 993 |
+
if (c.startsWith("γ_SNR")) headerMath = `$\\gamma_{\\text{SNR}}(${c.replace('γ_SNR(', '').replace(')', '')})$`;
|
| 994 |
+
if (c.startsWith("ε*")) headerMath = `$\\epsilon^*(${c.replace('ε*(', '').replace(')', '').replace(' [×1e-3]', '')}) [\\times 10^{-3}]$`;
|
| 995 |
+
if (c.startsWith("γ*")) headerMath = `$\\gamma^*(${c.replace('γ*(', '').replace(')', '')})$`;
|
| 996 |
+
if (c === "||μ||₂") headerMath = "$\\|\\mu\\|_2$";
|
| 997 |
+
if (c === "AvgCos") headerMath = "$\\text{AvgCos}$";
|
| 998 |
+
if (c === "MEV") headerMath = "$\\text{MEV}$";
|
| 999 |
+
if (c === "NID") headerMath = "$\\text{NID}$";
|
| 1000 |
+
if (c === "IsoScore") headerMath = "$\\text{IsoScore}$";
|
| 1001 |
+
|
| 1002 |
+
const sortIndicator = sortCol === c ? (sortAsc ? " ↑" : " ↓") : "";
|
| 1003 |
+
subHtml += `<th class="${leftCols.has(c) ? 'left' : ''}" data-col="${c}">${headerMath}${sortIndicator}</th>`;
|
| 1004 |
});
|
| 1005 |
subHtml += '</tr>';
|
| 1006 |
thead.innerHTML = subHtml;
|
| 1007 |
}
|
| 1008 |
|
| 1009 |
+
// Header click-to-sort listeners
|
| 1010 |
+
thead.querySelectorAll("tr.sub-header th").forEach(th => {
|
| 1011 |
+
th.onclick = () => {
|
| 1012 |
+
const colName = th.dataset.col;
|
| 1013 |
+
if (sortCol === colName) {
|
| 1014 |
+
sortAsc = !sortAsc;
|
| 1015 |
+
} else {
|
| 1016 |
+
sortCol = colName;
|
| 1017 |
+
sortAsc = true;
|
| 1018 |
+
}
|
| 1019 |
+
renderTable();
|
| 1020 |
+
};
|
| 1021 |
+
});
|
| 1022 |
+
|
| 1023 |
// Build Body
|
| 1024 |
const tbody = document.getElementById("tableBody");
|
| 1025 |
let prevGroup = null;
|
|
|
|
| 1035 |
|
| 1036 |
const gKey = `${r.Dataset}||${r.k}`;
|
| 1037 |
const tds = cols.map(c => {
|
| 1038 |
+
let val = r[c] !== undefined ? r[c] : "";
|
| 1039 |
const cls = [];
|
| 1040 |
if (leftCols.has(c)) cls.push("left");
|
| 1041 |
if (c === "Method" && isCoast) cls.push("method-coast");
|
|
|
|
| 1045 |
cls.push("best-score");
|
| 1046 |
}
|
| 1047 |
}
|
| 1048 |
+
let displayVal = val;
|
| 1049 |
+
if (c === "Method") {
|
| 1050 |
+
displayVal = formatLatex(val);
|
| 1051 |
+
}
|
| 1052 |
+
return `<td class="${cls.join(' ')}">${displayVal}</td>`;
|
| 1053 |
}).join("");
|
| 1054 |
|
| 1055 |
return `<tr class="${trCls.join(' ')}">${tds}</tr>`;
|
|
|
|
| 1063 |
${!isParam ? ` | ${state.dimMode}` : ""}
|
| 1064 |
`;
|
| 1065 |
document.getElementById("statusDims").textContent = `${rows.length} rows × ${cols.length} cols`;
|
| 1066 |
+
|
| 1067 |
+
// Trigger KaTeX math rendering
|
| 1068 |
+
triggerMath();
|
| 1069 |
+
}
|
| 1070 |
+
|
| 1071 |
+
function openMethodModal() {
|
| 1072 |
+
const isFull = state.dimMode === "Full (k = d)";
|
| 1073 |
+
const main = isFull ? DATA.full_main_methods : DATA.comp_main_methods;
|
| 1074 |
+
const abl = isFull ? DATA.full_ablation_methods : DATA.comp_ablation_methods;
|
| 1075 |
+
const allList = [...main, ...abl];
|
| 1076 |
+
|
| 1077 |
+
const currentAllowed = getAllowedMethods();
|
| 1078 |
+
const modalBody = document.getElementById("modalMethodList");
|
| 1079 |
+
modalBody.innerHTML = "";
|
| 1080 |
+
|
| 1081 |
+
allList.forEach(m => {
|
| 1082 |
+
const item = document.createElement("label");
|
| 1083 |
+
item.className = "method-item";
|
| 1084 |
+
const chk = document.createElement("input");
|
| 1085 |
+
chk.type = "checkbox";
|
| 1086 |
+
chk.value = m;
|
| 1087 |
+
chk.checked = currentAllowed.has(m);
|
| 1088 |
+
item.appendChild(chk);
|
| 1089 |
+
|
| 1090 |
+
const span = document.createElement("span");
|
| 1091 |
+
span.innerHTML = formatLatex(m);
|
| 1092 |
+
item.appendChild(span);
|
| 1093 |
+
|
| 1094 |
+
modalBody.appendChild(item);
|
| 1095 |
+
});
|
| 1096 |
+
|
| 1097 |
+
document.getElementById("methodModal").classList.remove("hidden");
|
| 1098 |
+
|
| 1099 |
+
if (window.renderMathInElement) {
|
| 1100 |
+
renderMathInElement(modalBody, {
|
| 1101 |
+
delimiters: [{ left: "$", right: "$", display: false }],
|
| 1102 |
+
throwOnError: false,
|
| 1103 |
+
});
|
| 1104 |
+
}
|
| 1105 |
}
|
| 1106 |
|
| 1107 |
function initEvents() {
|
| 1108 |
+
// Theme Toggle (Light / Dark)
|
| 1109 |
+
const themeBtn = document.getElementById("themeToggleBtn");
|
| 1110 |
+
const rootHtml = document.documentElement;
|
| 1111 |
+
const savedTheme = localStorage.getItem("coast_theme") || "light";
|
| 1112 |
+
rootHtml.dataset.theme = savedTheme;
|
| 1113 |
+
updateThemeBtn(savedTheme);
|
| 1114 |
+
|
| 1115 |
+
themeBtn.onclick = () => {
|
| 1116 |
+
const nextTheme = rootHtml.dataset.theme === "light" ? "dark" : "light";
|
| 1117 |
+
rootHtml.dataset.theme = nextTheme;
|
| 1118 |
+
localStorage.setItem("coast_theme", nextTheme);
|
| 1119 |
+
updateThemeBtn(nextTheme);
|
| 1120 |
+
};
|
| 1121 |
+
|
| 1122 |
+
function updateThemeBtn(th) {
|
| 1123 |
+
document.getElementById("themeIcon").textContent = th === "light" ? "◑" : "☼";
|
| 1124 |
+
document.getElementById("themeLabel").textContent = th === "light" ? "Dark Mode" : "Light Mode";
|
| 1125 |
+
}
|
| 1126 |
+
|
| 1127 |
// Segmented control binds
|
| 1128 |
document.querySelectorAll("#segEvalView button").forEach(btn => {
|
| 1129 |
btn.onclick = () => {
|
| 1130 |
document.querySelectorAll("#segEvalView button").forEach(b => b.classList.remove("active"));
|
| 1131 |
btn.classList.add("active");
|
| 1132 |
state.evalView = btn.dataset.val;
|
| 1133 |
+
state.customMethods = null;
|
| 1134 |
syncState();
|
| 1135 |
renderToolbarControls();
|
|
|
|
| 1136 |
renderTable();
|
| 1137 |
};
|
| 1138 |
});
|
|
|
|
| 1144 |
state.track = btn.dataset.val;
|
| 1145 |
syncState();
|
| 1146 |
renderToolbarControls();
|
|
|
|
| 1147 |
renderTable();
|
| 1148 |
};
|
| 1149 |
});
|
|
|
|
| 1158 |
document.querySelectorAll("#segDim button").forEach(b => b.classList.remove("active"));
|
| 1159 |
btn.classList.add("active");
|
| 1160 |
state.dimMode = btn.dataset.val;
|
| 1161 |
+
state.customMethods = null;
|
| 1162 |
renderToolbarControls();
|
|
|
|
| 1163 |
renderTable();
|
| 1164 |
};
|
| 1165 |
});
|
|
|
|
| 1169 |
document.querySelectorAll("#segMethodSet button").forEach(b => b.classList.remove("active"));
|
| 1170 |
btn.classList.add("active");
|
| 1171 |
state.methodSet = btn.dataset.val;
|
| 1172 |
+
state.customMethods = null;
|
| 1173 |
renderTable();
|
| 1174 |
};
|
| 1175 |
});
|
|
|
|
| 1183 |
};
|
| 1184 |
});
|
| 1185 |
|
| 1186 |
+
// Quick filter chips
|
| 1187 |
+
document.getElementById("chipDsAll").onclick = () => {
|
| 1188 |
+
state.activeDatasets = new Set(getDatasetPool());
|
| 1189 |
+
renderChips();
|
| 1190 |
+
renderTable();
|
| 1191 |
+
};
|
| 1192 |
+
|
| 1193 |
+
document.getElementById("chipKAll").onclick = () => {
|
| 1194 |
+
state.activeK = new Set(["512", "256", "128", "64"]);
|
| 1195 |
+
renderChips();
|
| 1196 |
+
renderTable();
|
| 1197 |
+
};
|
| 1198 |
+
|
| 1199 |
document.getElementById("chipColsAll").onclick = () => {
|
| 1200 |
state.colMode = "all";
|
| 1201 |
renderChips();
|
|
|
|
| 1212 |
renderTable();
|
| 1213 |
};
|
| 1214 |
|
| 1215 |
+
// Search box
|
| 1216 |
+
document.getElementById("tableSearch").oninput = e => {
|
| 1217 |
+
state.searchQuery = e.target.value;
|
| 1218 |
+
renderTable();
|
| 1219 |
+
};
|
| 1220 |
+
|
| 1221 |
+
// Custom method modal
|
| 1222 |
+
document.getElementById("openMethodPickerBtn").onclick = openMethodModal;
|
| 1223 |
+
document.getElementById("closeMethodModalBtn").onclick = () => {
|
| 1224 |
+
document.getElementById("methodModal").classList.add("hidden");
|
| 1225 |
+
};
|
| 1226 |
+
document.getElementById("modalSelectAllBtn").onclick = () => {
|
| 1227 |
+
document.querySelectorAll("#modalMethodList input").forEach(chk => (chk.checked = true));
|
| 1228 |
+
};
|
| 1229 |
+
document.getElementById("modalClearBtn").onclick = () => {
|
| 1230 |
+
document.querySelectorAll("#modalMethodList input").forEach(chk => (chk.checked = false));
|
| 1231 |
+
};
|
| 1232 |
+
document.getElementById("modalApplyBtn").onclick = () => {
|
| 1233 |
+
const checked = [...document.querySelectorAll("#modalMethodList input:checked")].map(c => c.value);
|
| 1234 |
+
if (checked.length > 0) {
|
| 1235 |
+
state.customMethods = new Set(checked);
|
| 1236 |
+
document.querySelectorAll("#segMethodSet button").forEach(b => b.classList.remove("active"));
|
| 1237 |
+
}
|
| 1238 |
+
document.getElementById("methodModal").classList.add("hidden");
|
| 1239 |
+
renderTable();
|
| 1240 |
+
};
|
| 1241 |
+
|
| 1242 |
+
// CSV Export
|
| 1243 |
document.getElementById("exportBtn").onclick = () => {
|
| 1244 |
if (!exportRows.length || !exportCols.length) return;
|
| 1245 |
const esc = v => {
|
|
|
|
| 1264 |
.then(r => r.json())
|
| 1265 |
.then(d => {
|
| 1266 |
DATA = d;
|
| 1267 |
+
state.activeDatasets = new Set(DATA.all_datasets);
|
| 1268 |
initEvents();
|
| 1269 |
syncState();
|
| 1270 |
renderToolbarControls();
|
|
|
|
| 1271 |
renderTable();
|
| 1272 |
});
|
| 1273 |
</script>
|