In the field of AI-assisted medical diagnosis, diabetic retinopathy represents one of the areas where the most progress has been made in automated detection of retinal lesions. However, blind trust in classification models can be dangerous if mechanisms that measure prediction uncertainty are not incorporated. A recent study explores precisely this issue by evaluating different last-layer adaptation strategies with RETFound, a foundational vision model based on self-supervised transformers, applied to diabetic retinopathy detection. The research compares approaches such as softmax with temperature calibration, variational Bayesian heads, diagonal Laplace approximations, and SNGP-style heads, all on frozen features of the base model. The results show that uncertainty-aware operating points improve sensitivity and selective referral behavior on the APTOS 2019 dataset, even achieving zero false negatives in the accepted subset, albeit with a high cost in false positives. However, when transferring the model to DDR, performance weakens and the checkpoint trained on APTOS fails to achieve useful external referral behavior. This underscores the need for a safety-focused evaluation that goes beyond aggregate accuracy: explicit validation on safety coverage and a second dataset under shift are required to support claims of clinical reliability.
The main lesson for developing AI for businesses in critical environments, such as healthcare, is that uncertainty is not a luxury but a safety requirement. At Q2BSTUDIO, we understand that predictive models must be auditable and capable of indicating when they do not know how to respond, especially when the consequences of an error can be severe. That is why we offer artificial intelligence for businesses solutions that integrate uncertainty quantification mechanisms from the architecture itself, adapting the last layers or incorporating Bayesian heads according to the use case. Our team helps design custom applications that incorporate these principles, allowing visual screening, assisted diagnosis, or medical image classification systems not only to provide an answer but also to report their confidence level. This is especially relevant when working with shifted data or populations different from the original training set.
Furthermore, in regulatory environments such as the European Union with the future high-risk AI regulation, the ability to explain and measure prediction uncertainty becomes an almost mandatory requirement. Therefore, at Q2BSTUDIO, we combine AWS and Azure cloud services to deploy these models in a scalable and secure manner, using certified infrastructure that meets healthcare standards. We also integrate business intelligence services to visualize model performance in real-time and detect potential drifts. The combination of AI agents with autonomous decision-making capability, but limited by well-defined uncertainty thresholds, is a trend that will mark the next generation of diagnostic support systems.
The aforementioned research demonstrates that simple post-hoc calibration or the use of Bayesian heads do not guarantee robust behavior in the face of changes in data distribution. The failure of the SNGP model when transferring from APTOS to DDR is a clear warning: external validation is essential. In this regard, at Q2BSTUDIO we promote an agile but rigorous development approach, where each custom software deployment includes testing plans with multiple datasets and safety coverage analysis. Additionally, we offer cybersecurity and pentesting services to ensure that models and their sensitive data are protected against adversarial attacks or information leaks.
In short, last-layer adaptation with uncertainty in foundational models like RETFound is a promising line of work, but it still needs to mature before being transferred to real clinical practice. The scientific community and technology companies must collaborate to establish clear safety metrics, such as sensitivity in the accepted subset or selective referral rate, and always validate with second datasets under shift. At Q2BSTUDIO, we are committed to this approach, offering solutions ranging from AI consulting to the development of complete platforms that integrate these uncertainty filters. Because in medical diagnosis, knowing how to say 'I don't know' can be as valuable as giving the correct answer.




