Skip to content

Clarify IntegratedGradients target semantics for binary and multilabel settings#944

Closed
ParthAgarwalCode wants to merge 2 commits intosunlabuiuc:masterfrom
ParthAgarwalCode:patch-1
Closed

Clarify IntegratedGradients target semantics for binary and multilabel settings#944
ParthAgarwalCode wants to merge 2 commits intosunlabuiuc:masterfrom
ParthAgarwalCode:patch-1

Conversation

@ParthAgarwalCode
Copy link
Copy Markdown

This PR clarifies IntegratedGradients target semantics across prediction modes.

Changes:

  • add decision_threshold for binary/multilabel default target inference
  • use decision_threshold instead of hardcoded 0.5
  • document binary default behavior
  • document multilabel default behavior
  • clarify that target_class_idx in binary behaves like target label selection
  • clarify that multilabel default attribution uses the sum of selected logits

This does not change the IG algorithm itself, and preserves existing default behavior when decision_threshold=0.5.

…l settings

This PR clarifies IntegratedGradients target semantics across prediction modes.

Changes:
- add `decision_threshold` for binary/multilabel default target inference
- use `decision_threshold` instead of hardcoded `0.5`
- document binary default behavior
- document multilabel default behavior
- clarify that `target_class_idx` in binary behaves like target label selection
- clarify that multilabel default attribution uses the sum of selected logits

This does not change the IG algorithm itself, and preserves existing default behavior when `decision_threshold=0.5`.
Comment on lines +198 to 199
self.decision_threshold = decision_threshold

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I dont see this field used anywhere.

@Logiquo
Copy link
Copy Markdown
Collaborator

Logiquo commented Apr 30, 2026

This issue has been fix by #926 already.

@Logiquo Logiquo closed this Apr 30, 2026
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