Easy Installation

Easy to install and insert LibAUC code into existing training pipeline with Deep Learning frameworks like PyTorch.

Broad Applications

Users can learn different neural network structures (e.g., linear, MLP, CNN, GNN, transformer, etc) that support their data types.

Efficient Algorithms

Stochastic algorithms with provable convergence that support learning with millions of data points without a large batch size.

Hands-on Tutorials

Hands-on tutorials are provided for optimizing a variety of measures and objectives belonging to the family of X-risks.


Traditional risk functions such as the cross-entropy loss, are limited in modeling a wide range of problems or tasks, e.g., imbalanced data, ranking problems, self-supervised learning. X-risk refers to a family of compositional measures/losses, in which each data point is compared with a set of data points explicitly or implicitly for defining a risk function. It covers a family of widely used measures/losses including but not limited to the following four interconnected categories:

    Areas under the curves, including areas under ROC curves (AUROC), areas under Precision-Recall curves (AUPRC), one-way and two-wary partial areas under ROC curves. Ranking measures/objectives, including p-norm push for bipartite ranking, listwise losses for learning to rank (e.g., listNet), mean average precision (mAP), normalized discounted cumulative gain (NDCG), etc. Performance at the top, including top push, top-K variants of mAP and NDCG, Recall at top K positions (Rec@K), Precision at a certain Recall level (Prec@Rec), etc. Contrastive objectives, including supervised contrastive objectives (e.g., NCA), and global self-supervised contrastive objectives improving upon SimCLR and CLIP.


The achievements we made so far.


Challenges winning solution (e.g., Stanford CheXpert, MIT AICures, OGB Graph Property Prediction).


Collaborations and Deployments at multiple industrial units, e.g., Google, Uber, Tencent, etc.


Scientific publications on top-tier AI Conferences (such as ICML, NeurIPS,ICLR).


Downloaded by more than 35K+ times by researchers around the world.


Explore LibAUC with challenging applications.

Card image cap

Our Deep AUROC Maximization method has achieved the 1st place on Stanford CheXpert Competition organized by Andrew Ng’s ML group on August 2020. CheXpert is a large dataset of chest X-rays and competition for automated chest x-ray interpretation and aims to automatically detect related diseases based on Chest X-ray images.

Learn More ➞
Card image cap
Self-Supervised Learning

Our SogCLR achieves a performance of 69.4% with a small batch size of 256 for top-1 linear evaluation accuracy using ResNet-50, which is on par with SimCLR (69.3%) with a large batch size 8,192 for self-supervised learning task on ImageNet1000 dataset. The pertained model can be widely used in many downstream computer vision tasks.

Learn More ➞
<-- Photo Credit: -->
Card image cap

Our Deep NDCG and top-K NDCG maximization algorithms (SONG and K-SONG) improve NDCG@10 by 11.7% and 12.4% over baseline methods implemented by Tensorflow Ranking library by Google on MovieLens20M with 20 millions of movie ratings of users. The prediction model can help build powerful recommender systems to make personalized movie recommendations.

Learn More ➞
Card image cap
Drug Discovery

Our LibAUC (AUROC, AUPRC) helped the team to achieve the 1st place at the MIT AI Cures Open Challenge, which is to predict antibacterial properties for fighting secondary effects of COVID19. Our AUC maximization algorithms improve the AUROC by 3%+ and AUPRC by 5%+ over the baseline models. Our framework can help tackle many practical health challenges.

Learn More ➞
Card image cap

Our Deep AUROC Maximization method outperforms standard deep learning methods for optimizing class-weighted imbalanced loss for detecting Melanoma based on skin images. We achieved the SOTA performance on 2020 Kaggle Melanoma Competition by improving the winner’s performance by 0.2% to predict Melanoma.

Learn More ➞
Card image cap

Our Deep AUROC maximization method improves the baseline models by 4% for detecting Stroke on an internal data. Stroke is the 2nd leading cause for death globally, responsible for approximately 11% of total deaths. We collaborate with University of Iowa Hospitals & Clinics (UIHC) to build AI models for predicting Stroke based on CT perfusion data.

Learn More ➞
Card image cap

Our Deep AUROC maximization methods achieve an improvement of 3% over baseline methods on PatchCamelyon dataset for identifying metastatic tissue from a microscopic image, which is a challenging diagnosis task even for pathologists. Building an automated AI detection system is essential for places that are short of pathological diagnosis services.

Learn More ➞


If LibAUC is helpful in your work, please cite our papers in BibTex( or ) and acknowledge our library. For any questions, please reach out to Zhuoning Yuan and Prof. Tianbao Yang.

	title={LibAUC: A Deep Learning Library for X-risk Optimization},
	author={Zhuoning Yuan and Dixian Zhu and Zi-Hao Qiu and Gang Li and Xuanhui Wang and Tianbao Yang},
	booktitle={29th SIGKDD Conference on Knowledge Discovery and Data Mining},

	title={Algorithmic Foundation of Deep X-risk Optimization},
	author={Yang, Tianbao},
	journal={arXiv preprint arXiv:2206.00439},