Modality-Task Map

A modality-task map connects the raw input signal to the model-ready representation, target output, loss, metric, and evaluation risk. It prevents a note from saying only “use a Transformer” or “use a GNN” without specifying what the model must actually solve.

The full contract is:

where is the raw modality, is the representation map, is the model input, is the model, and is the task output space.

Mapping Axes

ModalityCommon representationCommon tasksOutput spaceTypical risks
Texttokens, chunks, embeddingsretrieval, similarity search, reranking, QA, generation, classificationsequence, answer, class, ranked listcontext leakage, prompt injection, hallucination
Imagepixels, patches, feature maps, regionsclassification, detection, segmentation, captioningclass, box, mask, sequencenear-duplicate leakage, augmentation mismatch
Videoframes, clips, tubelets, temporal tokensevent detection, captioning, retrieval, forecastingclass, segment, sequence, ranked listtemporal leakage, frame sampling bias
Audiowaveform, spectrogram, acoustic tokensspeech recognition, event detection, generationsequence, class, timestamped eventsampling-rate mismatch, transcript leakage
Tabularcolumns, normalized features, embeddingsclassification, regression, ranking, rerankingclass, scalar, ranked listidentifier leakage, train-test distribution shift
Graphnodes, edges, featuresgraph classification, node prediction, link predictionclass, label, edge, graphsplit leakage through shared nodes or edges
Sequencetokens, residues, k-mers, eventsclassification, generation, tagging, similarity search, forecastingclass, sequence, span, scalar, ranked listhomolog leakage, future information leakage
MoleculeSMILES, graph, fingerprint, conformerproperty prediction, similarity search, generationscalar, class, ranked list, sequence, graphscaffold leakage, standardization mismatch
3D structurecoordinates, distances, frames, surfaces, geometric graphspose prediction, structure prediction, scoring, similarity search, segmentationcoordinates, scalar, class, graph, ranked listcoordinate-frame leakage, template leakage
Protein-ligand complexpocket graph, ligand pose, pair features, interaction graphinteraction prediction, affinity prediction, pose rankingscalar, class, contact map, ranked listprotein-family, scaffold, assay, and pose leakage

Task Construction

A task should be specified as:

where is the raw input space, is preprocessing or representation, is the output space, is the validity rule, is the training loss, is the metric set, and is the split rule.

Use Representation contract when is nontrivial, cached, learned, stochastic, or domain-specific.

The metric set should be chosen with Metric selection, and failure cases should be named with Failure mode taxonomy.

Evaluation Implications

The same modality can support very different metrics:

For example, an image can produce a class, box, mask, caption, embedding, or retrieved item. A protein-ligand complex can produce a pose, score, affinity estimate, contact map, or ranked candidate list. These outputs require different validity checks and metrics.

Checks

  • What is the raw modality before preprocessing?
  • What representation does the model actually see?
  • What is one valid target output?
  • What outputs are invalid and how are they handled?
  • Does the loss match the output space?
  • Does the metric match the user-facing behavior?
  • What failure modes are expected and counted?
  • Does the split rule prevent modality-specific leakage?
  • Does the architecture match the structure of the representation rather than the name of the task?