# A Transformer-Based Approach for Efficient Geometric Feature Extraction from Vector Shape Data
## 2 Methods
### Application of PSRT in Downstream Tasks
#### 2.4.2 Sample Pair Classification  
The architecture for single-sample classification tasks, such as building type recognition, is designed to independently process individual vector shapes and classify them into predefined categories based on their intrinsic characteristics, as depicted in Figure 6. The input consists of a singular vector shape representing an individual instance. However, practical applications often require evaluating relationships between sample pairs, as in road matching or determining the consistency of residential areas across different scales. Leveraging the self-attention mechanism in Transformers, PSRT can encode linked shape pairs, whether they are single samples or sample pairs, by capturing bidirectional cross-attention between two shapes.  
For tasks requiring relational analysis between entities, a strategy inspired by the UniLM model in Natural Language Processing is adopted [49]. This involves concatenating the vector representations of the two input shapes, enabling the network to jointly process and learn their interdependencies and similarities.  
To facilitate this process, a sample pair connection control point, \(P_{control}^{t+3,t+3}\), was introduced to represent the linkage between two samples. The connected sample sequence is then input into PSRT, allowing the model to ascertain whether the two shapes represent  
Figure 6: Single-sample classification task network structure diagram.  
a match (e.g., the same road segment) or are related in a specific manner (e.g., different representations of the same residential area at varying scales). A high-dimensional embedded representation of the features of the two samples is captured using the control point \(P_{control}^{I,t}\). The subsequent downstream task network has the same architecture as that of the single-sample network, as shown in Figure 7.  
This extension significantly broadens the applicability of the PSRT framework: While single-sample classification emphasizes individual feature extraction, sample pair classification leverages a UniLM-inspired concatenation strategy to facilitate the learning of relational features and similarity measures between samples. Such architectural design enables effective handling of tasks demanding both individual characterization and comparative analysis within a unified learning framework.  
In summary, the application of the PSRT model to downstream tasks highlights its capacity to handle complex and varied vector data easily and efficiently. By transforming shape coordinates into high-dimensional feature vectors, the PSRT framework enables flexible and robust solutions for both single-sample and sample pair classification tasks. Its architecture leverages the strengths of transformer networks, capitalizing on self-attention mechanisms to extract and utilize meaningful features without requiring additional manual feature design. This adaptability ensures that the PSRT model is not only effective in addressing current geographic information science challenges but also scalable to meet future demands across diverse mapping and classification scenarios.