Skip to content

WIP:innernode geomodel scoring - #44

Draft
pleary wants to merge 2 commits into
mainfrom
ml-378-innernode-geomodel-scoring
Draft

pleary wants to merge 2 commits into
mainfrom
ml-378-innernode-geomodel-scoring

Conversation

@pleary

@pleary pleary commented Nov 20, 2026

Copy link
Copy Markdown
Member

Still a lot in progress here, but parts of it are stable enough where feedback could be useful.

This branch introduces two new scoring methods (currently named predictions_for_image_new_scoring and predictions_for_image_innernnode). The former I think is basically complete and I will propose we use that as the scoring approach for non-innernode geomodels. The aggregation phase used for selecting a common ancestor has an equivalent replacement aggregate_results_new_scoring, that is also basically complete. Together they are 34% faster and in my evaluation produce exactly the same results as predictions_for_image/aggregate_results .

As part of that, the new scoring uses the new TaxonomyAggregationIndex and aggregate_taxonomy_up_inplace, both of which I think we should use and are ready for review. They greatly speed up the propagation of scores up (or down with propagate_max_down_tree_inplace) static taxonomies.

This branch also adds methods to score innernode geomodels with predictions_for_image_innernnode and aggregate_results_new_scoring_innernode. These are still being refined, but I'm open to feedback on the general approach. I still haven't nailed down a final implementation I love that I am proposing. As a result the code there is not being offered as-is for review - there is still a bit of code in there that is helpful for evaluating different approaches, but not nearly polished for a stable implementation. But the general strategy holds (calculate a genus-level geo difference and combine that with species level visual information to boost genus scores). Some other ideas I am still testing:

  • Other weights for combining genus-level geo scores besides a fixed factor
  • Whether or not we want to boost leaf scores when genera have higher geo scores to prevent the overall lowering of leaf scores
  • Wether or not we want to consider if some genera should be boosted higher than others (e.g. if there's already a lot of data at species, maybe a higher genus score should be less impactful than genera that have way more data stuck at the genus level). This is currently the most intriguing to me that I am to test next for reasons I'll explain below

For the scoring approaches we need to consider what it could mean then genus geo scores are higher than the max of species genus scores

  • It could mean there are other species, not in the model, that have geospatial data the genera are being trained on. This case warrants the genus overall score to be higher than the sum of the species overall scores, to give weight to the unaccounted for species
  • It could be the are observations identified to genus and no further. These could be observations of the species in the model, or they could be other species. This case may warrant increasing the species scores a little as well as boosting the genus score a little to account for both cases - these are known species plus unknown species
  • It could be the genus is just scoring higher because it is being trained on the aggregate of species and a lot of the species in the genus are nearby. This case may warrant little to no boost at all for the genus since it doesn't contain unique information and is benefitting from aggregated species-level scores. This is sort of what I'm seeing in testing - testing against datasets where the taxa are ones where more observations are stuck at genus benefit more from the genus level boosting. Those test sets show improved rate and accuracy of common ancestors by about 6%, whereas test sets of random (usually popular and well documented) species show little increase in how often we get the right common ancestor. The side effect here is unnecessarily lower leaf scores because the genus scores can get boosted by higher genus-level geo scores

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant