Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Lime output dimension in batch forward #1513

Closed
wants to merge 1 commit into from

Conversation

vivekmig
Copy link
Contributor

Summary:
Currently, when a batch of inputs is provided with a forward function that returns a single scalar per batch, Lime and KernelShap still return output matching the input shape.

This behavior is inconsistent with other perturbation based methods, particularly Feature Ablation and Shapley Value Sampling.

This change breaks backward compatibility for OSS users, but since it's a specific case (scalar per batch), should be fine to update with only a documentation update.

Differential Revision: D70096644

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70096644

vivekmig pushed a commit to vivekmig/captum-1 that referenced this pull request Feb 24, 2025
Summary:

Currently, when a batch of inputs is provided with a forward function that returns a single scalar per batch, Lime and KernelShap still return output matching the input shape.

This behavior is inconsistent with other perturbation based methods, particularly Feature Ablation and Shapley Value Sampling.

This change breaks backward compatibility for OSS users, but since it's a specific case (scalar per batch), should be fine to update with only a documentation update.

Differential Revision: D70096644
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70096644

vivekmig pushed a commit to vivekmig/captum-1 that referenced this pull request Feb 25, 2025
Summary:

Currently, when a batch of inputs is provided with a forward function that returns a single scalar per batch, Lime and KernelShap still return output matching the input shape.

This behavior is inconsistent with other perturbation based methods, particularly Feature Ablation and Shapley Value Sampling.

This change breaks backward compatibility for OSS users, but since it's a specific case (scalar per batch), should be fine to update with only a documentation update.

Reviewed By: craymichael

Differential Revision: D70096644
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70096644

vivekmig pushed a commit to vivekmig/captum-1 that referenced this pull request Feb 25, 2025
Summary:

Currently, when a batch of inputs is provided with a forward function that returns a single scalar per batch, Lime and KernelShap still return output matching the input shape.

This behavior is inconsistent with other perturbation based methods, particularly Feature Ablation and Shapley Value Sampling.

This change breaks backward compatibility for OSS users, but since it's a specific case (scalar per batch), should be fine to update with only a documentation update.

Reviewed By: craymichael

Differential Revision: D70096644
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70096644

Summary:

Currently, when a batch of inputs is provided with a forward function that returns a single scalar per batch, Lime and KernelShap still return output matching the input shape.

This behavior is inconsistent with other perturbation based methods, particularly Feature Ablation and Shapley Value Sampling.

This change breaks backward compatibility for OSS users, but since it's a specific case (scalar per batch), should be fine to update with only a documentation update.

Reviewed By: craymichael

Differential Revision: D70096644
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a799dfd.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants