Detecting Scarce and Sparse Anomalous: Solving Dual Imbalance in Multi-Instance Learning
Lin-Han Jia, Lan-Zhe Guo, Zhi Zhou, Si-Yu Han, Zi-Wen Li, Yu-Feng Li, National Key Laboratory for Novel Software Technology, School of Artificial Intelligence, School of Intelligence Science, TechnologyNanjing University, Nanjing 210023, China, Didi Chuxing, China · 2025
Read Detecting Scarce and Sparse Anomalous: Solving Dual Imbalance in Multi-Instance Learning by Lin-Han Jia, Lan-Zhe Guo, Zhi Zhou, Si-Yu Han, Zi-Wen Li, Yu-Feng Li, National Key Laboratory for Novel Software Technology, School of Artificial Intelligence, School of Intelligence Science, TechnologyNanjing University, Nanjing 210023, China, Didi Chuxing, China (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-13562.txt.
Introduction
Lin-Han Jia and co-authors hunt rare anomalies hidden in bags of samples in 2025. The catalog creator field carries affiliation text, but the head byline names six authors. In multi-instance learning, a bag is flagged if any member is odd, yet true anomalies are both scarce and sparse.
That double imbalance makes odd members easy to confuse with normal ones. Recasting the task as fine-grained learning from positive and unlabeled data opens a cleaner fix. Their frame balances at the micro level on a rigorous theory base. Tests on synthetic and real data show the method finds the needles better than rivals.
Catalog record
| CREATOR | Lin-Han Jia, Lan-Zhe Guo, Zhi Zhou, Si-Yu Han, Zi-Wen Li, Yu-Feng Li, National Key Laboratory for Novel Software Technology, School of Artificial Intelligence, School of Intelligence Science, TechnologyNanjing University, Nanjing 210023, China, Didi Chuxing, China |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 67 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-13562
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Detecting Scarce and Sparse Anomalous: Solving Dual Imbalance in Multi-Instance Learning Lin-Han Jia, Lan-Zhe Guo, Zhi Zhou, Si-Yu Han, Zi-Wen Li, Yu-Feng Li, National Key Laboratory for Novel Software Technology, School of Artificial Intelligence, School of Intelligence Science, TechnologyNanjing University, Nanjing 210023, China, Didi Chuxing, China Abstract In real-world applications, it is highly challenging to detect anomalous samples with extremely sparse anomalies, as they are highly similar to and thus easily confused with normal samples. Moreover, the number of anomalous samples is inherently scarce. This results in a dual imbalance Multi-Instance Learning (MIL) problem, manifesting at both the macro and micro levels. To address this "needle-in-a-haystack problem", we find that MIL problem can be reformulated as a fine-grained PU learning problem. This allows us to address the imbalance issue in an unbiased manner using micro-level balancing mechanisms. To this end, we propose a novel framework, Balanced Fine-Grained Positive-Unlabeled (BFGPU)-based on rigorous theoretical foundations. Extensive experiments on both synthetic and real-world datasets demonstrate the effectiveness of BFGPU. 0 0 footnotetext: Corresponding Author: Yu-Feng Li and Lan-Zhe Guo. 1 Introduction In real-world applications, there is a strong demand for effective detection of anomalous samples, such as in quality inspection, risk control, and fault diagnosis ( Görnitz et al., 2013 ; Pang et al., 2023 ; Ye et al., 2023 ) . Ideally, anomalous samples exhibit significant and easily distinguishable differences from normal samples, making them readily separable based on features or representations. However, in more realistic scenarios, the differences between anomalous and normal samples are often subtle because anomalies may manifest as sparse local information. As a result, anomalous samples are highly similar to normal ones at a macro level. Moreover, the number of anomalous samples is inherently scarce in reality, making them more difficult to identify. On the one hand, this problem has significant practical relevance. For instance, in cancer cell detection, diseased samples are inherently rare, and within these samples, the pathological regions often occupy only a minuscule portion. This makes early detection before the cancer metastasizes exceptionally challenging. On the other hand, the rise of large language models (LLMs) has further amplified the importance of this detection problem. During the Reinforcement Learning from Human Feedback (RLHF) phase, aligning LLMs with human values requires training a separate detector as a reward model ( Bai et al., 2022 ) . This model is trained on human feedback to identify non-compliant sections in the LLM’s outputs. However, these non-compliant contents are both scarce and sparse. Compounding this is the high cost of human annotation, which typically only provides coarse-grained labels. These factors make training an accurate reward model extremely difficult, thereby further highlighting the critical nature of this detection challenge. An example is provided in fig. 1 , a real-world customer service quality inspection task, the goal is to detect instances of impoliteness within extended conversations between customer service and customer. Since the customer service is well-trained, mistakes—if any—typically occur in only a subtle utterance. Figure 1: This example illustrates the difficulty in distinguishing between normal and anomalous macro samples due to the low proportion of anomalous information within anomalous samples. Given the difficulty of distinguishing samples at the macro level, a promising approach is to seek solutions at the micro level—by decomposing each macro-level sample into multiple finer-grained components and performing discrimination at this finer resolution. However, there are no precise labels available at the micro level, so learning must rely solely on macro-level supervision. Multiple Instance Learning (MIL) is a paradigm of weakly supervised learning designed for scenarios with imprecise labels ( Waqas et al., 2024 ; Zhou, 2018 ; Gao et al., 2022 ) . It structures data into two hierarchical levels: the macro level (referred to as bags) and the micro level (referred to as instances), and utilizes only macro-level labels for training. To address the lack of micro-level supervision, existing MIL methods often heuristically assign bag labels to all instances within the bag ( Ilse et al., 2018 ; Angelidis & Lapata, 2018 ; Pang et al., 2023 ) . However, this strategy lacks theoretical grounding and can introduce substantial bias. In terms of data imbalance, the micro-level imbalance—known in MIL literature as the low witness rate problem—has been recognized but remains unresolved ( Carbonneau et al., 2018 ; Zhang et al., 2022 ) . Meanwhile,macro-level imbalance has been largely overlooked and presents an even greater challenge. In this paper, instead of directly assigning bag labels to instances, we treat all instances from normal bags as positive instances and all instances from anomalous bags as unlabeled instances. This reformulates the MIL problem as a fine-grained Positive-Unlabeled (PU) learning task. PU learning is a learning paradigm that trains models using only positive and unlabeled data ( Bekker & Davis, 2020 ) . Building upon this reformulation, we further derive a PU learning loss function based on rigorous theoretical analysis, which simultaneously addresses the dual imbalance challenge in MIL. To develop a PU learning algorithm better suited for addressing MIL problems, we further incorporate macro-level information into the micro-level learning process. Specifically, we restrict the assignment of pseudo-labels to only high-confidence unlabeled instances, and dynamically adjust the confidence threshold to maintain balanced prediction. This design enables the model to improve macro-level performance directly through micro-level learning. The resulting algorithm, termed Balanced Fine-Grained Positive-Unlabeled (BFGPU), is a PU learning method tailored for solving MIL problems. Figure 2: This figure illustrates the different solution paradigms for the detection problem in this paper: coarse-grained positive-negative learning, MIL, and fine-grained positive-unlabeled learning. In the text and image modalities, we conducted comprehensive comparisons with existing supervised learning, anomaly detection, MIL, and PU learning methods based on customer service quality inspection (CSQI) and invasive ductal carcinoma (IDC) tasks, respectively. Furthermore, to validate the robustness of our algorithm under varying macro and micro imbalance ratios, we synthesized numerous datasets with different imbalance ratios based on four fundamental sentiment analysis datasets for additional comparative experiments. We also compared its performance with popular LLMs in addressing the "needle in a haystack" problem ( Wang et al., 2024a ; Kuratov et al., 2024 ) . Finally, through ablation studies and parameter sensitivity analysis, we further enriched the discussion on the algorithm’s robustness. Our Contributions. 1. We formalize the challenging detection problem in practical applications and propose a dual imbalanced MIL problem. 2. We propose a novel perspective that reformulates the MIL problem as a balanced PU learning task, which addresses the issues of bias and imbalance. 3. We incorporate macro information into the learning process, leading to BFGPU, an algorithm that enables balanced and unbiased macro performance by training at the micro level. 4. We provide a theoretical analysis demonstrating the advantages of BFGPU over macro-level learning and conventional MIL approaches. 5. Extensive experiments validate the superior performance of BFGPU. 2 Related Works PU learning can utilize positive data and unlabeled data to train a classifier that distinguishes between positive and negative data ( Bekker & Davis, 2020 ) . Most PU learning algorithms aim for the model to be unbiased in terms of accuracy, and there are many effective algorithms currently available ( Du Plessis et al., 2015 ; Kiryo et al., 2017 ; Chen et al., 2020