---
title: "2026-09-18 DiffSim fine28 mapping inspection"
description: "Located Cedrik's Histo v2 fine28-to-DiffSim tissue mapping and identified the sparse-label changes needed in DiffSim 0.1.100."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-09-18 DiffSim fine28 mapping inspection

## Work Done

- Inspected the local DiffSim repository and fetched/pruned `origin`.
- Searched all 15 local and remote branch refs with `cedrik` in their name.
- Located the 40-class name mapping to nine DiffSim compartments on `origin/cedrik/fk-fix`, introduced by commit `c59d66eb4787326bac8a2ed13ef97a642d415d50`.
- Verified from the local Histo fine28 taxonomy and output-store tests that Histo v2 writes 40 `region_classes`: 28 base classes plus 12 Gleason-derived classes, paired with sparse `region_ids` 0-27 and 128-139.
- Compared the branch implementation with DiffSim tag `v0.1.100` and documented why the released positional mapping cannot handle sparse graded labels. The intended port reads `region_ids`, accepts a class-name mapping, builds a separate label LUT, and retains a per-class mapping for names.
- Reported the exact mapping, refs, metadata order, and integration guidance to the parent agent. No DiffSim or mono files were edited.

## Lessons Learned: Pitfalls

- Searching only for `fine28` in DiffSim misses the implementation because the branch code names every class explicitly and never uses the taxonomy name.
- The fine28 name is misleading at the integration boundary: the emitted `region_classes` list has 40 entries after adding derived Gleason classes.
- The old 13-entry mapping on `cedrik/new-format` resembles the desired compartment collapse but is for the former taxonomy and is not compatible with Histo v2.

## Lessons Learned: Improvements

- Add a durable DiffSim/Histo integration note that records the fine28 output contract: 40 class names, sparse `region_ids`, and the nine-compartment mapping.
- Document that DiffSim 0.1.100's `domain_from_histo` assumes class-list position equals stored label and therefore needs the `origin/cedrik/fk-fix` behavior ported to NumPy rather than cherry-picked literally.

Source: https://docs.virdx.dev/knowledge/inbox/2026-09-18-diffsim-fine28-mapping-inspection/index.mdx
