--- title: PLUG Challenge emoji: 🧬 colorFrom: purple colorTo: green sdk: docker app_port: 7860 pinned: false license: apache-2.0 short_description: Leakage-free protein function prediction, eleven benchmarks --- # PLUG Challenge **P**rotein **L**eakage-free evaluation for **U**nbiased **G**enerators of function. A public leaderboard for protein-function prediction on [PLUG](https://github.com/PrismScienceOrg/plug)'s leakage-free Lo-Hi splits. Participants submit predictions for any or all of the eleven benchmarks in one bundle, with a required link describing their method; the Space validates and scores it on the spot and adds it to one of two leaderboards: - **Supervised**: trained on the Lo-Hi train/val splits, scored on the held-out, homology-disjoint test split of each benchmark. - **Unsupervised**: never fitted to these labels, scored on every row of each benchmark, unsplit. This repository **is** the Hugging Face Space ([PrismScienceOrg/PLUG-challenge](https://huggingface.co/spaces/PrismScienceOrg/PLUG-challenge)) — pushing to `main` deploys it. It is structured after [OpenADMET's blind-challenge-template](https://github.com/OpenADMET/blind-challenge-template), with the template's AWS backend (S3 + scheduled scoring Lambdas + OpenTofu + ECR) replaced by Hub dataset repos and synchronous in-Space scoring, which the challenge can do because PLUG is not blinded. See [`docs/architecture.md`](docs/architecture.md) for what changed and why. ## What participants do ```bash pip install "plug-challenge @ git+https://huggingface.co/spaces/PrismScienceOrg/PLUG-challenge" plug-challenge template ./my_submission --track supervised # one CSV per benchmark, ids pre-filled # ...fill in the prediction columns... cd my_submission && zip ../plug_submission.zip *.csv && cd .. plug-challenge validate plug_submission.zip --track supervised # the exact checks the Space runs ``` Then pick the track, add the method link and upload the zip on the Space's **Submit** tab. Scoring is immediate. ## Repository structure | Path | Contents | |------|----------| | `app.py`, `config.py`, `submission.py`, `leaderboards.py`, `models.py`, `utils.py` | The Gradio Space. `config.py` holds every piece of challenge-specific copy and the phase switch | | [`plug_challenge/`](plug_challenge/) | The scoring library: benchmark specs, metrics, validation, scoring, aggregation, Hub storage, CLI | | [`data/`](data/) | The committed per-benchmark protein lists (`/proteins.csv`) — which protein is in which Lo-Hi split | | [`scripts/`](scripts/) | `build_challenge_data.py`, which turns plug's loaders and its Lo-Hi split into the public ids and the private labels | | [`docs/`](docs/) | Setup runbook, architecture, scoring reference, submission format | | [`tests/`](tests/) | pytest suite over the whole pipeline, on synthetic data | `plug_challenge/benchmarks.py` is the single source of truth: the Space's copy, the validator, the scorer and the docs are all generated from it, so a benchmark cannot be described one way and scored another. ## The eleven benchmarks | Benchmark | Scored unit | Primary metric | |---|---|---| | Megascale ΔΔG | mutation | Spearman's ρ | | FireProt ΔΔG | mutation | Spearman's ρ | | ProteinGym DMS | variant | Spearman's ρ, per assay | | CAFA5 GO | protein | CAFA Fmax, macro over BP/MF/CC | | AlloBench sites | residue | AUROC | | PASSerRank sites | residue | AUROC | | Human PPI | protein pair | AUROC | | STRING SHS27k modes | protein pair | Macro AUROC over 7 modes | | LP-PDBBind affinity | complex | Spearman's ρ | | BindingDB affinity | measurement | Spearman's ρ | | ATLAS RMSF | residue | Spearman's ρ | Metric implementations are ported from [`plug-baselines`](https://github.com/PrismScienceOrg/plug-baselines) so a leaderboard number and a published baseline number are the same arithmetic. Each benchmark is scored on its own, and the headline **PLUG Score** is the improvement over random chance across all eleven: each primary metric is normalised so that chance is 0 and perfect is 1 (Spearman as |ρ|, so a ρ of −0.99 scores 0.99; AUROC as 2 × (AUROC − 0.5); Fmax as is), nothing is clipped, and the PLUG Score is their mean, with a benchmark left out of the bundle counting as chance (0). The board ranks by it, and each benchmark's tab ranks by that benchmark's normalised score, so a method built for one benchmark is compared there. See [`docs/scoring.md`](docs/scoring.md). ## Where the data lives | Repo | Visibility | Holds | |---|---|---| | `PrismScienceOrg/plug-challenge-data` | public | Per benchmark: `manifest.parquet` (every row's `datapoint_id`, `row_index`, protein id(s) and Lo-Hi split) and `proteins.csv` (protein → split). Ids and splits only | | `PrismScienceOrg/plug-challenge-private` | private | `ground_truth/` (every row's labels and split), `submissions/`, `scores/`, `leaderboard/entries.csv` | No labels, sequences, mutations or ligands are redistributed: not every benchmark's licence allows it (LP-PDBBind's does not). Participants read the rows from the original sources through plug's loaders, and `row_index` is a row's position there. The splits are public — you need them to know what to predict — but the labels the Space scores against are not, so a leaderboard number cannot be self-reported. This is the one sense in which the challenge is "not blinded": the test proteins are known up front. ## Running it locally ```bash uv venv --python 3.12 && uv pip install -e ".[space,dev]" pytest tests/ # synthetic data; test_real_data.py runs once the data is built CURRENT_PHASE=1 python app.py # the Space, against whatever repos HF_TOKEN can reach ``` ## Deploying ```bash git push origin main # this repo is the Space; pushing deploys it ``` Space secrets and variables: `HF_TOKEN` (write access to both dataset repos), `CURRENT_PHASE`, and optionally `PLUG_PRIVATE_REPO` / `PLUG_PUBLIC_REPO` to point a staging Space at throwaway repos. Full walkthrough in [`docs/SETUP.md`](docs/SETUP.md). ## Challenge phases `CURRENT_PHASE` gates the Space: | Phase | Submit tab | Leaderboard | |---|---|---| | `0` pre-challenge | placeholder | placeholder | | `1` open | accepting bundles | live, refreshing | | `2` closed | closed notice | frozen as the final standings | ## License Apache-2.0 for the code here. Every benchmark is redistributed from its original authors under its own licence; PLUG contributes the leakage-free splits, not the measurements.