File size: 4,306 Bytes
e6cdfd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
license: cc-by-nc-sa-4.0
pretty_name: "READ-Bench — Leaderboard Submissions"
tags:
  - leaderboard
  - time-series
  - retrieval
  - anomaly-detection
  - benchmark
---

# READ-Bench — Leaderboard Submissions

This repository collects **community submissions** to the
[READ-Bench](https://huggingface.co/datasets/c3aiia3c/read-bench) leaderboard for
historical-instance retrieval in time-series diagnosis
([arXiv:2609.32123](https://arxiv.org/abs/2609.32123)).

- **Data** lives in [`c3aiia3c/read-bench`](https://huggingface.co/datasets/c3aiia3c/read-bench).
- **Submissions** (code + results) live here, one folder per method.
- **The live board** is the
  [READ-Bench Leaderboard Space](https://huggingface.co/spaces/c3aiia3c/read-bench-leaderboard),
  which renders every accepted submission.

Submissions are **reproducible by design**: you include runnable code, and the
official harness (`eval_submission.py`, in this repo) runs *your* method against
the *hidden* relevance labels to produce the score — so numbers can't be faked
and anyone can rerun them.

## What a submission contains

Add one folder, `submissions/<your-slug>/`, with:

| file | required | what |
|---|---|---|
| `method.py` | ✅ | exposes `rank(query, corpus) -> list[int]` (see contract below) |
| `metadata.yaml` | ✅ | method name, family, supervision, authors, links |
| `requirements.txt` | ✅ | any deps your `method.py` imports |
| `results.json` | ✅ | produced by the harness (do not hand-edit) |

Copy [`example_submission/`](example_submission) as your starting point — it's a
working Euclidean-distance baseline.

## The method contract

```python
def rank(query: dict, corpus: list[dict]) -> list[int]:
    """Return corpus INDICES ordered most- to least-relevant to `query`.

    Each entry has: ts_values ([T][C] floats), channels, label, class_label,
    rca_target, rca_affected, dataset, entry_id, native_split, extras.

    Rules:
      * NEVER read query["class_label"] — it is the hidden target (and is
        masked out before your function is called).
      * You may read corpus class_labels ONLY if you declare your method
        `supervision: supervised` or `neighbour-labels` in metadata.yaml.
    """
```

## How to submit (all on Hugging Face — no GitHub needed)

```bash
# 1. clone this repo (git-backed, like GitHub)
git clone https://huggingface.co/datasets/c3aiia3c/read-bench-results
cd read-bench-results

# 2. create your submission from the template
cp -r example_submission submissions/my-method
# ... edit submissions/my-method/method.py + metadata.yaml + requirements.txt

# 3. validate structure, then score with the official harness
pip install -r submissions/my-method/requirements.txt
python validate_submission.py --submission submissions/my-method --run
#   -> writes submissions/my-method/results.json

# 4. open a Pull Request on this repo (Community tab) with your folder.
```

To open the PR: push your branch, or use the **"Community" → "New pull request"**
button on this repo's page and upload your `submissions/<slug>/` folder. A
maintainer re-runs the harness to confirm your `results.json`, then merges — and
the [Leaderboard Space](https://huggingface.co/spaces/c3aiia3c/read-bench-leaderboard)
picks it up automatically.

## Scoring

- **Primary metric:** NDCG@10, macro-averaged over the 12 datasets, at pollution
  levels ρ = 0 / 10 / 20% (fraction of the corpus that is Normal).
- Also reported: P@{1,3,5,10,20}, HR@{...}, NDCG@{1,3,5,20}, macro-F1.
- Relevance is binary & multi-target: a corpus item is relevant to a query iff
  they share the same non-normal `class_label`.
- The split is reconstructed deterministically (seed 42): corpus = train-split
  anomalies + Normals to the pollution fraction; queries = test-split anomalies.

See [`eval_submission.py`](eval_submission.py) for the exact, self-contained
implementation (only `datasets` + `numpy`).

## Citation

```bibtex
@article{readbench2026,
  title  = {READ-Bench: Benchmarking Historical Instance Retrieval for Time-Series Diagnosis},
  author = {Pastrana, Gerardo and Li, Haojun and Mehta, Dhruv and Vyas, Anoushka and
            Khoshfetrat Pakazad, Sina and Ohlsson, Henrik and Paparrizos, John},
  journal = {arXiv preprint arXiv:2609.32123},
  year    = {2026}
}
```