Beyond Accuracy: Centroid-Guided Contrastive Loss for Structured Fraudulent Job Posting Detection
Organizations: National University of Computer and Emerging Sciences, Karachi, Pakistan · National University of Computer and Emerging Sciences, Karachi, 75020, Pakistan · Islamic University of Madinah, Madinah, Saudi Arabia · Faculty of Computer and Information Systems, Islamic University of Madinah, Madinah 42351, Saudi Arabia ·
Abstract
Fraudulent job posting detection aims to identify job advertisements that are corrupted either through fake content, misleading information, or negative intent, disrupting the online eco-system of job-seekers and employers. Existing studies in this domain lack effective methods to simultaneously achieve high accuracy and meaningful structure of latent-space representations that capture subtleties among fake posts. To this end, we propose Centroid-Guided Contrastive Loss (CGCL), a loss function which unifies classification with densely formulated clustering to consistently reshape latent-space through a centroid-driven top- push-and-pull mechanism. The complementary nature of CGCL enables the model to enforce accurate decision boundaries and maintain high clustering compactness, effectively capturing both class separability and latent structure. Extensive experiments demonstrate the state-of-the-art (SOTA) performance of our method on EMSCAD, a public benchmark dataset. The code associated with this work is available at: https://github.com/ali-ahmed925/CGCL_code
Figures & tables
| Ref | Year | Feature Encoding | Imbalance Handling | Best Performing Model | Accuracy |
|---|---|---|---|---|---|
| [ 1 ] | 2020 | Categorical encoding | ✗ | Random Forest Classifier | 98.27 |
| [ 2 ] | 2021 | - | ✗ | BiLSTM | 98.0 |
| [ 3 ] | 2021 | TF-IDF | ✗ | MLP Classifier | 71.0 |
| [ 4 ] | 2021 | - | ✗ | Decision Forests | 95.4 |
| [ 5 ] | 2022 | TF-IDF | ✓ | Extra Tree Classifier | 99.9 |
| [ 6 ] | 2022 | BiLSTM | ✗ | BiLSTM | 97.21 |
| Column Name | Data Type | Non-Null Count | Description |
|---|---|---|---|
| job_id | int64 | 17880 | Unique identifier for job |
| title | object | 17880 | Job position or role name |
| location | object | 17534 | City, state, or country posted |
| department | object | 6333 | Hiring department within company |
| salary_range | object | 2868 | Offered compensation range |
| company_profile | object | 14572 | Company background or description |
| Embedding | Epochs | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| Word2Vec | 1500 | 0.981 | 0.97 / 0.98 | 0.98 / 0.98 | 0.98 / 0.98 |
| 2000 | 0.985 | 0.98 / 0.99 | 0.99 / 0.99 | 0.98 / 0.99 | |
| 3000 | 0.986 | 0.98 / 0.99 | 0.99 / 0.99 | 0.98 / 0.99 | |
| GloVe | 1500 | 0.985 | 0.98 / 0.99 | 0.99 / 0.99 | 0.98 / 0.98 |
| 2000 | 0.981 | 0.97 / 0.98 | 0.98 / 0.98 | 0.98 / 0.98 | |
| 3000 | 0.990 | 0.98 / 0.99 | 0.99 / 0.99 | 0.98 / 0.99 |
| Embedding | Accuracy | F1 | |||
|---|---|---|---|---|---|
| GloVe | 0.5 | 0.7 | 5 | 0.992 | 0.987 |
| 0.5 | 0.5 | 10 | |||
| 0.5 | 0.5 | 7 | |||
| 1.0 | 0.3 | 10 | |||
| 1.0 | 0.5 | 7 | |||
| Word2Vec | 0.5 | 0.3 | 7 | 0.989 | 0.981 |
| Embedding | Accuracy | F1-Score | |||
|---|---|---|---|---|---|
| Word2Vec | 0.5 | 0.3 | 7 | 0.989 | 0.981 |
| TF-IDF | 0.6 | 0.9 | 3 | 0.991 | 0.990 |
| GloVe | 0.5 | 0.7 | 5 | 0.992 | 0.987 |
| Metric | Score |
|---|---|
| Silhouette Score | 0.701 |
| Adjusted Rand Index (ARI) | 0.953 |
| Normalized Mutual Information (NMI) | 0.903 |
| Homogeneity Score | 0.909 |
| Completeness Score | 0.898 |
| V-Measure | 0.903 |
| Variant | Accuracy | Precision | Recall | F1 | PR-AUC | MCC |
|---|---|---|---|---|---|---|
| CE_only | 0.974 ±.002 | 0.763 ±.036 | 0.677 ±.015 | 0.718 ±.021 | 0.727 ±.022 | 0.706 ±.023 |
| CE_weighted | 0.976 ±.003 | 0.772 ±.043 | 0.719 ±.022 | 0.744 ±.026 | 0.740 ±.030 | 0.732 ±.028 |
| CE_ADASYN | 0.989 ±.000 | 0.967 ±.002 | 0.995 ±.003 | 0.981 ±.001 | 0.982 ±.003 | 0.973 ±.001 |
| CE_CenterLoss | 0.990 ±.001 | 0.968 ±.005 | 0.997 ±.002 | 0.982 ±.002 | 0.980 ±.006 | 0.975 ±.003 |
| CGCL_full | 0.983 ±.012 | 0.947 ±.035 | 0.997 ±.002 | 0.971 ±.020 | 0.981 ±.011 | 0.960 ±.028 |
| Seed 7 | Seed 13 | Seed 21 | Seed 42 | Seed 99 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Variant | F1 | PR-AUC | MCC | F1 | PR-AUC | MCC | F1 | PR-AUC | MCC | F1 | PR-AUC | MCC | F1 | PR-AUC | MCC |
| CE_only | .727 | .741 | .716 | .742 | .749 | .732 | .689 | .702 | .675 | .734 | .744 | .724 | .696 | .699 | .681 |
| CE_weighted | .751 | .701 | .741 | .782 | .780 | .773 | .732 | .719 | .718 | .753 | .770 | .741 | .702 | .733 | .688 |
| CE_ADASYN | .980 | .982 | .972 | .981 | .982 | .973 | .980 | .976 | .972 | .981 | .986 | .974 | .982 | .982 | .974 |
| CE_CenterLoss | .978 | .975 | .970 | .980 | .974 | .972 | .984 | .981 | .977 | .983 | .981 | .977 | .984 | .991 | .978 |
| CGCL_full | .984 | .990 | .978 | .980 | .988 | .972 | .978 | .984 | .970 | .981 | .984 | .974 | .931 | .961 | .905 |
Contrastive Learning
Contrastive learning trains representations by bringing related examples together and separating unrelated ones for recognition, retrieval, and transfer.
See all 325 papers