Daniele Meli
email: daniele.meli@univr.it

' it should have deliberative capabilities [4], i.e. monitoring the environment through sensors while acting, in order to reason and plan a new strategy when the expected behavior does not match reality. Moreover, it must adapt its prior model by learning from observations, to minimize uncertainty and critical events; ' it should be informed from pre-operative anatomical data and task-level expert knowledge, in order to devise a patient-specific strategy for the intervention;

Deliberation in autonomous robotic surgery: a framework for handling anatomical uncertainty

Eleonora Tagliabue ˚, Daniele Meli ˚, Diego Dall'Alba, Paolo Fiorini

Abstract-Autonomous robotic surgery requires deliberation, i.e. the ability to plan and execute a task adapting to uncertain and dynamic environments. Uncertainty in the surgical domain is mainly related to the partial pre-operative knowledge about patient-specific anatomical properties. In this paper, we introduce a logic-based framework for surgical tasks with deliberative functions of monitoring and learning. The DEliberative Framework for Robot-Assisted Surgery (DEFRAS) estimates a pre-operative patient-specific plan, and executes it while continuously measuring the applied force obtained from a biomechanical pre-operative model. Monitoring module compares this model with the actual situation reconstructed from sensors. In case of significant mismatch, the learning module is invoked to update the model, thus improving the estimate of the exerted force. DEFRAS is validated both in simulated and real environment with da Vinci Research Kit executing soft tissue retraction. Compared with state-of-theart related works, the success rate of the task is improved while minimizing the interaction with the tissue to prevent unintentional damage.

Index Terms-Planning under uncertainty; Surgical robotics: planning; Software architectures for robotics

I. INTRODUCTION

In recent years, research in surgical robotics has focused on the automation of surgical tasks, for its potential to provide physical and cognitive support to the surgeon [START_REF] Yang | Medical robotics-regulatory, ethical, and legal considerations for increasing levels of autonomy[END_REF]. Existing works in this field have mainly considered structured and controlled environments [START_REF] D'ettorre | Accelerating surgical robotics research: A review of 10 years with the da vinci research kit[END_REF]. This assumption makes current approaches still far from the applicability to real clinical scenarios, which consist of deformable tissues whose mechanical properties are unknown pre-operatively, leading to intra-operative uncertainty [START_REF] Attanasio | Autonomy in surgical robotics[END_REF].

To cope with real deformable anatomical environments, an Autonomous Robotic Surgery (ARS) system shall integrate the following skills: ' it should provide interpretable plans, which can be easily understood by a supervising surgeon, to guarantee reliability of the ARS system [START_REF] Attanasio | Autonomy in surgical robotics[END_REF], [START_REF] Fiazza | Design for interpretability: Meeting the certification challenge for surgical robots[END_REF], as required from level 2 of autonomy [START_REF] Yang | Medical robotics-regulatory, ethical, and legal considerations for increasing levels of autonomy[END_REF].

To address autonomy in real deformable surgical environments, we rely on a biomechanical simulation initialized with pre-operative information both to generate a patientspecific surgical plan pre-operatively and to detect possible unexpected behavior intra-operatively, via comparison with real sensor data. The specific contributions of this work are: 1) we present DEFRAS, a DEliberative Framework for Robot-Assisted Surgery that integrates skills necessary to cope with the uncertainties and the dynamic behavior of anatomical environments, while guaranteeing task completion and respect of safety constraints; 2) we demonstrate it for a representative surgical task with uncertainty, i.e. soft tissue retraction, both in simulated and real experiments with the da Vinci Research Kit (dVRK) [START_REF] Kazanzides | An open-source research kit for the da vinci R surgical system[END_REF]; 3) we publicly share the framework at https://gitlab.com/ altairLab/tissue retraction.git.

The paper is organized as follows. In Section II we review recent frameworks for surgical robotic autonomy under uncertainty and generic frameworks for deliberation; we then describe DEFRAS and our implementation of the tissue retraction task in Sections III and IV respectively; Section V describes the conducted validation experiments and Section VI reports the obtained results. Finally, we draw our conclusions in Section VII. c 2022 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

II. RELATED WORKS

Uncertainty poses challenges to ARS systems relying only on prior knowledge about anatomical models and/or task description [START_REF] Nagy | A dvrk-based framework for surgical subtask automation[END_REF]. Previous works have tried to deal with the different sources of uncertainty in the surgical domain, e.g. implementing strategies for accurate instrument and anatomy localization [START_REF] Sen | Automating multi-throw multilateral surgical suturing with a mechanical needle guide and sequential convex optimization[END_REF], [START_REF] Shademan | Supervised autonomous robotic soft tissue surgery[END_REF], online update of soft tissues models [START_REF] Wu | Leveraging vision and kinematics data to improve realism of biomechanic soft tissue simulation for robotic surgery[END_REF], [START_REF] Liu | Real-to-sim registration of deformable soft tissue with position-based dynamics for surgical robot autonomy[END_REF], workflow recognition [START_REF] Rossi | Cognitive robotic architecture for semiautonomous execution of manipulation tasks in a surgical environment[END_REF] and task model refinement [START_REF] Berthet-Rayne | Hubot: A three state human-robot collaborative framework for bimanual surgical tasks based on learned models[END_REF], [START_REF] Murali | Learning by observation for surgical subtasks: Multilateral cutting of 3d viscoelastic and 2d orthotropic tissue phantoms[END_REF]. Model predictive control has also been exploited to deal with uncertainty at motion planning level [START_REF] Rossi | Cognitive robotic architecture for semiautonomous execution of manipulation tasks in a surgical environment[END_REF], [START_REF] Kehoe | Autonomous multilateral debridement with the raven surgical robot[END_REF].

While existing works have attempted either to reduce uncertainty at sensing level or to deal with it at motion/task level, in this paper we address both aspects by introducing deliberative functions of autonomous agents [START_REF] Ingrand | Deliberation for autonomous robots: A survey[END_REF]. In particular, we integrate specific modules for uncertainty monitoring and pre-operative model refinement through online learning within a framework for robot-assisted surgery [START_REF] Meli | Autonomous tissue retraction with a biomechanically informed logic based framework[END_REF] that guarantees task-level interpretability with logic programming and supports online re-planning. Several paradigms for deliberation have been proposed in the field of artificial intelligence, focusing on different aspects of autonomy, e.g. planning [START_REF] Bratman | Intention, Plans, and Practical Reason[END_REF]- [START_REF] Bratman | Plans and resource-bounded practical reasoning[END_REF] and learning [START_REF] Bolisani | Knowledge strategy planning: an integrated approach to manage uncertainty, turbulence, and dynamics[END_REF]. However, in order to guarantee adaptability to diverse complex tasks, here we focus on the integration and parallel development of different skills for autonomy, which can be improved individually depending on the task of interest. For this reason, our framework builds on the modular architecture and definitions of deliberative functions described in [START_REF] Ingrand | Deliberation for autonomous robots: A survey[END_REF], which reports a large number of robotic applications.

III. DEFRAS: DELIBERATIVE FRAMEWORK FOR ROBOT-ASSISTED SURGERY

Our deliberative architecture is shown in Fig. 1. A task planning module computes the task plan, i.e. the sequence of actions to solve the task. Actions are elementary operations which correspond to a single motion trajectory or joint-level command (e.g., reaching a target or grasping), according to the granularity definitions described in [START_REF] Lalys | Surgical process modeling: a review[END_REF]. The plan is computed based on available expert procedural knowledge, conveniently expressed in the declarative logic programming formalism of Answer Set Programming (ASP) [START_REF] Lifschitz | Answer set programming and plan generation[END_REF], [START_REF] Calimeri | Asp-core-2 input language format[END_REF]. The ASP task description encodes entities, i.e. definitions of actions, tools and relevant anatomical features as logic variables and predicates (atoms). Logical implications between atoms are implemented to define pre-conditions and effects of actions, and constraints (e.g., infeasibility of some actions). Answer sets are then computed by ASP solver Clingo [START_REF] Gebser | A user's guide to gringo, clasp, clingo, and iclingo[END_REF] as the minimal sets of grounded atoms (i.e., with assignments of variables), hence including the shortest plans along with the corresponding environmental features. This enhances task-level interpretability. Throughout task execution, the sensing module analyses the state of the robot and the environment, to provide high-level environmental features for task planning and targets for motion planning (acting module). Moreover, it recognizes whether critical conditions occur, in which cases it triggers task re-planning or motion interruption to prevent risks. The monitoring module continuously estimates if the internal model of the environment, given by a patient-specific simulation initialized with pre-operative information and running in parallel, is coherently representing the actual scenario. To this aim, a task-specific metric assessing the level of discrepancy between the real and the simulated environments is computed starting from sensing information. Depending on discrepancy, different warning states are raised, associated with specific strategies at task-motion level to increase reliability and accommodate safety. Finally, the learning module is in charge of updating the pre-operative model from real data in warning states, to compensate for environmental uncertainty caused by inaccurate model parametrization.

IV. TISSUE RETRACTION WITH DEFRAS

DEFRAS functionalities are tested on autonomous execution of Tissue Retraction (TR), a representative surgical task which involves the interaction with soft anatomical tissues, whose properties might be not fully known before the intervention [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF], [START_REF] Pore | Safe reinforcement learning using formal verification for tissue retraction in autonomous robotic-assisted surgery[END_REF]. It consists in grasping and retracting soft tissues to expose a hidden Region Of Interest (ROI) to an intra-operative camera (Fig. 3). The tissue is attached to surrounding anatomies in correspondence of Attachment Points (APs). Previous works for autonomous TR have proposed either to generate the plan by optimizing some metrics [START_REF] Pore | Safe reinforcement learning using formal verification for tissue retraction in autonomous robotic-assisted surgery[END_REF]- [START_REF] Tagliabue | Soft tissue simulation environment to learn manipulation tasks in autonomous robotic surgery[END_REF] or to learn the task from human demonstrations [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF], [START_REF] Shin | Autonomous tissue manipulation via surgical robot using learning based model predictive control[END_REF], [START_REF] Pedram | Toward synergic learning for autonomous manipulation of deformable tissues via surgical robots: An approximate q-learning approach[END_REF]. However, none of them integrates methods to reason on the current environment and deal with unexpected situations which might occur in real surgery.

A. TR implementation with DEFRAS

The task is executed on the dVRK, whose Patient-Side Manipulators (PSMs) are equipped with ProGrasp R surgical grasping tools. In general, ROI exposure is obtained primarily by pulling up the tissue after grasping. The grasping location on the tissue can be reached by either one of the PSMs, depending on reachability conditions defined with respect of the tissue center1 , to avoid instrument collision during operation. However, pulling is not always successful due to kinematic limitations imposed by the anatomical environment and the insertion points of the instruments in the body, which define fixed pivots for the robotic arms. Furthermore, pulling may induce high forces which can damage the tissue. In these cases, alternative actions can be performed, such as moving the tissue in a parallel plane to the tissue surface, either folding it away from the intra-operative camera or possibly towards the ROI.

In this work, we create a physics-based model of the anatomy leveraging on tissue geometric and mechanical properties as well as locations of the ROI and Attachment Points (APs) obtained from pre-operative data. Such model is used to initialize a simulation which is exploited to find a patient-specific task plan in the pre-operative phase. We select the plan that maximizes the economy of motion and reduces the risk of critical events (see Section V for details). The pre-operative plan is then executed in the real environment.

During execution, the physics-based simulation is run in parallel, and the state of the real environment is continuously monitored with intra-operative sensors (Fig. 1). When mismatch between simulation and reality is identified, the preoperative plan may become sub-optimal or even infeasible, hence simulation parameters may be updated and specific strategies to improve the plan are implemented. In this work, we focus on the update of APs. Although APs can be initialized pre-operatively based on anatomical knowledge, previous works have shown that their proper definition is possible only during interaction with the tissue [START_REF] Nikolaev | Estimation of boundary conditions for patient-specific liver simulation during augmented surgery[END_REF], [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF].

The reason why we focus on APs is twofold. Firstly, they constitute model boundary conditions, thus represent an important parameter influencing simulation accuracy [START_REF] Nikolaev | Estimation of boundary conditions for patient-specific liver simulation during augmented surgery[END_REF], [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF]. Secondly, knowledge of APs location is very important in TR to prevent the pulling of highly constrained areas, minimizing the risk of tissue damage. The online simulation also continuously provides an estimate of the applied force on the tissue, compensating for the lack of force feedback in surgical robotic systems.

B. Task planning

Possible actions implemented in ASP task description are reaching a grasping point, opening gripper, grasping, pulling the tissue and folding it, either moving planarly towards the ROI or moving away from the intra-operative camera. They are expressed as predicates in plain English action(tool, object, property, time), e.g., reach(A, point, (X,Y), t), being A a generic tool, (X,Y) the coordinates of a grasping point and t a discrete time step. Possible grasping points are defined as ASP entities to be evenly spaced on the tissue surface. This allows to exploit built-in ASP optimization to select the most reasonable grasping point in case of re-planning, as the one farthest from APs and closest to ROI [START_REF] Meli | Autonomous tissue retraction with a biomechanically informed logic based framework[END_REF]. This is a commonsense approach to minimize tissue damage and expose ROI fast, but different strategies are also possible, e.g., [START_REF] Jansen | Surgical retraction of non-uniform deformable layers of tissue: 2d robot grasping and path planning[END_REF]. Relevant environmental features include reachability conditions, mutual locations of APs, ROI and tools and conditions on force and height of PSMs, as in [START_REF] Meli | Autonomous tissue retraction with a biomechanically informed logic based framework[END_REF]. They are expressed as predicates similarly to actions (e.g., max force(A, t)). Logical implications encode action pre-conditions, effects, constraints and the goal (i.e., the ROI must be eventually exposed). For instance, grasp only reachable points becomes grasp(A, point, (X,Y), t) :-reachable(A, point, (X,Y), t), where :-is ASP notation for Ð.

C. Sensing and acting

The sensing module continuously receives the state of the robot and the environment. The state of the robot consists of the position of tools and opening angles of grippers. The state of the environment includes the point cloud of tissue surface P C t and the ROI from the intra-operative camera; he position of the ROI, known APs and estimated Algorithm 1 Monitoring module return s " 0; r " r; learn=False forces at each tissue point from the simulation. Geometric reasoning is performed in real time on input data to ground anatomical features for task planning and anomaly detection. In particular, the sensing module continuously checks whether excessive force is applied to the tissue. When the maximum tissue force F exceeds a pre-defined threshold , DEFRAS first tries to reduce tissue solicitation by decreasing motion velocity [START_REF] Wang | Influence of clamping stress and duration on the trauma of liver tissue during surgery operation[END_REF], otherwise motion is interrupted and re-planning is triggered. Input data is also used to compute target positions for actions (e.g., locations of grasping points for reach). Orientations of PSMs are kept constant for simplicity. The acting module then translates ASP actions to joint (grasp, release) or Cartesian trajectories for the dVRK.

D. Monitoring

The monitoring module continuously receives P C t and the point cloud of the simulated tissue P C s from the sensing module, and computes a discrepancy metric µ, chosen as the median Euclidean distance of closest points between P C t and P C s (Alg. 1). The distance is normalized with respect to its rest value (i.e., before grasping occurs) to compensate for offsets induced by registration error and sensor noise. Inspired from recent works as [START_REF] Machin | Smof: A safety monitoring framework for autonomous systems[END_REF], the monitoring module considers 3 thresholds δ 1 , δ 2 , δ 3 (empirically set to 2, 4 and 6 mm) to classify the system state. n particular, when µ ą δ 1 the motion velocity is reduced for caution, to minimize the risk of applying excessive forces [START_REF] Wang | Influence of clamping stress and duration on the trauma of liver tissue during surgery operation[END_REF] and allow prompt response to anomalies. If δ 2 is exceeded, motion is interrupted and re-planning is asked at task level. In both states, the learning module is triggered to update environmental knowledge exploiting data from sensors. Overcoming δ 3 results in interruption of DEFRAS and human intervention is required.

E. Learning

The learning module focuses on the intra-operative update of APs whenever required by the monitoring module. Update relies on BANet, a deep neural network which predicts APs starting from the tissue pre-operative geometry and the current observed P C t [START_REF] Tagliabue | Data-driven intra-operative estimation of anatomical attachments for autonomous tissue dissection[END_REF]. This method has proved suitable for intra-operative model refinement, requiring a very low inference time and even improving biomechanical model accuracy [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF]. The new estimate of APs is used both to refine the simulated physics-based model, thus improving its reliability (especially of the force estimate), and to update the knowledge of the regions to avoid in case of re-planning.

V. EXPERIMENTS

We consider the problem of retracting a thin layer of soft tissue (120x120x5 mm) to expose at least 80% of ROI surface to the endoscopic camera, which is placed at the main surgical viewpoint (Fig. 3). In particular, we aim at assessing the capability of DEFRAS to accomplish TR task, coping with inaccurate parametrization of the available model of the environment from pre-operative information.

For monitoring purposes, we continuously capture the tissue point cloud P C t with an additional Intel R Realsense D435 RGBD sensor, placed opposite to the endoscope to maximize tissue visibility during manipulation, as done in [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF]. The RGBD sensor, endoscopic camera and the PSMs are calibrated with respect to a common reference placed at the center of the tissue, using the methodology described in [START_REF] Roberti | Improving rigid 3-d calibration for robotic surgery[END_REF]. The simulated environment is aligned to the same reference frame and a simulated RGBD sensor placed in the same position as the real one provides the point cloud of the simulated tissue P C s . Tissue deformable behavior is modelled relying on the laws of continuum mechanics, solved with the finite element method using the SOFA framework [START_REF] Faure | Sofa: A multi-model framework for interactive physical simulation[END_REF]. The tissue is described as a linear elastic material with Young's modulus 3 kPa and Poisson ratio 0.45 [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF], relying on the corotational formulation to handle large deformations while guaranteeing computational efficiency. For all experiments in this paper, we consider a set of 25 possible grasping points, regularly spaced over a 5x5 grid to maximize computational efficiency [START_REF] Meli | Autonomous tissue retraction with a biomechanically informed logic based framework[END_REF]. We design 17 pre-operative configurations of tissue with different locations for APs and ROI (Fig. 2a-3b).

As an initial step, we perform an exploratory search to identify a reasonable value for the force threshold . For each pre-operative configuration we launch DEFRAS only in simulation, deactivating learning and monitoring and ignoring force measurements. We compute plans for all possible grasping points under these conditions, and we record the estimated forces from the simulation. We obtain a median force F m " 0.15 N among all 425 executions. F m is chosen to represent the typical force on the tissue in the considered setup, hence we set " 2F m " 0.3 N.

Afterwards, for each pre-operative configuration we generate an optimal patient-specific TR plan as follows. We launch DEFRAS in simulation without learning and monitoring modules, but now including force measurements. We record plans originated picking all possible grasping points, and we select only plans maximizing the exposure goal, i.e. reaching a minimum visibility of 80%. Among these, we select the 3 plans minimizing F max , which is the maximum recorded tissue force over the entire execution. Finally, we choose the optimal plan as the one with the lowest number of actions, thus minimizing interaction with tissue and obtaining the maximum economy of motion. We validate the full DEFRAS both in simulation (8 out of 17 pre-operative configurations) and on real setup (9 out of 17 pre-operative configurations).

A. Simulation Experiments

Each of the 8 pre-operative scenarios considered in our simulation experiments is characterized by a different configuration of APs (red outlines in Fig. 2) extracted as proposed in [START_REF] Tagliabue | Data-driven intra-operative estimation of anatomical attachments for autonomous tissue dissection[END_REF]. For each pre-operative scenario, we generate optimal plans following the strategy described above. Each preoperative plan is executed by DEFRAS on two validation scenarios: the former with fewer APs (between 20-60%) and the latter with more APs (between 140-160%) with respect to the corresponding pre-operative configuration. These experiments emulate the realistic situation where initial knowledge of APs is not precise, thus the pre-operative plan might need adjustment due to mismatch between the current and the simulated environments. To run these experiments, we rely on two parallel simulations: the former (pre-operative simulation) represents the simulated environment in the scheme of Fig. 1, estimating the tissue forces and initialized with pre-operative APs; the latter (actual simulation) represents the validation scenario with either fewer or more APs than the pre-operative simulation, with simulated dVRK and cameras. Visibility in the actual simulation is computed by counting the number of visible ROI points from the simulated endoscope, assessed via ray-casting technique. The monitoring module continuously compares the tissue point clouds from the two simulations, triggering specific interventions according to Alg. 1. To assess the performance of the monitoring module, we compute the success rate of APs update with BANet as ratio between the number of times the update results in µ ď δ 1 in Alg. 1 (no warning from monitoring) and the number of times BANet is triggered because µ ą δ 1 (warning state).

We compare the performance of DEFRAS with respect to FRAS [START_REF] Meli | Autonomous tissue retraction with a biomechanically informed logic based framework[END_REF], the most similar framework in the surgical literature, in order to show the advantages of monitoring and learning modules in a deliberative architecture for autonomous robotic surgery. Therefore, we let FRAS perform autonomous TR on the actual simulations. It is worth recalling that FRAS does not rely on any pre-operative plan.

B. Real World Experiments

The performance of DEFRAS is evaluated on autonomous TR of silicone tissue with the real dVRK (Fig. 3). Similarly to [START_REF] Tagliabue | Data-driven intra-operative estimation of anatomical attachments for autonomous tissue dissection[END_REF], APs are defined by stitching the tissue on an attachment board with regularly spaced holes every 10 mm. The point cloud of the tissue in real environment is acquired after color-based segmentation and decimation of the raw point cloud from Realsense as in [START_REF] Tagliabue | Intra-operative update of boundary conditions for patient-specific surgical simulation[END_REF], and compared with the point cloud from the simulated environment for monitoring. Visibility in the real environment is computed detecting the ROI (with known size and position) from the endoscopic camera images with color-based segmentation and considering the percentage of visible pixels, as in [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF].

We consider three real world scenarios (A, B and C), obtained by stitching the tissue to the attachment board with 3 different configurations of APs (light blue in Fig. 3b). For each scenario, we consider 3 pre-operative models, each characterized by a different pre-operative knowledge of APs: [START_REF] Yang | Medical robotics-regulatory, ethical, and legal considerations for increasing levels of autonomy[END_REF] fewer APs (between 20-60%), (2) more APs (between 140-160%), and (3) same APs than/as the real scenario (Fig. 3b). For each of them, we generate the pre-operative plan in simulation, and test DEFRAS on the corresponding real configuration with the dVRK.

Moreover, we analyze the performance of our framework with respect to two state-of-the-art implementations of autonomous TR on real setups. In particular, we select the work by Pore et al. [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF], which proposes reinforcement learning to generate an optimal motion-level policy for retraction, and the one by Attanasio et al. [START_REF] Attanasio | Autonomous tissue retraction in robotic assisted minimally invasive surgery-a feasibility study[END_REF], which relies on image-guided control to reveal a ROI behind tissue flap. Similarly to us, both these approaches evaluate task success as percentage of ROI exposure upon task completion.

VI. RESULTS AND DISCUSSION

A. Simulation Experiments

The optimal plans for each pre-operative configuration successfully expose the ROI with a maximum of 6 actions, with the force exceeding the safety threshold at most once, but always keeping F max below 0.4 N.

Table I details the results obtained with DEFRAS and FRAS on scenarios with fewer and more APs than the corresponding pre-operative configuration. With DEFRAS, the ROI is successfully exposed in 13 out of 16 cases, even when the pre-operative information (i.e., knowledge of APs) is imprecise. Results show that, even when starting from pre-operative plans which minimize the tissue force, the force threshold can be exceeded during task execution, hence force feedback is needed to prevent dangerous tissue solicitation. The tissue force reaches higher values (ą 1 N) mostly in scenarios with more APs than the pre-operative configuration (' in Table ). This is motivated by the fact that optimal plans might select a grasping point close to APs that are unknown pre-operatively. In this case, monitoring detects a discrepancy between the pre-operative simulation and the actual simulation, and triggers learning for APs update close to the current grasping point, resulting in high force estimate. The results of our framework also show that when preoperative APs overestimate actual APs (a in Table ), fewer actions are needed with respect to the case when APs are underestimated. Therefore, overestimating APs in the preoperative phase leads to more optimized task executions, reducing (potentially unsafe) interaction with the tissue.

From the comparison with FRAS, the presence of the preoperative plan in DEFRAS proves fundamental to optimize executions in terms of tissue solicitation. Monitoring and learning modules in DEFRAS also improves performance. Whenever the mismatch between the pre-operative simulation and the actual simulation causes the monitoring module to trigger update of APs, BANet is able to provide an updated estimate of APs that brings the monitoring metric below threshold, except cases 1' (task success, ROI is exposed) and 5a (the task fails). Overall, the integration of the proposed deliberative modules results in higher median visibility (100% vs. 93%), lower number of failed tasks (3 vs. 5) and less frequent overcoming of the force threshold (-25% times, with -30% median force) with respect to FRAS. We notice that FRAS is able to solve the task when DEFRAS fails in configurations 3a and 5a. However, in both cases the monitoring module triggers APs update and the force threshold is overcome more times than all other configurations. This suggests that the pre-operative knowledge of APs is particularly far from reality in these cases, meaning that the estimate of the force from the pre-operative simulation provided by FRAS might be unreliable.

B. Real World Experiments

Table II presents the results of experiments on the real setup. Obtained results confirm that whenever pre-operative APs underestimate real APs, the monitoring and learning modules are triggered more frequently. The update of APs leads to successful task completion in all cases. Moreover, when the simulated and real APs match, the number of actions is usually minimum (except for configuration B, with 8 actions for " l and 7 for '). This suggests that overall the optimal pre-operative plan leads to better performances when APs are perfectly known.

In the video attachment, we show the executions in configuration A. The video shows that DEFRAS is able to re-plan and complete the task in case of grasping close to unknown APs (a) and null visibility after optimal plan ('). Re-planning proves able to successfully expose the ROI in both cases. Monitoring module detects a mismatch also in " l case, due to uncertainty introduced by real cameras and the calibration procedure. However, DEFRAS is able to cope with such situation and successfully complete the task.

The average visibility achieved by DEFRAS is 94%, which is aligned with the 90% visibility obtained by [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF], and improves the one reported in [START_REF] Attanasio | Autonomous tissue retraction in robotic assisted minimally invasive surgery-a feasibility study[END_REF] (83%). Both reference works do not implement monitoring and learning.

VII. CONCLUSIONS

In this paper we proposed DEFRAS, a deliberative framework for autonomous robotic surgery. We introduced the fundamental capabilities of monitoring and learning in the context of a logic-based framework for autonomous interpretable planning, to deal with the uncertainty of anatomical environments. Experiments on a representative soft tissue retraction task have shown that our framework can learn and refine available pre-operative knowledge about APs in an online simulation, relying on constant monitoring of sensors and simulation data. In this way, any pre-operative plan can be adapted, and tissue force information from the simulation remains reliable for task completion. Compared with a framework lacking deliberative functions and recent tissue retraction implementations, results show that the percentage of task success increases, especially when prior APs are overestimated. Moreover, reliance on a preoperative patient-specific plan brings benefits in terms of minimal manipulation of the tissue, hence reduced risk of tissue damage.

The modularity of DEFRAS will allow us to improve individual deliberative capabilities in order to deal with more realistic and challenging surgical scenarios in future works. Motion adaptation and learning as in [START_REF] Pore | Learning from demonstrations for autonomous soft-tissue retraction[END_REF], [START_REF] Ginesi | Overcoming some drawbacks of dynamic movement primitives[END_REF] will be implemented to replicate expert surgeons' dexterity. Furthermore, we plan to improve task knowledge with pre-operative [START_REF] Bombieri | Automatic detection of procedural knowledge in robotic-assisted surgical texts[END_REF] and intra-operative learning [START_REF] Meli | Inductive learning of answer set programs for autonomous surgical task planning[END_REF], [START_REF] Meli | Towards inductive learning of surgical task knowledge: A preliminary case study of the peg transfer task[END_REF]. Finally, we will cope with surgical-specific problems as vision occlusion.

Fig. 1 .

 1 Fig. 1. DEFRAS architecture (deliberative functions in blue boxes).Green lines represent pre-operative information. Red lines trigger actions only when monitoring threshold is exceeded.

Fig. 2 .

 2 Fig. 2. (a) Configurations of APs used for the experiments in simulation. The red outline delimits the pre-operative configuration used to generate the plan; considered actual simulations are in blue (a) and green ('); magenta sphere represents the ROI. (b) Zoom in on the pre-operative configuration for case 0; (c) Zoom in on the ' actual configuration for case 0; (d) Zoom in on the a configuration for case 0.

Fig. 3 .

 3 Fig. 3. (a) The setup for TR with dVRK. (b) Configurations of APs used for the real world experiments. The light blue region in each subimage represents the configuration of APs in the real setup (" l). Blue and green regions indicate pre-operative configurations with fewer APs (a) and more APs (') than the real configuration. Magenta sphere represents the ROI.

1 :

 1 Input: P C t , P C s , motion rate r, grasped tissue 2: Output: Warning state s, motion rate r, trigger learning learn 3: Init: d rest " rs 4: while not task ended do rest .append(||P C t ´P C s || 2 )

	5:	while not grasped tissue do
	6:
	7:	d rest "meanpd rest q
	8:	d " ||P C t ´P C s || 2
	9:	µ " d ´drest
	10:	if δ 1 ă µ ď δ 2 then
	11:	return s " 1; r " r 2 ; learn=True
	12:	else if δ 2 ă µ ď δ 3 then
	13:	return s " 2; r " 0; learn=True
	14:	else if µ ą δ 3 then
	15:	return s " 3; r " 0; learn=False
	16:	else
	17:

d

TABLE I SIMULATION

 I EXPERIMENTS WITH FEWER (a) AND MORE (') APS THAN PRE-OPERATIVE CONFIGURATION. FOR EACH METRIC, UPPER ROW IS REFERRED TO DEFRAS (D), LOWER ROW TO FRAS (F). "BANET" ROW REPORTS THE SUCCESS RATE OF APS UPDATE WITH BANET IN DEFRAS.

			0		1		2		3		4		5		6		7
			a	'	a	'	a	'	a	'	a	'	a	'	a	'	a	'	Median	IQR
	multirow2*Visibility [%]	D	100 100 100 100 100 0	9	95	100 100 0	100 100 100 100 100	100	98-100
		F	100 90	100 0	0	0	90	0	100 100 100 0	97	93	93	93	93	0-100
	Actions	D F	4 5	11 6	6 15	6 23	6 22	30 22	38 7	12 22	5 17	26 19	29 7	25 22	5 16	30 16	5 9	5 15	8 16	5-26 8-22
	F ą	D F	0 0	26 0	11 29	3 33	1 32	44 28	240 27 11 40	0 21	46 29	99 0	83 28	8 27	61 18	1 20	3 12	18 24	2-49 11-29
	Fmax [N]	D F	0.2 1.3 0.4 0.4 0.4 1.4 0.9 1.8 0.3 1.7 3.3 3.3 0.4 1.2 0.3 0.4 0.3 0.3 1.0 1.0 1.1 1.0 0.4 1.2 0.9 0.9 0.3 1.1 0.9 0.9 1.2 0.9	0.6 0.9	0.4-1.5 0.8-1.0
	BANet	D	1/1 1/1 -	0/1 2/2 1/1 6/6 -	1/1 2/2 11/12 -	1/1 4/4 2/2 -	-	-

TABLE II REAL

 II WORLD EXPERIMENTS WITH DEFRAS. FOR EACH REAL WORLD CONFIGURATION (A, B, C), WE REPORT DETAILS OF TR EXECUTIONS WHEN UNDERESTIMATING REAL APS (a), OVERESTIMATING REAL APS (') AND HAVING PERFECT KNOWLEDGE OF THE REAL APS (" l).

			A			B			C
		a	'	" l	a	'	" l	a	'	" l	Median	IQR
	Visibility [%]	99	95	100	100	100	71	99	83	96	99	95-100
	Actions	13	15	9	24	7	8	14	7	7	9	7-14
	F ą	11	20	8	0	8	20	8	8	6	8	8-11
	Fmax [N]	1.2	1.1	0.5	0.2	0.5	1.1	1.1	0.7	0.5	0.7	0.5-1.1
	BANet	1/1	1/1	1/1	13/14	-	-	1/1	-	-	-	-

With reference to Fig.3, a point on the tissue is reachable by a PSM if it lies on the same side as the PSM with respect to the x ´z plane.

This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme under grant agreement No. 742671 (ARS). *Authors contributed equally to the work.