Built an Active Learning system for job posting classification on ~124K real-world samples.
- Reduced labeling cost via uncertainty, diversity, and committee-based sampling
- Maintained strong classification performance under severe class imbalance
- Designed full ML pipeline with iterative retraining + evaluation framework
- Built reproducible experiments across multiple sampling strategies
A machine learning system implementing Active Learning strategies to reduce labeling cost while maintaining strong classification performance on job posting data.
This project builds a full Active Learning experimentation framework for job posting classification.
Instead of labeling the entire dataset, the system iteratively selects the most informative samples from an unlabeled pool and retrains the model.
The goal is to evaluate how different sampling strategies impact:
- Label efficiency
- Model performance
- Class imbalance behavior
- Training stability across iterations
Large-scale job posting datasets contain hundreds of thousands of unlabeled entries.
Fully labeling these datasets is expensive and often impractical.
This project investigates:
How effectively can Active Learning reduce labeling cost while preserving classification performance?
This project uses the LinkedIn Job Listings dataset from DataStax:
https://huggingface.co/datasets/datastax/linkedin_job_listings
The dataset is a large-scale tabular + text dataset for real-world NLP classification on job postings.
| Property | Value |
|---|---|
| Total samples | ~124,000 |
| Modalities | Structured + Unstructured Text |
| Main text field | description |
| Task | Employment type classification |
title: Job titledescription: Main job posting text (primary NLP input)formatted_work_type: Target label (FULL_TIME, CONTRACT, PART_TIME, etc.)formatted_experience_level: Experience levellocation: Job locationcompany_name: Employer identity- Salary-related fields: partially missing / noisy
Selects samples where the model has lowest confidence.
Uses embedding clustering (KMeans) to ensure coverage across data space.
Multiple models vote; high disagreement samples are selected.
Uniform random selection used as a performance baseline.
- DistilBERT-base-uncased
- 66M parameters
- 512 token limit
- Fast baseline performance
- EuroBERT (210M parameters)
- 8192 token context length
- Used for long-context experiments
Unlabeled Pool
β
Model Inference
β
Active Learning Strategy
β
Sample Selection
β
Human Annotation
β
Dataset Update
β
Model Retraining
β
Repeat until labeling budget is exhausted
train.py β Training entry point
model.py β Model definitions
methods/ β Active Learning strategies
utils/ β Metrics, DB, preprocessing utilities
table_def/ β Database schema
scripts/
βββ active_learning_analysis.py
βββ comprehensive_analysis.py
βββ comprehensive_evaluation.py
βββ model_comparison.py
βββ cross_validation.py
βββ efficiency_analysis.py
βββ error_analysis.py
βββ statistical_analysis.py
βββ plot_class_recalls.py
βββ plot_combined_graphs.py
βββ split_pool.py
βββ prepare_balanced_dataset.py
βββ quick_test.py
tmp/
βββ diversity_sampling.py
βββ extract_portion.py
βββ jsonl_to_csv.py
βββ Semantic_Similarity.txt
- Accuracy
- Precision
- Recall
- F1 Score (Macro)
- Minority Class Recall
Macro-F1 and minority recall are emphasized due to class imbalance.
- PyTorch
- HuggingFace Transformers
- scikit-learn
- SentenceTransformers
- Pandas
- NumPy
- PostgreSQL (schema + optional backend)
git clone <repo-url>
cd ara-proje-repopython3 -m venv venv
source venv/bin/activate
pip install --upgrade pippip install -r requirements.txtCreate .env file:
echo -e "DB_HOST=localhost\nDB_NAME=postgres\nDB_USER=postgres\nDB_PASSWORD=postgres\nDB_PORT=5432\nNEON_API_KEY=YOUR_API_KEY" > .envchmod +x table_def/bootstrap.sh
./table_def/bootstrap.shpython -m scripts.split_pool --fraction 0.2 --seed 42 --yespython scripts/prepare_balanced_dataset.py --mode 2 --target_total_size 20000python -m methods.active_learning_in_memorypython scripts/plot_graph.py --input results/results1.xlsx- Reproducible Active Learning experiments
- Modular sampling strategy design
- Fair comparison of strategies
- Handling imbalanced classification properly
- Scalable evaluation pipeline
This project is an R&D-oriented machine learning system, focused on empirical experimentation rather than production deployment.
The primary goal is to investigate and compare Active Learning strategies in terms of:
- Label efficiency over brute-force annotation
- Empirical comparison of sampling strategies
- Reproducible experimentation
- Real-world noisy dataset handling
- Faruk Tekin
@FarukTekinCENG - Nijat Majidli
@nicat00m20
MIT License
See LICENSE for details.