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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EventX: A Multimodal Benchmark Linking Social Media Posts to Prediction Market Dynamics
|
| 2 |
+
|
| 3 |
+
**Dataset: [https://huggingface.co/datasets/mlsys-io/EventXBench](https://huggingface.co/datasets/mlsys-io/EventXBench)**
|
| 4 |
+
|
| 5 |
+
[](https://huggingface.co/datasets/mlsys-io/EventXBench)
|
| 6 |
+
[](https://doi.org/PLACEHOLDER)
|
| 7 |
+
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
| 8 |
+
|
| 9 |
+
**EventX** is a multimodal benchmark connecting 9M Twitter/X posts from 1,152 KOL accounts to 11,952 Polymarket prediction markets (2021--2026). It defines seven tasks across two tiers: **resolution** (human-annotated ground truth) and **forecast** (deterministic labels from post-publication tick data).
|
| 10 |
+
|
| 11 |
+
## Quick Start
|
| 12 |
+
|
| 13 |
+
```bash
|
| 14 |
+
pip install -r requirements.txt
|
| 15 |
+
|
| 16 |
+
from eventxbench import load_task
|
| 17 |
+
train, test = load_task("t1") # Returns pandas DataFrames
|
| 18 |
+
|
| 19 |
+
# Run a baseline
|
| 20 |
+
python baselines/t1/llm_baseline.py --provider openai --model gpt-4o --shots 0
|
| 21 |
+
|
| 22 |
+
# Evaluate predictions
|
| 23 |
+
python evaluation/evaluate.py --task t1 --predictions results/t1_predictions.jsonl
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
## Benchmark Overview
|
| 27 |
+
|
| 28 |
+
| Task | Name | Tier | Output | Instances | Primary Metrics |
|
| 29 |
+
|------|------|------|--------|-----------|-----------------|
|
| 30 |
+
| T1 | Market Volume Prediction | Forecast | 3-class (`high`/`moderate`/`low`) | 305 | Macro-F1, `high`-class P@K |
|
| 31 |
+
| T2 | Post-to-Market Linking | Resolution | Market ID or `none` | 815 | Accuracy@1, MRR |
|
| 32 |
+
| T3 | Evidence Grading | Resolution | Ordinal 0--5 | 342,552 | QWK (kappa), macro-F1 |
|
| 33 |
+
| T4 | Market Movement Prediction | Forecast | Direction x Magnitude | 4,803 | Dir-Acc, Mag-F1, Spearman rho |
|
| 34 |
+
| T5 | Volume & Price Impact | Forecast | Continuous | 407 (268 clean) | Spearman rho (price_impact, volume_multiplier) |
|
| 35 |
+
| T6 | Cross-Market Propagation | Forecast | 3-class | 4,006 | Macro-F1, MAE (onset lag) |
|
| 36 |
+
| T7 | Impact Persistence (Decay) | Forecast | 3-class (`transient`/`sustained`/`reversal`) | 407 (268 clean) | Macro-F1 |
|
| 37 |
+
|
| 38 |
+
## Tasks
|
| 39 |
+
|
| 40 |
+
### T1: Conditional Market Volume Prediction
|
| 41 |
+
Predict the final trading-volume percentile of a subsequently created market, given pre-market social signals.
|
| 42 |
+
|
| 43 |
+
- **Labels**: `high` (>80th pctl), `moderate` (40th--80th), `low` (<40th)
|
| 44 |
+
- **Input**: Tweet cluster features, event metadata, temporal features
|
| 45 |
+
- **Metrics**: Macro-F1, `high`-class precision@K
|
| 46 |
+
|
| 47 |
+
### T2: Post-to-Market Linking
|
| 48 |
+
Given a tweet and a candidate set recalled by BGE-large-en-v1.5 / FAISS dense retrieval, identify which market the post addresses (or `none`).
|
| 49 |
+
|
| 50 |
+
- **Input**: Tweet text + candidate market questions
|
| 51 |
+
- **Metrics**: Accuracy@1, MRR, `none`-class F1
|
| 52 |
+
|
| 53 |
+
### T3: Evidence Grading and Resolution Potential
|
| 54 |
+
Assign an ordinal evidence grade (0--5) to each post-market pair.
|
| 55 |
+
|
| 56 |
+
- **Grade scale**: 0 (`noise`), 1 (`commentary_reaction`), 2 (`speculation_rumor`), 3 (`indirect_report`), 4 (`strong_direct`), 5 (`resolving`)
|
| 57 |
+
- **Metrics**: Quadratic-weighted kappa, `resolving`-class precision, macro-F1
|
| 58 |
+
|
| 59 |
+
### T4: Market Movement Prediction
|
| 60 |
+
Predict direction and magnitude of the YES-price change at 2-hour horizon after a tweet.
|
| 61 |
+
|
| 62 |
+
- **Direction**: `up` (delta > 0.02), `down` (delta < -0.02), `flat` (otherwise)
|
| 63 |
+
- **Magnitude**: `large` (>8%), `medium` (2--8%), `small` (<=2%)
|
| 64 |
+
- **Metrics**: Direction accuracy, Magnitude macro-F1, Spearman rho on continuous delta curve
|
| 65 |
+
- **Secondary horizons**: 30 min, 6 h
|
| 66 |
+
|
| 67 |
+
### T5: Volume and Price Impact
|
| 68 |
+
Predict two continuous targets per post: (i) `price_impact` (max absolute deviation from p0), (ii) `volume_multiplier` (total volume / 24h baseline).
|
| 69 |
+
|
| 70 |
+
- **Targets**: `price_impact` (continuous), `volume_multiplier` (continuous)
|
| 71 |
+
- **Metrics**: Spearman rho for each target
|
| 72 |
+
- **Note**: T5 and T7 share the same underlying data (`task5+7/` in the codebase). T5 evaluates the continuous predictions; T7 evaluates the decay classification.
|
| 73 |
+
|
| 74 |
+
### T7: Impact Persistence (Decay)
|
| 75 |
+
Classify whether a tweet's initial market impact is transient, sustained, or reverses over time.
|
| 76 |
+
|
| 77 |
+
- **Labels**: `transient` (|delta_2h| < 30% of |delta_15m|), `sustained` (same sign, larger), `reversal` (sign flips at 2h)
|
| 78 |
+
- **Metrics**: Macro-F1
|
| 79 |
+
- **Note**: Uses the same data as T5 but evaluates the `decay_class` field. In the codebase, uses `task5+7/` directories and `t7_` prefixes.
|
| 80 |
+
|
| 81 |
+
### T6: Cross-Market Propagation
|
| 82 |
+
Predict whether a tweet's market impact propagates to sibling markets within 2 hours. A sibling is deemed "moved" if |delta_p| > 1.5 sigma (rolling 24h stdev).
|
| 83 |
+
|
| 84 |
+
- **Labels**: `no_effect`, `primary_mover` (primary market moves first, sibling follows), `propagated_signal` (sibling moves before or instead of primary)
|
| 85 |
+
- **Metrics**: Macro-F1, MAE on onset lag (minutes)
|
| 86 |
+
|
| 87 |
+
## Data
|
| 88 |
+
|
| 89 |
+
### Hugging Face Dataset
|
| 90 |
+
|
| 91 |
+
All data is hosted on Hugging Face:
|
| 92 |
+
|
| 93 |
+
```python
|
| 94 |
+
from datasets import load_dataset
|
| 95 |
+
|
| 96 |
+
ds = load_dataset("mlsys-io/EventXBench", "t1")
|
| 97 |
+
|
| 98 |
+
# Or use our convenience loader
|
| 99 |
+
from eventxbench import load_task
|
| 100 |
+
train, test = load_task("t1")
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
See [`data/README.md`](data/README.md) for the full dataset card.
|
| 104 |
+
|
| 105 |
+
### Data Files
|
| 106 |
+
|
| 107 |
+
| File | Description | Size |
|
| 108 |
+
|------|-------------|------|
|
| 109 |
+
| `posts_no_text.jsonl` | Tweet IDs and metadata (text stripped for privacy) | ~9M rows |
|
| 110 |
+
| `market_fundamental.json` | Market metadata (question, category, resolution) | 11,952 markets |
|
| 111 |
+
| `market_ohlcv.json` | Price/volume time series (OHLCV) | 1.8 GB |
|
| 112 |
+
| `t1_labels.jsonl` | T1 ground truth with train/test splits | 305 |
|
| 113 |
+
| `t2_groundtruth.jsonl` | T2 post-market linking pairs | 815 |
|
| 114 |
+
| `t3_graded.json` | T3 evidence grades (0--5) | 342,552 |
|
| 115 |
+
| `t4_labels.jsonl` | T4 direction x magnitude labels | 4,803 |
|
| 116 |
+
| `t5_labels.jsonl` | T5 price impact + volume multiplier | 407 |
|
| 117 |
+
| `t6_labels.jsonl` | T6 cross-market propagation labels | 4,006 |
|
| 118 |
+
| `t7_labels.jsonl` | T7 decay class labels (same data as T5) | 407 |
|
| 119 |
+
|
| 120 |
+
### Privacy
|
| 121 |
+
|
| 122 |
+
Tweet text is **not** included in the public release to comply with Twitter/X Terms of Service. The `posts_no_text.jsonl` file contains tweet IDs for rehydration via the Twitter API. Market data from Polymarket is fully included.
|
| 123 |
+
|
| 124 |
+
## Baselines
|
| 125 |
+
|
| 126 |
+
We provide three baseline families:
|
| 127 |
+
|
| 128 |
+
### LLM Baselines
|
| 129 |
+
Zero-shot and few-shot prompting:
|
| 130 |
+
- GPT-4o (OpenAI)
|
| 131 |
+
- Sonnet 4.5 (Anthropic)
|
| 132 |
+
- Grok 4.1 (xAI)
|
| 133 |
+
- Qwen 3.5 (local via vLLM, 4B and 27B)
|
| 134 |
+
|
| 135 |
+
```bash
|
| 136 |
+
# T1 zero-shot with GPT-4o
|
| 137 |
+
python baselines/t1/llm_baseline.py --provider openai --model gpt-4o --shots 0
|
| 138 |
+
|
| 139 |
+
# T4 three-shot with Claude
|
| 140 |
+
python baselines/t4/llm_baseline.py --provider anthropic --model claude-sonnet-4-5-20250514 --shots 3
|
| 141 |
+
|
| 142 |
+
# T2 contextual validation with an OpenAI-compatible Lumid model
|
| 143 |
+
python baselines/t2/llm_baseline.py \
|
| 144 |
+
--provider openai \
|
| 145 |
+
--base-url https://lum.id/llm \
|
| 146 |
+
--api-key-env LUMID_API_KEY \
|
| 147 |
+
--model nvidia/Gemma-4-26B-A4B-NVFP4 \
|
| 148 |
+
--disable-thinking \
|
| 149 |
+
--split val \
|
| 150 |
+
--shots 0 \
|
| 151 |
+
--resume \
|
| 152 |
+
--output results/t2_gemma.val.0shot.jsonl
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
**Required env vars**: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `XAI_API_KEY`, `HF_TOKEN` (for Qwen)
|
| 156 |
+
|
| 157 |
+
The T2 runner defaults to the frozen 2,500-row contextual-gold package, treats
|
| 158 |
+
`NONE` as an explicit option, and writes Accuracy@1, MRR, NONE-class F1,
|
| 159 |
+
bootstrap intervals, token usage, latency, input hashes, and prompt provenance.
|
| 160 |
+
Run validation first. A frozen test run requires `--split test --allow-test`.
|
| 161 |
+
Models recorded as Task 2 train-silver judges are automatically marked
|
| 162 |
+
`diagnostic_excluded_silver_judge` and must not be reported as independent
|
| 163 |
+
paper baselines.
|
| 164 |
+
|
| 165 |
+
Lumid also accepts the Anthropic message format. Use `--provider anthropic`
|
| 166 |
+
with the same gateway root and PAT environment variable. The provider flag
|
| 167 |
+
describes the request format; the actual baseline model remains the model ID
|
| 168 |
+
passed with `--model` and returned by Lumid's `/llm/v1/models` endpoint.
|
| 169 |
+
|
| 170 |
+
### ML Baselines
|
| 171 |
+
LightGBM classifiers with Bayesian hyperparameter tuning (Optuna):
|
| 172 |
+
|
| 173 |
+
```bash
|
| 174 |
+
python baselines/t1/lightgbm_baseline.py
|
| 175 |
+
python baselines/t4/lightgbm_baseline.py
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
### Heuristic & Basic Baselines
|
| 179 |
+
Majority class, random walk, graph heuristics, BM25 retrieval:
|
| 180 |
+
|
| 181 |
+
```bash
|
| 182 |
+
python baselines/t1/basic_baseline.py
|
| 183 |
+
python baselines/t6/basic_baseline.py
|
| 184 |
+
```
|
| 185 |
+
|
| 186 |
+
## Evaluation
|
| 187 |
+
|
| 188 |
+
```bash
|
| 189 |
+
python evaluation/evaluate.py --task t1 --predictions results/t1_preds.jsonl
|
| 190 |
+
python evaluation/evaluate.py --task t4 --predictions results/t4_preds.jsonl
|
| 191 |
+
python evaluation/evaluate.py --task all --predictions-dir results/
|
| 192 |
+
```
|
| 193 |
+
|
| 194 |
+
See [`evaluation/README.md`](evaluation/README.md) for prediction format specs.
|
| 195 |
+
|
| 196 |
+
## Repository Structure
|
| 197 |
+
|
| 198 |
+
```
|
| 199 |
+
EventXBench/
|
| 200 |
+
├── README.md
|
| 201 |
+
├── LEADERBOARD.md
|
| 202 |
+
├── requirements.txt
|
| 203 |
+
├── eventxbench/ # Data loading utilities
|
| 204 |
+
│ ├── __init__.py
|
| 205 |
+
│ └── loader.py
|
| 206 |
+
├── data/
|
| 207 |
+
│ └── README.md # Hugging Face dataset card
|
| 208 |
+
├── baselines/
|
| 209 |
+
│ ├── t1/ ... t6/ # Per-task baselines (LLM, ML, basic)
|
| 210 |
+
│ └── t7/ # Impact Persistence (Decay) baselines
|
| 211 |
+
├── evaluation/
|
| 212 |
+
│ ├── evaluate.py # Unified evaluation CLI
|
| 213 |
+
│ ├── metrics.py # Metric implementations
|
| 214 |
+
│ └── README.md
|
| 215 |
+
├── scripts/
|
| 216 |
+
│ └── upload_to_hf.py # Upload data to Hugging Face
|
| 217 |
+
└── examples/
|
| 218 |
+
└── quickstart.py
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
## Leaderboard
|
| 222 |
+
|
| 223 |
+
See [LEADERBOARD.md](LEADERBOARD.md) for current results. To submit, open a pull request.
|
| 224 |
+
|
| 225 |
+
## License
|
| 226 |
+
|
| 227 |
+
- **Code**: MIT License
|
| 228 |
+
- **Data**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
|
| 229 |
+
- Tweet text excluded; use Twitter API for rehydration
|
| 230 |
+
- Polymarket data included under fair use for research
|