Google Summer of Code 2026

Final Work Product for mlr3torchAUM on CRAN

This page is the final work product for my GSoC 2026 project with the R Project for Statistical Computing. The project focused on extending mlr3torchAUM with AUC-oriented losses, sampling methods, and CRAN-ready testing and documentation.

Contributor: Aman Kashyap Mentors: Toby Dylan Hocking, Sebastian Fischer Last updated: August 24, 2026

Project Goals

Below is the project goal, referenced from the official GSoC project idea page for mlr3torchAUM on CRAN, under the R Project for Statistical Computing.

Real classification data is usually imbalanced — a small minority of positive cases against a large majority of negatives:

ROC curves are the standard way to evaluate such problems, and torch::nn_aum_loss() (added to torch in 2025) makes it possible to optimize the ROC curve directly with gradient descent.

mlr3torchAUM already provided that AUM loss plus some custom samplers. The GSoC goal was to:

This project will make it easier to compare different approaches for imbalanced classification in R.

Summary of Contributions

For each of the implementation PRs below, I added a test script and a man page alongside the code, to keep the package CRAN-compatible and maintainable.

Merged Pull Requests

Open or Not Yet Merged Work

A couple of things I did outside of PRs: I started the coordination-roadmap discussion between the two contributors in issue #35, and shared a benchmark comparing the pairwise-AUC squared-hinge loss with log-linear version on EMNIST and FashionMNIST in issue #87 — the two matched in learning trajectory.

Challenges and What I Learned

Current State and Remaining Work

Today, a user can load mlr3torchAUM and use new losses directly through the standard t_loss() dictionary:

RandomOverSampler, RandomUnderSampler, and ADASYN are also merged and usable directly as R6 classes for training-time over- and under-sampling. Every implementation above ships with its own test file and man page (see Summary of Contributions), and CI on main — including R CMD check, test coverage — is currently green.

mlr3torchAUM also gained multiclass losses and LibAUC optimizer support from a co-contributor working on the project at the same time — this page only describes my part of that combined state.

Remaining Work

One more piece is implemented and tested but still open as a pull request — the re-weighted logistic loss (PR #106 above) — and should get merged soon.

Beyond that, a few ideas are future scope rather than something I got to during GSoC: multiclass support for the re-weighted logistic loss, and additional SMOTE variants such as KMeansSMOTE and BorderlineSMOTE.

Thanks to My Mentor

I want to thank my mentor, Toby Hocking, for giving me the chance to work on this project and for being patient and clear with feedback all the way from my very first PR on mlr3torchAUM through to the end of GSoC. This summer taught me a lot about writing code that other people can actually rely on, and I'm grateful for the opportunity.