XMC -Agent : Dynamic Navigation over Scalable Hierarchical Index for Incremental Extreme Multi-label Classification (2024)

Abstract: The eXtreme Multi-label Classification (XMC) aims at accurately assigning large-scale labels to instances, and is challenging for learning, managing, and predicting over the large-scale and rapidly growing set of labels. Traditional XMC methods, like one-vs-all and tree-based methods struggle with the growing set of labels due to their static label assumptions, and embedding-based methods struggle with the complex mapping relationships due to their late-interaction paradigm. In this paper, we propose a large language model (LLM) powered agent framework for extreme multi-label classification – XMC-Agent, which can effectively learn, manage and predict the extremely large and dynamically increasing set of labels. Specifically, XMC-Agent models the extreme multi-label classification task as a dynamic navigation problem, employing a scalable hierarchical label index to effectively manage the unified label space. Additionally, we propose two algorithms to enhance the dynamic navigation capabilities of XMC-Agent: a self-construction algorithm for building the scalable hierarchical index, and an iterative feedback learning algorithm for adjusting the agent to specific tasks. Experiments show that XMC-Agentachieves the state-of-the-art performance on three standard datasets.

## introduction the extreme multi-label classification (xmc) task aims to classify instances to relevant labels from an extremely large label candidate space @xcite @xcite . xmc is a widely used technique in many realworld applications, such as assigning appropriate tags to products in e-commerce platforms @xcite , recommending of interest in recommendation systems @xcite , and facilitating search queries auto-completion in search engines @xcite . unfortunately, due to the extensive and dynamic growth of the label candidates, xmc is a very challenging task. in real-world xmc problems, the number of potential labels often ranges from tens of thousands to millions @xcite . such a large output space poses significant challenges for modeling, learning, and computing the mapping from instances to large-scale labels, i.e., the scalability problem. for instance, it is difficult to directly learn the mapping from headsets (instance) in figure 1 to xbox and glasses (labels), and computing all instance-label pairs will result in a high computation cost. furthermore, the label set in real-world xmc scenarios is often dynamically changing and rapidly growing. the evolving labels further raise the challenge of efficient integration of new labels without the necessity for extensive retraining. current extreme multi-label classification methods are mainly tree-based @xcite @xcite @xcite and embedding-based approaches @xcite @xcite @xcite . tree-based approaches organize the labels as a fixed and static label tree, classify instances from root to leaf nodes and gradually narrow down the label candidates. these approaches, while addressing the challenge posed by large-scale label sets, struggle with dynamically growing label sets due to the utilization of prefixed, static label indices. embedding-based approaches, on the other hand, predict labels by mapping labels and instances into the same vector space and selecting labels based on their vector similarities. however, due to the lack of fine-grained interaction between instances and labels, issues arise when dealing with complex mapping relationships. moreover, to effectively integrate new labels, a process of re-training or continual training is necessary. however, the extensive label space and large volumes of data make retraining resource-intensive, and continuous learning can result in severe catastrophic forgetting, degrading previously acquired label knowledge. in this paper, we propose an agent-based framework for extreme multi-label classification -xmc-agent, which can effectively learn, manage, and predict the extremely large and dynamically increasing set of labels by leveraging llms-powered agents. specifically, xmc-agent models the extreme multi-label classification task as a dynamic navigation problem (i.e., the model searches through the label space to locate the labels corresponding to the instance), and employs a scalable hierarchical label index to effectively manage the extensive label space via transforming them into a tree-like label index. in this way xmc-agent can uniformly manage both existing labels and future labels and seamlessly integrate future labels by inserting them at suitable positions in the tree as they emerge, leveraging their connections and associations with existing labels, thereby avoiding disruption of existing structures and the need for extensive retraining. by leveraging the capabilities of llms for dynamic navigation within a structured label space, xmc-agent offers a novel and effective solution for addressing the scalability and adaptability challenges of xmc. given the xmc-agent framework, we propose a self-construction algorithm for scalable hierarchical label building and a self-correction algorithm for the general navigational capabilities of llms. specifically, the self-construction algorithm autonomously transforms the large label set into a structured hierarchical index by adopting a selfquestioning strategy, i.e., the xmc-agent determines comparison relations between labels and recursively merges these relations to build the structured label index. in this way, the self-construction algorithm enables the seamless integration of newly emerged labels. furthermore, we propose a selfcorrection algorithm, which dynamically obtains feedback signals from previous incorrect navigation trajectories and iteratively adjusts its navigation capability on specific tasks. generally, our main contributions are: ## methodology let x and y represent the sets of input instances and labels respectively, and { y 0 , y 1 , • • • , y k } represent the acquired labels at different time. for ## related works previous research on xmc can be divided into two settings: full label coverage @xcite @xcite and weak label coverage @xcite @xcite , the difference is whether supporting predictions for newly added labels during inference. a prevalent approach for addressing weak label coverage entails the utilization of a bi-encoder to map labels and instances into the same vector space. siamesexml @xcite generalizes existing siamese networks @xcite by combining siamese architectures with per-label extreme classifiers. maclr @xcite constructs label and input text encoders by training a pseudo label-input annotation data through a twostage process. semsup-xc @xcite uses web information to augment label semantics and calculates the similarity between label and input from both semantic and lexicon perspectives. unlike previous approaches that transformed the classification task into an end-to-end generation task @xcite or utilized the in-context learning ability of llms to generate approximate labels @xcite @xcite , we model xmc as an llm-agent dynamic navigation task @xcite , allowing for better handling the dynamically growing extensive labels. ## conclusion in this paper, we propose xmc-agent to address the challenge of dynamically expanding label set in extreme multi-label classification. this framework utilizes a self-constructed label index for effective management of the extensive labels. and incorporates an iterative feedback learning mechanism to adjust general navigational capabilities to a specific task. the results on three standard datasets indicate that our approach effectively enhances the classification performance in incremental settings.