CoolFace
Datasetpublic

nips234678/poolbench

PoolBench PoolBench is a diagnostic benchmark for evaluating pooling strategies in decoder-only large language models. Every embedding pipeline implicitly chooses a pooling strategy — last token, mean pooling, attention-weighted, etc. — yet this choice is almost never studied systematically. PoolBench provides the first controlled, multi-concept, multi-model evaluation framework for this decision. What is a pooling strategy? A pooling strategy is a function that… See the full description on the dataset page: https://huggingface.co/datasets/nips234678/poolbench.

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes25downloads
Dataset Card

PoolBench

PoolBench is a diagnostic benchmark for evaluating pooling strategies in decoder-only large language models. Every embedding pipeline implicitly chooses a pooling strategy — last token, mean pooling, attention-weighted, etc. — yet this choice is almost never studied systematically. PoolBench provides the first controlled, multi-concept, multi-model evaluation framework for this decision.


What is a pooling strategy?

A pooling strategy is a function that maps a sequence of per-token hidden states This vector is then used for classification, similarity search, or steering. PoolBench asks: which pooling strategy best captures a given semantic concept in a given model at a given layer?


Benchmark overview

DimensionValue
Pooling strategies evaluated19 (18 unsupervised + 1 supervised)
Semantic concepts17
ModelsLlama-3.1-8B, Gemma-2-9B, Mistral-7B-v0.3
Evaluation metricsD1 AUROC · D2 SCP · D3 Disentanglement
Corpus size1,000 passages/concept (700 train + 300 test, balanced pos/neg)
Token window300–500 tokens (LLaMA-3.1-8B BPE tokenizer)
Total passages~37,693

The 17 Concepts

Concepts span five linguistic families, chosen to cover a range of signal density and linguistic depth:

FamilyConcepts
Sparse-lexicalhedging, legal_formality, frustration, numerical_precision
Dense-lexicalimdb_sentiment, toxicity, depression
Syntactic/discoursecausation, contrast, conditionality, negation_density
Registeracademic_tone, code_docs, bureaucratic, narrative
Semantic-abstractdeference, planning

Sensitive concepts: toxicity and depression are included in all metric computations but their steered text outputs are withheld from public release (available on request for research use).


The 19 Pooling Strategies

FamilyStrategy IDDescription
Position-anchoredP1_last_tokenFinal non-padding token
P2_first_tokenFirst token (BOS position)
Uniform aggregationA1_meanArithmetic mean over all tokens
A2_maxElement-wise max
A3_minElement-wise min
A4_norm_weightedToken-norm weighted mean
WindowW1_first_kMean of first k tokens
W2_last_kMean of last k tokens
W3_middle_kMean of middle k tokens
W4_hierarchicalChunk → mean → aggregate
Saliency-weightedS1_attentionAttention-score weighted mean
S2_gradientGradient-norm weighted mean
S3_iti_probeSupervised ITI head-based pooling
Structural-linguisticL1_pos_filteredContent POS tags only (NOUN, VERB, ADJ, ADV)
L2_dependency_relDependency-arc triggered tokens
L3_entityNamed entity spans
L4_clauseClause-boundary segmentation
L5_keywordTF-IDF top-k keywords
L6_sentenceSentence-boundary segments

Evaluation Dimensions

D1 — Concept Separability (AUROC)

Linear probe AUROC measuring how well a pooling strategy separates positive from negative passages for each concept. Training: 5-fold OOF on 700 train passages per class. No labels from the test split are used for D1 training.

D2 — Steered Concept Prevalence (SCP)

Measures whether a pooling strategy's steering vector (DiffMean) actually steers generated text toward the target concept. A Classifier B (fine-tuned BERT) scores each steered generation. SCP = correlation between alpha (steering strength) and Classifier B score.

D3 — Disentanglement

Measures whether steering toward concept A avoids contaminating a linguistically-distant (LD) and linguistically-close (LC) neighbour concept.

$$\text{Disent}c = 1 - \frac{\DeltaB}{\Delta_A}$$

Where $\DeltaA$ = SCP on target concept, $\DeltaB$ = SCP on neighbour concept under the same steering vector.


Dataset Structure

poolbench/
  {concept}/
    train_pos.jsonl    # 700 positive training passages
    train_neg.jsonl    # 700 negative training passages
    test_pos.jsonl     # 300 positive test passages
    test_neg.jsonl     # 300 negative test passages

Each JSONL record:

json
{
  "id": "academic_tone_train_pos_0001",
  "text": "...",
  "label": 1,
  "domain": "academic",
  "token_count": 347,
  "matched_pair_id": null,
  "split": "train"
}

Fields:

  • id — unique identifier with concept, split, class, and index
  • text — passage text (300–500 LLaMA-3.1-8B tokens except toxicity/deference)
  • label — 1 = positive, 0 = negative
  • domain — source domain (e.g., academic, news, social, legal_us)
  • token_count — exact token count under LLaMA-3.1-8B tokenizer
  • matched_pair_id — non-null for matched-pair concepts (negative is a controlled rewrite of the positive)
  • splittrain or test

Corpus Construction

Positive and negative passages were constructed under strict controls:

  • 700/700 train, 300/300 test per concept — balanced classes to avoid probe bias
  • 300–500 token window — enforced by LLaMA-3.1-8B BPE tokenizer at build time
  • ≥3 source domains per concept — prevents domain vocabulary from confounding pooling strategy comparisons
  • ±25 token matching rule — for matched-pair concepts, the positive and its negative rewrite differ by ≤25 tokens
  • MD5-based deduplication — within-class, cross-class, and train/test leak checks
  • Seed-word contamination filter — negatives must not contain the concept's seed words

See the GitHub repository for full construction notes and per-concept source tables.

Source datasets

Concept familySources
Academic/Scientificgfissore/arxiv-abstracts-2021, qiaojin/PubMedQA
Legal/Governmentlex_glue (scotus, eurlex), FiscalNote/billsum
Newscc_news
Socialsentence-transformers/reddit, Yelp/yelp_review_full
Mathmeta-math/MetaMathQA, AI-MO/NuminaMath-CoT
Codecode_search_net (python, java, javascript, ruby)
Sentiment/Toxicityyin001/imdb_dataset_positive_negative, tdavidson/hate_speech_offensive, google/civil_comments, Surge-AI toxicity CSV
Depressionmrjunos/depression-reddit-cleaned, dlb/mentalreddit
PolitenessIntel/polite-guard
How-togursi26/wikihow-cleaned

Quick Start

python
from datasets import load_dataset

# Load one concept
ds = load_dataset("nips234678/poolbench", data_dir="academic_tone")

# Load all concepts
from pathlib import Path
concepts = [
    "academic_tone", "bureaucratic", "causation", "code_docs",
    "conditionality", "contrast", "deference", "depression",
    "frustration", "hedging", "imdb_sentiment", "legal_formality",
    "narrative", "negation_density", "numerical_precision",
    "planning", "toxicity",
]
for concept in concepts:
    ds = load_dataset("nips234678/poolbench", data_dir=concept)

To reproduce the full pipeline from activations to leaderboard:

bash
git clone https://github.com/2023mc21517-arch/poolbench.git
cd poolbench
pip install -e ".[dev]"

# Download corpus
huggingface-cli download nips234678/poolbench --repo-type dataset --local-dir data/corpora

# Run full pipeline (requires GPU, ~8h per model on A100)
python scripts/run_model.py --model mistral7b --device cuda:0

Related Artifacts

ArtifactLinkContents
BERT Scorer Models (D2)nips234678/poolbench-bert-scorers17 fine-tuned BERT classifiers (one per concept) used as Classifier B for D2 SCP scoring
Activation Filesnips234678/poolbench-activationsPer-model per-layer hidden states (.npy) for all 3 models — enables D1 evaluation without re-running inference (~390 GB)
Steered Outputsnips234678/poolbench-steered-outputsGenerated texts from D2 SCP evaluation for 15 non-sensitive concepts across all 3 models
Code & LeaderboardGitHubEvaluation pipeline, pooling strategy implementations, community submission workflow

Ethical Considerations

  • Toxicity and depression concepts include passages containing toxic language and expressions of psychological distress, respectively. These are sourced from publicly available datasets with established research use. Steered text outputs for these two concepts are withheld from public release.
  • No personal information — all passages are sourced from public corpora with no PII.
  • Model outputs — steered generation outputs are research artifacts demonstrating steering vector magnitude effects; they are not endorsements of the content.
  • Intended use — evaluation of pooling strategies in language model representations. Not intended for clinical use, content moderation in production, or as training data for generation models.

Citation

bibtex
@dataset{poolbench2026,
  title        = {{PoolBench}: A Benchmark for Pooling Strategies in Decoder-Only Language Models},
  author       = {Anonymous},
  year         = {2026},
  publisher    = {HuggingFace},
  url          = {https://huggingface.co/datasets/nips234678/poolbench},
}

Citation will be updated with full author list and DOI upon paper acceptance.