Giter Club home page Giter Club logo

diffaurc's Introduction

Differentiable risk-coverage curve

This repository contains the ongoing exploration of designing a loss function that allows for better selective prediction.

This is WIP, and the code is not yet production-ready. The first target is to have a differentiable loss function based on the area-under-the-risk-coverage-curve (AURC, Bias-Reduced Uncertainty Estimation for Deep Neural Classifiers" (ICLR 2019)) that can be used in a PyTorch training loop.

Installation

The scripts require python >= 3.8 to run. We will create a fresh virtualenvironment in which to install all required packages.

mkvirtualenv -p /usr/bin/python3 diffAURC

Using poetry and the readily defined pyproject.toml, we will install all required packages

workon diffAURC 
pip3 install poetry
poetry install

Organization

The repository is organized as follows:

  • data/ contains some data used for the unit tests (CIFAR-100 validation/test logits)
  • paper/ contains the LateX documenting the mathematical derivation of the differentiable AURC loss function
  • src/ contains the source code
    • AURC_implementations holds all different implementations of the AURC metric from the literature and our own derivations/approximations
    • AURC loss contains the implementation of the differentiable AURC loss function with the additional alphas approximation
    • Tests contains synthetic and real data tests to check the difference in AURC metric implementations, the differentiability of the AURC loss function, and the effect of batch size on the statistical approximation quality
    • Metrics contains some additional metrics to evaluate the quality of a probabilistic classifier (BS, NLL, ECE, MCE, AURC, ...)

diffaurc's People

Contributors

jordy-vl avatar tpopordanoska avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.