﻿# PubChem SID and CID: chemical standardization does not erase source-record provenance

Join PubChem learning data by distinguishing contributed Substance IDs from standardized Compound IDs, preserving many-to-one mappings, missing structures and source-specific annotations.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-pubchem-sid-cid-many-to-one-provenance/
Language: en

## Identify what each record represents

The [PubChem data-organization guide](https://pubchem.ncbi.nlm.nih.gov/docs/data-organization) distinguishes contributor Substance records from derived Compound records. A SID identifies a source record, while a CID identifies a standardized chemical structure. They are not interchangeable identifiers with different prefixes. Establish which level a model's labels and molecular features belong to before joining tables. A string-based merge that ignores identifier type can create an incorrect association even when every row contains a plausible chemical name.

## Preserve many-to-one relationships

The [Compound versus Substance explanation](https://pubchem.ncbi.nlm.nih.gov/docs/compound-vs-substance) describes aggregation of contributed records through standardized structures. Multiple sources can therefore provide distinct records linked to the same compound. Joining a compound-level feature table to substance-level observations can legitimately expand rows. Record that cardinality rather than treating every expanded row as a newly observed molecular identity. Conversely, deduplicating by CID can discard source-specific measurement context that remains important to the supervised target.

## Keep records without standardized structures visible

The [Substance documentation](https://pubchem.ncbi.nlm.nih.gov/docs/substances) explains that some records lack a structure or do not yield a standardized Compound record. A failed SID-to-CID join is therefore not automatically a download failure or a missing numeric identifier to fill arbitrarily. Preserve the rejection reason and the original source record. If a graph model requires a structure, the resulting filtering changes the represented collection and should be reported as an input-availability condition of the experiment.

## Do not turn aggregation into universal agreement

A Compound summary can bring annotations from multiple contributors together. Shared standardized identity does not establish that all source assertions were measured under identical conditions or have equal evidentiary status. Keep source links when selecting labels and resolve conflicting observations using an explicit policy. A convenient aggregated page is a discovery interface, not a replacement for the measurement-level provenance needed to define a reproducible training target.

## Partition according to the claimed identity transfer

For a task testing unseen chemical structures, group all linked source records so the same standardized compound does not cross the intended boundary. For source-document transfer, retain the document dimension separately. The existing [entity-group guide](/journal/data-guide-entity-group-split-design/) and [typed-graph guide](/journal/data-guide-openaire-research-product-graph/) support related identity and relationship records. Report SID retention, CID mapping and structure-filtering policies independently, making clear whether the evaluation concerns new molecules, new source assertions or another explicitly defined data population.
