arXiv:2609.11182eess.ASSep 2026

Manuscript Offprint

arXiv:2609.11182

Exploring Second-Order Pattern Recognition in Speaker Recognition

Yanze Xu, Wenwu Wang, Mark D. Plumbley

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

In classical pattern recognition tasks, neural networks are trained to recognise human-defined patterns for model inputs. Some Explainable AI (XAI) methods can explain other latent patterns that underlie the network's recognition of inputs as human-defined patterns; in this work, we call these latent patterns second-order patterns, and we propose to discover them. To this end, we apply a hierarchical clustering algorithm to analyse whether representations learned by a speaker recognition network from utterances naturally form hierarchical clusters. Each resulting cluster represents a second-order pattern that characterises how the network recognises some known utterances as speaker identities. All the resulting second-order patterns are then semantically interpreted using the existing Hierarchical Cluster-Class Matching (HCCM) method.

Furthermore, we propose a new task, second-order pattern recognition, to identify which discovered second-order patterns characterising known utterances are exhibited by an unseen utterance. To achieve this, we design the Hierarchical Cluster Navigation and Assignment (HCNA) method. HCNA recognises a known second-order pattern as applying to an unseen utterance when the unseen utterance's network representation lies within the extrapolation space of the cluster regarded as that second-order pattern. Our experiments show that the extrapolation mechanism introduced by HCNA substantially improves performance on the second-order pattern recognition task.

Index Terms— Explainable AI, Second-order Pattern Recognition, Hierarchical Clustering, Extrapolation Space, Gradient Cost

1. INTRODUCTION

Classical pattern recognition [1] aims to discriminate and recognise human-defined patterns in data. Pattern recognition tasks (e.g. image classification and speaker recognition) are usually implemented by training neural networks to learn a non-linear mapping from observed data directly to human-defined patterns [2, 3]. However, most neural networks operate as black boxes, posing risks when deployed in real-world applications. The field of explainable artificial intelligence (XAI) [4, 5] aims to explain the decision-making processes of trained models, especially neural networks. Some XAI techniques [6, 7] are designed to explain some latent patterns that underlie, or contribute to, how the network recognises inputs as human-defined patterns.

In cognitive psychology, a person’s belief about an object is regarded as a first-order belief, while another person’s belief about that person’s belief is regarded as a second-order belief [8]. Inspired by this, we regard the first-order belief of a network to be that the network “believes” that inputs can be recognised as human-defined patterns, while we regard the second-order belief of an XAI technique as this technique “believes” that some latent patterns characterise the network’s first-order belief (i.e. recognising data as human-defined patterns). On this basis, we next define those human-defined patterns in the network’s first-order belief as first-order patterns, and those latent patterns in the XAI technique’s second-order belief as second-order patterns.

Two research questions are then asked. First, does the real world contain a large number of second-order patterns that remain to be jointly discovered and understood by humans, neural networks, and XAI techniques? Secondly, once a set of second-order patterns characterising the network's recognition of known data as first-order patterns has been successfully discovered, can we automatically recognise which second-order patterns associated with the known data are exhibited by unseen data? We define this new recognition task as second-order pattern recognition.

This work aims to realise such a second-order pattern recognition task based on a speaker recognition network [9, 3]. Specifically, we first extract latent representations (i.e. speaker embeddings) learned by a trained speaker recognition network from a group of known utterances. We next apply a hierarchical clustering algorithm [10], Single-Linkage Clustering (SLINK) [11, 12], which has been introduced into the XAI domain [4], to analyse whether the speaker embeddings naturally form clusters with hierarchical relationships. Each resulting cluster is a second-order pattern since it is what SLINK “believes” at the second-order level characterises how the network discriminates and recognises speaker identities of known utterances.

The above second-order patterns (i.e. hierarchical representation clusters) discovered can be made understandable to humans through semantic interpretation. In particular, we apply the existing Hierarchical Cluster-Class Matching (HCCM) method [4] to match the resulting hierarchical representation clusters with predefined semantic classes in a one-to-one manner. Each cluster is semantically interpreted according to the semantic class with which it is best matched, thereby simultaneously providing a semantic interpretation of the second-order pattern represented by that cluster.

Moreover, the discovered second-order patterns characterising our network’s recognition of the examined known utterances are treated as recognition targets in the second-order pattern recognition task to determine which of them apply to an unseen utterance. To achieve this, we propose the Hierarchical Cluster Navigation and Assignment (HCNA) method, which identifies applicable second-order patterns by determining which representation clusters of known utterances the unseen utterance’s network representation belongs to.

Following McInnes et al. [13], an unseen representation belongs to a cluster of known representations when it lies within the empirical space defined by the representations in that cluster. Instead of using the empirical space, HCNA estimates the extrapolation space [14] for each cluster, defined as the space to which the known representations in that cluster can generalise. To estimate this extrapolation space, HCNA introduces the Gradient Cost, which quantifies the gradient expenditure required to optimise a unit difference in loss function. The Gradient Cost is next used to adjust the cluster's empirical space to obtain the extrapolation space, for checking whether an unseen representation lies within it.

Overall, the second-order pattern recognition task is operationalised primarily through the proposed HCNA, while its realisation also relies on SLINK to first discover second-order patterns and HCCM to subsequently interpret them. Hence, these three methods form a complete second-order pattern recognition system. Several evaluation metrics are introduced to assess this system. Experimental results show that introducing HCNA's extrapolation mechanism substantially improves the system's performance on the second-order pattern recognition task.