Hierarchy-Aware Supervised Uncertainty Estimation for Black-box LLM Taxonomic Reasoning
Organizations: Vector Institute for AI, Toronto, ON · University of Guelph, Guelph, ON
Abstract
Large language models (LLMs) are increasingly used for scientific decision support, yet reliable confidence estimation remains difficult in black-box settings. We study uncertainty estimation for hierarchical taxonomic reasoning generated by a black-box LLM in a long-tailed biodiversity monitoring pipeline. Using proxy features extracted by an open-source tool LLM, we train lightweight supervised estimators with hierarchy-aware supervision to predict rank-wise correctness. Across three tool LLMs, the supervised estimators consistently outperform a token-likelihood baseline for micro discrimination and selective prediction under a single global rejection threshold, improving micro AUROC from 0.57 to 0.75--0.80. The best results are achieved by a rank-specific multi-head design (H3), suggesting that accounting for hierarchical output structure is important when a unified abstention rule is required. Our code is publicly available at https://github.com/uoguelph-mlrg/hierarchy-aware-llm-uq
Figures & tables
| Tool LLM | Benchmarks | Ours | ||
| Baseline | H1 | H2 | H3 | |
| Gemma 7B | 0.573 | 0.710 0.050 | 0.694 0.060 | 0.796 0.023 |
| Qwen3 30B A3B Instruct | 0.743 0.050 | 0.719 0.080 | 0.749 0.017 | |
| GPT-OSS 20B | 0.733 0.069 | 0.783 0.044 | 0.790 0.028 | |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Rank | Attempts | Coverage (%) | Accuracy | F1 | HP | HR | HF |
| Class | 950 | 100 | 0.966 | 0.973 | 0.981 | 0.981 | 0.981 |
| Order | 922 | 97 | 0.872 | 0.885 | 0.955 | 0.955 | 0.955 |
| Family | 745 | 78 | 0.693 | 0.710 | 0.914 | 0.914 | 0.914 |
| Genus | 223 | 23 | 0.453 | 0.532 | 0.865 | 0.865 | 0.865 |
| Species | 55 | 6 | 0.455 | 0.500 | 0.847 | 0.847 | 0.847 |
| Tool LLM | Middle layer | Total Number of Layers | Hidden size |
| Gemma 7B ( google/gemma-7b ) | 14 | 28 | 3072 |
| Qwen3 30B A3B Instruct ( Qwen/Qwen3-30B-A3B-Instruct-2507-FP8 ) | 24 | 48 | 2048 |
| GPT-OSS 20B ( openai/gpt-oss-20b ) | 12 | 24 | 2880 |
| Tool LLM | Benchmarks | Ours | ||
| Baseline | H1 | H2 | H3 | |
| Gemma 7B | 0.621 | 0.451 0.009 | 0.454 0.013 | 0.498 0.036 |
| Qwen3 30B A3B Instruct | 0.520 0.015 | 0.514 0.016 | 0.491 0.021 | |
| GPT-OSS 20B | 0.509 0.029 | 0.528 0.044 | 0.515 0.031 | |
| Tool LLM | Method | NLL | ECE | Brier | |||
| pre | cal | pre | cal | pre | cal | ||
| None | Baseline | 1.030 (0.000) | 0.706 (0.000) | 0.114 (0.000) | 0.299 (0.000) | 0.408 (0.000) | 0.256 (0.000) |
| Gemma 7B | H1 | 0.488 (0.055) | 0.465 (0.039) | 0.057 (0.018) | 0.064 (0.021) | 0.150 (0.013) | 0.148 (0.011) |
| H2 | 0.470 (0.040) | 0.435 (0.026) | 0.081 (0.023) | 0.035 (0.009) | 0.151 (0.015) | 0.139 (0.011) | |
| H3 | 0.403 (0.017) | 0.411 (0.018) | 0.057 (0.020) | 0.059 (0.006) | 0.128 (0.008) | 0.127 (0.006) | |
| GPT-OSS 20B | H1 | 0.437 (0.048) | 0.427 (0.038) | 0.045 (0.024) | 0.037 (0.019) | 0.144 (0.020) | 0.139 (0.015) |