v1.3.0 (2025-06-17) #404
mmschlk
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Below you find the reals notes for shapiq version 1.3.0.
✨Highlights
SPEX (SParse EXplainer) by @justinkang221 and @landonbutler
shapiq.SPEX
(Sparse Exact) approximator for efficient computation of sparse interaction values for really large models and games. Paper: SPEX: Scaling Feature Interaction Explanations for LLMsAgnosticExplainer
The
shapiq.AgnosticExplainer
is a generic explainer that works for any value function orshapiq.Game
object, allowing for more flexibility in explainers.Full Changelog
New Features
approximator.sparse
for efficient computation of sparse interaction values #379shapiq.AgnosticExplainer
which is a generic explainer that can be used for any value function orshapiq.Game
object. This allows for more flexibility in the explainers. #100, #395budget
to be a mandatory parameter given to theTabularExplainer.explain()
method #355InteractionValues.get_n_order()
function to be callable with either theorder: int
parameter and optional assignment ofmin_order: int
andmax_order: int
parameters or with the min/max order parameters #372min_percentage
parameter in the force plot tocontribution_threshold
to better reflect its purpose #391verbose
parameter to theExplainer
'sexplain_X()
method to control weather a progress bar is shown or not which is defaulted toFalse
. #391InteractionValues.get_n_order()
andInteractionValues.get_n_order_values()
function more efficient by iterating over the stored interactions and not over the powerset of all potential interactions, which made the function not usable for higher player counts (models with many features, and results obtained fromTreeExplainer
). Note, this change does not really helpget_n_order_values()
as it still needs to create a numpy array of shapen_players
timesorder
#372network_plot()
plot function to use thesi_graph_plot()
as its backend function. This allows for more flexibility in the plot function and makes it easier to use the same code for different purposes. In addition, thesi_graph_plot
was modified to make plotting more easy and allow for more flexibility with new parameters. #349Game.compute()
method to theshapiq.Game
class to compute game values without changing the state of the game object. The compute method also introduces ashapiq.utils.sets.generate_interaction_lookup_from_coalitions()
utility method which creates an interaction lookup dict from an array of coalitions. #397shapiq.network_plot()
orInteractionValues.plot_network()
is now a special case of theshapiq.si_graph_plot()
andInteractionValues.plot_si_graph()
. This allows to create more beautiful plots and easier maintenance in the future. #349Testing, Code-Quality and Documentation
"ALL"
rules inruff-format
configuration to enforce stricter code quality checks and addressed around 500 (not automatically solvable) issues in the code base. #391InteractionValues
objects to be used in the tests. This allows for more efficient and cleaner tests, as well as easier debugging of the tests #372index
parameter is not in the list of available indices in theTabularExplainer
since the type hints were replaced by Literals #391shapiq
tests if some approximators/explainers can be instantiated with certain indices or not in favor of using Literals in the__init__
method of the approximator classes. This allows for better type hinting and IDE support, as well as cleaner code. #391RuntimeWarning
inRegression
approximatorssolve_regression()
method when the solver is not able to find good interim solutions for the regression problem.tests_unit/
andtests_integration/
to better separate unit tests from integration tests. #395tests/tests_integration/test_explainer_california_housing
which compares the different explainers against ground-truth interaction values computed byshapiq.ExactComputer
and interaction values stored on disk as a form of regression test. This test should help finding bugs in the future when the approximators, explainers, or exact computation are changed. #395Bug Fixes
shapiq.waterfall_plot
function that caused the plot to not display correctly resulting in cutoff y_ticks. Additionally, the file was renamed fromwatefall.py
towaterfall.py
to match the function name #377TabPFNExplainer
, where the model was not able to be used for predictions after it was explained. This was due to the model being fitted on a subset of features, which caused inconsistencies in the model's predictions after explanation. The fix includes that after each call to theTabPFNImputer.value_function
, the tabpfn model is fitted on the whole dataset (without omitting features). This means that the original model can be used for predictions after it has been explained. #396.BII
orBV
indices withshapiq.approximator.MonteCarlo
approximators (affectingSHAP-IQ
,SVARM
andSVARM-IQ
). All orders of BII should now be computed correctly. #395Autogenerated Notes
InteractionValues.get_n_order()
, Adds Test Fixtures, and new install-import CI Workflow by @mmschlk in ⚒️ ImprovesInteractionValues.get_n_order()
, Adds Test Fixtures, and new install-import CI Workflow #372"ALL"
by @mmschlk in 🛠️ update of ruff-format ruleset to"ALL"
#391t
parameter in SPEX and Sparse by @mmschlk in Renamet
parameter in SPEX and Sparse #392Game.compute
function and related test to the Game class by @IsaH57 in AddGame.compute
function and related test to the Game class #397AgnosticExplainer
and refactors explanation/approximation code by @mmschlk in addsAgnosticExplainer
and refactors explanation/approximation code #395New Contributors
Full Changelog: v.1.2.3...v1.3.0
This discussion was created from the release v1.3.0 (2025-06-17).
Beta Was this translation helpful? Give feedback.
All reactions