## Certifying Robustness of Learning-Based Keypoint Detection and Pose Estimation Methods

XUSHENG LUO, TIANHAO WEI, SIMIN LIU, and ZIWEI WANG, Carnegie Mellon University, USA

LUIS MATTEI-MENDEZ, TAYLOR LOPER, and JOSHUA NEIGHBOR, The Boeing Company, USA

CASIDHE HUTCHISON and CHANGLIU LIU, Carnegie Mellon University, USA

This work addresses the certification of the local robustness of vision-based two-stage 6D object pose estimation. The two-stage method for object pose estimation achieves superior accuracy over the single-stage approach by first employing deep neural network-driven keypoint regression and then applying a Perspectiven-Point (PnP) technique. Despite advancements, the certification of these methods' robustness, especially in safety-critical scenarios, remains scarce. This research aims to fill this gap with a focus on their local robustness on the system level-the capacity to maintain robust estimations amidst semantic input perturbations. The core idea is to transform the certification of local robustness into a process of neural network verification for classification tasks. The challenge is to develop model, input, and output specifications that align with off-the-shelf verification tools. To facilitate verification, we modify the keypoint detection model by substituting nonlinear operations with those more amenable to the verification processes. Instead of merely injecting random noise into images, as is common, we employ a convex hull representation of images as input specifications to more accurately depict semantic perturbations. Furthermore, by conducting a sensitivity analysis, we propagate the robustness criteria from pose estimation to keypoint accuracy, and then formulating an optimal error threshold allocation problem that allows for the setting of a maximally permissible keypoint deviation thresholds. Viewing each pixel as an individual class, these thresholds result in linear, classification-akin output specifications. Under certain conditions, we demonstrate that the main components of our certification framework are both sound and complete, and validate its effects through extensive evaluations on realistic perturbations. To our knowledge, this is the first study to certify the robustness of large-scale, keypoint-based pose estimation given images in real-world scenarios.

CCS Concepts: · Computer systems organization → Embedded and cyber-physical systems ; · Computing methodologies → Computer vision problems .

Additional Key Words and Phrases: Neural networks verification, robust pose estimation, keypoint detection

## 1 Introduction

In the realm of computer vision, vision-based 6D object pose estimation, i.e., 3D rotation and 3D translation of an object with respect to the camera, serves as a pivotal method for identifying, monitoring, and interpreting the posture and movements of objects through images [14, 44] This technology is fundamental in granting machines the ability to comprehend the physical environment, finding its utility in diverse domains such as robotics [8, 9], augmented reality [43], and human-computer interaction [57]. The evolution of deep learning and the adoption of neural networks, particularly convolutional neural networks (CNNs), have markedly surpassed traditional techniques that depend on manually engineered features. Within the spectrum of learning-based approaches, a distinct classification exists: single-stage methods directly estimate the 6D pose from an image [10, 25, 58]. Conversely, a more widespread and accurate category of methods employs a two-stage strategy, initially regressing sparse keypoints [16, 31, 35] or dense pixels [27, 32, 33, 39, 48]

Authors' Contact Information: Xusheng Luo, xushengl@andrew.cmu.edu; Tianhao Wei, twei2@andrew.cmu.edu; Simin Liu, siminliu@andrew.cmu.edu; Ziwei Wang, ziweiwa2@andrew.cmu.edu, Carnegie Mellon University, Pittsburgh, Pennsylvania, USA; Luis Mattei-Mendez, Luis.E.Mattei-Mendez@boeing.com; Taylor Loper, taylor.s.loper@boeing.com; Joshua Neighbor, joshua.neighbor@boeing.com, The Boeing Company, Seattle, Washington, USA; Casidhe Hutchison, fhutchin@nrec.ri.cmu. edu; Changliu Liu, cliu6@andrew.cmu.edu, Carnegie Mellon University, Pittsburgh, Pennsylvania, USA.

Luo et al.

Fig. 1. Overview of the PnP-based pose estimation and the proposed verification framework. A thick red dashed line divides the sections for pose estimation (above) and verification (below). For pose estimation, a seed image X 0 is processed by the target model F target to identify keypoints, which are then input into the PnP method G to determine the pose R and t . The verification framework takes as input the seed image X 0 and a set of perturbed images X that form the convex hull X , along with the pose error bound 𝝐 . Through sensitivity analysis, this pose error bound is transformed into a keypoint error bound, which in turn determines the parameters of the average pooling operation. This substitution replaces the less verification-friendly softmax operation, creating the proxy model F proxy. By checking the inclusion relation between the reachable set of model F proxy and the output specification, the verification tool returns whether the model is robustness.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-35b33acc-1e6d-45c0-a7b1-e0b97f94dff8.jpg)

from the image, followed by the utilization of a Perspective-n-Point (PnP)-based strategy for pose estimation through established 3D-2D point correspondences.

Despite the increasing efforts to boost the empirical robustness of these methods against challenges like occlusions, fluctuating lighting, and varied backgrounds, the focus on validating or certifying the reliability of vision-based pose estimation systems remains minimal. The absence of performance assurances for these frameworks raises concerns about their integration into safety-critical applications. In this work, our objective is to certify the robustness of learning-based keypoint detection and pose estimation approaches given input images. We focus on the aspect of local robustness, which refers to the ability to maintain consistent performance or predictions when the input data is perturbed around a given input point. The core question is determining whether pose estimation stays within an acceptable range when the input image undergoes perturbations. To the best of our knowledge, this study is the first one to certify the robustness of large-scale, keypoint-based pose estimation problem encountered in the real world.

Given the crucial role of neural networks in learning-based visual pose estimation, certifying their robustness is inherently linked to neural network verification [28]. This area of verification has attracted significant attention in recent years, driven by the paradox of widespread adoption of neural network solutions without adequate assurance of their reliability, primarily due to their opaque nature [5]. What distinguishes our problem from existing neural network (NN) verification efforts is our focus on system-level properties rather than on verifying attributes of isolated neural networks, which typically relate directly to the NN outputs [2, 23, 49]. For example, in robustness verification of classification models, the objective is to ensure the predicted class remains unchanged despite variations in input. Our research, however, targets the pose estimation framework, wherein the NN constitutes only one component of the entire system. The verification encompasses system-wide requirements, necessitating not just the evaluation of the keypoint detection model's robustness but also that of the PnP-based method.

## 1.1 Overview of the Approach

To certify the robustness of the two-stage keypoint-based pose estimation framework, our main idea is to convert the local robustness certification of pose estimation into a standard neural network verification problem for classification networks. The primary challenge involves crafting three verification components-model, input, and output specifications-in a manner that is compatible with existing verification tools. A graphical overview is provided in Fig. 1.

Model modification for verification. Considering the keypoint detection model involves complex nonlinear operations such as the softmax function, a variant of the model that is more amenable to verification is created, and an analysis is conducted to understand the properties that are maintained between the original and this modified model.

Input specification through convex hulls. To account for realistic semantic perturbations in input images, we define the input space as a convex hull of possible perturbed images, which captures variations in a mathematically rigorous manner, allowing for a linear representation of input perturbations. Such a specification outperforms existing methods that simply introduce random independent noise into images.

Output specification via sensitivity analysis. The core of connecting system requirements with the neural network's output lies in conducting a sensitivity analysis of the downstream PnP method. By understanding how variations in detected keypoints affect the estimated pose, it's possible to translate system-level pose accuracy requirements into error thresholds for keypoint detection. By treating each pixel as a separate class, these thresholds are then used to define classification-like linear output specifications.

## 1.2 Contributions

Our contributions can be summarized as follows:

- (1) We propose a local robustness certification framework for the learning-based keypoint detection and pose estimation pipeline;
- (2) We analyse the soundness and completeness properties of this certification framework;
- (3) We demonstrate the method's efficacy through validation on a real-world scale keypointbased pose estimation problem.

## 2 Related Work

## 2.1 Formal Verification of Neural Networks

The objective of verifying neural networks involves ensuring they meet certain standards of safety, security, accuracy, or robustness. This essentially means determining the truth of a specific claim about the outputs of a network based on its inputs. In recent years, there has been a significant influx of research in this area. For comprehensive insights into neural network verification, one can refer to [28]. Verification techniques are generally divided into three main groups: reachability-based approaches, which perform a layer-by-layer analysis to assess network output range [15, 47, 54]; optimization methods, which seek to disprove the assertion [3, 45]; and search-based strategies which combine with reachability analysis or optimization to identify instances that contradict the assertion [11, 23, 52, 55]. In 2020, VNN-COMP [5] launched as a competition to evaluate the capabilities of advanced verification tools spanning a variety of tasks, including collision detection, image classification, dataset indexing, and image generation. However, these methods treat deep neural networks in isolation, concentrating on analyzing the input-output relationship.

Concurrently, there is research focused on the system-level safety of cyber-physical systems (CPS) incorporating neural network components, particularly within the system and controls domain. They broadly fall into two categories. The first category [12, 13, 20, 46] focuses on ensuring the correctness of neural network-based controllers, taking their input from the structured outcomes of the state estimation module, regardless of the state estimation module is based on perception or not. Neural network controllers of this type generally consist of several fully connected layers, making them relatively straightforward to verify. The second category focuses on validating the closed-loop performance of vision-based dynamic systems that incorporate learning-based components. Among these, studies such as [18, 21, 22, 40, 41] examine LiDARs as the perception module, processed by multi-linear perceptrons (MLPs) with a few hidden layers. Other approaches, primarily applied to runway landing and lane tracking, deal with high-dimensional inputs from camera images, employing methods like approximate abstraction of the perception model [18], contract synthesis [1], simplified networks within the perception model [7, 24], or a domainspecific model of the image formation process [36]. Nevertheless, studies directly dealing with high-dimensional inputs from camera images are still limited due to the images' high dimensionality and unstructured data nature, in contrast to structured robot states such as position and velocity.

## 2.2 Certification of Keypoint Detection and Pose Estimation Methods

The investigation of certification methods for pose estimation is relatively limited. [42] introduced a certifiable approach to keypoint-based pose estimation from point clouds by correcting keypoints identified by the model, ensuring the correctness guarantee of the pose estimation. [38] expanded on this by integrating the correction concept with ensemble self-training. In a similar vein, By propagating the uncertainty in the keypoints to the object pose, [56] created a keypoint-based pose estimator for point clouds that is provably correct and is characterized by definitive worst-case error bounds. The above work focuses on point clouds as opposed to images. [53] applied an advanced deep learning technique for uncertainty quantification to assess the uncertainty (i.e., the predicted distribution of a pose) in multi-stage 6D object pose estimation methods. In contrast, [37] aimed to design a neural network that processes camera images to directly predict the aircraft's position relative to the runway with certifiable error bounds. Of all these studies, [26] is the most similar to our work, which focuses on the verification of keypoint detection, excluding the examination of the PnP method for system-wide assurances. Their approach verifies the neural network in isolation and is limited to very slight perturbations, failing to encompass realistic semantic variations.

## 3 Background

In this work, we represent scalars and scalar functions by italicized lowercase letters ( 𝑥 ), vectors and vector functions by upright bold lowercase letters ( x ), matrices and matrix functions by upright bold uppercase letters ( X ), and sets and set functions with calligraphic uppercase letters ( X ).

## 3.1 Keypoint-based Pose Estimation

The keypoint-based approach consists of two steps to estimate the 6D pose from a 2D model image. First, a neural network is tasked with predicting the 2D locations of keypoints, whose 3D locations are predefined within the object model. A common strategy involves the use of heatmap regression, wherein ground-truth heatmaps are created by placing 2D Gaussian kernels atop each keypoint. The heatmap pixel values are interpreted as the likelihood of each pixel being a keypoint. These heatmaps are then used to guide the training through an ℓ 2 loss. The detection network can be divided into two parts. A backbone network, denoted by F b , inputs a 2D image to produce unnormalized heatmaps, which is first followed by a softmax layer that transforms unnormalized heatmaps into normalized ones, and then by argmax operations, or another layer of

Fig. 2. Pose estimation of an airplane parked at airports is conducted using a PnP-based method. The method uses 23 keypoints, marked in red, which are placed across the airplane's surface to thoroughly cover the aircraft's body, as shown in the 3D model from [17] (right). These keypoints have predefined 3D coordinates within the airplane's coordinate system. An overhead image of the airplane is taken and 2D keypoints, marked in green, are identified through a keypoint detection network. The PnP-based method computes the transformation matrix between the plane and camera coordinate frames.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-27fa5259-3af7-4e34-ad06-7dd230412d0a.jpg)

differentiable spatial to numerical transformation (DSNT) [30] for keypoint extraction. We refer to the part after the softmax (including) as the head network. The entire network is represented by V = F X ( ) = F h ◦ F b ( X ) , where X ∈ R 𝐻 × 𝑊 𝐶 × represents a 2D RGB image with dimensions being 𝐻 × 𝑊 × 𝐶 , and V ∈ R 𝐾 × 2 denotes the 2D coordinates of 𝐾 keypoints. Here, ◦ denotes function composition. To enhance accuracy and robustness, it's often essential to preprocess the input image X before it is passed to the network, such as resizing and color normalization. Denote this preprocessing step by F 0 , leading to the equation V = F X ( ) = F h ◦ F b ◦ F 0 ( X ) . In what follows, we omit the preprocessing step unless it is critical to consider it.

The second step employs the Perspective-n-Point (PnP) algorithm, which executes a nonlinear least squares (NLS) optimization to estimate the 6D pose from established 3D-to-2D correspondences. An illustration of the pose estimation for an airplane is presented in Fig. 2. Let K ∈ R 3 × 3 denote the camera intrinsic parameter matrix, p 𝑘 ∈ R 3 denote the 3D coordinate of keypoint 𝑘 , where 𝑘 = 1 , . . . , 𝐾 , and v 𝑘 ∈ R 2 denote the corresponding 2D coordinate. These 3D-2D correspondences are formed through the following perspective projection model:

$$\lambda _ { k } \left [ \begin{matrix} \mathbf v _ { k } \\ 1 \end{matrix} \right ] = K ( \mathbf R p _ { k } + \mathbf t ),$$

where R ∈ R 3 × 3 and t ∈ R 3 represent the rotation matrix and translation vector, respectively, that establish the transformation between the object and camera coordinate systems, with 𝜆 𝑘 representing the scaling factor. The objective of the PnP method is to approximate this transformation, represented by ˆ R and ˆ t , by minimizing the ℓ 2 norm of the reconstruction error:

$$\langle \hat { R }, \hat { t } \rangle \ = \ \arg \min _ { R, t } \ \sum _ { k = 1 } ^ { K } \left \| K ( R \mathbf p _ { k } + t ) - \lambda _ { k } \left [ \begin{matrix} v _ { k } \\ 1 \end{matrix} \right ] \right \| _ { 2 } ^ { 2 }.$$

Let the notation ⟨ ˆ R ˆ t , ⟩ = G P V ( , ) represent the PnP procedure, where P ∈ R 𝐾 × 3 denotes the 3D coordinates of keypoints. Note that the keypoint-based pose estimation framework described above is the basic version. Numerous adaptations have been developed to increase accuracy and robustness [29], particularly in challenging conditions such as occlusions, varying viewpoints, and different lighting scenarios. This paper concentrates on validating the robustness of this foundational pipeline, marking a crucial step towards certifying the effectiveness of more intricate keypoint-based

pose estimation techniques. Hereafter, we use 𝚿 to represent this pipeline, which includes keypoint detection followed by the application of a PnP method, that is, ⟨ ˆ R ˆ t , ⟩ = 𝚿 ( X ) = G P F X ( , ( )) .

## 3.2 Verification of Neural Networks

Consider a multi-layer neural network representing a function f , which takes an input x ∈ D x ⊆ R 𝑑 0 and produces an output y ∈ D y ⊆ R 𝑑 𝑛 , where 𝑑 0 is the input dimension, and 𝑑 𝑛 is the output dimension. Any non-vector inputs or outputs are restructured into vector form. The verification process entails assessing the validity of the following input-output relationships defined by the function f : x ∈ X ⇒ y = f ( x ) ∈ Y , where sets, X ⊆ D x and Y ⊆ D y , are referred to as input and output constraints, respectively.

In the context of confirming the robustness of a classification network, the goal is to ascertain that all samples within a proximal vicinity of a specified input 𝑥 0 receive an identical classification label. Assuming the target label is 𝑖 ∗ ∈ { 1 , . . . , 𝑑 𝑛 } , the specification for verification is that 𝑦 𝑖 ∗ &gt; 𝑦 𝑗 for every 𝑗 not equal to 𝑖 ∗ . The constraints on inputs and outputs are established accordingly: X = { x | ∥ x -x 0 ∥ 𝑝 ≤ 𝜖 } Y , = { y | 𝑦 𝑖 ∗ &gt; 𝑦 , 𝑗 ∀ 𝑗 ≠ 𝑖 ∗ } , where 𝜖 represents the maximum permissible deviation in the input space. The metric used to quantify disturbance can be any ℓ 𝑝 norm.

Neural network verification algorithms can generally be categorized into three main types: reachability analysis, optimization, and search. NN verification essentially seeks to transform the nonlinear model checking problem into piece-wise linear satisfiability problems, and it can be applied to various nonlinearities, including ReLU and, more recently, softmax [50]. Two pivotal attributessoundness and completeness -are of critical importance. A verification algorithm is sound if it only confirms the validity of a property when the property is indeed valid. It is complete if it consistently recognizes and asserts the existence of a property whenever it is actually present. There is a trade-off between computational complexity and conservativeness (or in-completeness).

## 4 Problem Formulation

The most common type of input specification involves limiting the ℓ 𝑝 -norm of the variation to a threshold, that is, ∥ X -X 0 ∥ 𝑝 ≤ 𝜖 . However, ℓ 𝑝 perturbation, often characterized by a small value 𝜖 , is not a correct mathematical description of more realistic perturbations, as the independent nature of pixel-wise perturbations falls short in creating perturbations that reflect semantic correlations between pixels, such as large variations in lighting, weather conditions, and the effects of camera motion blur. Another approach for input perturbations is to directly add a generative model that perturbs the input image before the original neural network, such as [34], and then verify them together. However, the verification result can be biased by the generative model used and it is not user friendly due to the difficulty in controlling the changes made to the image. To address these shortcomings, we adopt a strategy based on the convex hull, which involves combining a seed image with a collection of perturbed images. These perturbed images can be created through different methods including simulators and learning-based generative models. Also, the convex hull specification can directly enable users to specify the perturbed images, which makes the perturbation specifications more user friendly.

Definition 4.1 (Convex hull of images). Given a seed image X 0 and a set of 𝑛 perturbed images { X 1 , . . . , X 𝑛 } , the convex hull constituted by these images is defined by the set of all their possible convex combinations. Mathematically,

$$\mathcal { X } = \left \{ X \ \left | \, \mathbf X = \sum _ { i = 0 } ^ { n } \alpha _ { i } X _ { i }, \ \ s. t. \ \alpha _ { i } \geq 0, \sum _ { i = 0 } ^ { n } \alpha _ { i } = 1 \right \}.$$

Images within the convex hull X ∈ X result from varying degrees of continuous blending among the provided images. Through the convex combination of perturbation instances, we can model environmental and sensor-related perturbations, including changes in brightness, contrast, weather conditions, motion blur, and dust on lens. Convex hull perfectly captures the entire range of brightness or contrast shifts, and does a reasonable approximation of color shifts, provided they are small. However, this approach does not capture translational perturbations of the object or perturbations related to camera movements, such as changes in the viewpoint. Preliminary methods exist that characterize pixel-wise perturbations caused by camera motion [19], but these methods cover only a very limited range. Investigating robustness against such perturbations will be addressed in future research. A collection of perturbed images and sampled images from the convex hull can be found in Fig. 7 in Section 8.4.

Given two rotation matrices R and ˆ R , we define the function D 𝑟 ( ˆ R R , ) = | r ( ˆ R ) -r ( R )| , where r (·) represents the function that converts rotations to Euler angles, and | · | denotes the elementwise absolute value. Thus, D 𝑟 measures the rotational difference along each axis. Similarly, define D 𝑡 GLYPH&lt;0&gt; ˆ t , t GLYPH&lt;1&gt; = GLYPH&lt;12&gt; GLYPH&lt;12&gt; ˆ t -t GLYPH&lt;12&gt; GLYPH&lt;12&gt; , which calculates the translational difference per axis.

Problem 1. Given a convex hull representation X consisting of a seed image X 0 and 𝑛 perturbed images, and a keypoint-based pose estimation framework 𝚿 . The problem is to certify whether the pose estimation framework 𝚿 is robust to any image within the set X . Mathematically,

$$\begin{bmatrix} D _ { r } \left ( \hat { R }, R \right ) \\ D _ { t } \left ( \hat { t }, t \right ) \end{bmatrix} \leq \begin{bmatrix} \epsilon _ { r } \\ \epsilon _ { t } \end{bmatrix} \quad s. t. \ \langle \hat { R }, \hat { t } \rangle = \Psi ( X ), \ \forall X \in \mathcal { X },$$

where ⟨ R t , ⟩ = G P V ( , ) represents the pose estimated given the ground-truth 3D keypoint coordinates P and ground-truth 2D keypoint coordinates V for X 0 , and 𝝐 𝑟 ∈ R 3 and 𝝐 𝑡 ∈ R 3 denote the error thresholds specified by the user for rotation and translation. We refer to R and t as the nominal transform, and ˆ R and ˆ t as the perturbed transform. In simpler terms to describe Eq. (4) , the variation between the nominal transform and the perturbed transform is kept within these predefined thresholds.

Remark 1. If a pre-processing step, such as resizing or color normalization, is applied to an image before it is input into the keypoint detection model, then the convex hull should be constructed using images that have also undergone these pre-processing steps. Consequently, any image within the convex hull is represented as X = ˝ 𝑛 𝑖 = 0 𝛼 𝑖 F 0 ( X 𝑖 ) , where F 0 denotes the pre-processing function.

The vector of error thresholds 𝝐 𝒓 and 𝝐 𝒕 can specify requirements from system designers in an interpretable manner. For example, such requirement can be setting the error thresholds for translation to be within 1 meter. The difficulty presented by Problem 1 is that, the error thresholds 𝝐 are defined with respect to pose estimation rather than the direct outputs of neural networks-keypoints-and there are nonlinear mappings between keypoints and pose estimation. To address Problem 1, the core of our approach is to transform the local robustness certification problem into a standard neural network verification problem for classification networks. This involves adapting three verification components-model, input, and output specifications-to be compatible with existing verification tools. As detailed in Section 5.1, we have modified the keypoint detection model to handle complex operations like the softmax function, simplifying the verification process. The input space is the a convex hull of possible perturbed images, which captures semantic variations compared to traditional methods that introduce random noise. Section 5.2 outlines how the output specification is established through a sensitivity analysis of the PnP method, detailed further in Section 6. This analysis helps translate system-level pose accuracy requirements into error thresholds for keypoint detection. Finally, Section 7 is dedicated to analyzing the soundness and completeness of our proposed verification framework.

## 5 Formulation of Verification of the Neural Network

To convert Problem 1 into an equivalent problem that can be verified using existing NN verification tools, we introduce approaches to modify the NN model and specify the output constraints.

## 5.1 Verification-Friendly Keypoint Detection Model

As introduced in Section 3.1, a softmax layer follows the backbone network to generate probabilistic heatmaps. This step introduces verification challenges due to the highly nonlinear exponential function in softmax. To address this, we propose to maintain the backbone network but replace the head network with an alternative one. A critical insight is that during the inference phase, the unnormalized heatmaps output by the backbone network F b already provide significant clues about the locations of keypoints. The subsequent operations within the head network F h , such as softmax and DSNT, essentially serve to aggregate this information across the entire heatmap. This aggregation allows for the generation of predictions in an average manner. In essence, the peaks within the heatmaps play a pivotal role in these predictions, and their locations remain unchanged between unnormalized and normalized heatmaps. Consequently, by focusing on the characteristics of these peaks, we can bypass some of the complexities introduced by the head network's nonlinear operations while still capturing the essential information required for accurate keypoint detection.

By appending an average pooling layer followed by an argmax layer as the new head network, referred to as F ′ h , to the backbone network, we create a proxy model, denoted by F proxy = F ′ h ◦ F b . We refer to the original model as the target model. The introduction of this proxy model simplifies the transformation of the verification problem into one akin to classification, where each pixel is treated as a unique category, as illustrated in Fig. 1. The average pooling layer offers two advantages. Firstly, its downsampling effect significantly reduces the number of categories (pixels), thereby simplifying the complexity of verification. Secondly, by aggregating local features within each pooling region, it ensures a more accurate representation than applying argmax directly.

The selection of pooling parameters should be guided by the error threshold on pose estimation 𝝐 𝑟 and 𝝐 𝑡 , as elaborated in Section 6. This leads to a scenario where the pooling parameters assigned to each heatmap, corresponding to individual keypoints, vary. This variation arises because keypoints have differing levels of influence on the accuracy of pose estimation. Consequently, keypoints with lesser influence on pose estimation are allocated a larger permissible error range, whereas those that play a critical role in pose estimation are subjected to stricter error ranges. It is worth noting that, with certain assumptions, the target model and proxy model are equivalent in terms of verification. The analysis on how assurances regarding the proxy model's performance can be extended to the target model is conducted in Section 7.

## 5.2 Output Specification: Polytope Representation

For the coordinate v 𝑘 of the 𝑘 -th keypoint, where v 𝑘 represents its 2D coordinate, let ¯ v 𝑘 denote its averaged ground-truth coordinate following the application of the average pooling and argmax layers. To ensure the classification result is consistent across perturbations, the output specification necessitates that the value at ¯ 𝑣 𝑘 exceeds the values at all other entries. This requirement can be

encapsulated by a half-space-based polytope, represented as A y 𝑘 𝑘 ≤ b 𝑘 with

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-62366dde-1585-4130-8153-6029f684367a.jpg)













where the ¯ -th column of 𝑣 𝑘 A 𝑘 is populated with (-1)'s, and all diagonal elements set to 1 with the exception of the element at ( ¯ 𝑣 𝑘 , 𝑣 ¯ 𝑘 ) , the components of b 𝑘 are set to zero except for the ¯ 𝑣 𝑘 -th element, which is assigned a significantly large integer 𝑀 . Consequently, the specification for all keypoints is denoted by Ax ≤ b with

$$A = \begin{bmatrix} A _ { 1 } & 0 & 0 & \dots & 0 \\ 0 & A _ { 2 } & 0 & \dots & 0 \\ 0 & 0 & A _ { 3 } & \dots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \dots & A _ { K } \end{bmatrix}, \quad y = \begin{bmatrix} y _ { 1 } \\ y _ { 2 } \\ y _ { 3 } \\ \vdots \\ y _ { K } \end{bmatrix}, \quad b = \begin{bmatrix} b _ { 1 } \\ b _ { 2 } \\ b _ { 3 } \\ \vdots \\ b _ { K } \end{bmatrix}.$$













The construction of Eq. (6) presupposes verifying all keypoints. However, should there be a keypoint that does not require verification, potentially due to being an outlier, the matrices associated with it are then adjusted accordingly: A 𝑘 = I and b 𝑘 = [ 𝑀, . . . , 𝑀 ] 𝑇 .

## 6 Error Propagation and Determination of Pooling Parameters

To calculate the parameters for average pooling, the initial step involves mapping the error thresholds 𝝐 𝑟 and 𝝐 𝑡 from the pose estimation onto the keypoints' error thresholds that may be correlated to each other, which is accomplished by employing sensitivity analysis methods. Subsequently, we formulate an optimal error threshold allocation problem, aiming to assign independent error thresholds to each keypoint. This step is crucial for determining the allowable errors for each keypoint individually, ensuring that the overall pose estimation adheres to predefined error limits. The idea is graphically depicted in Fig. 1.

## 6.1 Error Propagation via Sensitivity Analysis

Sensitivity analysis for nonlinear optimization explores the impact of first-order changes in the optimization parameters on the locally optimal solution [6]. It involves analyzing an unconstrained parameterized nonlinear optimization problem expressed as min x 𝐹 ( x a ; ) , with a representing the parameter vector. Here, let 𝑧 represent the optimal objective value given the parameter vector a , i.e., 𝑧 ( a ) = min x 𝐹 ( x a ; ) . Sensitivity analysis [6] connects the first-order derivatives 𝜕 x and 𝛿𝑧 with 𝜕 a :

$$\begin{bmatrix} - F _ { \mathbf a } \\ - F _ { \mathbf x a } \end{bmatrix} \partial \mathbf a = \begin{bmatrix} F _ { \mathbf x } & - 1 \\ F _ { \mathbf x x } & 0 \end{bmatrix} \begin{bmatrix} \partial \mathbf x \\ \partial z \end{bmatrix}.$$

In the context of pose estimation, the keypoint coordinates v are considered as parameters and the pose to be estimated represents the decision variables, the notation for partial derivatives 𝜕 is substituted with the notation for deivation 𝛿 . Consequently, Eq. (7) is transformed into

$$\begin{bmatrix} - G _ { \mathbf v } \\ - G _ { \xi \mathbf v } \end{bmatrix} \delta \mathbf v = \begin{bmatrix} G _ { \xi } & - 1 \\ G _ { \xi \xi } & 0 \end{bmatrix} \begin{bmatrix} \delta \xi \\ \delta z \end{bmatrix},$$

where 𝝃 ∈ R 6 = [ r t , ] represents the 6D pose vector, with the 3D rotation matrix R expressed in the axis-angle or Euler angles representations form r , and 𝐺 corresponds to the NLS optimization objective outlined in Eq. (2). Note that 𝛿 v ∈ R 2 𝐾 . The following notation is introduced

$$\mathbf M _ { v \xi } \coloneqq \begin{bmatrix} - G _ { v } \\ - G _ { \xi v } \end{bmatrix} \in \mathbb { R } ^ { 7 \times 2 K }, \, \mathbf M _ { \xi } \coloneqq \begin{bmatrix} G _ { \xi } & - 1 \\ G _ { \xi \xi } & 0 \end{bmatrix} \in \mathbb { R } ^ { 7 \times 7 }.$$

If M 𝝃 is invertible, then it follows that M -1 𝝃 Mv 𝝃 𝛿 v = [ 𝛿 𝝃 , 𝛿𝑧 ] 𝑇 . By extracting the rows in the matrix M -1 𝝃 Mv 𝝃 that correspond to 𝛿 𝝃 and naming the resulting matrix ˜ Mv 𝝃 , we obtain the linear mapping ˜ Mv 𝝃 𝛿 v = 𝛿 𝝃 . This leads to the establishment of a linear relationship between 2D keypoints errors and 6D pose errors. Upon specification of the keypoints v and the transform 𝝃 , the matrix ˜ Mv 𝝃 becomes determined.

Let Ξ represent the set of tolerable errors, indicating the range within which deviations of the perturbed transform from the nominal transform are acceptable, meaning 𝛿 𝝃 ∈ Ξ . Let 𝛿 V denote the derived tolerable keypoint errors that has the following property: 𝛿 V = GLYPH&lt;8&gt; 𝛿 v | ˜ Mv 𝝃 𝛿 v = 𝛿 𝝃 ∈ Ξ GLYPH&lt;9&gt; . Note that 𝛿 V is an approximation of actual tolerable keypoint errors that lead to tolerable pose errors 𝛿 𝝃 . As the pose error bounds decrease, the accuracy of the PnP linearization improves, narrowing this disparity. In what follows, we assume that Ξ is defined as a polytope represented by linear inequalities, specifically Ξ = { 𝛿 𝝃 | P 𝝃 𝛿 𝝃 ≤ b 𝝃 } . This inequality can be established based on a user-defined thresholds 𝝐 𝑟 and 𝝐 𝑡 as outlined in Problem 1. By the linear mapping, the set 𝛿 V can also be characterized as a polytope: 𝛿 V = GLYPH&lt;8&gt; 𝛿 v | P Mv 𝝃 ˜ 𝝃 𝛿 v ≤ b 𝝃 GLYPH&lt;9&gt; = { 𝛿 v | Pv 𝛿 v ≤ bv } , where Pv = P Mv 𝝃 ˜ 𝝃 and bv = b 𝝃 . While larger set 𝛿 V is desirable, it is an approximation of actual tolerable errors due to the linearization of sensitivity analysis. To mitigate the risk of over-approximation, we introduce a scaling factor to reduce the size of set 𝛿 V in the next section.

## 6.2 Optimal Error Threshold Allocation

The tolerable errors of keypoints are interrelated within the derived polytope set 𝛿 V . In this section, we allocate the tolerable errors across each keypoint to ensure their tolerances are independent, as current verification tools lack the capability to verify dependencies between keypoints. The allocated error threshold aims to be maximized, provided that the pose deviation remains tolerable.

For a given error vector 𝛿 v , we can uniquely define an axis-aligned, axis-symmetric hyperrectangle, denoted as HR( 𝛿 v ) ⊂ R 2 𝐾 , centered at the origin with each element 𝛿 v 𝑖 representing the half-length of its sides. Axis symmetry indicates that the error thresholds are identical in opposite directions. We establish the following problem for optimal error threshold allocation:

$$\max _ { \delta v \in \mathbf R _ { + } ^ { 2 K } } \quad w _ { 1 } \prod _ { k = 1 } ^ { 2 K } \delta v _ { k } + w _ { 2 } \Delta \quad & & ( 1 0 ) \\ \quad \dots \quad \dots \quad \dots \quad \dots \quad & &.$$

$$\text{s.t.} \ \mathcal { H R } ( \delta \mathbf v ) \subseteq \delta \mathcal { V },$$

$$\delta \mathbf v _ { k } \geq \Delta, \quad k = 1, \dots, 2 K.$$

Constraint (11) ensures that the hyper-rectangle is encompassed within the set of tolerable errors 𝛿 V , while constraint (12) sets a minimum threshold for the side lengths. The goal defined in objective (10) is to optimize a weighted sum of two objectives: the first seeks to identify the largest possible axis-aligned, axis-symmetric hyper-rectangle within a convex polytope, and the second strives to extend the minimal side length as much as feasible.

To address the optimal error threshold allocation problem, we translate constraint (11) into a series of linear inequalities, drawing from the method in [4] for identifying the largest axis-aligned hyper-rectangle inscribed within a convex polytope. Considering a hyper-rectangle B = { x ∈ R 𝑑 |

l ≤ x ≤ u } and a convex polytope C = { x | Px ≤ b } , [4] demonstrates that B ⊆ C if and only if

$$\sum _ { j = 1 } ^ { d } ( \mathsf P _ { i j } ^ { + } \mathsf u _ { j } - \mathsf P _ { i j } ^ { - } \mathsf l _ { j } ) \leq \mathsf b _ { i }, \quad i = 1, \dots, n.$$

where P + 𝑖 𝑗 = max { P 𝑖 𝑗 , 0 } and P -𝑖 𝑗 = max {-P 𝑖 𝑗 , 0 } . Given the axis symmetry in our scenario, it follows that u 𝑗 = -l 𝑗 . Substituting u 𝑗 with 𝛿 v 𝑗 , P with Pv , and b with bv , we can reformulate Ineq. (13) as

$$\sum _ { j = 1 } ^ { 2 K } \delta \mathbf v _ { j } ( \mathbf P _ { \mathbf v i j } ^ { + } + \mathbf P _ { \mathbf v i j } ^ { - } ) \leq b _ { \mathbf v i }, \quad i = 1, \dots, 6.$$

Given that GLYPH&lt;12&gt; GLYPH&lt;12&gt; Pv 𝑖 𝑗 GLYPH&lt;12&gt; GLYPH&lt;12&gt; = P v + 𝑖 𝑗 + P v -𝑖 𝑗 where | · | returns element-wise absolute values, it follows that

$$\sum _ { j = 1 } ^ { 2 K } \delta \mathbf v _ { j } \left | \mathbf P _ { \mathbf v i j } \right | \leq \mathbf b _ { \mathbf v i }, \quad i = 1, \dots, 6.$$

In matrix notation, Ineq. (15) is expressed as | Pv | 𝛿 v ≤ bv . Ultimately, the problem of optimal error threshold allocation, encompassing objectives (10) through constraints (12), is equivalent to

$$\ell \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda \lambda } \cdots \\ \max _ { \delta v \in \mathbb { Z } _ { + } ^ { 2 K } } \quad w _ { 1 } \prod _ { k = 1 } ^ { 2 K } \delta v _ { k } + w _ { 2 } \Delta \\ s. t. \quad \kappa | P _ { v } | \delta v \leq b _ { v }, \\ \delta v _ { k } \geq \Delta, \quad k = 1, \dots, 2 K, \\ \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdots \tilde { \lambda } \cdot$$

where Z + represents the set of non-negative integers, and 𝜅 ∈ R + is the scaling factor that controls the actual size of polytope. The effect of the scaling factor 𝜅 on the allocation is discussed in Section 8.3. The solution, denoted by 𝛿 v ∗ , returns the maximum tolerable errors for all keypoints while ensuring that the pose errors remains within the error thresholds. This solution will determine the parameters for average pooling in Section 5.1.

## 6.3 Determination of Average Pooling Parameters

Awidely accepted practice to train the keypoint detection model is to regress the heatmaps centered on the ground truth keypoint. Building on this approach, we propose the following assumption and support it with evaluation results detailed in Section 8.2.

Assumption 1. The softmax layer in the target model F target produces a distribution with a peak at its center and exhibits symmetry along axes that intersect this peak.

Upon determining the independent error threshold for each keypoint, we proceed to define the parameters for average pooling in the proxy model F proxy . Focusing on a particular keypoint with coordinates v = ( v ℎ , v 𝑣 ) , and considering the error thresholds 𝛿 v ∗ ℎ and 𝛿 v ∗ 𝑣 allocated for horizontal and vertical directions respectively, we define the set

$$\mathcal { V } _ { \delta } = \{ ( h, v ) \ | \ | h - \mathbf v _ { h } | \leq \delta \mathbf v _ { h } ^ { * } \wedge | v - \mathbf v _ { v } | \leq \delta \mathbf v _ { v } ^ { * } \}.$$

Only pixels within V 𝛿 are considered acceptable potential predictions for the keypoint. The average pooling parameters for this keypoint are selected to ensure every pixel in V 𝛿 is contained by the same pooling patch. This guarantees that all these pixels are pooled into the same after-pooling pixel as the keypoint, thereby belonging to the same class.

We begin by examining how predictions are generated in the proxy model F proxy . Based on Assumption 1, the unnormalized heatmap returned by the backbone network F b exhibits symmetry along axes passing through this peak, as softmax operation will not change the overall shape

Fig. 3. (a) Graphical depiction of determining the stride parameter. The unnormalized heatmap is overlaid on the airplane. The most saturated area in the heatmap, located near the center, indicates its peak. Consecutive average pooling patches are in different colors, denoted as P1 , P , and P+ 1 , with dots indicating their centers. The red star denotes the ground-truth keypoint, which aligns with the center of the average pooling patch P . The dashed vertical lines, 𝑏 -1 and 𝑏 + 1 , represent perpendicular bisectors between the centers of adjacent patches, with a distance equal to the stride 𝑠 ℎ . Consequently, the red pooling patch corresponds to the predicted keypoint. (b) and (c): Determination of the padding parameter.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-428ff7eb-97b1-4262-a8ed-595f46540530.jpg)

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-69dec1e6-82f0-47e7-a68a-9676b18b65df.jpg)

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-2c0e63e8-e293-4038-9f35-e520b4cc8510.jpg)

of the unnormalized heatmap. To infer the keypoint prediction, we concentrate on the average pooling patch that predominantly overlaps with the vicinity of the peak. Since the average pooling patches also exhibit axial symmetry, patches closer to the peak yield larger averaged pixel values. Consequently, the pooling patch with its center closest to the peak results in the predicted keypoint. This insight enables us to transform the determination of the location of the maximal pixel value after pooling into identifying the closest pooling patch to the peak of the unnormalized heatmap under Assumption 1. Next, we compute the average pooling parameters for each keypoint to ensure that: (i) the ground-truth keypoint aligns with the center of an average pooling patch, and (ii) all pixels in proximity to this pooling patch fall within the allocated error thresholds from the ground truth keypoint, making them suitable to act as the peak of the unnormalized heatmap. Let s = ( 𝑠 ℎ , 𝑠 𝑣 ) denote the stride, k = ( 𝑘 , 𝑘 ℎ 𝑣 ) the kernel size, and p = ( 𝑝 , 𝑝 ℎ 𝑣 ) the patch size.

Determination of stride and kernel parameters. The initial step involves determining the stride and kernel parameters, denoted as 𝑠 ℎ and 𝑘 ℎ , respectively, as in Fig. 3(a). We focus on the horizontal axis (similar logic applies to the independent vertical axis). Let P represent the pooling patch centered at a keypoint, with P1 and P+ 1 denoting the adjacent patches to the left and right, respectively. Additionally, let 𝑏 -1 and 𝑏 + 1 denote the perpendicular bisectors between these patches. The distance between these two perpendicular bisectors corresponds to the horizontal stride. To position the ground-truth keypoint at the center, an odd stride is required. As long as the peak of the unnormalized heatmap lies between 𝑏 -1 and 𝑏 + 1 , the pooling patch P is the closest to the peak, resulting in the predicted keypoint. Let 𝛿 v ∗ ℎ denote the allocated error threshold. To ensure that peaks falling between 𝑏 -1 and 𝑏 + 1 remain permissible with respect to the error threshold, the threshold should be no less than half the stride distance from the ground-truth keypoint on either side, i.e., 𝛿 v ∗ ℎ ≥ 1 2 ( 𝑠 ℎ -1 ) , which leads to the inequality 𝑠 ℎ ≤ 2 𝛿 v ∗ ℎ + 1. Choosing 𝑠 ℎ = 2 𝛿 v ∗ ℎ + 1 minimizes the post-pooling size. It's worth noting that there are no constraints on the kernel parameter. For simplicity, we set the kernel 𝑘 ℎ to be equal to the stride 𝑠 ℎ .

Determination of the padding parameter. The next step involves determining the padding parameter to center a pooling patch at the ground-truth keypoint. Padding can be added from the left (horizontal) or from the top (vertical) to achieve this. Considering the horizontal axis where the kernel is equal to the stride, the idea is to identify the closest pooling patch to the keypoint from its right side and then shift it left by the distance between the keypoint and its center, as illustrated in Fig. 3(b) and 3(c). Assuming 𝑘 ℎ = 𝑠 ℎ , let 𝑟 ℎ be the number of pixels the keypoint is from the left side of the closest pooling patch, calculated as 𝑟 ℎ ≡ v ℎ ( mod 𝑘 ℎ ) . (i) If 𝑟 ℎ ≤ k ℎ + 1 2 , the closest patch center to the right of the keypoint, belongs to the pooling patch containing the keypoint. (ii) Otherwise, the closest patch center to the right comes from the pooling patch immediately to the right of the one containing the keypoint. The horizontal padding parameter 𝑝 ℎ is determined as 𝑘 ℎ + 1 2 -𝑟 ℎ if 𝑟 ℎ ≤ 𝑘 ℎ + 1 2 , otherwise, as 3 𝑘 ℎ + 1 2 -𝑟 ℎ . Note that the shift is not unique because multiples of the stride can be added to 𝑝 ℎ .

## 7 Theoretical Analysis

With the method we introduced (to reformulate the problem into a verifiable form using off-the-shelf verification tools), it is important to understand whether false analysis results will be introduced. To answer that question, we perform the following analysis.

## 7.1 Properties of the Proxy Model

We examine two target models. The models ending with a DSNT layer and an argmax layer are represented by F dsnt and F argm , respectively. The term F target is used to represent either target model. The notation F 𝑘 is employed to identify the 𝑘 -th predicted keypoint. Recall that ¯ v 𝑘 denote the averaged ground-truth coordinate of the 𝑘 -th keypoint after the application of average pooing and argmax layers. Before providing theoretical results, we establish formal definitions for both the soundness and completeness related to the proxy model, which are visually represented in Fig. 4.

Definition 7.1 (Soundness). A proxy model is deemed sound if, for cases where the proxy model's predicted keypoint aligns with the averaged ground-truth keypoint ¯ v 𝑘 , the deviation of the target model's prediction from the ground truth v 𝑘 does not exceed the error threshold 𝛿 v ∗ 𝑘 . Specifically,

$$F _ { \text{proxy} } ^ { k } ( X ) = \bar { \nu } _ { k } \Rightarrow \left | F _ { \text{target} } ^ { k } ( X ) - \mathbf v _ { k } \right | \leq \delta \mathbf v _ { k } ^ { * }, \quad \text{for} \ k = 1, \dots, K.$$

Here, | · | indicates the computation of element-wise absolute differences.

Definition 7.2 (Completeness). A proxy model is deemed complete if the difference between the target model's prediction and the ground truth v 𝑘 is confined within the error threshold 𝛿 v ∗ 𝑘 , then the predicted keypoint by the proxy model matches the averaged ground truth ¯ v 𝑘 . That is,

$$\left | F _ { \text{target} } ^ { k } ( X ) - \mathbf v _ { k } \right | \leq \delta \mathbf v _ { k } ^ { * } \Rightarrow F _ { \text{proxy} } ^ { k } ( X ) = \bar { \mathbf v } _ { k }, \quad \text{for} \ k = 1, \dots, K.$$

Theorem 7.3. If Assumption 1 holds, the proxy model is sound, that is,

$$\mathbf F _ { p r o x y } ^ { k } \left ( X \right ) = \bar { \nu } _ { k } \Rightarrow \left | \mathbf F _ { d s n t } ^ { k } \left ( X \right ) - \mathbf v _ { k } \right | \right | \leq \delta \mathbf v _ { k } ^ { * }, \quad \text{for} \, k = 1, \dots, K.$$

$$\mathbf F _ { p r o x y } ^ { k } \left ( X \right ) = \bar { \nu } _ { k } \Rightarrow \left | \mathbf F _ { a r g m } ^ { k } \left ( X \right ) - \mathbf v _ { k } \right | \leq \delta \mathbf v _ { k } ^ { * }, \quad \text{for} \, k = 1, \dots, K.$$

To prove Theorem 7.3, we first prove the equivalence of two target models.

Proposition 7.4. If Assumption 1 holds, the two target models produce the same predictions, i.e., F 𝑘 dsnt ( X ) = F 𝑘 argm ( X ) , for 𝑘 = 1 , . . . , 𝐾 .

Fig. 4. Illustration of soundness and completeness of the proxy model: The left heatmap, sized 12 × 12 and generated by the target model, is transformed into a 4 × 4 heatmap by the proxy model, utilizing pooling patches with both kernel and stride set to 3. Both the averaged ground-truth keypoint ¯ v 𝑘 and the ground-truth keypoint v 𝑘 are marked in green. The area highlighted in blue encompasses pixels located within a 𝛿 v ∗ 𝑘 distance from the ground truth.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-b3d06a36-007b-4ba3-af53-a35b98f15d3b.jpg)

Proof. Before delving into the proof, we first introduce how DSNT extracts a keypoint from a normalized heatmap. Let H represent a normalized heatmap of dimensions 𝑚 × 𝑛 , which is generated by a softmax layer. Define C as an 𝑚 × 𝑛 matrix where each entry C 𝑖 𝑗 is calculated by C 𝑖 𝑗 = 2 𝑗 -( 𝑛 + ) 1 𝑛 . Consequently, each column of C contains identical values. These values fall within the range of (-1 1 , with the center value at 0. To determine the column coordinate , ) v ℎ of the keypoint, DSNT computes the sum of the element-wise product between H and C , expressed as v ℎ = ˝ 𝑖,𝑗 H C 𝑖 𝑗 𝑖 𝑗 . The row coordinate is obtained in a similar way.

Without loss of generality, due to independence of horizontal and vertical axes, we will show for the horizontal direction. Considering a symmetric heatmap with dimensions 𝑚 × 𝑛 , we initially position the center of the distribution at the 𝑚 + 1 2 -th row and the 𝑛 + 1 2 -th column, effectively placing the distribution's center at the heatmap's midpoint. Upon applying the DSNT process, the resulting keypoint coordinate is (0, 0). This outcome is attributed to the distribution's symmetry along both the horizontal and vertical axes that intersect at its center, with the DSNT operation cancelling out symmetric values relative to the origin. Subsequently, we consider a horizontal displacement of the distribution by 𝑐 columns, where a positive 𝑐 indicates a shift to the right. The column coordinate v ℎ , as determined by DSNT following the horizontal shift, is then

$$\sum _ { i, j } \mathbf H _ { i j } C _ { i j } \ \stackrel { \odot } { = } \ \sum _ { i, j ^ { \prime } } \mathbf H _ { i j ^ { \prime } } \left ( C _ { i j ^ { \prime } } + \frac { 2 c } { n } \right ) \ \stackrel { \odot } { = } \ \sum _ { i, j ^ { \prime } } \mathbf H _ { i j ^ { \prime } } C _ { i j ^ { \prime } } + \sum _ { i, j ^ { \prime } } \mathbf H _ { i j ^ { \prime } } \frac { 2 c } { n } \ \stackrel { \odot } { = } \ 0 + \frac { 2 c } { n } \sum _ { i, j ^ { \prime } } \mathbf H _ { i j ^ { \prime } } \ \stackrel { \odot } { = } \ \frac { 2 c } { n } \ \ ( 2 2 )$$

In 1 , the pixel located at ( 𝑖, 𝑗 ′ ) is the corresponding pixel at ( 𝑖, 𝑗 ) prior to the horizontal shift, with both pixels having identical values, denoted as H 𝑖 𝑗 = H 𝑖 𝑗 ′ . The value 2 𝑐 𝑛 represents the difference across every 𝑐 columns within the matrix C . For 3 , the expression ˝ 𝑖,𝑗 ′ H 𝑖 𝑗 ′ C 𝑖 𝑗 ′ equals zero, reflecting the distribution's initial centering at the heatmap's midpoint. In 4 , the probability over distribution sums up to 1. The calculation of the DSNT column coordinate as 2 𝑐 𝑛 ∈ (-1 1 , ) aligns it with the heatmap's ( 𝑛 + 1 2 + 𝑐 ) -th column. On the other hand, the argmax operation in F 𝑘 argm returns the distribution's center, located at the ( 𝑛 + 1 2 + ) 𝑐 -th column following the shift. Consequently, we establish that F 𝑘 dsnt ( X ) = F 𝑘 argm ( X ) , thereby completing the proof. □

According to Proposition 7.4, it is sufficient to validate Eq. (21) that connects F proxy with F argm to prove Theorem 7.3. The distinction between the F proxy and F argm models lies solely in their method of handling the unnormalized heatmap, specifically whether they use a softmax or an average pooling layer as depicted in Fig. 1. With this, we are poised to validate Theorem 7.3, a conclusion that naturally follows from the way we identify average pooling parameters.

Fig. 5. Illustration of the probabilistic soundness and completeness. On the left, the green area represents the ground-truth tolerable errors on keypoints 𝛿 V Ξ . The red patches ( HR \ 𝛿 V Ξ ) indicate the keypoint errors that result in pose errors exceeding tolerance. The brown area ( HR ∩ 𝛿 V Ξ ) shows the keypoint errors that lead to tolerable pose errors. Similarly, on the right, the brown area ( Ξ ∩ Ξ HR ) represents the pose errors that cause keypoint errors within HR . The dashed black lines indicate the correlations between these two spaces.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-728b4486-8de0-4d31-b2f9-95962025a1b0.jpg)

Proof. Considering the 𝑘 -th keypoint v 𝑘 , if F 𝑘 proxy ( X ) = ¯ v 𝑘 , it implies that average pooling parameters ensure that the closest pooling patch P v 𝑘 to the ground-truth keypoint v 𝑘 is exactly centered at v 𝑘 . The selection of stride parameters ensures that the heatmap's peak is within a 𝛿 v ∗ 𝑘 distance from the center of P v 𝑘 , which is also the ground-truth coordinate v 𝑘 . Given that the softmax layer preserves the peak's position, the prediction F 𝑘 argm precisely returns the peak's location, leading to the conclusion that F 𝑘 argm ( X ) is within a 𝛿 v ∗ 𝑘 distance from v 𝑘 , i.e., GLYPH&lt;12&gt; GLYPH&lt;12&gt; GLYPH&lt;12&gt; F 𝑘 argm ( X ) -v 𝑘 GLYPH&lt;12&gt; GLYPH&lt;12&gt; GLYPH&lt;12&gt; ≤ 𝛿 v ∗ 𝑘 . □

Theorem 7.5. If Assumption 1 holds, the proxy model is complete, that is,

$$\left | \mathsf F _ { d s n t } ^ { k } \left ( X \right ) - \mathbf v _ { k } \right | \leq \delta \mathbf v _ { k } ^ { * } \Rightarrow \mathsf F _ { p r o x y } ^ { k } \left ( X \right ) = \bar { \mathbf v } _ { k }, \quad \text{for} \, k = 1, \dots, K.$$

$$\left | \mathbf F _ { \arg m } ^ { k } \left ( X \right ) - \mathbf v _ { k } \right | \leq \delta \mathbf v _ { k } ^ { * } \Rightarrow \mathbf F _ { p r o x y } ^ { k } \left ( X \right ) = \bar { \mathbf v } _ { k }, \quad \text{for} \, k = 1, \dots, K.$$

Proof. Based on Proposition 7.4, we focus exclusively on the target model F argm . The selection of pooling parameters guarantees that every pixel within the 𝛿 v ∗ 𝑘 proximity of the ground-truth keypoint-eligible to be recognized as the predicted keypoint-shares the same closest pooling patch. This closest pooling patch is identical to that of the ground-truth keypoint. As a result, these pixels yield an averaged pixel that is the same as that of the ground-truth keypoints. □

## 7.2 Properties of the Optimal Error Threshold Allocation

In the previous section, we examined the properties of the proxy model after determining the error threshold for keypoints. This section focuses on the properties of the optimal error threshold allocation. We introduce the concepts of probabilistic soundness and probabilistic completeness to measure the relationship between tolerable errors in pose and keypoints, as depicted in Fig. 5.

Considering the set of acceptable pose errors Ξ , let 𝛿 V Ξ represent the corresponding set of acceptable keypoint errors. Note that 𝛿 V Ξ might not be polytopic, due to the non-linear nature of the PnP method, even though Ξ is polytopic. Let 𝜇 (·) denote the measure of a set.

Definition 7.6 (Probabilistic Soundness). Probabilistic soundness is defined by the ratio 𝜇 𝛿 ( V ∩HR) Ξ 𝜇 ( HR) , which is the fraction of keypoint errors in HR that result in tolerable pose errors within Ξ .

Fig. 6. Verified keypoint detection model.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-09ec3dda-073d-4c72-b039-03981a134210.jpg)

Likewise, considering the set of tolerable errors on keypoints HR , let Ξ HR represent the corresponding set of tolerable errors on poses.

Definition 7.7 (Probabilistic Completeness). Probabilistic completeness is defined as the ratio 𝜇 ( Ξ HR∩ Ξ ) 𝜇 ( Ξ ) , which represents the fraction of permissible pose errors in Ξ that result in errors on keypoints within HR .

Deriving an exact or lower bound for these two metrics is difficult, due to the challenges in making definitive conclusions using linearization-based sensitivity analysis, as the accuracy of local linearizations varies with instances, such as varying poses. In Section 8.3, we perform statistical tests to approximate these two values, offering insights into the practicality of our framework.

## 8 Evaluation Results

## 8.1 Verified Keypoint Detection Model and Perturbations

8.1.1 Verified keypoint detection model. The verified keypoint detection model, illustrated in Fig. 6, is modified from the proxy model F proxy . This verified model includes three components:

- 1. Backbone model. The dataset contains 7,320 images, each with dimensions of 1920 × 1200.
- · CNN. The architecture includes 5 convolutional layers and an equal number of deconvolutional layers, designed to handle inputs of size 64 × 64 × 3. The model comprises 39 layers and contains around 6.57 × 10 5 trainable parameters.
- · ResNet-18. This model includes 8 residual blocks and processes inputs of size 256 × 256 × 3. It is composed of 84 layers and possesses approximately 1.2 × 10 7 trainable parameters, which is approximately an order of magnitude larger than existing works [26].
- 2. Average pooling. Consider that the parameters for average pooling are tailored based on optimally allocated error thresholds that may vary across different keypoints, thereby necessitating distinct pooling parameters for each. To address this issue, the second component includes the division of a multi-channeled unnormalized heatmap layer into individual channels. Each of these channels is then processed through its own average pooling layer. This design allows for simultaneous verification of all keypoints, eliminating the need to verify each keypoint individually.
- 3. Flattening and concatenation. The third component involves the flattening of the previously splitted channels, which are then concatenated into a single-dimensional format for verification.
- 8.1.2 Perturbations. Out of 7000 images, we randomly sample 200 images as seed images, adding local or global perturbations to them.

(b)

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-6df41c00-5472-4c53-912a-2f94781fe770.jpg)

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-04c29cff-4487-4226-9aec-4004df451b7a.jpg)

Fig. 7. (a) Various vehicles, personnel and objects considered as local perturbations. (b)-(c) overlapping images with perturbations highlighted within red circles. (c) non-overlapping images derived from the same seed image. (d) Sampled images from the convex hull, composed of non-overlapping images as shown in 7(c), that undergo color normalization and display objects in varying shades of gray.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-2c749587-429d-4b5a-b16a-c8af9d12785d.jpg)

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-a4fd18be-d194-40ec-ad56-b55e7f65b526.jpg)

Local object occlusions. We created a set of 40 realistic semantic disturbances featuring personnel and vehicles typically encountered at an airport. These disturbances are depicted in Fig. 7(a). To create perturbed images, we randomly selected 20 objects as patches, each up to 150 pixels in size, positioned randomly on the seed images, with each perturbed image having one patch. The perturbed images are classified into two groups: overlapping and non-overlapping, based on whether the patches overlap with the airplane in the image. There are 4000 perturbed images in total, including 893 overlapping and 3107 non-overlapping images. The convex hull's complexity is adjusted by changing the number of perturbed images 𝑚 , where 𝑚 ranges from 2 to 4. These perturbed images are randomly selected, allowing us to systematically assess how the addition of semantic disturbances affects the robustness and performance of the system. Note that the convex hull is comprised solely of either overlapping or non-overlapping images. A collection of perturbed images and sampled images from the convex hull are presented in Fig. 7.

Local block occlusions. Given a seed image, we generate 4 perturbed images. In each perturbed image, a 3 × 3 square is placed either away from the airplane or centered over a randomly selected keypoint to create non-overlapping or overlapping images, respectively. All pixel values within this square are randomly selected from the range [0, 255]. A convex hull is formed using these 5 images per seed image, of which all perturbed images are non-overlapping or overlapping ones.

Global perturbations. We change each pixel's value through two types of global perturbations: brightness and contrast. For brightness, a variation value 𝑏 ∈ Z is applied such that each pixel's value increases by 𝑏 , that is, 𝐼 ′ = clip ( 𝐼 + 𝑏 ) , where 𝐼 represents the original pixel values, 𝐼 ′ the new pixel values, and clip ensures the values remain within the range [0, 255]. For contrast perturbation, a variation value 𝑐 ∈ R adjusts each pixel's value by a percentage 𝑐 , formulated as 𝐼 ′ = clip ( 𝐼 ×( 1 + )) 𝑐 . The convex hull is constructed as follows. For a positive value 𝑏 ∈ Z + , two perturbed images are

Fig. 8. Skewness, the disparity between mean and median values, the disparity between mean and mode values, and the IQR for the normalized heatmaps generated by ResNet-18, with row (left) and column (right) dimensions depicted separately in each subfigure.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-e9e58ec3-0a1c-4e80-b257-66141db2c4c8.jpg)

created for 𝑏 and -𝑏 , respectively. These images act as vertices of the convex hull. Along with the seed image, this approach facilitates verification of the model's robustness to any brightness variation within the range [-𝑏, 𝑏 ] . The same methodology applies to contrast variations 𝑐 ∈ R + . We examine the effects for 𝑏 values of { 1 2 , } and 𝑐 values of 5 × 10 -4 , 5 × 10 -3 , 1 × 10 -2 } .

## 8.2 Validity of Assumption 1

To assess the degree of symmetry and unimodality exhibited by the normalized heatmaps, we use four metrics: skewness, the disparity between mean and median, the disparity between mean and mode (peak), and the Interquartile Range (IQR), which is the difference between the third quartile (Q3) and the first quartile (Q1). A skewness near zero and a minimal difference between the mean and median indicate a symmetrical distribution. Combined with small skewness and close mean and median, a small IQR and close mean and mode suggest unimodality. These metrics are calculated individually for each image dimension. The evaluation uses the ResNet-18-based backbone model across 3000 seed images and 4000 perturbed images with object occlusions and is presented in Fig. 8. The findings reveal skewness values approximately zero and mean and median values that are closely aligned, especially when considering the heatmap dimensions of 256 × 256.

Fig. 9. Results about the optimal error threshold allocation for horizontal (left) and vertical (right) dimensions.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-47c5cb85-d71a-4769-9368-b043a52c9087.jpg)

The difference between mean and mode and IQR values are also minor relative to the total range of 256. Thus, these statistical outcomes demonstrate that the normalized heatmaps predominantly feature unique peaks and exhibit axis symmetry, supporting Assumption 1.

## 8.3 Probabilistic Soundness and Completeness of Optimal Error Threshold Allocation

8.3.1 Optimal tolerance allocation. Note that the outcomes of allocating optimal tolerance are influenced by images and defined thresholds for acceptable pose errors. In our experiments, we manipulate these thresholds by incorporating a scaling factor 𝛼 ∈ R + , resulting in adjusted error thresholds 𝛼 𝝐 𝑟 and 𝛼 𝝐 𝑡 . The pose error thresholds are set as 𝝐 𝑟 = 𝛼 · [ 10 ◦ , 10 ◦ , 10 ◦ ] and 𝝐 𝑡 = 𝛼 · [ 4 4 20 . The threshold factor , , ] 𝛼 is varied across the values { 0 5 1 0 1 5 2 0 . , . , . , . } . We maintain the scaling factor 𝜅 at 1.0 as specified in Eq. (16), and assign the weights 𝑤 1 and 𝑤 2 values of 1 and 5, respectively. Our analysis includes 3000 images, each contributing 5000 sets of perturbed keypoints, accumulating a total of 1 5 . × 10 7 samples. The mean and standard deviation of the tolerance allocated in the horizontal and vertical directions are presented in Fig. 9. As the allowable pose errors grows, the tolerance allocated per keypoint increases, predominantly uniform in both the horizontal and vertical axes, with the exception of the 10-th and 11-th keypoints, which are symmetrical with respect to the body axis of the plane (see Fig. 2), exhibit larger tolerances horizontally, while the 5-th and 23-th keypoints, aligned along the body axis, have larger tolerances vertically.

8.3.2 Probabilistic soundness. In this part, we intend to evaluate the probabilistic soundness of optimal error threshold allocation by verifying if the pose estimation errors resulting from perturbed keypoints fall within the predefined error thresholds. One approach is to perform random sampling within the hyper-rectangle HR( 𝛿 v ∗ ) . However, given the high dimensionality of HR , which is 2 2 𝐾 with 𝐾 exceeding 20 in our scenario, this method demands an extraordinarily large sample size to achieve sufficient coverage. To address this issue, we only evaluate on vertices. For a seed image we randomly choose vertices from the hyper-rectangle HR( 𝛿 v ∗ ) , which we then add to the coordinates of the ground-truth keypoints to create perturbed keypoints. Mathematically, in matrix form, ˆ V = A ⊙ 𝛿 V ∗ + V , where the elements of matrix A are randomly set to either -1 or 1, the symbol ⊙ represents element-wise multiplication, and ˆ V denotes the perturbed keypoints. This allows the perturbation of keypoints to reach the maximum tolerable errors.

The simulation setup is largely the same as the previous section. We vary both the scaling factor 𝜅 in Eq. (16) and the threshold factor 𝛼 , and compute the ratio of samples where the pose estimation errors remain within thresholds over the total number of samples. We report the ratio of samples resulting in tolerable pose errors. The results are summarized in Table 1. As we can see, only a small number of samples result in poses that surpass the error threshold. There is a noticeable trend where, vertically, as 𝜅 increases, the ratio of acceptable samples rises due to the shrinking of the keypoint error threshold polytope. Horizontally, increasing 𝛼 results in a lower ratio, as linearization becomes less accurate when the pose moves away from the reference point.

Table 1. Probabilistic soundness and completeness of optimal error threshold allocation. Ideal value is 1.0.

| factor 𝛼   |   soundness |   soundness |   soundness |   soundness | complenteness   | complenteness   | complenteness   | complenteness   |
|------------|-------------|-------------|-------------|-------------|-----------------|-----------------|-----------------|-----------------|
| factor 𝜅   |         0.5 |    1        |    1.5      |    2        | 0.5             | 1.0             | 1.5             | 2.0             |
| 1.0        |         1   |    0.998978 |    0.996596 |    0.988339 | 1.93 × 10 - 6   | 3.07 × 10 - 5   | 4.85 × 10 - 5   | 6.20 × 10 - 5   |
| 1.5        |         1   |    0.999993 |    0.999887 |    0.99989  | < 6.67 × 10 - 9 | 1.00 × 10 - 6   | 2.00 × 10 - 6   | 3.67 × 10 - 6   |
| 2.0        |         1   |    1        |    1        |    0.999999 | < 6.67 × 10 - 9 | < 6.67 × 10 - 9 | 3.33 × 10 - 7   | 6.67 × 10 - 7   |

Fig. 10. Unscaled reprojection errors (blue) from 5000 samples and the optimally allocated error thresholds (yellow square) for keypoints 1, 3 and 5. The red points denote a keypoint error allocation that collectively results in the violation of pose error bounds, obtained by deviating outward from the yellow boundaries.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00117v1-figure-71796287-0a48-4941-b8a3-a945527de9df.jpg)

8.3.3 Probabilistic completeness. To compute completeness, we randomly sample from the set of tolerable pose errors Ξ , use the perspective projection model (1) to determine keypoints, and then compute the reprojection error relative to the ground truth. We verify whether these reprojection errors remain within the permissible error bounds on keypoints, represented by the hyper-rectangle HR . This simulation follows the same setup as used for probabilistic soundness. The results are presented in Table 1. Vertically, as 𝜅 increases, completeness diminishes due to the reduction in the size of HR , leading to more samples exceeding these bounds. On the other hand, there is no discernible trend when viewed horizontally.

When examining Table 1, a trade-off between soundness and completeness is evident. Our framework exhibits better soundness, implying that the set of allocated keypoint errors, HR , is relatively small compared to the ground-truth set 𝛿 V Ξ . This smaller size of HR accounts for the reduced completeness observed in the results. To support this, Fig. 10 illustrates the reprojection errors relative to the optimally allocated bounds (rectangle) for keypoints 1, 3 and 5 from a specific image under the conditions 𝛼 = 0 5 and . 𝜅 = 1 0. These reprojection errors are calculated by . randomly generating pose errors within tolerable ranges and calculating the difference between ground-truth keypoints and those obtained from perspective projection model (1). The illustration shows that a significant number of samples exceed the computed bounds, contributing to the overall low completeness observed across all keypoints. Therefore, if the verification tool returns a hold, it implies that the pose estimation is robust with high probability. On the other hand, if the tool returns a violation, we cannot draw any definitive conclusions. The conservativeness in error allocation mainly stems from the need to decouple the dependencies among keypoints.

Table 2. Statistical results on verification time for local perturbations (seconds).

| non-overlapping images   | non-overlapping images   | non-overlapping images   | non-overlapping images   | overlapping images   | overlapping images   | overlapping images   | overlapping images   |
|--------------------------|--------------------------|--------------------------|--------------------------|----------------------|----------------------|----------------------|----------------------|
| 𝜅 = 1 . 0                | 𝜅 = 1 . 0                | 𝜅 = 1 . 5                | 𝜅 = 1 . 5                | 𝜅 = 1 . 0            | 𝜅 = 1 . 0            | 𝜅 = 1 . 5            | 𝜅 = 1 . 5            |
| 𝛼 = 1 . 0                | 𝛼 = 1 . 5                |                          | 𝛼 = 1 . 0 𝛼 = 1 . 5      | 𝛼 = 1 . 0            | 𝛼 = 1 . 5            | 𝛼 = 1 . 0            | 𝛼 = 1 . 5            |
| 2 38.3 ±                 | 56.7                     | 11.9 ± 11.1              | 81.5 ± 79.7 47.1 ± 69.0  | 82.1 ± 128.3         | 31.1 ± 29.4          | 133.1 ± 127.3        | 72.4 ± 79.6          |
| 3                        | 63.3 ± 89.2 16.9 ±       | 12.3 104.9 ± 188.3       | 60.7 ± 74.0              | 87.9 ± 87.4          | 47.7 ± 44.7          | 154.8 ± 127.4        | 98.3 ± 96.2          |
| 4 73.1 ±                 | 103.8 23.2 ± 16.5        | 127.7 ± 105.4            | 79.1 ± 101.0             | 109.2 ± 101.8        | 60.4 ± 36.7          | 184.3 ± 132.5        | 110.1 ± 87.7         |

Table 3. Statistical results on verified rate for local perturbations.

| non-overlapping images   | non-overlapping images   | non-overlapping images   | non-overlapping images   | overlapping images   | overlapping images   | overlapping images   | overlapping images   |
|--------------------------|--------------------------|--------------------------|--------------------------|----------------------|----------------------|----------------------|----------------------|
| 𝜅 = 1 . 0                | 𝜅 = 1 . 0                | 𝜅 = 1 . 5                | 𝜅 = 1 . 5                | 𝜅 = 1 . 0            | 𝜅 = 1 . 0            | 𝜅 = 1 . 5            | 𝜅 = 1 . 5            |
| 𝛼 = 1 . 0                | 𝛼 = 1 .                  | 5                        | 𝛼 = 1 . 0 𝛼 =            | 1 . 5 𝛼 = 1 . 0      | 𝛼 = 1 . 5            | 𝛼 = 1 . 0            | 𝛼 = 1 . 5            |
| 2 55.0%                  |                          | 88.5 %                   | 16.9%                    | 55.6% 42.2%          | 74.1%                | 13.1%                | 44.8%                |
| 3                        | 55.8%                    | 88.5 %                   | 16.6% 55.3%              | 36.7%                | 65.1%                | 12.6%                | 38.9%                |
| 4                        | 55.3% 85.5               | % 16.7%                  | 53.1%                    | 28.0%                | 50.4%                | 10.6%                | 29.4%                |

## 8.4 Verification of Local and Global Perturbations

In this section, we assess the robustness of the pose estimation method when subjected to various levels of perturbations. We aim to answer three key questions:

- (1) How computationally efficient is the resulting neural network verification problem?
- (2) How accurate is the proposed certification method for robust pose estimation?

8.4.1 Metric. We measure the performance using verification times and verified rates. Verified rate is defined as the proportion of cases where the verification algorithm confirms robustness against those where seed images produce acceptable pose estimation errors. Another critical measure is verification accuracy which is defined as the proportion of cases where the verification algorithm confirms robustness against those that are indeed robust. However, determining the exact number of truly robust instances is impractical. Consequently, the verified rate serves as a lower bound of verification accuracy as the instances with acceptable pose estimation errors from seed images exceed those that are truly robust.

8.4.2 Verification results. We employ the verification toolbox ModelVerification.jl ( MV ) [51], which accepts convex hulls as input specifications. MV.jl is the state-of-the-art verifier that supports a wide range of verification algorithms and is the most user-friendly to extend. It follows a branchand-bound strategy to divide and conquer the problem efficiently. Two parameters guide this process: split\_method determines the division of an unknown branch into smaller branches for further refinement, and search\_method dictates the approach to navigating through the branch. We set search\_method to use breadth-first search and split\_method to bisect the branch. The computing platform is a Linux server equipped with an Intel CPU with 48 cores running at 2.20GHz and 376GB of total memory, approximately 150GB of which is available owing to multiple users. Additionally, the server includes 4 NVIDIA RTX A4000 GPUs, each with 16GB of memory.

Local object occlusions for the CNN-based model. The results presented in Tab. 2 indicate that for non-overlapping images, verification time increases as the number 𝑚 of perturbed images forming the convex hull rises. As the error bounds for pose estimation expand, with threshold factor 𝛼 increasing from 1.0 to 1.5, the time decreases. A similar effect is observed when the scaling factor 𝜅 decreases from 1.5 to 1.0. This reduction occurs because the optimally allocated error thresholds on keypoints expand with increasing 𝛼 and decreasing 𝜅 , as illustrated in Fig. 9, which

Table 4. Statistical results on verification time for global perturbations (seconds).

| 𝑐     | 𝜅 = 1 . 0     | 𝜅 = 1 . 0   | 𝜅 = 1 . 5     | 𝜅 = 1 . 5     | 𝑏   | 𝜅 = 1 . 0     | 𝜅 = 1 . 0   | 𝜅 = 1 . 5     | 𝜅 = 1 . 5     |
|-------|---------------|-------------|---------------|---------------|-----|---------------|-------------|---------------|---------------|
| 𝑐     | 𝛼 = 1 . 0     | 𝛼 = 1 . 5   | 𝛼 = 1 . 0     | 𝛼 = 1 . 5     | 𝑏   | 𝛼 = 1 . 0     | 𝛼 = 1 . 5   | 𝛼 = 1 . 0     | 𝛼 = 1 . 5     |
| 0.05% | 79.7 ± 105.5  | 15.4 ± 4.9  | 133.9 ± 95.5  | 83.2 ± 105.0  | 1   | 135.0 ± 171.5 | 32.7 ± 12.4 | 236.4 ± 164.0 | 144.7 ± 164.5 |
| 0.5%  | 88.6 ± 112.3  | 19.6 ± 5.7  | 159.0 ± 111.1 | 92.0 ± 108.1  | 2   | 223.4 ± 301.9 | 64.6 ± 22.5 | 373.5 ± 309.2 | 225.1 ± 266.0 |
| 1%    | 176.3 ± 232.9 | 48.7 ± 17.7 | 304.1 ± 243.6 | 200.0 ± 249.4 | -   | -             | -           | -             | -             |

Table 5. Statistical results on verified rate for global perturbations.

| 𝑐          | 𝜅 = 1 . 0   | 𝜅 = 1 . 0   | 𝜅 = 1 . 5   | 𝜅 = 1 . 5   | 𝑏   | 𝜅 = 1 . 0   | 𝜅 = 1 . 0   | 𝜅 = 1 . 5   | 𝜅 = 1 . 5   |
|------------|-------------|-------------|-------------|-------------|-----|-------------|-------------|-------------|-------------|
| 𝑐          | 𝛼 = 1 . 0   | 𝛼 = 1 . 5   | 𝛼 = 1 . 0   | 𝛼 = 1 . 5   | 𝑏   | 𝛼 = 1 . 0   | 𝛼 = 1 . 5   | 𝛼 = 1 . 0   | 𝛼 = 1 . 5   |
| 5 × 10 - 4 | 57.0%       | 91.5 %      | 17.3%       | 57.1%       | 1   | 57.0%       | 91.5%       | 15.0%       | 57.7%       |
| 5 × 10 - 3 | 56.5%       | 90.5 %      | 16.8%       | 56.7%       | 2   | 56.0%       | 88.5%       | 14.8%       | 57.6%       |
| 1 × 10 - 2 | 56.0%       | 87.4 %      | 17.3%       | 56.8%       | -   |             |             | -           | -           |

results in fewer nodes. A similar trend is observed for overlapping images. We emphasize that the verification process for overlapping images requires more time than for non-overlapping ones, given the same number of perturbed images and identical pose estimation error bounds, indicating that the keypoint detection model is effective in suppressing disturbances external to the airplane.

In reference to the verified rates displayed in Tab. 3, for non-overlapping images, the rate remains stable regardless of the number of perturbed images, given the same 𝜅 and 𝛼 . Conversely, there is an increase in the verified rate with a decrease in 𝜅 and an increase in 𝛼 , as larger allocated keypoint error thresholds or larger allowable pose error thresholds result in more images being verified as robust. In the case of overlapping images, a notable trend is the decline in the verified rate when the number of perturbed images increases. This is because a rise in the number of perturbed images means more objects are overlaid on the airplane, which compromises the accuracy of predictions and, in turn, decreases the number of images verified as robust.

Global perturbations for the CNN-based model. Asimilar trend to that seen with local perturbations emerges, as indicated in Tables 4 and 5. The verification can handle contrast variations 𝑐 of 1% and brightness variations 𝑏 of 2/255. Greater variations in contrast and brightness lead to longer verification times, whereas a larger 𝛼 reduces verification time and increases the verified rate.

Local block occlusions for the ResNet-18-based model. We set 𝜅 = 1 0 and . 𝛼 = 1 5. For the convex . hull comprised of non-overlapping images, the verification time is 314.4 ± 227.0 in seconds, with a verification rate of 93.5%. Conversely, for the convex hull consisting of overlapping images, the verification time significantly escalates to 1571.7 ± 1213.5 seconds, and the verification rate is 94.0%.

## 9 Conclusions

In this study, we introduce a framework designed to certify the robustness of learning-based keypoint detection and pose estimation methods. Given system-level requirements, our approach transforms the certification of PnP-based pose estimation into the standard verification for classification, allowing us to leverage off-the-shelf tools. The evaluation results demonstrated that our framework can handle realistic semantic perturbations compared to existing methods. We emphasize that our certification framework is general for safety-critical applications that depend on accurate keypoint detection. These include airport runway detection for automatic landing, pedestrain pose estimation for autonomous driving, and anatomical landmark identification for robot-assisted surgery. Future directions of this framework could include: 1) Expanding the input

specifications to represent more perturbations, such as the translational movement of objects. 2) Reducing the conservativeness caused by independent error allocation among keypoints.

## Acknowledgement

This material is based upon work supported by The Boeing Company. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of The Boeing Company.

## References

- [1] Angello Astorga, Chiao Hsieh, P Madhusudan, and Sayan Mitra. 2023. Perception Contracts for Safety of ML-Enabled Systems. Proceedings of the ACM on Programming Languages 7, OOPSLA2 (2023), 2196-2223.
- [2] Stanley Bak, Hoang-Dung Tran, Kerianne Hobbs, and Taylor T Johnson. 2020. Improved geometric path enumeration for verifying relu neural networks. In Computer Aided Verification: 32nd International Conference, CAV 2020, Los Angeles, CA, USA, July 21-24, 2020, Proceedings, Part I 32 . Springer, 66-96.
- [3] Osbert Bastani, Yani Ioannou, Leonidas Lampropoulos, Dimitrios Vytiniotis, Aditya Nori, and Antonio Criminisi. 2016. Measuring neural net robustness with constraints. Advances in neural information processing systems 29 (2016).
- [4] Mehdi Behroozi. 2019. Largest Inscribed Rectangles in Geometric Convex Sets. arXiv preprint arXiv:1905.13246 (2019).
- [5] Christopher Brix, Stanley Bak, Changliu Liu, and Taylor T Johnson. 2023. The fourth international verification of neural networks competition (vnn-comp 2023): Summary and results. arXiv preprint arXiv:2312.16760 (2023).
- [6] Enrique Castillo, Roberto Mínguez, and Carmen Castillo. 2008. Sensitivity analysis in optimization and reliability problems. Reliability Engineering &amp; System Safety 93, 12 (2008), 1788-1800.
- [7] Chih-Hong Cheng, Chung-Hao Huang, Thomas Brunner, and Vahid Hashemi. 2020. Towards safety verification of direct perception neural networks. In 2020 Design, Automation &amp; Test in Europe Conference &amp; Exhibition (DATE) . IEEE, 1640-1643.
- [8] Alvaro Collet, Manuel Martinez, and Siddhartha S Srinivasa. 2011. The moped framework: Object recognition and pose estimation for manipulation. The international journal of robotics research 30, 10 (2011), 1284-1306.
- [9] Xinke Deng, Yu Xiang, Arsalan Mousavian, Clemens Eppner, Timothy Bretl, and Dieter Fox. 2020. Self-supervised 6d object pose estimation for robot manipulation. In 2020 IEEE International Conference on Robotics and Automation (ICRA) . IEEE, 3665-3671.
- [10] Yan Di, Fabian Manhardt, Gu Wang, Xiangyang Ji, Nassir Navab, and Federico Tombari. 2021. So-pose: Exploiting self-occlusion for direct 6d pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision . 12396-12405.
- [11] Hai Duong, Dong Xu, ThanhVu Nguyen, and Matthew B Dwyer. 2024. Harnessing Neuron Stability to Improve DNN Verification. arXiv preprint arXiv:2401.14412 (2024).
- [12] Souradeep Dutta, Xin Chen, and Sriram Sankaranarayanan. 2019. Reachability analysis for neural feedback systems using regressive polynomial rule inference. In Proceedings of the 22nd ACM International Conference on Hybrid Systems: Computation and Control . 157-168.
- [13] Michael Everett. 2021. Neural network verification in control. In 2021 60th IEEE Conference on Decision and Control (CDC) . IEEE, 6326-6340.
- [14] Zhaoxin Fan, Yazhi Zhu, Yulin He, Qi Sun, Hongyan Liu, and Jun He. 2022. Deep learning on monocular object pose detection and tracking: A comprehensive overview. Comput. Surveys 55, 4 (2022), 1-40.
- [15] Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin Vechev. 2018. Ai2: Safety and robustness certification of neural networks with abstract interpretation. In 2018 IEEE symposium on security and privacy (SP) . IEEE, 3-18.
- [16] Yisheng He, Haibin Huang, Haoqiang Fan, Qifeng Chen, and Jian Sun. 2021. Ffb6d: A full flow bidirectional fusion network for 6d pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 3003-3013.
- [17] Hikami3150. 2024. Boeing 777-300ER Model. https://sketchfab.com/3d-models/boeing-777-300er-model322e7961d2024bba834887878d2d49a2. 3D model.
- [18] Chiao Hsieh, Yangge Li, Dawei Sun, Keyur Joshi, Sasa Misailovic, and Sayan Mitra. 2022. Verifying controllers with vision-based perception using safe approximate abstractions. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 41, 11 (2022), 4205-4216.
- [19] Hanjiang Hu, Changliu Liu, and Ding Zhao. 2023. Robustness verification for perception models against camera motion perturbations. In ICML Workshop on Formal Verification of Machine Learning (WFVML) .

- [20] Radoslav Ivanov, Taylor Carpenter, James Weimer, Rajeev Alur, George Pappas, and Insup Lee. 2021. Verisig 2.0: Verification of neural network controllers using taylor model preconditioning. In International Conference on Computer Aided Verification . Springer, 249-262.
- [21] Radoslav Ivanov, Taylor J Carpenter, James Weimer, Rajeev Alur, George J Pappas, and Insup Lee. 2020. Case study: verifying the safety of an autonomous racing car with a neural network controller. In Proceedings of the 23rd International Conference on Hybrid Systems: Computation and Control . 1-7.
- [22] Radoslav Ivanov, Kishor Jothimurugan, Steve Hsu, Shaan Vaidya, Rajeev Alur, and Osbert Bastani. 2021. Compositional learning and verification of neural network controllers. ACM Transactions on Embedded Computing Systems (TECS) 20, 5s (2021), 1-26.
- [23] Guy Katz, Derek A Huang, Duligur Ibeling, Kyle Julian, Christopher Lazarus, Rachel Lim, Parth Shah, Shantanu Thakoor, Haoze Wu, Aleksandar Zeljić, et al. 2019. The marabou framework for verification and analysis of deep neural networks. In Computer Aided Verification: 31st International Conference, CAV 2019, New York City, NY, USA, July 15-18, 2019, Proceedings, Part I 31 . Springer, 443-452.
- [24] Sydney M Katz, Anthony L Corso, Christopher A Strong, and Mykel J Kochenderfer. 2022. Verification of image-based neural network controllers using generative models. Journal of Aerospace Information Systems 19, 9 (2022), 574-584.
- [25] Wadim Kehl, Fabian Manhardt, Federico Tombari, Slobodan Ilic, and Nassir Navab. 2017. Ssd-6d: Making rgb-based 3d detection and 6d pose estimation great again. In Proceedings of the IEEE international conference on computer vision . 1521-1529.
- [26] Panagiotis Kouvaros, Francesco Leofante, Blake Edwards, Calvin Chung, Dragos Margineantu, and Alessio Lomuscio. 2023. Verification of semantic key point detection for aircraft pose estimation. In Proceedings of the International Conference on Principles of Knowledge Representation and Reasoning , Vol. 19. 757-762.
- [27] Ruyi Lian and Haibin Ling. 2023. Checkerpose: Progressive dense keypoint localization for object pose estimation with graph neural network. In Proceedings of the IEEE/CVF International Conference on Computer Vision . 14022-14033.

[28]

Changliu Liu, Tomer Arnon, Christopher Lazarus, Christopher Strong, Clark Barrett, Mykel J Kochenderfer, et al. 2021.

Algorithms for verifying deep neural networks.

Foundations and Trends® in Optimization

4, 3-4 (2021), 244-404.

- [29] Jian Liu, Wei Sun, Hui Yang, Zhiwen Zeng, Chongpei Liu, Jin Zheng, Xingyu Liu, Hossein Rahmani, Nicu Sebe, and Ajmal Mian. 2024. Deep Learning-Based Object Pose Estimation: A Comprehensive Survey. arXiv preprint arXiv:2405.07801 (2024).
- [30] Aiden Nibali, Zhen He, Stuart Morgan, and Luke Prendergast. 2018. Numerical coordinate regression with convolutional neural networks. arXiv preprint arXiv:1801.07372 (2018).
- [31] Markus Oberweger, Mahdi Rad, and Vincent Lepetit. 2018. Making deep heatmaps robust to partial occlusions for 3d object pose estimation. In Proceedings of the European conference on computer vision (ECCV) . 119-134.
- [32] Kiru Park, Timothy Patten, and Markus Vincze. 2019. Pix2pose: Pixel-wise coordinate regression of objects for 6d pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision . 7668-7677.
- [33] Sida Peng, Yuan Liu, Qixing Huang, Xiaowei Zhou, and Hujun Bao. 2019. Pvnet: Pixel-wise voting network for 6dof pose estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition . 4561-4570.
- [34] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. 2018. Generative adversarial perturbations. In Proceedings of the IEEE conference on computer vision and pattern recognition . 4422-4431.
- [35] Mahdi Rad and Vincent Lepetit. 2017. Bb8: A scalable, accurate, robust to partial occlusion method for predicting the 3d poses of challenging objects without using depth. In Proceedings of the IEEE international conference on computer vision . 3828-3836.
- [36] Ulices Santa Cruz and Yasser Shoukry. 2022. Nnlander-verif: A neural network formal verification framework for vision-based autonomous aircraft landing. In NASA Formal Methods Symposium . Springer, 213-230.
- [37] Ulices Santa Cruz and Yasser Shoukry. 2023. Certified vision-based state estimation for autonomous landing systems using reachability analysis. In 2023 62nd IEEE Conference on Decision and Control (CDC) . IEEE, 6052-6057.
- [38] Jingnan Shi, Rajat Talak, Dominic Maggio, and Luca Carlone. 2023. A correct-and-certify approach to self-supervise object pose estimators via ensemble self-training. (2023).
- arXiv preprint arXiv:2302.06019
- [39] Ivan Shugurov, Sergey Zakharov, and Slobodan Ilic. 2021. Dpodv2: Dense correspondence-based 6 dof pose estimation. IEEE transactions on pattern analysis and machine intelligence 44, 11 (2021), 7417-7435.
- [40] Shiqi Sun, Yan Zhang, Xusheng Luo, Panagiotis Vlantis, Miroslav Pajic, and Michael M Zavlanos. 2022. Formal verification of stochastic systems with relu neural network controllers. In 2022 International Conference on Robotics and Automation (ICRA) . IEEE, 6800-6806.
- [41] Xiaowu Sun, Haitham Khedr, and Yasser Shoukry. 2019. Formal verification of neural network controlled autonomous systems. In Proceedings of the 22nd ACM International Conference on Hybrid Systems: Computation and Control . 147-156.
- [42] Rajat Talak, Lisa R Peng, and Luca Carlone. 2023. Certifiable Object Pose Estimation: Foundations, Learning Models, and Self-Training. IEEE Transactions on Robotics (2023).

- [43] Fulin Tang, Yihong Wu, Xiaohui Hou, and Haibin Ling. 2019. 3D mapping and 6D pose computation for real time augmented reality on cylindrical objects. IEEE Transactions on Circuits and Systems for Video Technology 30, 9 (2019), 2887-2899.
- [44] Stefan Thalhammer, Dominik Bauer, Peter Hönig, Jean-Baptiste Weibel, José García-Rodríguez, and Markus Vincze. 2023. Challenges for monocular 6d object pose estimation in robotics. arXiv preprint arXiv:2307.12172 (2023).
- [45] Vincent Tjeng, Kai Y Xiao, and Russ Tedrake. 2018. Evaluating Robustness of Neural Networks with Mixed Integer Programming. In International Conference on Learning Representations .
- [46] Hoang-Dung Tran, Feiyang Cai, Manzanas Lopez Diego, Patrick Musau, Taylor T Johnson, and Xenofon Koutsoukos. 2019. Safety verification of cyber-physical systems with reinforcement learning control. ACM Transactions on Embedded Computing Systems (TECS) 18, 5s (2019), 1-22.
- [47] Hoang-Dung Tran, Xiaodong Yang, Diego Manzanas Lopez, Patrick Musau, Luan Viet Nguyen, Weiming Xiang, Stanley Bak, and Taylor T Johnson. 2020. NNV: the neural network verification tool for deep neural networks and learning-enabled cyber-physical systems. In International Conference on Computer Aided Verification . Springer, 3-17.
- [48] He Wang, Srinath Sridhar, Jingwei Huang, Julien Valentin, Shuran Song, and Leonidas J Guibas. 2019. Normalized object coordinate space for category-level 6d object pose and size estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 2642-2651.
- [49] Shiqi Wang, Huan Zhang, Kaidi Xu, Xue Lin, Suman Jana, Cho-Jui Hsieh, and J Zico Kolter. 2021. Beta-crown: Efficient bound propagation with per-neuron split constraints for neural network robustness verification. Advances in Neural Information Processing Systems 34 (2021), 29909-29921.
- [50] Dennis Wei, Haoze Wu, Min Wu, Pin-Yu Chen, Clark Barrett, and Eitan Farchi. 2023. Convex Bounds on the Softmax Function with Applications to Robustness Verification. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research, Vol. 206) , Francisco Ruiz, Jennifer Dy, and JanWillem van de Meent (Eds.). PMLR, 6853-6878. https://proceedings.mlr.press/v206/wei23c.html
- [51] Tianhao Wei, Luca Marzari, Kai S Yun, Hanjiang Hu, Peizhi Niu, Xusheng Luo, and Changliu Liu. 2024. ModelVerification. jl: a Comprehensive Toolbox for Formally Verifying Deep Neural Networks. arXiv preprint arXiv:2407.01639 (2024).
- [52] Haoze Wu, Omri Isac, Aleksandar Zeljić, Teruhiro Tagomori, Matthew Daggitt, Wen Kokke, Idan Refaeli, Guy Amir, Kyle Julian, Shahaf Bassan, et al. 2024. Marabou 2.0: A Versatile Formal Analyzer of Neural Networks. arXiv preprint arXiv:2401.14461 (2024).
- [53] Kira Wursthorn, Markus Hillemann, and Markus Ulrich. 2024. Uncertainty Quantification with Deep Ensembles for 6D Object Pose Estimation. arXiv preprint arXiv:2403.07741 (2024).
- [54] Weiming Xiang, Hoang-Dung Tran, and Taylor T Johnson. 2018. Output reachable set estimation and verification for multilayer neural networks. IEEE transactions on neural networks and learning systems 29, 11 (2018), 5777-5783.
- [55] Kaidi Xu, Huan Zhang, Shiqi Wang, Yihan Wang, Suman Jana, Xue Lin, and Cho-Jui Hsieh. 2020. Fast and Complete: Enabling Complete Neural Network Verification with Rapid and Massively Parallel Incomplete Verifiers. In International Conference on Learning Representations .
- [56] Heng Yang and Marco Pavone. 2023. Object pose estimation with statistical guarantees: Conformal keypoint detection and geometric uncertainty propagation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 8947-8958.
- [57] Ce Zheng, Wenhan Wu, Chen Chen, Taojiannan Yang, Sijie Zhu, Ju Shen, Nasser Kehtarnavaz, and Mubarak Shah. 2023. Deep learning-based human pose estimation: A survey. Comput. Surveys 56, 1 (2023), 1-37.
- [58] Linfang Zheng, Chen Wang, Yinghan Sun, Esha Dasgupta, Hua Chen, Aleš Leonardis, Wei Zhang, and Hyung Jin Chang. 2023. Hs-pose: Hybrid scope feature extraction for category-level object pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 17163-17173.
Xusheng Luo Tianhao Wei Simin Liu Ziwei Wang Luis Mattei-Mendez Taylor Loper Joshua Neighbor Casidhe Hutchison Changliu Liu
Certifying Robustness of Learning-Based Keypoint Detection and Pose Estimation Methods
This work addresses the certification of the local robustness of vision-based
two-stage 6D object pose estimation. The two-stage method for object pose
estimation achieves superior accuracy by first employing deep neural
network-driven keypoint regression and then applying a Perspective-n-Point
(PnP) technique. Despite advancements, the certification of these methods'
robustness remains scarce. This research aims to fill this gap with a focus on
their local robustness on the system level--the capacity to maintain robust
estimations amidst semantic input perturbations. The core idea is to transform
the certification of local robustness into neural network verification for
classification tasks. The challenge is to develop model, input, and output
specifications that align with off-the-shelf verification tools. To facilitate
verification, we modify the keypoint detection model by substituting nonlinear
operations with those more amenable to the verification processes. Instead of
injecting random noise into images, as is common, we employ a convex hull
representation of images as input specifications to more accurately depict
semantic perturbations. Furthermore, by conducting a sensitivity analysis, we
propagate the robustness criteria from pose to keypoint accuracy, and then
formulating an optimal error threshold allocation problem that allows for the
setting of a maximally permissible keypoint deviation thresholds. Viewing each
pixel as an individual class, these thresholds result in linear,
classification-akin output specifications. Under certain conditions, we
demonstrate that the main components of our certification framework are both
sound and complete, and validate its effects through extensive evaluations on
realistic perturbations. To our knowledge, this is the first study to certify
the robustness of large-scale, keypoint-based pose estimation given images in
real-world scenarios.