Task Specification

A task specification defines what a model receives, what it must output, what outputs are valid, and how success is measured. It is the contract between data, model, and evaluation.

A compact task specification is:

where is the input space, is the output space, is a validity function, is the training loss, is the metric set, and is the split rule.

Required Fields

  • Input: raw modality and model-ready representation.
  • Output: class, scalar, rank, retrieved set, sequence, mask, box, graph, coordinate object, answer, or action.
  • Validity: syntax, geometry, schema, label space, constraints, or safety boundary.
  • Loss: what is optimized during training.
  • Metric: what is reported during evaluation, selected with Metric selection.
  • Split: what generalization claim the result supports.
  • Failure mode: invalid output, wrong output, unsupported output, missing evidence, or low-confidence output, using Failure mode taxonomy.

Task Contract Table

FieldQuestionExample
example unitWhat is one supervised or evaluated case?molecule-target pair, prompt, image, protein structure
input spaceWhat can the model observe?graph, tokens, coordinates, retrieved context
output spaceWhat counts as a prediction?class, scalar, rank, sequence, pose, mask
validity ruleWhich outputs are admissible?valid molecule, normalized probability, no atom clash, JSON schema
lossWhat signal updates parameters?cross entropy, MSE, contrastive loss, diffusion loss
metricWhat claim is reported?AUROC, RMSE, NDCG, RMSD, enrichment factor
split unitWhat is held out?scaffold, protein family, source, time, user
aggregationHow are per-example scores summarized?row mean, target mean, scaffold mean, paired comparison

Why It Matters

Two systems can use the same architecture but solve different tasks. A decoder-only transformer can do sequence generation, retrieval reranking, tool-call structured output, or classification depending on the task specification.

The task should also be checked against Modality-task map so the raw modality, representation, output space, loss, metric, and split rule stay aligned.

Common Mismatches

MismatchSymptomFix
loss differs from claimgood training loss but weak reported metricadd metric-aligned validation or reranking objective
output validity ignoredgenerated objects are syntactically or physically invaliddefine validity before scoring
split weaker than claimrandom split used for novelty claimchoose split unit that matches deployment
example unit unclearduplicate entities inflate the scoredefine entity, pair, assay, pose, or region unit
metric aggregated by row onlyfrequent targets or easy cases dominatereport grouped or stratified metrics
preprocessing hiddeninference cannot reproduce benchmark inputlink a preprocessing contract

Computational Biology Examples

TaskExample UnitOutput SpaceSplit UnitMetric Boundary
molecular property predictionmolecule or assay rowscalar or classscaffold, source, assayunit, threshold, endpoint must be explicit
activity predictionmolecule-target-assay tuplescalar, class, or ranking scorescaffold and target familyassay harmonization affects comparability
docking pose rankingreceptor-ligand posepose score or rankcomplex, protein family, ligand scaffoldpose RMSD and physical validity are separate
protein sequence modelingsequence or residuetoken, embedding, annotation, scalarsequence identity cluster or familyhomolog leakage changes interpretation
variant effect predictionvariant or regionscalar, class, or ranklocus, gene, chromosome, sourcereference genome and coordinate convention matter

Checks

  • What is one example and one target?
  • Is the output independent, ranked, sequential, spatial, temporal, or structured?
  • Are invalid outputs counted as failures or repaired before scoring?
  • Does the metric measure the actual downstream behavior?
  • Does the split unit match the claimed generalization?
  • Is the training loss aligned with the evaluation metric?