Skip to content

feat: Larr method#34

Merged
zkhotanlou merged 17 commits intocharmlab:mainfrom
HashirA123:LARR-method
Nov 24, 2025
Merged

feat: Larr method#34
zkhotanlou merged 17 commits intocharmlab:mainfrom
HashirA123:LARR-method

Conversation

@HashirA123
Copy link
Contributor

The reproduce file has two main test functions. The first test function aims to use the inner logic of the LARR method to perform an experiment similar to one done in the original paper's code. There are many differences between what we have, mainly in the way the models they have produce predictions. This is important as it impacts the Lambda parameter that is calculated.

The compromise I came up with is to slightly modify the structure of the experiment in the code, not changing the actual recourse logic, to get results in their code and our code as close as possible.

However, when running our own pipeline, because of the way that the models are trained, some being poorer than the ones in the paper, getting comparable recourse even when using similar datasets is a large challenge.

Given the scope of our current task, since we can confirm that the logic of the recourse implementation is aligned with the original papers, we can give it a level 1-2 rating in terms of reproducibility.

TODO:
- make compatible with Repo structure
- add reproduce.
The reproduce file has two main test functions.The first test function aims to use the inner logic of the LARR method to perform an experiment similar to one done in the original paper's code. There are many differences what we have, mainly in the way the models they have produce predictions. This is important as it impacts the Lambda param is calculated.

The compromise I came up with is to slightly modify the structure of the experiment in the code, not changing the actual recourse logic, to get results in their code and our code as close as possible.

However, when running our own pipeline, because of the way that the models are trained, some being poorer than the ones in the paper, getting comparable recourse even when using similar datasets is a large challenge.

Given the scope of our current task, since we can confirm that the logic of the recourse implementation is aligned with the original papers, We can give it a level 1-2 rating in terms of reproducibility.
@HashirA123 HashirA123 marked this pull request as ready for review November 19, 2025 16:44
@HashirA123 HashirA123 marked this pull request as draft November 19, 2025 19:44
This method was not working correctly before. I noticed this when running the experiment file, where the method could not pass for any of the datasets.

The problem was likely the predict method that was being used inside the get lambda function, along with the methos weights not being set properly.

These issues seem now to be resolved.
@HashirA123 HashirA123 marked this pull request as ready for review November 19, 2025 21:07
Copy link
Collaborator

@zkhotanlou zkhotanlou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation looks solid. It checks the reproducibility of results for the same dataset and model as the original paper, and it follows the repository’s benchmarking pipeline structure correctly. After resolving the merge conflicts, the PR would ready to be merged.

flake8 was giving incorrect compare types on some files.

"do not compare types. Use is, is not, or isinstance() instead."
Copy link
Collaborator

@zkhotanlou zkhotanlou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an implementation of the "LARR"[1] recourse method. The level of reproduction is on level1 as the unit tests checks the implementation could reproduce results reported in the paper for German dataset on linear model.

[1] Kayastha, K., Gkatzelis, V., Jabbari, S. (2025). Learning-Augmented Robust Algorithmic Recourse. Drexel University. (https://arxiv.org/pdf/2410.01580)

@zkhotanlou zkhotanlou merged commit 3f0db2b into charmlab:main Nov 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants