This work investigates whether twin-prime pairs can be identified from graph representations derived solely from modular-inverse relations. Each integer is represented as a graph whose vertices correspond to residues modulo that integer and whose edges encode multiplicative-inverse relations. We provide mathematical justification for two classification approaches: a Siamese Graph Isomorphism Network (SiameseGIN) and logistic regression. We identify the sum of the isolated-vertex proportions of the two graphs as a common structural quantity underlying both approaches and establish conditions under which it separates twin-prime pairs from non-twin pairs. For the SiameseGIN, we show that message passing and pooling encode the isolated-vertex proportions. For logistic regression, we establish conditions under which an affine function of this structural quantity achieves perfect separation. We further establish conditions for the existence of a common separating threshold across validation and test ranges. Both approaches are evaluated using disjoint training, validation, and test ranges. A threshold selected exclusively on the validation set is applied unchanged to the test set, where both models achieve a balanced accuracy of 1.000, with no false-positive or false-negative classifications. Additional experiments demonstrate perfect classification across extended numerical ranges, including integers near $10^6$, without retraining or threshold adjustment. The principal contribution is a mathematical characterization of how the SiameseGIN architecture processes modular-inverse graphs for integers below $10^4$, supported by experimental results.
翻译:暂无翻译