## 2 Materials and Methods
### PSCDR: A Deep Contrastive Regression Method for Point Cloud Data
#### 2.2.3 Supervised Contrastive Loss for Point Cloud and Deep Regression  
The PSCDR method is designed to handle point cloud data and introduces the loss function \(\alpha_{\text{PSCDR}_{\text{j}}}\). For sample j, if it is not selected as an anchor point data, then \(\Lambda_{\text{PSCDR}_{\text{j}}}=0\). Otherwise, the loss function minimizes the distance between positive sample point cloud pairs in the feature space while proportionally increasing the distance between negative sample point cloud pairs based on the similarity of their labels and feature values. In simpler terms, this loss function aims to pull features of positive point cloud pairs (those with similar biomass labels and originating from the same augmented sample) closer together in the feature space while pushing features of negative pairs (those with dissimilar labels or features) further apart. The degree of repulsion for negative pairs is scaled by their label and feature dissimilarity. The specific formula is as follows:  
\[\Lambda_{\text{PSCDR}_{\text{j}}}=-\text{log}\,\frac{1}{\text{N}_{\text{j}}^{+ }}\sum_{\text{f}_{\text{i}}\in\text{f}_{\text{j}}^{+}}\frac{\text{exp}(\text {f}_{\text{j}}\cdot\text{f}_{\text{j}}/\tau)}{\sum_{\text{f}_{\text{f}}\in \text{E}_{\text{j}}^{+}}\text{exp}(\text{f}_{\text{j}}\cdot\text{f}_{\text{p}} /\tau)+\sum_{\text{f}_{\text{f}_{\text{q}}}\in\text{E}_{\text{j}}^{-}}\text{ T}_{\text{j}\text{d}}\text{exp}(\text{f}_{\text{j}}\cdot\text{f}_{\text{q}}/\tau)} \tag{1}\]  
where \(\tau\) is the temperature parameter and \(\text{f}_{\text{j}}\) is the feature vector produced by the feature encoder for the anchor point data. \(\text{T}_{\text{j}\text{d}}\) represents the repulsion between each point cloud negative sample pair, and its calculation formula is as follows:  
\[\text{T}_{\text{j}\text{d}}=\text{P}_{\text{s}}\bigg{(}\theta,\text{Sim}_{ \text{j}}\bigg{(}\overset{\sim}{\text{1}}_{\text{j}},\overset{\sim}{\text{1}}_ {\text{q}}\bigg{)},\text{Sim}_{\text{pf}}\bigg{(}\text{f}_{\text{j}},\text{f} _{\text{q}},\overset{\sim}{\text{S}}_{\text{j}},\overset{\sim}{\text{S}}_{\text {q}}\bigg{)}\bigg{)} \tag{2}\]  
In Equation (2), \(\text{P}_{\text{s}}(\cdot)\) is the repulsion calculation function for negative sample pairs, \(\overset{\sim}{\text{1}}_{\text{q}}\) represents the label value of the augmented sample \(\overset{\sim}{\text{S}}_{\text{q}}\), \(\theta\) is the weight coefficient, and \(\text{Sim}_{\text{l}}(\cdot,\cdot,\cdot)\) and \(\text{Sim}_{\text{pf}}(\cdot,\cdot,\cdot,\cdot)\) are the label similarity calculation function and the sample feature similarity calculation function, respectively. The calculated value of \(\text{T}_{\text{j}\text{d}}\) is directly proportional to \(\theta\) and \(\text{Sim}_{\text{pfpf}}\bigg{(}\text{f}_{\text{j}},\overset{\sim}{\text{f}}_ {\text{q}},\overset{\sim}{\text{S}}_{\text{j}},\overset{\sim}{\text{S}}_{\text {q}}\bigg{)}\) and inversely proportional to \(\text{Sim}_{\text{l}}\bigg{(}\overset{\sim}{\text{1}}_{\text{j}},\overset{\sim} {\text{1}}_{\text{q}}\bigg{)}\). For the \(\text{Sim}_{\text{pf}}\) similarity calculation function, both the similarity between feature vectors and the similarity between the original point cloud data are taken into account. Point cloud  
Figure 2: Schematic of the PSCDR sample pairing process. Augmented samples pass through an encoder and regression function. Positive pairs are formed from samples with close labels. Negative pairs are formed from samples with distant labels but close predictions, facilitating contrastive learning in the feature space. data differs significantly from 2D image data in modality and carries rich structural and spatial information. Therefore, considering only the similarity between feature vectors (f) generated by the encoder might lead to the loss of some original spatial information. To address this, the Chamfer distance metric is introduced to calculate the similarity between point cloud negative sample pairs, while cosine similarity is used to calculate the similarity between feature vectors.