# GeoSAE: A 3D Stratographic Modeling Method Driven by Geological Constraint
## 2 Methods
### Geologically Constrained Loss Function Construction
#### 2.1.2 Stratigraphic Sequence Constraints
The approximate signed distance \(\delta_{I_{x},I_{K}}\) is provided as a more accurate measure of how far a point is above, below, or overlapping with a reference interface compared to the scalar difference \(D_{I_{x},I_{K}}\). The loss function formulae for the layer ordering relationships between surfaces are presented in Equations (7)-(9). \[L\text{oss}_{I}^{Above}=\sum_{I_{X}\in I}^{|I|}\frac{1}{\left|X\right|}\sum_{ x\in X}^{\left|X\right|}\sum_{k\in K}^{\left|K\right|}\delta_{I_{x},I_{K}}, \delta_{I_{x},I_{K}}=\begin{cases}\begin{array}{ll}\begin{array}{ll} \begin{array}{ll}\begin{array}{ll}\begin{array}{ll}\begin{array}{ll} \begin{array}{ll}\begin{array}{ll}\begin{array}{ll}\begin{array}{ll} \begin{array}{ll}\begin{array}{ll}\begin{array}{ll}\begin{array}{ll} \begin{array}{ll}\begin{array}{ll}\begin{array}{ll}\begin{array}{ll} \begin{array}{ll}\begin{array}{ll}\begin{array}{ll}\begin{array}{llll} \begin{array}{ll}\begin{array}{ll}\begin{array}{llll}\begin{array}{llll} \begin{array}{llll}\begin{array}{llll}\begin{array}{llll}\begin{array}{llll} \begin{array}{llll}\begin{array}{llll}\begin{array}{llll}\begin{array}{llll} \begin{array}{llll}\begin{array}{llbetween the actual attitude direction vector and the potential field gradient is measured by the angle \(\theta_{o}^{I_{K}}\). When the attitude direction vector and the potential field gradient at point \(o\) are closely aligned (i.e., angle \(\theta_{o}^{I_{K}}\) approaches 0\({}^{\circ}\)), a strong attitude constraint in the constructed potential field at point \(o\) is signified.  
The corresponding equation is as follows:  
\[\theta_{o}^{I_{K}}=0^{\circ} \tag{11}\]  
Here, the angle is used to represent the angle between the direction vector at point \(o\) and the gradient of the potential field associated with stratigraphic surface, where point \(o\) is part of the sampling point set at the stratigraphic surface. Therefore, when angle \(\theta_{o}^{I_{K}}\) between the attitude direction vector at point \(o\) and the potential field gradient is not 0\({}^{\circ}\), the loss between the potential field gradient and the potential field trend at point \(o\) within the potential field associated with stratigraphic surface \(I_{K}\) is represented by the cosine of this angle. The corresponding equation is provided below. The formula for the cosine of angle \(\theta_{o}^{I_{K}}\) is given in Equation (12):  
\[\cos\theta_{o}^{K}=\frac{v_{O}\cdot\
abla S_{O}^{I_{K}}}{\left\|v_{O}\right\| \left\|\
abla S_{O}^{I_{K}}\right\|} \tag{12}\]  
The design of the loss function incorporating the attitude direction constraints at the attitude points is presented in Equation (13):  
\[L_{O}=\sum_{K\in F}^{F}\frac{1}{\left|O\right|}\sum_{o\in O}^{\left|O\right|} \left|\cos\theta_{o}-\cos\theta_{o}^{K}\right| \tag{13}\]  
The attitude point-related loss is calculated by finding the difference between the cosine of the angle between the actual attitude direction vector and the potential field direction, and the cosine of the angle between the potential field gradient and the potential field direction, for all potential fields containing attitude points. The attitude point-related loss is computed by first averaging the values for the direction point set \(O\) in each potential field, and then summing the averages across all \(F\) potential fields. Here, \(F\) is used to denote the number of potential fields, and \(\left|O\right|\) represents the number of attitude points in each potential field's direction point set.