atlas

Research map / Large language models / Language, safety and interpretability

To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DRO

ICML 2024 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes TempNet, a small network that predicts per-sample temperatures for LLM softmax and CLIP contrastive losses, trained under a KL-constrained DRO robust loss, and shows gains on LLM common-sense/perplexity tasks and CLIP retrieval/zero-shot classification.

Problem

Setting the temperature in softmax-type losses for large foundation models is done by hand or as a single global value, which ignores data heterogeneity; individualized learnable temperatures scale poorly and overfit.

Approach

Derive a KL-DRO robust softmax/contrastive loss with an instance-wise temperature, and replace the per-instance temperatures with a small temperature prediction network (TempNet) that pools prototypical logits, justified by a variational-analysis lemma that the functional minimization equals pointwise minimization.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add TempNet to LLaMA2 Chat modelsLLaMA2 Chat on AlpacaEval · AlpacaEvalWin Rate: 4.96% -> 5.43%; 7.70% -> 7.73%; 13.89% -> 15.05%Helped
Train GPT-2 from scratch with TempNetGPT-2 · Common Sense Reasoning Averageaccuracy: 31.44 -> 32.24Helped
Finetune GPT-2 with TempNetGPT-2 · Common Sense Reasoning Averageaccuracy: 35.42 -> 36.48Helped
Train TempNet while keeping LLaMA2 7B fixedLLaMA2 7B · Common Sense Reasoning Averageaccuracy: 57.20 -> 59.44Helped
Train TempNet while keeping LLaMA2 13B fixedLLaMA2 13B · Common Sense Reasoning Averageaccuracy: 60.00 -> 61.24Helped
Use TempNet instead of fixed temperatures for contrastive learningCLIP encoders · Flickr30K RetrievalIR@1: 44.36$\pm$0.12 -> 46.17$\pm$0.14Helped
Use TempNet instead of fixed temperatures for contrastive learningCLIP encoders · MSCOCO RetrievalIR@1: 23.27$\pm$0.18 -> 24.83$\pm$0.16Helped
Use TempNet instead of fixed temperatures for contrastive learningCLIP encoders · ImageNet1Ktop-1 accuracy: 40.72$\pm$0.23 -> 42.28$\pm$0.19Helped
Add TempNet at maj@1, replacing the fixed temperatureLLaMA2 7B · GSM8Kmaj@1: 13.2±0.9 -> 12.8±0.9Hurt
Add TempNet at maj@64, replacing the fixed temperatureLLaMA2 7B · GSM8Kmaj@64: 16.5±1.0 -> 17.3±1.0Helped
Add TempNet instead of default temperatureLLaMA2 Chat on MT-bench · MT-bench, 7B and 70Bscore: 6.27 -> 6.44; 6.89 -> 6.97Helped
Add TempNet instead of default temperatureLLaMA2 Chat 13B · MT-benchscore: 6.65 -> 6.58Hurt

Surprising findings

Limitations

Experimental setup

Datasets: OpenWebText2 CC3M CC12M Flickr30K MSCOCO Lambada Wikitext-2 PIQA HellaSwag ARC-e ARC-c OBQA

Benchmarks: PIQA HellaSwag ARC-e ARC-c OBQA Lambada Wikitext Flickr30K MSCOCO CIFAR10 CIFAR100 ImageNet1K

Metrics: accuracy perplexity recall@k top-1 accuracy win rate LC win rate

Baselines: CLIP CyCLIP SogCLR iSogCLR GPT-2 with tau=1.0 LLaMA2 Chat with default tau=0.7

Builds on: iSogCLR SogCLR KL-DRO CLIP LLaMA2

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy