graph LR
ImbAlgorithms["ImbAlgorithms"]
Algorithm_Base["Algorithm Base"]
ABC_Algorithm["ABC Algorithm"]
CoSSL_Algorithm["CoSSL Algorithm"]
CREST_Algorithm["CREST Algorithm"]
DARP_Algorithm["DARP Algorithm"]
DASO_Algorithm["DASO Algorithm"]
DebiasPL_Algorithm["DebiasPL Algorithm"]
ImbAlgorithms -- "contains" --> ABC_Algorithm
ImbAlgorithms -- "contains" --> CoSSL_Algorithm
ImbAlgorithms -- "contains" --> CREST_Algorithm
ImbAlgorithms -- "contains" --> DARP_Algorithm
ImbAlgorithms -- "contains" --> DASO_Algorithm
ImbAlgorithms -- "contains" --> DebiasPL_Algorithm
ABC_Algorithm -- "integrates with" --> Algorithm_Base
CoSSL_Algorithm -- "integrates with" --> Algorithm_Base
CREST_Algorithm -- "integrates with" --> Algorithm_Base
DARP_Algorithm -- "integrates with" --> Algorithm_Base
DASO_Algorithm -- "integrates with" --> Algorithm_Base
DebiasPL_Algorithm -- "integrates with" --> Algorithm_Base
click ImbAlgorithms href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/Semi-supervised-learning/ImbAlgorithms.md" "Details"
The semilearn project's ImbAlgorithms subsystem provides a specialized suite of semi-supervised learning algorithms designed to address data imbalance. At its core, the Algorithm Base component establishes a unified interface and foundational structure, ensuring consistency across all algorithms. Each specific algorithm, such as ABC Algorithm, CoSSL Algorithm, CREST Algorithm, DARP Algorithm, DASO Algorithm, and DebiasPL Algorithm, extends this base, implementing unique strategies to handle imbalanced datasets. These algorithms are contained within the ImbAlgorithms subsystem, leveraging the common functionalities provided by Algorithm Base while introducing their specialized mechanisms for tasks like pseudo-labeling refinement, dynamic parameter updates, and class rebalancing. This modular design allows for easy integration and extension of new imbalance-aware semi-supervised learning techniques within the semilearn framework.
Critical Interaction Pathways:
- ImbAlgorithms contains specific algorithms: The
ImbAlgorithmspackage serves as a container for various specialized imbalance-aware algorithms (e.g.,ABC Algorithm,CREST Algorithm). This represents a hierarchical relationship where the package organizes and provides access to its constituent algorithms. - Specific algorithms integrate with Algorithm Base: Each specialized algorithm (e.g.,
ABC Algorithm,CREST Algorithm) inherits from or utilizes theAlgorithm Base. This signifies that the base component provides the fundamental framework and common functionalities that all specific algorithms build upon, ensuring a standardized approach to semi-supervised learning. - CREST Algorithm utilizes hooks for training flow: The
CREST Algorithmspecifically registersCReSTCheckpointHookandCReSTLoggingHookto manage its training process, demonstrating how individual algorithms can customize their behavior through a hook-based system. - CREST Algorithm manages pseudo-labels and dataset splits: The
CREST Algorithmincludes methods likeget_splitandset_datasetto handle the generation and integration of pseudo-labels, which are crucial for its self-training mechanism in imbalanced scenarios. - CREST Algorithm re-initializes components for generations: The
re_initmethod inCREST Algorithmshows how the algorithm can reset and rebuild its model, optimizer, and data loaders across multiple generations, indicating a multi-stage training process.
ImbAlgorithms [Expand]
The overarching subsystem that groups various imbalance-aware semi-supervised learning algorithms. It serves as the entry point for accessing and integrating these specialized algorithms into the broader semilearn framework.
Related Classes/Methods:
Provides a standardized interface and foundational setup for all semi-supervised learning algorithms, including those within ImbAlgorithms. It defines common methods for training, evaluation, and model management, ensuring consistency and extensibility across different algorithm implementations.
Related Classes/Methods:
Implements the "Adaptive Balanced Consistency" (ABC) semi-supervised learning strategy, specifically tailored for imbalanced datasets. It incorporates a custom network architecture and a specialized loss calculation to handle class distribution disparities.
Related Classes/Methods:
Implements the "Consistency-based Semi-Supervised Learning" (CoSSL) algorithm, adapted for imbalanced scenarios. It utilizes dynamic parameter updates via a dedicated hook to adjust its learning process based on dataset imbalance.
Related Classes/Methods:
Implements the "Class-REbalancing Self-Training" (CREST) algorithm, a semi-supervised learning approach designed to mitigate the effects of imbalanced data by rebalancing class distributions during self-training.
Related Classes/Methods:
Implements the "Distribution-Aware Pseudo-labeling" (DARP) algorithm, which focuses on refining pseudo-labels in an imbalance-aware manner. It uses a specific hook for pseudo-labeling and a utility for refinement.
Related Classes/Methods:
Implements the "Distribution-Aware Self-training with Online feature queue" (DASO) algorithm. This approach manages a feature history queue to guide the self-training process, particularly useful in imbalanced settings.
Related Classes/Methods:
Implements the "Debiased Pseudo-Labeling" (DebiasPL) algorithm, which aims to reduce bias in pseudo-labels generated for imbalanced datasets. It utilizes a custom consistency loss function to achieve this debiasing.
Related Classes/Methods: