Skip to content
Back to skills

Majority K

ASecurity

Evaluates the robustness and consistency of a model's mathematical reasoning by aggregating predictions across multiple inference runs per problem. It measures whether the most frequent prediction among k samples matches the ground truth. Use when the user has predictions and gold and needs to compute Majority@k.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythongo

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill majority-k --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Majority K?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Majority K
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-majority-k/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-majority-k)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: majority-k
description: Evaluates the robustness and consistency of a model's mathematical reasoning by aggregating predictions across multiple inference runs per problem. It measures whether the most frequent prediction among k samples matches the ground truth. Use when the user has predictions and gold and needs to compute Majority@k.
metadata:
  skill_kind: metric
  source_arxiv: 2506.15710
  bibtex_key: ouyang2025rast
  confidence: high
---

# majority-k

> RAST: Reasoning Activation in LLMs via Small-model Transfer — Ouyang et al. (2025) (arXiv:2506.15710, 2025)

## What this evaluates

Evaluates the robustness and consistency of a model's mathematical reasoning by aggregating predictions across multiple inference runs per problem. It measures whether the most frequent prediction among k samples matches the ground truth.

## Datasets

- **MATH500** — total ?; splits: test (-1)
- **GSM8K** — total ?; splits: test (-1)
- **AIME 2024** — total ?; splits: test (-1)
- **AMC 2023** — total ?; splits: test (-1)
- **Minerva** — total ?; splits: test (-1)
- **Olympiad Bench** — total ?; splits: test (-1)

## Metrics

- `Majority@k` **(primary)** — range: [0, 1]
  - Accuracy based on the majority prediction among k inference runs per problem. Formula: (1/N) * sum_{i=1}^N I(majority(y_hat_{i,1}...y_hat_{i,k}) == y_i).

## Input / output format

**Input**: Mathematical problem statement.

**Output**: A predicted answer string per inference run.

## Scoring recipe

```python
def compute_majority_k(predictions_list, k, ground_truths):
    correct = 0
    for preds, gt in zip(predictions_list, ground_truths):
        majority_pred = max(set(preds), key=preds.count)
        if majority_pred == gt:
            correct += 1
    return correct / len(ground_truths)
```

## Common pitfalls

- Requires generating k independent samples per problem, which significantly increases inference cost.
- Tie-breaking in the majority function is not specified and can arbitrarily affect results when k is small.
- Accuracy is typically exact-match on the final answer, not step-level or format-tolerant.

## Evidence (verbatim from paper)

> Definition of Majority@k: This metric evaluates accuracy based on the majority prediction among multiple inference runs per problem. Formally, Majority@k = 1/N \sum_{i=1}^{N}\mathbb{I}(majority(\hat{y}_{i,1},\dots,\hat{y}_{i,k}) = y_i), where the majority function returns the prediction most frequently appearing among the k inference runs for the i-th problem.

## Citation

```bibtex
@misc{ouyang2025rast,
  title={RAST: Reasoning Activation in LLMs via Small-model Transfer},
  author={Ouyang et al. (2025)},
  year={2025},
  note={arXiv:2506.15710}
}
```

- arXiv: 2506.15710

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.