Keep the biology. Reduce the batch effect.

Each bone-marrow cell's gene and protein measurements are compressed into 61 numbers. Read them for one cell: which numbers name its cell type, which were trained to forget its batch, and how much the rest still reveal.

The question

Each of 66,175 bone-marrow cells was measured in two ways: which genes it was expressing and which proteins sat on its surface. The cells came in 9 batches (one donor’s cells measured at one site), and readings differ from batch to batch. Can a model combine both measurements into one embedding, a short list of numbers per cell, that keeps the cell type readable while reducing the differences between batches?

The answer

Cell types stay readable: the first 45 of the 61 numbers name the annotated cell type for 87% of the 5,004 cells shown. The nine numbers trained to forget the batch are all stored as zero in 97% of cells, which gives every batch equal probability, as their training target asks. That target covers only those nine numbers: across all 61, 54.5% of a cell’s 15 nearest neighbours come from its own batch, against 12.1% expected by chance.

1 · Pick a cell

2 · Read its 61 numbers

How to read the bars. Each bar is one of this cell's 61 stored numbers, grouped into the four blocks the model was trained with. In the cell-type block the highest bar is highlighted: it is the type the block names. The batch block's target is equal probability for all nine batches, which any nine equal values meet, including nine zeros.

3 · How often does that reading hold?

Where these numbers come from