--- license: cc-by-4.0 pretty_name: ProteinChameleon Structure–Function Dataset language: - en size_categories: - 100K function ds = load_dataset("/proteinchameleon-structure-function", "alignment") print(ds["test"][0]["function_text"]) print(ds["test"][0]["structure_tokens"][:16]) # multimodal narratives di = load_dataset("/proteinchameleon-structure-function", "interleaved") ``` The original NumPy artifacts are also included under [`raw/`](./raw) for exact reproducibility (`np.load(..., allow_pickle=True)`). ## Data Collection & Curation ### Sources - **Sequences & function annotations** — [UniProtKB / Swiss-Prot](https://www.uniprot.org) (manually reviewed entries). `function_text` is derived from curated UniProt function annotations; `organism` and `accession` are taken directly from the entry. - **3D structures** — [AlphaFold Protein Structure Database](https://alphafold.ebi.ac.uk), tokenized with **GeoBPE**. Each backbone is quantized into geometric tokens and merged into structural-motif tokens, yielding the `structure_tokens` sequence. ### Leakage-free split protocol Naïve per-accession splits leak badly, because protein databases are highly redundant and UniProt function text is shared verbatim across orthologs. Measured on the original splits: - **Homology leakage** — 94% of test proteins had a ≥30%-identity homolog in train/val. - **Function-text leakage** — 79% of test function descriptions appeared verbatim in train. - **Cross-task leakage** — 91% of the interleaved-test proteins also appeared in alignment-train (the two tasks were split independently but trained jointly). To remove all three, the splits in this release (`clean2`) are built as follows: 1. **Union of both tasks.** Pool every protein appearing in either the alignment or interleaved task into a single set. 2. **Homology graph.** Cluster all sequences with **MMseqs2** at **30% sequence identity** and **80% coverage** (`mmseqs easy-cluster --min-seq-id 0.3 -c 0.8`). Add an edge between any two proteins in the same cluster. 3. **Function-text graph.** Add an edge between any two proteins that share an *identical* function description. 4. **Connected components.** Take connected components of the combined graph (union-find). Homologous proteins and proteins sharing boilerplate function text therefore always fall in the same component. 5. **Component-level assignment.** Assign whole components to train / validation / test (~90 / 5 / 5%), so no protein — and no close homolog or shared description — ever crosses the split boundary. The **same assignment is applied to both tasks**, eliminating cross-task leakage. A machine-readable `split_manifest_clean2.json` and the per-protein `split_assignment_clean2.json` are included under `raw/` for auditing. ### Verification After construction, the splits were re-checked for all three leakage channels; homology, function-text, and cross-task overlap between test and train/val are driven to **zero** under the 30%-identity criterion. ## Limitations & Intended Use - `structure_tokens` are **GeoBPE codes**, not 3D coordinates; they are only meaningful with a model trained on the same GeoBPE vocabulary. They are not interchangeable with other structure-token schemes (e.g. Foldseek 3Di, ESM3 structure tokens). - Function text is curated prose and may contain UniProt-style boilerplate; it is intended for conditional generation / understanding, not as a controlled ontology (use the EC/CATH ontologies for label-based tasks). - The dataset reflects the coverage and biases of Swiss-Prot and AlphaFold DB. ## License & Attribution Released under **CC-BY-4.0**, consistent with the source databases. If you use this dataset, please attribute the underlying resources: - The UniProt Consortium, *UniProt: the Universal Protein Knowledgebase* (CC-BY-4.0). - Varadi et al., *AlphaFold Protein Structure Database* (CC-BY-4.0). ## Citation ```bibtex @misc{proteinchameleon_dataset, title = {ProteinChameleon Structure--Function Dataset}, author = {Steven}, year = {2026}, note = {Leakage-free structure-token / function-text splits derived from UniProt/Swiss-Prot and AlphaFold DB via GeoBPE tokenization} } ```