GCI_Bench / README.md
Enderchef's picture
Update README.md
3834c17 verified
|
Raw
History Blame Contribute Delete
4.36 kB
metadata
language:
  - en
license: gpl-3.0
pretty_name: GCI-Bench (Glint Clarity Index Bench)
task_categories:
  - text-generation
  - question-answering
tags:
  - benchmark
  - evaluation
  - context-based
  - attention

GCI-Bench: Glint Clarity Index Benchmark

Gradient × Attention Context Importance Benchmark

GCI-Bench is a 5,000-item diagnostic benchmark designed to measure whether a small language model (1M–100M parameters) uses its attention × gradient interactions to prioritize relevant context over distractors.

Unlike standard NLP benchmarks, GCI-Bench does not evaluate answer correctness. Instead, it analyzes the model’s internal dynamics while it processes the prompt. Specifically, it measures how strongly gradients flow through attention connections tied to causally relevant parts of the input. No reference answer is required for scoring.

The goal is to evaluate how a model distributes importance across context—not whether it produces the right output.


Scoring

Each item produces two independent metrics:

Score Range What it measures
Priority Score 0–100 (50 = neutral) Whether the model assigns more gradient-weighted attention to relevant segments than to distractors
Linkage Score 0–100 (50 = neutral) Whether the model strengthens attention between causally linked sentence pairs compared to related→distractor pairs
GCI Score 0–100 Mean of Priority and Linkage

Both metrics are self-normalized. Each item contains a balanced 50/50 split of related and unrelated segments, and scores are averaged per token. A model with no systematic preference will converge to ~50 by construction.

Scores above 50 indicate structured prioritization. Scores below 50 indicate inverse or noisy allocation.


Dataset Structure

Item Fields

Field Type Description
id string Unique ID (gci-00001gci-05000)
topic string Topic category ID (e.g., cooking, astronomy)
topicLabel string Human-readable topic
templateId string Causal template (AF)
difficulty string easy (2 pairs), medium (3 pairs), hard (4 pairs)
question string Question about the causal chain
referenceAnswer string Ground-truth answer (not used for scoring)
context string Full paragraph with related and distractor segments (shuffled)
segments list Segment annotations with character offsets and labels
relatedSegmentIds list IDs of causally relevant segments
unrelatedSegmentIds list IDs of distractor segments
keyLinkPairs list Segment ID pairs representing causal links
meta object Structured fields: subject, driver, mechanism, outcome, threshold, unit

Topics (20 Domains)

agriculture, archaeology, architecture, astronomy, automotive, aviation, chemistry,
cooking, energy, finance, gardening, hardware, marine, music, photography,
physiology, sports, textiles, weather, wildlife


Causal Templates

Six structured templates (A–F) generate reasoning chains:

  • Threshold-based change
  • Comparative experiments
  • Cumulative exposure
  • Sudden spike events
  • Threshold-crossing dynamics
  • Feedback loops

These templates enforce consistent causal structure across domains while allowing content variation.


Evaluation Harness

The reference evaluation script (evaluation_harness.py) supports HuggingFace transformer models that return output_attentions.

The harness:

  1. Runs the model in language modeling mode
  2. Computes standard LM loss
  3. Backpropagates gradients through attention matrices
  4. Computes attention × gradient attribution
  5. Aggregates token-level values into segment-level scores
  6. Produces Priority, Linkage, and final GCI scores

Example usage:

# Evaluate TinyStories-33M on 500 random items(for personal benchmarking)
python evaluation_harness.py --model roneneldan/TinyStories-33M --limit 500

# Evaluate on the full 5,000-item set(for the full benchmark)
python evaluation_harness.py --model roneneldan/TinyStories-8M --limit 0

Some architectures may require minor adjustments to expose attention tensors correctly.


License

GPL 3.0 - see LICENSE