Manuscript Offprint

arXiv:2610.26626

VoxLogicA2: A Spatial Model Checker for Neuro-symbolic Medical Imaging (extended version)

Gina Belmonte, Laura Bussi, Vincenzo Ciancia, Mieke Massink

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Gina Belmonte 1^{1}[0000-0002-7087-8914], Laura Bussi 2^{2}[0000-0003-1292-4086], Vincenzo Ciancia 3^{3}[0000-0003-1314-0574], and Mieke Massink 3^{3}[0000-0001-5089-002X]

1^{1} Azienda USL Toscana Nordovest, Ospedale San Luca, Lucca, Italy

gina.belmonte@uslnordovest.toscana.it

2^{2} University of Amsterdam, Amsterdam, The Netherlands

1.bussi@uva.nl

3^{3} Istituto di Scienze e Tecnologie dell'Informazione, CNR, Italy {vincenzo.ciancia,mieke.massink}@cnr.it

Abstract. We present the tool VoxLogicA2, a spatial model checker aimed at Computer Vision, with applications in high-resolution 2D and 3D medical imaging. The new version of the tool combines logical primitives, non-logical primitives, and training and prediction primitives of state-of-the-art neural networks, freely interleaved with the symbolic tool functionality. The primary application field is neuro-symbolic medical image analysis. VoxLogicA2 is a fast, paralleising spatial model checker with a declarative domain-specific language, capable of describing both the learning procedures and the spatial logic procedures of an analysis in one program. We validate our approach by verifying its improved efficiency, and by using the new constructs of the language to describe case studies of previous work, which were based on Python, with a specification that uses VoxLogicA2 only.

Keywords: Spatial model checking · Neuro-symbolic AI · Medical imaging

1 Introduction

Medical image analysis requires perception abilities as well as symbolic reasoning and knowledge representation capabilities. When analysing an image, we may be interested in enforcing some constraints, or exploit domain specific knowledge. Today this analysis is most often carried out by neural networks, which perceive at the level of a human expert but do not reason symbolically. The BraTS challenge [31] is a competition among different methods performing high grade glioblastoma segmentation. Machine Learning (ML) methods achieve very high accuracy, which is crucial as segmentation is the basis for follow up therapies, like radiotherapy. Still, the predictions are not explainable nor auditable, which

G. Belmonte et al.

are desired properties for a physician to understand the procedure leading to a certain result. It is thus natural to ask whether it is possible to combine these two approaches in order to get efficient, accurate, auditable, reproducible and explainable results.

The field that combines symbolic and neural methods, neuro-symbolic AI, is a particularly active area of research (see e.g. [17, 12, 34]). Its application to image analysis is motivated by the complementary strengths and weaknesses of neural and symbolic representations: neural models are effective at extracting semantic information from visual data, but are weak in providing explanations for their results. Symbolic representations, instead, can explicitly capture domain knowledge and relations between the spatial entities identified in an image, but are weaker in capturing the variability of real-world datasets. A careful combination of the two approaches may give the advantages of both and increase the reliability and the explainability of the image analysis. This requires however a suitable platform to operate such combined methods that is transparent, auditable and permits easy and controlled replication of the results. This is the main aim of VoxLogicA2.

In recent years, spatial logic emerged as a suitable symbolic language to express properties (such as reachability, distance, similarity, shape and proximity) of entities located in logical or physical spaces, among which general graphs, polyhedra and digital images. Ciancia et al. [13, 14, 5] introduced the Spatial Logic for Closure Spaces (SLCS), a spatial logic interpreted over Céch closure spaces, a generalisation of topological spaces. Digital images are symmetric regular graphs, whose nodes are pixels (voxels in 3D) and whose edges are given by adjacency, so SLCS can state properties of images.

Along with SLCS various spatial model checkers have been developed, among which VoxLogicA [5, 15], which is specialised and highly optimised for digital images. VoxLogicA obtained results on par with the state of the art on the Brain Tumour Segmentation challenge (BraTS) [31] dataset, both in terms of accuracy, compared to provided expert ground truth segmentation, and in terms of performance, i.e. computational resources and time needed to obtain the results. See [16, 6] for an overview on recent work on spatial model checking and [15] for a hands-on tutorial for VoxLogicA.

In this paper, we present VoxLogicA2, a new version of VoxLogicA that includes AI primitives for training and prediction, providing an innovative platform for neuro-symbolic image analysis. VoxLogicA2 integrates nnU-Net [27], a state-of-the-art, self-configuring deep learning framework for biomedical image segmentation. Combined with symbolic spatial model checking procedures, VoxLogicA2 can perform hybrid analysis based on a fully certified process in the sense that all steps in the procedure, from the configuration of the learning process to the symbolic specification and production of results are transparent, fully auditable and independently replicable. This represents a step towards the EU Artificial Intelligence Act [18] and the EU Ethics Guidelines for Trustworthy AI [19], which both ask for trustworthy and explainable AI procedures.

Figure

Fig. 1. Example brain tumour segmentation of BraTS 2020 case BraTS20_Training_165 (TCIA01_147 in BraTS 2019). From left to right: Original MRI image; Symbolic tumour segmentation with VoxLogicA in cyan; Expert segmentation (ground truth) overlay in magenta. Images produced with VoxLogicA-UI.

VoxLogicA2 is a new implementation of VoxLogicA, written in Python, the language of the neural network ecosystem, so that a hybrid analysis can call a network directly. A program is turned into a Merkle directed acyclic graph (DAG) [32, 8], in which identical sub-expressions become one node [20] whose identity is the hash of its contents, so that a sub-expression is computed once, however often it occurs. The same hashes key a persistent cache: a value computed by one run is available to every later run, and an interrupted analysis is resumed rather than restarted. Execution is parallel and demand driven, with coordination on a single lock-free event loop, while the imaging kernels fill the cores of a workstation. The design targets coarse-grained work, where the cost of scheduling is negligible compared to that of computing, which is the regime in which automatic parallelisation pays.

We illustrate VoxLogicA2 on a realistic case study, a threshold sweep in brain tumour segmentation and a form of neuro-symbolic analysis, both proposed in [7] using separate tools in a non-integrated way.

Case study 1: brain tumour segmentation. The first case study is the segmentation of brain tumours on the BraTS2020 dataset, measured against expert segmentations (Fig. 1). The procedure is that of [5], which obtained results on par with state-of-the-art machine learning tools on the 2017 edition of BraTS. We run both VoxLogicA and VoxLogicA2 on it to compare their results and performance.

Case study 2: threshold sweep and neuro-symbolic analysis. The segmentation depends on two thresholds: hiThr selects the hyper-intense voxels, and a fixed value always finds the tumour core; viThr selects the very intense voxels of the surrounding oedema, and can be adjusted per case to gain accuracy. We sweep 21 values of viThr in two experiments: first against the expert ground truth, then, in the neuro-symbolic one, against the prediction of a trained nnU-Net model, used as a pseudo-ground-truth against which viThr is calibrated.

Synopsis. In Section 2 we recall basic notions about SLCS, VoxLogicA and nnU-Net. Section 3 presents the architecture of VoxLogicA2 and how it was

G. Belmonte et al.

developed and tested. Section 4 details the case studies and Section 5 the performance analysis; Section 7 concludes the paper including an outlook to future research.

References (39)