File size: 3,146 Bytes
035de95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03441ea
cf2d461
035de95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf2d461
 
 
 
 
03441ea
 
 
 
 
 
 
cf2d461
 
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
---
license: other
language:
- en
pretty_name: Topic Shift 10k
size_categories:
- 1K<n<10K
task_categories:
- token-classification
- text-classification
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train.jsonl
  - split: validation
    path: data/validation.jsonl
  - split: test
    path: data/test.jsonl
---

# Topic Shift 10k

📄 [Paper](https://arxiv.org/abs/2611.12935) · 📝 [Blog post](https://www.mercity.ai/research/online-topic-guardrails-with-saes/) · 💻 [Code](https://github.com/Mercity-AI/SAE-Guardrails) · 🤗 [Collection](https://huggingface.co/collections/Mercity/online-guardrails-using-sparse-autoencoders-6ac602940468c62fefb2b9e8)

10,000 synthetic single-turn conversations for per-token topic detection. Each record is a short user prompt and an assistant response of about 600 words that covers one to four business topics in a fixed order. The response moves from one topic to the next in ordinary prose, with no heading to mark the change.

Every topic span in the prompt and the response is wrapped in an inline tag, for example `<Financial>…</Financial>`. Stripping the tags and projecting them onto tokens gives a per-token topic label.

## Topics

Enterprise documents, General news & content, Customer service, Legal, Financial, HR & people operations, Healthcare.

| | |
|---|---|
| Records | 10,000 |
| Train / validation / test | 7,000 / 1,500 / 1,500 |
| Records with 1 / 2 / 3 / 4 topics | 2,067 / 2,128 / 3,092 / 2,713 |

The splits are the canonical record-level 70/15/15 split (`numpy.random.RandomState(42)`) used for every detector trained on this data.

## Fields

- `id`: record id from the generation run.
- `row`: position of the record in the original 10,000-record file.
- `prompt`, `response`: tagged text.
- `topics`: the record's topics, in order.
- `num_topics`: length of `topics`.
- `meta_prompt`: the scenario the generator was given.
- `taxonomy_mix`: the sampled taxonomy nodes that fixed the topics and their order.
- `strategy_id`: the sampling strategy.
- `generator_model`: the model that wrote the record.
- `critic_verdicts`: the critic model's accept decisions.
- `created_at`: generation timestamp.

## How it was made

The records were generated with [Simula](https://www.mercity.ai/research/building-simula-our-synthetic-data-generation-library/), Mercity's synthetic data library. A hand-authored taxonomy fixes each record's topics and their order before anything is written. That keeps the topic sequence as the one controlled variable, while the scenario and wording are left to the generator. GPT-5.6 Luna wrote and critiqued every record. `taxonomy.json` and `strategies.json` are the taxonomy and sampling strategies used for the run.

## Citation

```bibtex
@misc{mallagundla2026topicscope,
  title         = {Train on prefill, monitor at decode: Using sparse autoencoders for topic monitoring},
  author        = {Mallagundla, Rishikesh and Patel, Pranav},
  year          = {2026},
  eprint        = {2611.12935},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {https://arxiv.org/abs/2611.12935}
}
```