Accurate assessment of surgical margins remains one of the greatest challenges in oncologic surgery. Techniques such as Rapid Evaporative Ionization Mass Spectrometry (REIMS) provide real-time molecular information, but their effective integration into the operating room requires interpretable and generalizable artificial intelligence models. Traditional deep learning approaches, though powerful, have two fundamental issues: they rely on labeled data from resected tissue that does not reflect intraoperative noise, and their black-box nature prevents understanding and improving their behavior. A new paradigm emerges: agent-guided concept learning, which extracts meaningful semantic representations directly from data without expensive annotations.
This method, inspired by recent research on concept discovery, employs a reasoning agent that refines semantic descriptions of learned concepts and adaptively adjusts their weight according to diagnostic relevance. Furthermore, concepts are grounded in a biochemical knowledge graph to ensure consistency with known metabolic relationships. Results on skin and breast cancer datasets show significant improvements in balanced accuracy and sensitivity, and in a representative intraoperative case, false positives are reduced. This indicates better generalization to real surgical conditions, where data is noisy and unlabeled.
From a business and technical perspective, this approach opens opportunities to develop custom software applications that integrate interpretable AI models into clinical workflows. Q2BSTUDIO, as a company specialized in software development and technology, can offer solutions that combine this type of artificial intelligence with robust cloud infrastructure. For example, deploying the model on AWS or Azure allows processing large volumes of spectral data in real time, while cybersecurity services ensure protection of sensitive patient data. Additionally, incorporating dashboards with Power BI enables surgeons to visualize margin certainty and make informed decisions.
The role of AI agents is crucial: they not only learn concepts but can act as autonomous assistants that dynamically adapt their reasoning according to the surgical context. This represents a step toward truly intelligent and explainable clinical decision support systems. At Q2BSTUDIO, we understand that the key is to translate academic research into viable products, and we offer services ranging from AI architecture design to integration with existing hospital systems. Customization is essential, as each cancer type and surgical environment presents particularities that require fine-tuning of the model.
Cybersecurity cannot be an afterthought. Since REIMS data contains identifiable metabolic information, it is imperative to implement security measures from the design phase. Our expertise in secure development and regulatory compliance (HIPAA, GDPR) ensures that any cloud solution, whether on AWS or Azure, meets the highest standards. Likewise, business analytics via Power BI allows hospitals to monitor model performance and detect potential deviations in clinical practice, turning complex data into actionable insights.
Ultimately, surgical margin assessment with agent-guided concepts represents a natural evolution toward more robust and transparent AI. The combination of machine learning, symbolic reasoning, and expert knowledge paves the way for real clinical adoption. Artificial intelligence applied to medicine must not only be accurate but also understandable; only then will surgeons trust it for critical decisions. At Q2BSTUDIO, we work to make this vision a reality, offering technological solutions that integrate the best of research with business practice. The future of data-driven surgery is here, and the tools to build it are within our reach.



