Skip to content

Commit 00b08c3

Browse files
feat: implement RQ1 model selector with dynamic button generation and heatmap updates
1 parent 6ea2cb5 commit 00b08c3

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
lines changed

css/style.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,3 +689,31 @@ body.coming-soon-active #coming-soon-overlay .coming-soon-content {
689689
width: 40px;
690690
height: 40px;
691691
}
692+
693+
/* RQ1 model selector buttons */
694+
.rq1-model-btn {
695+
appearance: none;
696+
-webkit-appearance: none;
697+
background: #ffffff;
698+
color: #495057;
699+
border: 1px solid var(--border-color);
700+
border-radius: 9999px;
701+
padding: 0.35rem 0.75rem;
702+
font-family: inherit;
703+
font-size: 0.8rem;
704+
font-weight: 600;
705+
cursor: pointer;
706+
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
707+
white-space: nowrap;
708+
}
709+
.rq1-model-btn:hover {
710+
background: var(--primary-light);
711+
border-color: rgba(0, 123, 255, 0.3);
712+
color: var(--primary-color);
713+
}
714+
.rq1-model-btn.active {
715+
background: var(--primary-color);
716+
border-color: var(--primary-color);
717+
color: #ffffff;
718+
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
719+
}

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ <h2>Use Cases</h2>
8888
<section id="experiments-llm-selection">
8989
<h2>RQ1: Can LLMs Generate Consistent and Context-Aware Corruption Strategies?</h2>
9090
<p class="exp-summary" data-exp="llm-selection"><strong>Answer:</strong> Across a broad set of open- and closed-source LLMs, corruption strategies remain largely consistent and domain-appropriate. Several models across different sizes and architectures produce fully plausible selections, while others show occasional deviations. Performance does not follow a simple trend with model scale. Among these models, GPT-4o provides fully consistent selections and is used as the reference for downstream robustness experiments. <strong>Setup:</strong> We evaluated corruption-selection behavior across eleven LLMs: closed-source (GPT-4o, GPT-4o-mini), open-source large (GPT-OSS-120B, Qwen2.5-110B, Llama-3.3-70B, DeepSeek-R1-70B), and open-source medium/small (Gemma-3-27B, Llama-4-Scout-17B, Phi-4-14B, Qwen2.5-8B, Mistral-8x7B). Each model produced 10 sampling runs per domain using different seeds. Final corruption sets were obtained by majority vote and checked against domain-specific whitelist/blacklist constraints encoding expert prior knowledge. <strong>Results:</strong> GPT-4o, Llama-3.3-70B, and Llama-4-Scout-17B exhibit zero violations, demonstrating fully domain-consistent behavior. Performance does not correlate with scale: some large models (e.g., DeepSeek-R1-70B) show more violations than mid-size models such as Gemma-3-27B or Phi-4-14B. The mixture-of-experts Mistral-8x7B shows the highest number of violations. Core transforms (Brightness, Contrast, ImageRotation) are selected consistently across domains, while domain-specific choices (e.g., CloudGenerator for Satellite, Rain for Driving) demonstrate contextual adaptation.</p>
91+
<div id="rq1-model-thumbnails" class="thumbnail-container"></div>
9192
<div class="plot-block">
92-
<h3>Corruption Selection Frequencies (GPT-4o)</h3>
93-
<img src="assets/experiments/augmentation_selection_gpt-4o_heatmap_flipped.png" alt="Heatmap of GPT-4o corruption selection frequencies across domains (10 runs per domain). Green = whitelist, Red = blacklist. Majority vote used for final sets." />
93+
<h3 id="rq1-plot-title">Corruption Selection Frequencies (GPT-4o)</h3>
94+
<img id="rq1-heatmap" src="assets/experiments/augmentation_selection/gpt-4o/augmentation_selection_gpt-4o_heatmap_flipped.png" alt="Heatmap of corruption selection frequencies" />
9495
</div>
9596
</section>
9697

@@ -114,7 +115,7 @@ <h2>RQ4: How Does Model Architecture Affect Robustness?</h2>
114115

115116
<section id="experiments-pretraining">
116117
<h2>RQ5: How Does Pretraining Data Influence Robustness?</h2>
117-
<p class="exp-summary" data-exp="pretraining"><strong>Answer:</strong> Curated, semantically aligned pretraining data yields higher accuracy and robustness than noisy corpora. <strong>Setup:</strong> Evaluate CLIP ViT-L/14 on five datasets: LAION-400M (Schuhmann et al., 2021), MetaCLIP FullCC (Xu et al., 2024), CommonPool, DataComp XL (Gadre et al., 2023), DFN2B (Fang et al., 2023), and OpenAI (Radford et al., 2021). Tested on six domains with domain-specific corruptions. <strong>Results:</strong> Curated models outperform noisy ones in accuracy and mean corruption error (mce).</p>
118+
<p class="exp-summary" data-exp="pretraining"><strong>Answer:</strong> Models pretrained on curated, semantically aligned data generally achieve higher accuracy and enhanced robustness compared to those trained on larger, noisier corpora. However, the OpenAI baseline, while often weaker, can become the top performer when its proprietary training data is highly aligned with the target domain, as seen in People. <strong>Setup:</strong> To isolate the effect of pretraining data, we evaluate CLIP ViT-L/14 models trained on five distinct datasets representing a spectrum of data collection philosophies: LAION-400M (Schuhmann et al., 2021) and MetaCLIP FullCC (Xu et al., 2024) as large-scale, minimally filtered web scrapes; CommonPool and DataComp XL (Gadre et al., 2023) and DFN2B (Fang et al., 2023) as corpora prioritizing high-quality, semantic image-text alignment; and OpenAI (Radford et al., 2021) as a proprietary baseline. All models are evaluated under domain-specific corruption sets across six application domains. <strong>Results:</strong> Curated datasets consistently outperform larger, noisier corpora in both clean accuracy and mean corruption error (mCE). For instance, CommonPool achieves top-tier performance in Driving and Manufacturing, while LAION-400M lags behind with a notable robustness deficit in Medical. A critical exception is People, where the OpenAI baseline surpasses all other models, highlighting that domain-specific alignment of pretraining data can be more decisive than general data quality or scale.</p>
118119
<div class="experiment" data-exp="pretraining"></div>
119120
</section>
120121

js/main.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,61 @@
486486
return thumbnail;
487487
}
488488

489+
// --- RQ1 MODEL SELECTOR ---
490+
const rq1Models = [
491+
{ id: 'gpt-4o', label: 'GPT-4o' },
492+
{ id: 'gpt-4o-mini', label: 'GPT-4o-mini' },
493+
{ id: 'gpt-oss_120b', label: 'GPT-OSS 120B' },
494+
{ id: 'qwen_110b', label: 'Qwen 110B' },
495+
{ id: 'llama3.3_70b', label: 'Llama-3.3 70B' },
496+
{ id: 'deepseek-r1_70b', label: 'DeepSeek-R1 70B' },
497+
{ id: 'gemma3_27b', label: 'Gemma-3 27B' },
498+
{ id: 'llama_4_scout_17b', label: 'Llama-4 Scout 17B' },
499+
{ id: 'phi4_14b', label: 'Phi-4 14B' },
500+
{ id: 'qwen3_8b', label: 'Qwen 8B' },
501+
{ id: 'mistral_latest', label: 'Mistral 8x7B' },
502+
];
503+
504+
function buildRQ1ModelSelector() {
505+
const container = document.getElementById('rq1-model-thumbnails');
506+
const heatmap = document.getElementById('rq1-heatmap');
507+
const title = document.getElementById('rq1-plot-title');
508+
if (!container || !heatmap) return;
509+
510+
let selectedModel = rq1Models[0].id;
511+
512+
function update() {
513+
const model = rq1Models.find(m => m.id === selectedModel);
514+
const path = `assets/experiments/augmentation_selection/${selectedModel}/augmentation_selection_${selectedModel}_heatmap_flipped.png`;
515+
heatmap.src = path;
516+
heatmap.alt = `Heatmap of ${model.label} corruption selection frequencies`;
517+
if (title) title.textContent = `Corruption Selection Frequencies (${model.label})`;
518+
container.querySelectorAll('.rq1-model-btn').forEach(btn => {
519+
btn.classList.toggle('active', btn.dataset.model === selectedModel);
520+
});
521+
}
522+
523+
rq1Models.forEach(model => {
524+
const btn = document.createElement('button');
525+
btn.type = 'button';
526+
btn.className = 'rq1-model-btn';
527+
btn.dataset.model = model.id;
528+
btn.textContent = model.label;
529+
btn.addEventListener('click', () => {
530+
selectedModel = model.id;
531+
update();
532+
});
533+
container.appendChild(btn);
534+
});
535+
536+
update();
537+
}
538+
489539
// --- INITIALIZATION ---
490540
function initialize() {
491541
buildCorruptionGallery();
492542
buildUseCasesSection();
543+
buildRQ1ModelSelector();
493544
document.querySelectorAll('.experiment').forEach(expDiv => {
494545
const expKey = expDiv.dataset.exp;
495546
const basePath = `assets/experiments/${expKey}`;

0 commit comments

Comments
 (0)