Skip to content

Avoid overflow in feature-attribution averages - #8

Draft
Ayushdevo wants to merge 2 commits into
mainfrom
fix/attribution-extreme-values
Draft

Ayushdevo wants to merge 2 commits into
mainfrom
fix/attribution-extreme-values

Conversation

@Ayushdevo

@Ayushdevo Ayushdevo commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Large but finite SHAP values can overflow while computing mean absolute attributions and the sum used for feature percentages. This can produce nonfinite or misleading rankings and reports. Scale before averaging in the public explainer and report pipeline, and normalize importance values before summing them. Zero-valued features stay zero.

Validation: the extreme-value regressions fail on their respective base implementations; the public explainer selection passes 19 tests, and the report pipeline selection passes 4 cases covering extreme, ordinary, zero, and nonfinite input. Scoped Ruff E/F excluding existing line-length violations and git diff --check passed. Tested changed files match the base version of current main; full suite not run. AI-assisted contribution.

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.

1 participant