--- license: cc-by-4.0 language: - en pretty_name: OpenFARM Dog Pain Triage size_categories: - n<1K tags: - animal-welfare - veterinary - dog - pain - clinical-text - openfarm --- # OpenFARM Dog Pain Triage This prepared dataset derives from the Zenodo Dog Pain Database. Source: https://zenodo.org/records/15303646 DOI: 10.5281/zenodo.15303646 Source title: Dog Pain Database: A Multidimensional Dataset for Investigating Canine Pain Source license: CC-BY-4.0 Prepared: 2026-05-17 ## Scope This is a canine **clinical text triage** dataset for OpenFARM/AWW-style welfare-status reasoning. It is not a visual pain-recognition dataset and should not be described as automated veterinary diagnosis. Given leakage-safe canine clinical metadata, predict one OpenFARM/AWW category: - `Negative_Nociceptive` - `Neutral_Resting` ## Source Processing Summary - Raw spreadsheet rows: 594 - Supervised rows with usable AWW projection: 557 - Supervised dogs: 175 - Natural supervised label counts: {'Negative_Nociceptive': 514, 'Neutral_Resting': 43} - Excluded rows: source rows without explicit `Pain type` labels are retained in local audit metadata but not used in supervised splits. ## Data Shape Each public row is one source spreadsheet observation with a minimal clinical metadata schema. The environment evaluating this dataset is responsible for mapping these columns into a chat prompt. DatasetDict split membership is stored by split name, so the `split` column is not included inside each public split. Main fields: - `source_subject_id`: original dog ID, used for dog-heldout splitting and leakage auditing - `source_observation_id`, `source_row_index`: original source observation references - `species`: always `dog` - `breed`, `weight`, `birth_date`, `sex`, `neuter_status`: demographic metadata - `patient_type`, `primary_diagnosis`, `medical_history`, `situation`: clinical context available for environment prompt design - `medication`, `anesthesia`, `orthopedic_exam`, `neurologic_exam`, `time_since_surgery`, `recovered_anesthesia`: extended clinical source metadata for audits and ablations - `pain_type`, `pain_origin`, `pain_duration`, `estimated_severity`: source pain annotation/descriptor fields - `pain_bucket`, `pain_binary`, `aww_category`: derived benchmark labels and helper labels - `source_url`, `source_doi`, `license`: source attribution fields For the primary dog-pain env, prompts should use only the leakage-safe clinical subset selected by the env. Source label fields such as `pain_type`, `pain_origin`, `pain_duration`, `estimated_severity`, `pain_bucket`, `pain_binary`, and `aww_category` are present for scoring/audits and should not be rendered into the model prompt. ## Splits All splits are dog-heldout at the raw train/test boundary. No `source_subject_id` appears in both raw train and raw test. Prepared splits: - `train`: class-balanced view sampled from the dog-heldout raw train set; counts {'Negative_Nociceptive': 34, 'Neutral_Resting': 34} - `test`: class-balanced view sampled from the dog-heldout raw test set; counts {'Negative_Nociceptive': 9, 'Neutral_Resting': 9} - `train_raw`: natural dog-heldout train distribution; counts {'Negative_Nociceptive': 407, 'Neutral_Resting': 34} - `test_raw`: natural dog-heldout test distribution; counts {'Negative_Nociceptive': 107, 'Neutral_Resting': 9} Use `train`/`test` for balanced OpenFARM env development and quick model comparisons. Use `train_raw`/`test_raw` when reporting prevalence-aware behavior on the source distribution. ## Metrics Do not report plain accuracy alone. The natural distribution is highly imbalanced, so majority-class guessing can look strong while missing no-pain/control cases. Recommended metrics: - overall accuracy - balanced accuracy - macro F1 - per-class precision/recall/F1 - confusion matrix - majority-class baseline - shallow lexical baseline from `baseline_audit.json` ## Prompting / Leakage Policy Target/source-label fields such as `Pain type`, derived AWW helper labels, pain bucket, estimated severity, pain origin, and pain duration are included in public rows for audit/scoring, but are never used in primary prompt rendering. The recommended environment prompt should only include core clinical context: species, breed, sex, neuter status, primary diagnosis, medical history, and clinical situation. Optional demographic or extended clinical fields can be ablated separately. Surgery/recovery fields are not used by the default env because their missingness is label-correlated. ## Known Shortcut Risks The source clinical text often contains terms such as `pain`, `lameness`, `lame`, and medication names. The dataset prep notebook audits these lexical gaps and writes `baseline_audit.json`. This benchmark should therefore be interpreted as clinical case reasoning/triage, not hidden-state inference from raw behavior. ## Limitations The public Zenodo source is tabular. Associated videos are not included. Labels are derived from spreadsheet pain-type annotations and should be used as benchmark labels, not as standalone veterinary diagnosis.