Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6fee881
feat: set discriminator weights on current KOTH kings
dylanuys Sep 2, 2026
872f502
fix: honor NETUID and EPOCH_LENGTH in validator pm2 config
dylanuys Sep 2, 2026
60e38a8
fix: exit gascli d push after a successful upload
dylanuys Sep 2, 2026
2ee272f
fix: fail closed when burn UID is unavailable
dylanuys Sep 2, 2026
aeb0448
fix: report chain registration failure
dylanuys Sep 2, 2026
5318074
fix: validate KOTH weight split
dylanuys Sep 2, 2026
b3c98e9
feat: split KOTH lane weights 85/10/5 across last three kings
dylanuys Sep 3, 2026
0d73afc
chore: bump to 5.0.0 for the KOTH weight contract
dylanuys Sep 3, 2026
1de92f9
Merge pull request #433 from BitMind-AI/feat/koth-phase-a
kenobijon Sep 4, 2026
6d0754b
fix: treat discriminator push as successful after upload
dylanuys Sep 4, 2026
01d80aa
docs: one counted submission per hotkey per modality
dylanuys Sep 4, 2026
9555def
docs: collapse validator guide and fix KOTH emissions wording
dylanuys Sep 4, 2026
0c96e8f
docs: one counted submission per hotkey, any modality
dylanuys Sep 4, 2026
6cf1f2e
Merge pull request #437 from BitMind-AI/feat/testnet-followups
kenobijon Sep 4, 2026
544fc59
docs: one counted submission per hotkey, any modality
dylanuys Sep 4, 2026
dcff2b2
Merge branch 'testnet' into feat/testnet-followups
kenobijon Sep 4, 2026
01a99b1
docs: one model per hotkey; validators fetch /kings
dylanuys Sep 4, 2026
00b6b25
Merge pull request #438 from BitMind-AI/feat/testnet-followups
kenobijon Sep 5, 2026
405cdf6
Gate KoTH discriminator payouts on explicit emissions activation (#440)
dylanuys Sep 6, 2026
a14ffd8
Merge branch 'main' into testnet
dylanuys Sep 6, 2026
8098fa1
Remove unused skip_chain parameter from upload helper
dylanuys Sep 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ GAS runs two parallel competition tracks on Bittensor Subnet 34:

**Key facts:**
- **Three modalities**: Image, video, and audio detection are all scored independently
- **Cloud-evaluated**: Discriminator models are benchmarked on cloud infrastructure -- no GPU hosting required
- **Model format**: Safetensors only (ONNX submissions are not accepted)
- **Datasets refresh weekly** with fresh GAS-Station data alongside static benchmarks
- **One model per modality per hotkey** for discriminative miners
- **One model per hotkey** for discriminative miners

See [Incentive Mechanism](docs/Incentive.md) for full scoring details.

Expand Down Expand Up @@ -71,17 +70,10 @@ gascli validator start
# Miners: Start or restart generative miner
gascli generator start

# Miners: Push discriminator models (all three modalities at once)
gascli d push \
--image-model image_detector.zip \
--video-model video_detector.zip \
--audio-model audio_detector.zip \
# Miners: Push one discriminator model per hotkey
gascli d push --image-model image_detector.zip \
--wallet-name default --wallet-hotkey default

# Or push one model at a time
gascli d push --image-model image_detector.zip
gascli d push --video-model video_detector.zip
gascli d push --audio-model audio_detector.zip
# Video or audio: use --video-model or --audio-model on a different hotkey

# Miners: Check your benchmark performance (epistula-authenticated)
gascli d perf --wallet-name default --wallet-hotkey default
Expand All @@ -104,12 +96,10 @@ pm2 start validator.config.js
# Miners: Start or restart generative miner
pm2 start gen_miner.config.js

# Miners: Push discriminator models
# Miners: Push one discriminator model per hotkey
source .venv/bin/activate
python neurons/discriminator/push_model.py \
--image-model image_detector.zip \
--video-model video_detector.zip \
--audio-model audio_detector.zip \
--wallet-name default --wallet-hotkey default
```
For detailed installation and usage instructions, see [Installation Guide](docs/Installation.md).
Expand All @@ -120,7 +110,7 @@ For detailed installation and usage instructions, see [Installation Guide](docs/
> This documentation assumes basic familiarity with [Bittensor concepts](https://docs.bittensor.com/learn/bittensor-building-blocks).

#### Discriminative Miners [[docs](docs/Discriminative-Mining.md)]
Discriminative miners submit detection models for evaluation against a wide variety of real and synthetic media across **image, video, and audio** modalities. Models are evaluated on cloud infrastructure and rewarded based on their accuracy and calibration. This significantly reduces the capital required to mine compared to previous versions that required GPU hosting, and allows the subnet to more reliably identify unique models and reward novel contributions proportionally to their accuracy.
Discriminative miners submit detection models for evaluation against a wide variety of real and synthetic media across **image, video, and audio** modalities. Models are rewarded based on their accuracy and calibration. This significantly reduces the capital required to mine compared to previous versions that required GPU hosting, and allows the subnet to more reliably identify unique models and reward novel contributions proportionally to their accuracy.

#### Generative Miners [[docs](docs/Generative-Mining.md)]

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.9.11
5.0.0
43 changes: 23 additions & 20 deletions docs/Discriminative-Mining.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Follow the [Installation Guide](Installation.md) to set up your environment befo
- Miners submit media-provenance classifiers across three modalities: **image**, **video**, and **audio**.
- Image models classify `[real, synthetic, semisynthetic]`; video models classify `[real, synthetic, semisynthetic, rendered]`; audio remains `[real, synthetic]`.
- The visual taxonomy is experimental. Semisynthetic media retains materially captured visual content alongside spatially localized generated or replaced content. Fully synthesized output remains synthetic even when captured media conditions generation.
- Models are evaluated on cloud infrastructure -- miners do not need to host hardware for inference.
- Miners do not need to host hardware for inference.

Class order is part of the submission contract:

Expand All @@ -31,34 +31,31 @@ Discriminative miners must submit models in **safetensors format**:

**📖 [Safetensors Model Specification](https://github.com/bitmind-ai/gasbench/blob/main/docs/Safetensors.md)** - Requirements for model submission

You can submit models for any combination of modalities:
Each hotkey can submit **one** model, in one of these modalities:
- `image_detector.zip` - Image classification model
- `video_detector.zip` - Video classification model
- `video_detector.zip` - Video classification model
- `audio_detector.zip` - Audio classification model

A second modality needs a second registered hotkey.

## Pushing Your Model

First, activate the virtual environment:
```bash
source .venv/bin/activate
```

Push your models to the network using the `push` command:
Push one model per hotkey using the `push` command:

```bash
# Upload all three models
gascli d push \
--image-model image_detector.zip \
--video-model video_detector.zip \
--audio-model audio_detector.zip \
--wallet-name your_wallet_name \
--wallet-hotkey your_hotkey_name

# Or upload individual models
gascli d push \
--image-model image_detector.zip \
--wallet-name your_wallet_name \
--wallet-hotkey your_hotkey_name
# Video or audio on a different hotkey:
# gascli d push --video-model video_detector.zip --wallet-hotkey video_key
# gascli d push --audio-model audio_detector.zip --wallet-hotkey audio_key
```

### Command Options
Expand All @@ -68,8 +65,6 @@ The `push` command accepts several parameters:
```bash
gascli d push \
--image-model image_detector.zip \
--video-model video_detector.zip \
--audio-model audio_detector.zip \
--wallet-name your_wallet_name \
--wallet-hotkey your_hotkey_name \
--netuid 34 \
Expand All @@ -87,7 +82,16 @@ gascli d push \
- `--chain-endpoint`: Subtensor network endpoint (default: "wss://entrypoint-finney.opentensor.ai:443/")
- `--retry-delay`: Retry delay in seconds (default: 60)

At least one model (image, video, or audio) must be provided.
Provide exactly one of `--image-model`, `--video-model`, or `--audio-model`. A second model needs a different hotkey.

## Submission Limits

Each registered hotkey gets **one counted submission** (image, video, or audio — not one of each).

- Exam failures and incomplete uploads do not consume the slot. You can retry on the same key until a model is successfully uploaded and not later marked exam-failed.
- A confirmed or superseded model **does** consume the slot for the life of that hotkey, for every modality.
- A new benchmark version does **not** refill the slot.
- To submit another model, register a new miner hotkey.

---

Expand All @@ -104,7 +108,7 @@ The normalized terms apply exponents $1.2$ to MCC performance and $1.8$ to Brier
### Model Requirements

- **Format**: Safetensors only (ONNX is no longer accepted)
- **Three model per modality per hotkey**: You can submit up to three image, three video, and three audio model per registered hotkey
- **Submission cap**: one counted model per hotkey (see [Submission Limits](#submission-limits))

### Sandbox and Import Restrictions

Expand All @@ -114,7 +118,6 @@ For the complete list of allowed and blocked imports, see the [Safetensors Model

### Evaluation

- Models are benchmarked on cloud infrastructure (not miner hardware)
- Evaluation runs against a diverse dataset of image samples, video samples, and audio samples per benchmark cycle
- Datasets are refreshed weekly with new GAS-Station data alongside static benchmark datasets

Expand Down Expand Up @@ -149,7 +152,7 @@ gascli d push --image-model my_detector.zip
### What Happens During Push

1. **Model Validation**: The system checks that the zip files are present and valid
2. **Model Upload**: Your model zip files are uploaded to the cloud inference system
2. **Model Upload**: Your model zip files are uploaded for evaluation
3. **Blockchain Registration**: Model metadata is registered on the Bittensor blockchain
4. **Verification**: The system verifies the registration was successful

Expand All @@ -166,7 +169,7 @@ Before your model is ever scored on the network, it must pass an **entrance exam
- Internally this runs `gasbench run --small`, which downloads one archive per dataset and evaluates roughly 100 samples per dataset
- Your model must achieve **≥ 80% accuracy** averaged across all submitted modalities to pass
- The exam has a **maximum wall-clock timeout of 1 hour 25 minutes** (5,100 seconds); models that exceed this are treated as failed
- The exam runs in an **isolated cloud sandbox** — your code has no network access and cannot interact with the host environment
- The exam runs in an **isolated sandbox** — your code has no network access and cannot interact with the host environment
- Submissions are statically analyzed and executed in an isolated sandbox; prohibited code or imports result in rejection

**Model status during the exam:**
Expand Down Expand Up @@ -194,7 +197,7 @@ Models that pass the entrance exam are benchmarked against the **complete datase
- **Private holdout datasets** — curated datasets not visible to miners, used to prevent overfitting to the public benchmark set
- Refreshed weekly with new data from the GAS-Station pipeline

The full benchmark has a **maximum wall-clock timeout of 5 hours** (18,000 seconds) per modality. The benchmark score from this stage determines your **TAO emissions** on Subnet 34. The active round configuration selects provenance weighting, multiclass scoring, and augmentation robustness parameters; see [Incentive Mechanism](Incentive.md).
The full benchmark has a **maximum wall-clock timeout of 5 hours** (18,000 seconds) per modality. This `sn34_score` is what the King of the Hill competition uses: a high enough score can take or keep a lane, and emissions then follow the 85/10/5 split on the current king plus the previous two. The active round configuration selects provenance weighting, multiclass scoring, and augmentation robustness parameters; see [Incentive Mechanism](Incentive.md).

You can simulate a full benchmark run locally (without holdouts) to get a sense of your model's performance:

Expand Down
24 changes: 13 additions & 11 deletions docs/Incentive.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Incentive Mechanism

## Benchmark Runs
Submitted discriminator miners are evaluated against a subset of the data sources listed below. Models are evaluated on cloud infrastructure -- miners do not need to host hardware for inference. A portion of the evaluation data comes from generative miners, who are rewarded based on their ability to submit data that both pass validator sanity checks (prompt alignment, etc.) and fool discriminators in benchmark runs.
Submitted discriminator miners are evaluated against a subset of the data sources listed below. Miners do not need to host hardware for inference. A portion of the evaluation data comes from generative miners, who are rewarded based on their ability to submit data that both pass validator sanity checks (prompt alignment, etc.) and fool discriminators in benchmark runs.

Each modality (image, video, audio) is scored independently using the `sn34_score` metric, which combines classification performance (MCC) with probability calibration (Brier score). The active round selects binary or multiclass scoring per modality.

Expand Down Expand Up @@ -138,19 +138,21 @@ The benchmark records `base_sn34_score`, `aug_sn34_score`, and robustness diagno

The normative implementation details and complete metric field glossary live in GASBench's [Classification Taxonomy and Scoring](https://github.com/BitMind-AI/gasbench/blob/main/docs/Classification-and-Scoring.md).

### Competition Rounds
### King of the Hill

The discriminator competition is organized into **rounds**. Each round introduces new benchmark datasets and evaluates all submitted models. Winners are determined **per modality** (image, video, audio) independently.
Discriminator emission is King of the Hill. Each modality has one reigning model. Validators set that lane's weight on registered hotkeys every tempo — not on an escrow wallet. Each hotkey may land **one counted submission** for the life of that registration (any modality; exam failures do not count; a new model needs a new key).

#### How Rounds Work
Current split:

1. **New round begins**: Benchmark datasets are updated (new GAS-Station data, potentially new static datasets). All modalities share the same benchmark version number.
2. **Models are benchmarked**: All submitted discriminator models are evaluated against the current round's datasets and scored using `sn34_score`.
3. **Winner determined per modality**: The highest-scoring model for each modality wins that round.
4. **Alpha reward**: The round winner for each modality receives an alpha reward.
- Image lane: 40%
- Video lane: 40%
- Audio lane: 4%
- Generators: 16%

#### Winner-Take-All Per Round
Each discriminator lane is split **85 / 10 / 5** across the current king and the previous two **distinct** crowned hotkeys. If a lane has no previous king, that residual rolls up to the current king (a first king receives the full lane). An unresolvable current king burns its share; an unresolvable previous king rolls to the current king when that UID is registered.

Each round is winner-take-all -- only the top-scoring discriminator for each modality receives the alpha reward for that round. This incentivizes miners to continuously improve their models and push the state of the art in AI-generated content detection.
A challenger takes the crown when it posts an `sn34_score` at least **0.01** higher than the sitting king on the **same** `CURRENT_BENCHMARK_VERSION`. Empty-lane seeding and failed-defense replacement do not use the margin. The same `file_hash` can refresh its stored score without resetting the reign.

Rounds progress as benchmark versions are incremented, ensuring that models are always evaluated against fresh, evolving data.
When a new benchmark version is released the current king keeps receiving weights. The throne is marked `defending` until that exact model completes a full re-eval on the new version. Dethroning is frozen during defense. After a successful defense, deferred challengers still need the 0.01 margin. If the re-eval fails or times out (48 hours), the crown goes to the best successful new-version model, or that lane's share burns until one exists.

Alpha accrues on the chain hotkeys while they hold those residual shares. There is no end-of-round escrow transfer and no pot.
2 changes: 1 addition & 1 deletion docs/Mining.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
GAS supports two types of miners that work together in an adversarial loop:

## [Discriminative Mining](Discriminative-Mining.md) 📖
Miners submit classifiers that detect AI-generated content across **image, video, and audio** modalities. Models are evaluated on cloud infrastructure against diverse benchmark datasets and scored using the `sn34_score` metric (accuracy + calibration).
Miners submit classifiers that detect AI-generated content across **image, video, and audio** modalities. Models are evaluated against diverse benchmark datasets and scored using the `sn34_score` metric (accuracy + calibration). Each hotkey gets one counted submission (any modality); see [Discriminative Mining](Discriminative-Mining.md#submission-limits).

## [Generative Mining](Generative-Mining.md) 🎨
Miners create synthetic media (images and videos) that challenges the discriminators. They generate increasingly realistic content to test and improve detection capabilities, and are rewarded based on validation pass rate and adversarial performance.
Expand Down
50 changes: 0 additions & 50 deletions docs/Validating-New.md

This file was deleted.

Loading
Loading