Home

Awesome

<p align="center"> <img src="https://github.com/yzhuoning/LibAUC/blob/main/imgs/libauc.png" width="70%" align="center"/> </p> <p align="center"> Logo by <a href="https://yzhuoning.com">Zhuoning Yuan</a> </p>

LibAUC: A Deep Learning Library for X-Risk Optimization

Pypi Downloads python PyTorch LICENSE

Website | Updates | Installation | Tutorial | Research | Github

We continuously update our library by making improvements and adding new features. If you use or like our library, please star:star: this repo. Thank you!

:calendar: Updates

:mag: What is X-Risk?

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:

:star: Key Features

:gear: Installation

$ pip install libauc==1.2.0

The latest version 1.2.0 is available now! You can check release note for more details. Source code is available for download here.

:clipboard: Usage

Example training pipline for optimizing X-risk (e.g., AUROC)

>>> #import our loss and optimizer
>>> from libauc.losses import AUCMLoss 
>>> from libauc.optimizers import PESG 
...
>>> #define loss & optimizer
>>> Loss = AUCMLoss()
>>> optimizer = PESG()
...
>>> #training
>>> model.train()    
>>> for data, targets in trainloader:
>>>	data, targets  = data.cuda(), targets.cuda()
        logits = model(data)
	preds = torch.sigmoid(logits)
        loss = Loss(preds, targets) 
        optimizer.zero_grad()
        loss.backward()
        optimizer.step()
...	
>>> #update internal parameters
>>> optimizer.update_regularizer()

:notebook_with_decorative_cover: Tutorials

X-Risk

Applications

:page_with_curl: Citation

If you find LibAUC useful in your work, please cite the papers in BibTex and acknowledge our library:

@inproceedings{yuan2023libauc,
	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},
	year={2023}
	}
@article{yang2022algorithmic,
   title={Algorithmic Foundation of Deep X-Risk Optimization},
   author={Yang, Tianbao},
   journal={arXiv preprint arXiv:2206.00439},
   year={2022}
}

:email: Contact

For any technical questions, please open a new issue in the Github. If you have any other questions, please contact us @ Zhuoning Yuan [yzhuoning@gmail.com] and Tianbao Yang [tianbao-yang@tamu.edu].