8000 GitHub - percool/LibAUC: LibAUC: A Deep Learning Library for X-Risk Optimization
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

percool/LibAUC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo by Zhuoning Yuan

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⭐ this repo. Thank you!

📆 Updates

  • 2022/7: LibAUC 1.2.0 is released! In this version, we've included more losses and optimizers as well as made some performance improvements. Please check release note for more details! Thanks!

🔍 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:

  • 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.

⭐ Key Features

  • 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., MLP, CNN, GNN, transformer, etc) that support their data types.
  • Efficient Algorithms - Stochastic algorithms with provable theoretical convergence that support learning with millions of data points without larger 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.

⚙️ 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.

📋 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()

📔 Tutorials

X-Risk

Applications

📃 Citation

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

@software{libauc2022,
  title={LibAUC: A Deep Learning Library for X-risk Optimization.},
  author={Yuan, Zhuoning and Qiu, Zi-Hao and Li, Gang and Zhu, Dixian and Guo, Zhishuai and Hu, Quanqi and Wang, Bokun and Qi, Qi and Zhong, Yongjian and Yang, Tianbao },
  year={2022}
  }
@article{yang2022algorithmic,
 title={Algorithmic Foundation of Deep X-Risk Optimization},
 author={Yang, Tianbao},
 journal={arXiv preprint arXiv:2206.00439},
 year={2022}
}

📧 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].

About

LibAUC: A Deep Learning Library for X-Risk Optimization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TeX 100.0%
0