SlowGuess/NeurIPS_2023_OCR huggingface dataset:
4) Consistency Constraint of Curve Lengths. For the same input pair of geodesic query points, we can simultaneously obtain their geodesic distance  $d$  and shortest path  $\mathbf{c}_{s\rightarrow t} = \{\mathbf{p}_m\}_{m = 0}^{M - 1}$ . To promote the consistency between  $d$  and  $\mathbf{c}_{s\rightarrow t}$ , we explicitly minimize the difference of curve lengths between the predicted  $\mathbf{c}_{s\rightarrow t}$  and its ground-truth  $\tilde{\mathbf{c}}_{s\rightarrow t} = \{\tilde{\mathbf{p}}_m\}_{m = 0}^{M - 1}$  as:
$$
\left. \ell_ {\mathrm {c c l}} = \left\| \sum_ {m = 1} ^ {M - 1} \left(\left\| \tilde {\mathbf {p}} _ {m} - \tilde {\mathbf {p}} _ {m - 1} \right\| _ {2}\right) - \sum_ {m = 1} ^ {M - 1} \left(\left\| \mathbf {p} _ {m} - \mathbf {p} _ {m - 1} \right\| _ {2}\right) \right\| _ {1}, \right. \tag {10}
$$
where we roughly approximate the curve length as the summation of pair-wise Euclidean distances between adjacent points.
5) Distribution Constraint of Curve Points. Theoretically, each curve point  $\mathbf{p}_m$  of the shortest path is supposed to be located on the underlying shape surface, with zero signed distance value. However, under the generative modeling framework, there is no strict guarantee to eliminate deviation between the generated geodesic curves and the corresponding shape surface. To this end, we further constrain the spatial distribution of the generated curve points by minimizing the absolute values of their signed distances, as given by:
$$
\ell_ {\mathrm {d c p}} = \frac {1}{M} \sum_ {m = 0} ^ {M - 1} \left| \mathcal {N} _ {\phi} (\mathbf {p} _ {m}) \right| \tag {11}
$$
where  $\mathcal{N}_{\phi}:\mathbb{R}^3\to \mathbb{R}$  represents an independent neural model overfitted on the given shape for the fitting of signed distance fields in advance, whose network parameters are fixed. Given an arbitrary spatial query,  $\mathcal{N}_{\phi}$  outputs a scalar of the corresponding signed distance value, offering a natural way of constraining the generated curve points in a differentiable manner.
Testing Shapes. We experimented with a variety of 3D shape models that are commonly adopted in the geometry processing community, covering different complexity in terms of both geometry and topology, as displayed in Figure 2. Detailed mesh statistics can be found in Table 1. The anisotropy  $\tau$  quantifies the level of anisotropy in the meshes. Meshes with  $\tau > 3$  are classified as anisotropic models. In our experiments, all the testing models have already been uniformly scaled into a unit sphere.
Figure 2: Visualization of selected testing shapes, among which the dragon, bucket, and nail meshes are highly anisotropic, and the heptoroid mesh is with high genus.
Table 1: Comparison of geodesic representation accuracy and time efficiency for SSAD querying.
Mesh	#V(K)	τ	Running Time (ms) of SSAD Query	Mean Relative Error (%)
VTP [32]	HM [10]	fDGG [2]	NeuroGF	HM [10]	fDGG [2]	NeuroGF
armadillo	173	1.3	1778	194	59	0.5	1.03	0.59	0.51
bimba	75	1.1	985	82	20	0.5	0.67	0.57	0.46
bucket	35	14.1	500	18	16	0.5	3.35	0.96	0.18
bunny	35	1.4	374	29	10	0.5	0.87	0.58	0.44
cow	46	1.6	593	28	11	0.5	2.19	0.57	0.51
dragon	436	12.7	6209	246	145	0.7	10.6	0.46	0.68
fandisk	20	1.4	359	14	4	0.5	0.88	0.66	0.35
heptoroid	287	2.6	5789	212	86	0.6	1.75	0.48	0.87
maxplanck	49	1.2	797	33	11	0.5	0.79	0.57	0.39
nail	2.4	4.6	16	1.4	0.6	0.4	2.71	0.42	0.50
Training Data Preparation. We employed DGG-VTP [1] and fast discrete geodesic graphs (fDGG) [2] to generate the ground-truth geodesic distances and shortest paths, respectively. Specifically, we set the accuracy control parameter  $\varepsilon = 10^{-7}$  for both DGG-VTP and fDGG. This parameter ensures that the computed geodesic distances and paths have accuracy comparable to the results obtained from the exact VTP method [32] using single-precision floating points. It is worth emphasizing that training NeuroGF on a given mesh does not require the utilization of geodesics between every pair of mesh vertices, which would be computationally expensive. Instead, we selected a subset of vertices and then uses the distances and paths between them. In our implementation, we sampled 20K vertices using mesh simplification tools, such as QSlim [11], for each input mesh. Our experiments show that the down-sampling strategy is sufficient for achieving satisfactory learning results. We also observed that exhaustive preparation of all-pairs geodesics for the input mesh did not further bring any obvious gain of accuracy.
Network Configuration. The overall learning framework is composed of four network components. The initial query point feature embedding is achieved through a stack of three FC layers with output dimensions of  $\{D_e / 4, D_e / 2, D_e\}$ , where  $D_e$  is an adjustable hyperparameter that controls the whole network size. Then comes the subsequent three learning branches for the fitting of geodesic distances, shortest paths, and signed distances, respectively. Specifically,  $\mathcal{B}_{\mathrm{gdist}}$  comprises three FC layers with output dimensions of  $\{D_e / 4, 64, 1\}$ ,  $\mathcal{B}_{\mathrm{spath}}$  is a stack of point-wise MLPs with output dimensions of  $\{128, 64, 32, 3\}$ ,  $\mathcal{B}_{\mathrm{sdist}}'$  comprises three FC layers with output dimensions of  $\{D_e / 4, 64, 1\}$ .
We adopted  $D_{e} = 256$  for constructing our baseline representation model, which totally contains  $259\mathrm{K}$  network parameters. Note that the same number of parameters applies to all different testing shapes without changing the network structure.
**Optimization Strategy.** We adopted the popular AdamW [20] optimizer for parameter updating with 500 training epochs, with the learning rate gradually decaying from 0.01 to 0.0001 scheduled by cosine annealing. During each training epoch, we randomly sampled around 30K spatial points as signed distance queries, 90K paired mesh vertices as geodesic distance queries, and 20K paired mesh vertices as shortest path queries, which are repeatedly consumed as inputs for 200 iterations. In the whole training phase, we specified the number of geodesic curve points as  $M = 128$  and  $M = 32$  for long and short shortest paths, respectively, to facilitate batch-wise processing.
Evaluation Protocol. We evaluated the geodesic representation accuracy and online SSAD query efficiency of the proposed NeuroGF learning framework and made necessary quantitative comparisons with two representative computational approaches HM [10] and fDGG [2]. The quality of geodesic
Figure 3: Visual comparison of shortest paths.
Mesh	Chamfer-L1(×10-2)
armadillo	1.366
bimba	1.301
nail	0.354
bunny	1.559
cow	0.941
dragon	1.319
fandisk	0.822
heptoroid	2.244
maxplanck	1.434
bucket	1.183
Table 2: Chamfer-  $L_{1}$  errors between ground-truth and our predicted shortest path points.
Figure 4: Visualization of our predicted geodesic distance fields.  $\mathbb{Q}$  Zoom in to see details.
distance representation is measured by the mean relative error (MRE), which can be formulated as  $|d - \tilde{d}| / \tilde{d} \times 100\%$ . For shortest path evaluation, we densely interpolate the predicted and ground-truth curves to around 1K points and compute their similarity as Chamfer- $L_{1}$  distance.
4.2 Quantitative Evaluations and Visualization Examples
We performed quantitative evaluations on geodesic distances produced from different approaches, as compared in Table 1, where our NeuroGF achieves the lowest mean relative errors for most testing shapes. Particularly, the performance of the heat method (HM) [10] suffers from obvious degradation when dealing with anisotropic meshes (especially for dragon and bucket with anisotropy degree  $\tau > 10$ ), while our approach shows satisfactory robustness. We also visualized geodesic distance fields using isolines in Figure 4, which shows the smoothness of our results. We further compared the time efficiency of different approaches (including exact VTP [32] for ground truth geodesic distances and paths), where [32, 10, 2] run on the CPU (Intel i5 7500), while NeuroGF runs on the GPU (NVIDIA GeForce RTX 3090). fDGG allows the user to specify the desired accuracy of geodesic distances and paths. We set its accuracy parameter  $\varepsilon = 2.5\%$  so that its results have an accuracy similar to ours, which enables us to make a fair comparison in terms of speed. Computational results show that our approach is much faster than the others for answering online SSAD queries.
In addition, the quality of the shortest paths exported from NeuroGFs is measured in Table 2 and visualized in Figure 3. We can observe that our predicted geodesic curves are highly close to ground truths even for heptoroid, which is characterized by highly complicated topological structures.
4.3 Extension to Generalizable Learning Frameworks
We made further efforts to extend the overfitting working mode of NeuroGFs introduced previously to generalizable learning frameworks. More specifically, as illustrated in Figure 5, we designed three versions of generalizable NeuroGFs using (a) autodecoder-based (i.e., DeepSDF-like [29]), (b) point transformer-based, and (c) graph convolution-based feature extraction strategies. Notably, NeuroGF equipped with (a) or (b) for shape encoding can directly work on point clouds during testing. We used the popular ShapeNet [7] mesh dataset pre-processed by [42], covering 13 different shape categories. We collected 3000 models from 8 categories as our training set. For each model, we only sparsely generated 2K ground-truth training pairs. For evaluation, we constructed different testing sets: 1)
Figure 5: Illustration of extending our NeuroGFs to generalizable learning frameworks. From the architectural point of view, we only need to replace the single-object query point embedding module (red box) by a multi-object embedding module (orange box).
Figure 6: Statistics of SSAD geodesic distance querying with different network complexity.
SN-Airplane, SN-Chair, and SN-Car are collected within the same categories of airplane, chair, and car, each of which containing 500 models; 2) SN-8x50 is collected from the same 8 categories as in the training set, but each shape is unseen during training. 3) SN-5x50 is collected from the other 5 different categories.
Quantitative results are reported in Table 3. The testing results on (a) validate the category-specific representation capability (with about  $3\%$  MRE). The testing results on (b) show that our extended approach equipped with a powerful deep point encoder works well on point clouds for both seen and unseen categories. (c) further incorporates mesh connectivity cues, thus achieving better performance.
In the preceding experiments, we uniformly configured  $D_{e} = 256$ , corresponding to  $259\mathrm{K}$  network parameters. Here, we further investigated the effects of scaling the network size by changing  $D_{e}$  to 64, 128, and 512, leading to three different variants with  $35\mathrm{K}$  and  $84\mathrm{K}$ , and  $916\mathrm{K}$  parameters, respectively. As illustrated in Figure 6, as the network complexity increases, the geodesic representation accuracy gets stably enhanced. Furthermore, to reveal the specific influences of the different learning components and supervision objectives involved in our approach, we performed necessary ablative analyses as presented in Table 4. We can observe that removing any of them leads to some degree of performance degradation, which demonstrates their necessity and effectiveness.
This paper made the first effort to investigate learning-based neural implicit representations for 3D surface geodesics in both overfitted and generalizable working modes. The proposed NeuroGF achieves accurate and highly efficient point-to-point queries of both geodesic distances and shortest paths, which can be naturally combined with the learning of signed distances to further produce a
Table 3: MRE (\%) performances of generalizable NeuroGF learning frameworks equipped with different global shape feature extractors, including: (a) AutoDec, (b) PointTr, and (c) GraphConv.
(a)	SN-Airplane	SN-Chair	SN-Car	(b)	SN-8x50	SN-5x50	(c)	SN-8x50	SN-5x50
AutoDec	3.03	3.91	2.78	PointTr	3.28	4.16	GraphConv	2.94	3.55
Table 4: Influences of different learning components and supervision objectives, where the results are averaged on all testing shapes. The right two columns show the representation accuracy of our predicted geodesic distances and shortest paths (the lower, the better). The averaged statistics of our full implementation in terms of the two metrics are  $0.49\%$  and  $1.25 \times 10^{-2}$ . In particular, we mark the relative change within each bracket to facilitate comparison.
Bgdist	Bspath	B'sdist	ℓccl	ℓdcp	Mean Relative Error (%)	Chamfer-L1(×10-2)
X	-	1.46 (↑0.21)
X	0.61 (↑0.12)	-
X	0.57 (↑0.08)	1.31 (↑0.06)
X	0.52 (↑0.03)	1.35 (↑0.10)
X	0.50 (↑0.01)	1.38 (↑0.13)
unified geodesic and geometric representation structure. Experiments demonstrated that our approach achieves comparable, if not better, geodesic representation accuracy against previous representative computational and optimization-based approaches. We believe that NeuroGF opens up new and promising paradigms for the complicated problem of geodesic representation and computation.
Table 5: Chamfer-  ${L}_{1}\left( {\times {10}^{-2}}\right)$  errors between ground-truth and our predicted shortest path points after post-processing.
armadillo	bimba	nail	bunny	cow	dragon	fandisk	heptoroid	maxplanck	bucket	average
1.131	1.126	0.347	1.325	0.804	1.070	0.766	1.994	1.248	1.079	1.09
Figure 7: Error distribution of our predicted geodesic distance fields.  $\mathbb{Q}$  Zoom in to see details.
While we have demonstrated superior runtime performance of NeuroGF in answering point-to-point distance queries and solving the SSAD problem, our approach is still subject to a few limitations. There is no guarantee that the generated geodesic path strictly lies on the underlying surface, as the path points may exhibit varying degrees of deviation from the surface. To enhance the accuracy of geodesic paths, post-projection/refinement techniques can be employed, utilizing direction cues from signed distance fields. As shown in Table 5, the shortest path representation accuracy will further improve after pre-processing for making curve points locate exactly on the underlying surface. Although our approach achieves highly stable and satisfactory mean relative errors, it is worth noting that the metric of maximal errors can sometimes reach higher values, as depicted in Figure 7, where the relative error can rise up to approximately  $5\%$ . To address this, incorporating more advanced optimization strategies, such as online hard example mining, may be necessary.
This work was supported by the Hong Kong Research Grants Council under Grants CityU 11202320 and CityU 11219422.
1) Visualization of MSAD Geodesic Distance Fields. We randomly selected 5 source points on the shape surface to produce the resulting MSAD geodesic distance field, as illustrated in Figure A1. Besides, we also visualized the triangulation of the testing meshes in Figure A2.
Figure A1: Visualization of MSAD geodesic distance fields computed by our approach. Zoom in to see details.
Figure A2: Visualization of mesh triangulations.
2) Visualization of SSAD Geodesic Distance Fields. We provided more visual comparisons of the SSAD geodesic distance fields exported from different approaches, as presented in Figure A3. To facilitate comparisons, we also marked the quantitative metrics of geodesic representation accuracy below each example computed from different approaches. In particular, Figure A4 presents close-up views for regions on the anisotropic nail model.
VTP	NeuroGF	fDGG	HM
0.51%	0.59%	1.03%
0.46%	0.57%	0.67%
0.18%	0.96%	3.35%
0.68%	0.46%	10.6%
0.50%	0.42%	2.71%
0.35%	0.66%	0.88%
0.87%	0.48%	1.75%
Figure A3: Visual comparison of SSAD geodesic distances. Below each example, we also marked the corresponding mean relative error (\%).  $\mathbb{Q}$  Zoom in to see details.
Figure A4: Close-up views for geodesic distance fields on the anisotropic nail model.
3) Offline Training with Limited Ground-Truth Geodesics. For the preprocessing stage of preparing the required ground-truth geodesics for offline training of NeuroGFs, during which 4 data generation scripts run in parallel, we explored the effects of using different numbers of source points, i.e., 10000, 1024, 512, 256, 128, and 64. For each source point, we only preserved its geodesic distances between 4096 target points and its shortest paths between 2048 target points. As compared in Table A1, our approach can still achieve relatively satisfactory geodesic representation performances when only a limited amount of source points are exploited to produce ground-truth training data. Besides, we can also observe that using a much larger amount of training samples (i.e., with 10000 source points) only leads to insignificant performance gains.
Furthermore, note that here our preprocessing stage is not well-optimized, since we need to do lots of disk writing operations. We can directly integrate the approaches used for data preparations (fDGG [2] and DGG-VTP [1]) to Python to avoid costly disk writing time in the future. Comparatively, the recent work SEP [12] requires around 30 minutes for preprocessing a mesh with  $20\mathrm{K}$  vertices. Its time complexity of preprocessing is  $O(f(n) + m^3 n)\sqrt{n}$ , where  $n$  is the number of mesh vertices and  $f(n)$  is the time complexity of the used SSAD algorithm, which is at least  $O(n)$  time for fDGG [2]. We can see that this time complexity increases more than linearly in the number of mesh vertices. Thus, we can estimate that for the dragon mesh model with more than  $400\mathrm{K}$  vertices, SEP would require more than 10 hours to finish preprocessing. This is much longer than our preprocessing stage using 1024 source points, which achieves geodesic representation accuracy comparable to SEP.
In addition, we also evaluated training with highly sparse ground-truth pairs. As shown in Table A2, when training NeuroGFs with only 8K and 2K ground-truth pairs, the errors do not rise up drastically, still maintaining relatively satisfactory.
Table A1: Effects of offline training with different amounts of paired ground-truth geodesics on the dragon model. In the right two columns, we respectively record the preprocessing (Prep.) time cost for generating ground-truth geodesic distance (G.D.) and shortest path (S.P.) data.
#Sources	MRE (%)	Chamfer-L1 (×10-2)	Prep. G.D. (minutes)	Prep. S.P. (hours)
10000	0.66	1.297	119.1	21.6
1024	0.68	1.319	12.2	2.2
512	0.75	1.397	6.1	1.1
256	0.83	1.580	3.0	0.6
128	1.09	2.044	1.5	0.3
64	1.63	2.926	0.8	0.14
32	2.21	3.725	0.4	0.07
Table A2: Effects of training NeuroGFs with highly sparse ground-truth pairs.
#GT-Pairs	MRE (%)	#GT-Pairs	MRE (%)	#GT-Pairs	MRE (%)
Original	0.53	8K	4.05	2K	5.62
4) Memory Footprint of Online Point-to-Point Geodesic Query. We compared the memory footprints of different approaches for online answering the geodesic distance between an input pair of source and target points. The quantitative results are reported in Table A3, where we can observe that our approach consistently maintains satisfactory memory efficiency. Thanks to our implicit querying paradigm, the resulting memory footprint is independent of the complexity of the given shape. Instead, for both the two competing approaches of HM [10] and fDGG [2], their memory footprints increase when dealing with larger meshes.
Table A3: Comparison of memory efficiency for online point-to-point geodesic query.
Mesh	#V(K)	Memory Footprint (MB) of Point-to-Point Geodesic Query
HM [10] (on CPUs)	fDGG [2] (on CPUs)	NeuroGF (on GPUs)
armadillo	173	272	60	10
bimba	75	138	26	10
bucket	35	45	15	10
bunny	35	56	13	10
cow	46	70	17	10
dragon	436	597	152	10
fandisk	20	29	7	10
heptoroid	287	690	108	10
maxplanck	49	85	17	10
nail	2.4	2.9	1.3	10
5) Evaluation on Large-Scale and Real-World Meshes. We experimented with a much denser version of the dragon model with 1.5M vertices and another classic graphics model lucy with 6.9M vertices. As reported in Table A4, our approach works well on these two highly dense mesh models. As illustrated in Figure A5, in addition to the object models used in the paper for testing, here we further selected several representative large-scale real-world mesh models, covering (a) indoor room, (b) urban scene, and (c) street view, which are from diverse dataset sources. It can be observed that our approach still achieves satisfactory performances on the three scene-level meshes with MRE rates of  $0.37\%$ ,  $1.14\%$ , and  $0.23\%$ , respectively.
Table A4: MRE (%) performances for a much denser version of the dragon model and another popular lucy model.
Mesh	#V(M)	MRE(%)	Chamfer-L1(x10-2)
dragon	1.5	0.70	1.335
lucy	6.9	0.58	1.404
Figure A5: Experimental evaluations on large-scale real-world meshes (with up to 2 million vertices).
6) Geometry Representation Recovery. As pointed out in the paper, NeuroGFs jointly encode both 3D geometry and geodesics in a unified neural representation structure, although geodesic information is our major focus and geometric information just serves as a byproduct in this work.
Here, we provided necessary qualitative and quantitative evaluations for signed distance field information encoded in NeuroGFs. We deduced the predictions of signed distance values on a uniformly-distributed 3D grid with the resolution of  $512^3$ , and then measured the  $L_{1}$  differences between the predicted and ground-truth signed distances, as reported in Table A5. For visualization, we applied the Marching Cubes [48] algorithm for isosurface extraction. The resulting mesh reconstructions are displayed in Figure A6.
7) Time Cost of Per-Model Overfitting. Practically, since NeuroGF is an offline per-input overfitting process, users can flexibly control the trade-off between training time and fitting accuracy. Typically, the training time cost for achieving comparable performances as reported in the paper is "minute-level". Table A6 provides statistics averaged on all the 10 testing models, showing that the convergence speed is fast. For example, it only takes less than half a minute to reach the MRE lower than  $3\%$ . From our experience, in most cases, the whole training effects will saturate within 10 minutes. Further extending the training process can only bring marginal performance gains at a slow pace.
Table A5: Mean  $L_{1}$  errors between our predicted and ground-truth signed distances.
Mesh	armadillo	bimba	bucket	bunny	cow	dragon	fandisk	heptoroid	maxplanck	nail
L1(×10-3)	1.22	0.97	0.68	0.97	0.86	1.28	0.67	1.01	1.03	0.45
Figure A6: Visualization of mesh reconstruction deduced from NeuroGFs.
Table A6: Time cost for overfitting a single input 3D model.
MRE	<3%	<2%	<1%
Training Time Cost	0.4min	1.7min	7.9min
Table A7: Ablation studies on different variants of our technical implementations, where "variant (1)" means adding position encoding before fed into FC layers for query point feature embedding, "variant (2)" means replacing  $L_{1}$  loss with  $L_{2}$  loss for supervisions, and "variant (3)" means computing Chamfer distance between generated and ground-truth curve points of shortest paths  $\mathbf{c}_{s\rightarrow t}$  and  $\tilde{\mathbf{c}}_{s\rightarrow t}$  for the formulation of  $\ell_{\mathrm{spath}}$  (Eq. (8) in the paper).
Implementation Variants	dragon	heptoroid
MRE	Chamfer-L1	MRE	Chamfer-L1
(0) Original Implementation	0.68	1.319	0.87	2.244
(1) Adding PosEnc	0.62	1.253	0.79	1.921
(2) L2Supervisions	0.71	1.345	0.88	2.227
(3) Chamfer Loss for ℓspath	0.66	1.286	0.82	2.149