Entropy-Based Data Selection for Language Models
Organizations: School of Computer and Communication Engineering, University of Science and Technology Beijing, Beijing 100083, China · National Key Laboratory of General Artificial Intelligence, Beijing Institute for General Artificial Intelligence, Beijing 100086, China · Shunde Innovation School, University of Science and Technology Beijing, Foshan 528399, China
Abstract
Modern language models (LMs) increasingly require two critical resources: computational resources and data resources. Data selection techniques can effectively reduce the amount of training data required for fine-tuning LMs. However, their effectiveness is closely related to computational resources, which always require a high compute budget. Owing to the resource limitations in practical fine-tuning scenario, we systematically reveal the relationship between data selection and uncertainty estimation of selected data. Although large language models (LLMs) exhibit exceptional capabilities in language understanding and generation, which provide new ways to alleviate data scarcity, evaluating data usability remains a challenging task. This makes efficient data selection indispensable. To mitigate these issues, we propose Entropy-Based Unsupervised Data Selection (EUDS) framework. Empirical experiments on sentiment analysis (SA), topic classification (Topic-CLS), and question answering (Q&A) tasks validate its effectiveness. EUDS establishes a computationally efficient data-filtering mechanism. Theoretical analysis and experimental results confirm the effectiveness of our approach. EUDS significantly reduces computational costs and improves training time efficiency with less data requirement. This provides an innovative solution for the efficient fine-tuning of LMs in the compute-constrained scenarios.
Figures & tables
| Entropy Level | Numerical Interval | Abbreviation |
| Low Entropy | ; ; | 0-3; 3-5; 0-5 |
| Medium Entropy | ; ; | 0-8; 3-10; 3-8 |
| High Entropy | ; ; | 5-8; 8-10; 5-10 |
| Dataset (Entropy Type) | Data Type | Entropy Interval | Original Count | Selected Count |
| MMLU (IE) | OriData | 3–10 | 2000 | 1038 |
| SynData | 3–8 | 2000 | 669 | |
| SumData | 8–10 | 4000 | 2013 | |
| JoSelData | 3–10 | 4000 | 1720 | |
| MMLU (GE) | OriData | 5–10 | 2000 | 1200 |
| SynData | 5–10 | 2000 | 1170 |
| Dataset | Source |
| SA | |
| SST-2 | stanfordnlp/sst2 |
| SST-5 | SetFit/sst5 |
| IMDb | stanfordnlp/imdb |
| Yelp | Yelp/yelp_review_full |
| Topic-CLS | |
| OriData | Information Entropy | Generative Entropy | Semantic Entropy | |||||||||
| Tasks | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 |
| SST-2 | 0-3 | 64.20↓ | 4.40↑ | 4.44↑ | 0-5 | 40.60↓ | 2.00↑ | 2.11↑ | 0-8 | 13.25↓ | 2.40↑ | 2.35↑ |
| SST-5 | 3-10 | 5.65↓ | 4.40↑ | 4.91↑ | 0-3 | 50.75↓ | 2.80↑ | 2.93↑ | 5-8 | 42.00↓ | 7.60↑ | 8.48↑ |
| IMDb | 3-10 | 0.20↓ | 0.00→ | 0.00→ | 3-5 | 33.55↓ | 0.00→ | 0.00→ | 3-10 | 0.50↓ | 0.00→ | 0.00→ |
| Yelp | 5-8 | 28.55↓ | 0.80↑ | 0.84↑ | 0-3 | 20.45↓ | 0.80↑ | 0.92↑ | 3-8 | 45.80↓ | 1.60↑ | 0.08↑ |
| AGNews | 0-8 | 0.70↓ | 2.40↑ | 2.36↑ | 0-8 | 0.25↓ | 0.40↑ | 0.38↑ | 5-10 | 13.50↓ | 0.00→ | 0.02↓ |
| SynData | Information Entropy | Generative Entropy | Semantic Entropy | |||||||||
| Tasks | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 |
| SST-2 | 5-8 | 28.80↓ | 2.00↑ | 2.23↑ | 5-10 | 70.10↓ | 2.00↑ | 1.76↑ | 3-8 | 52.00↓ | 0.00→ | 0.25↑ |
| SST-5 | 3-8 | 11.15↓ | 1.20↑ | 0.50↑ | 5-8 | 78.80↓ | 2.80↑ | 0.48↓ | 8-10 | 58.50↓ | 1.60↑ | 2.18↑ |
| IMDb | 5-10 | 34.10↓ | 1.20↑ | 1.09↑ | 5-10 | 74.60↓ | 0.40↑ | 0.41↑ | 3-8 | 80.50↓ | 0.40↑ | 0.41↑ |
| Yelp | 3-5 | 63.40↓ | 0.80↑ | 0.81↓ | 3-5 | 54.65↓ | 0.40↑ | 0.48↓ | 0-5 | 17.70↓ | 1.20↓ | 1.79↓ |
| AGNews | 5-10 | 11.55↓ | 1.20↑ | 1.12↑ | 3-5 | 52.40↓ | 1.20↑ | 1.94↑ | 3-5 | 63.40↓ | 2.80↑ | 3.00↑ |
| Tasks | Information Entropy | Generative Entropy | Semantic Entropy | |||||||||
| Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | |
| SST-2 | 0-3 | 46.82↓ | 0.00→ | 0.03↓ | 5-8 | 35.85↓ | 0.80↓ | 0.90↓ | 3-5 | 46.25↓ | 0.00→ | 0.05↓ |
| SST-5 | 3-8 | 5.57↓ | 0.80↓ | 0.02↑ | 5-8 | 39.40↓ | 0.40↓ | 0.25↓ | 5-8 | 26.25↓ | 2.00↑ | 1.69↑ |
| IMDb | 3-5 | 35.20↓ | 3.20↑ | 3.21↑ | 5-8 | 37.85↓ | 2.80↑ | 2.81↑ | 5-8 | 43.25↓ | 3.20↑ | 3.21↑ |
| Yelp | 5-8 | 24.10↓ | 1.20↓ | 1.07↓ | 3-10 | 19.17↓ | 2.40↓ | 2.41↓ | 3-5 | 9.50↓ | 1.60↓ | 1.78↓ |
| AGNews | 0-8 | 5.47↓ | 0.40↑ | 0.41↑ | 0-5 | 6.62↓ | 0.80↑ | 0.81↑ | 5-10 | 18.52↓ | 0.40↓ | 0.43↓ |
| Tasks | Information Entropy | Generative Entropy | Semantic Entropy | |||||||||
| Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | Interval | Data | Accuracy | F1 | |
| SST-2 | 0-5 | 57.92↓ | 0.40↑ | 0.73↑ | 3-10 | 25.00↓ | 1.60↓ | 1.54↓ | 5-8 | 54.12↓ | 0.80↓ | 0.84↓ |
| SST-5 | 3-10 | 6.60↓ | 1.20↓ | 1.13↓ | 0-5 | 16.00↓ | 1.20↓ | 0.55↓ | 3-8 | 37.25↓ | 0.80↑ | 1.94↑ |
| IMDb | 8-10 | 60.27↓ | 2.00↑ | 2.01↑ | 3-8 | 25.77↓ | 3.20↑ | 3.21↑ | 8-10 | 30.12↓ | 2.40↑ | 2.41↑ |
| Yelp | 3-8 | 15.05↓ | 2.40↓ | 2.75↓ | 3-8 | 59.80↓ | 1.20↓ | 0.99↓ | 0-5 | 11.22↓ | 0.80↑ | 0.79↑ |
| AGNews | 3-8 | 11.97↓ | 0.40↓ | 0.32↓ | 0-5 | 17.30↓ | 1.20↓ | 1.30↓ | 5-8 | 65.45↓ | 1.60↓ | 1.71↓ |
| Tasks | Information Entropy | Generative Entropy | Semantic Entropy | |||||||||
| OriData | SynData | SumData | JoSelData | OriData | SynData | SumData | JoSelData | OriData | SynData | SumData | JoSelData | |
| SST-5 | 25.00↓ 1.28↑ | 45.00↓ 1.92↑ | 48.00↓ 2.40↑ | 10.22↓ 0.08↑ | 10.88↓ 0.32↓ | 74.11↓ 2.96↑ | 49.91↓ 2.56↑ | 65.36↓ 0.48↑ | 29.40↓ 0.08↑ | 87.18↓ 0.08↑ | 49.99↓ 2.24↑ | 58.30↓ 1.52↑ |
| AGNews | 52.83↓ 0.00↑ | 76.03↓ 2.88↑ | 38.01↓ 1.72↑ | 87.82↓ 8.08↑ | 20.65↓ 0.24↓ | 41.74↓ 1.60↑ | 49.96↓ 5.12↑ | 60.61↓ 5.04↑ | 65.10↓ 0.40↑ | 0.06↓ 1.12↑ | 0.28↓ 2.24↑ | 18.03↓ 1.84↑ |
| MMLU | 51.51↓ 3.84↑ | 85.71↓ 0.64↑ | 42.85↓ 1.68↑ | 89.38↓ 1.68↑ | 70.00↓ 0.08↑ | 90.87↓ 0.56↑ | 45.43↓ 0.16↑ | 62.17↓ 0.12↑ | 40.85↓ 1.44↑ | 87.27↓ 0.80↑ | 49.51↓ 1.94↑ | 72.25↓ 0.88↑ |
| Tasks | IG Entropy | IS Entropy | GS Entropy | IGS Entropy | ||||
| OriData | SynData | OriData | SynData | OriData | SynData | OriData | SynData | |
| SST-5 | 22.65↓ 0.40↑ | 29.60↓ 2.40↑ | 32.20↓ 4.80↑ | 53.35↓ 0.80↑ | 64.75↓ 1.60↑ | 24.65↓ 0.40↑ | 45.00↓ 2.40↑ | 31.90↓ 0.40↑ |
| AGNews | 55.00↓ 0.00↑ | 44.35↓ 0.80↑ | 14.10↓ 0.40↓ | 38.35↓ 1.60↑ | 25.35↓ 0.00↑ | 58.70↓ 1.20↑ | 52.30↓ 0.80↓ | 62.30↓ 2.00↑ |
| MMLU | 55.35↓ 2.00↑ | 66.70↓ 0.00↑ | 60.00↓ 8.00↑ | 67.50↓ 0.80↑ | 72.35↓ 4.80↑ | 70.35↓ 2.40↑ | 61.25↓ 4.80↑ | 70.95↓ 4.50↑ |
| SumData | JoSelData | SumData | JoSelData | SumData | JoSelData | SumData | JoSelData | |
| SST-5 | 50.00↓ 0.40↓ | 13.62↓ 2.80↓ | 38.40↓ 0.80↓ | 44.62↓ 0.80↓ | 44.97↓ 0.80↑ | 34.52↓ 4.00↑ | 50.00↓ 0.40↓ | 44.95↓ 0.80↓ |
| Entropy | Dataset | Interval | Subset Acc ↑ (%) | Subset Reduce (%) | Fullset Acc ↑ (%) | Fullset Reduce (%) |
| IE | OriData | 0-3 | 7.69↑ | 51.85↓ | 7.49↑ | 66.56↓ |
| SynData | 0-3 | 5.17↑ | 34.10↓ | 3.74↑ | 16.97↓ | |
| SumData | 5-8 | 20.75↑ | 45.63↓ | 3.19↑ | 49.59↓ | |
| JoSeData | 0-3 | 16.98↑ | 42.97↓ | 1.60↑ | 41.76↓ | |
| GE | OriData | 0-5 | 21.15↑ | 60.00↓ | 0.33↑ | 69.06↓ |
| SynData | 5-8 | 5.17↑ | 42.95↓ | 0.31↑ | 90.97↓ |
| Dataset | Methods | Accuracy (%) |
| IMDb | BiLSTM | 81.87 |
| RoBERTa-BiLSTM | 92.46 | |
| TWSSenti | 95.00 | |
| SELECT | 63.79 | |
| IE (Ours) | 93.60 | |
| GE (Ours) | 93.20 |