logix-project / logix

AI Logging for Interpretability and Explainability🔬
Apache License 2.0
74 stars 6 forks source link

Support module-wise influence computations #99

Closed sangkeun00 closed 4 months ago

sangkeun00 commented 4 months ago

For more detailed influence analysis, one may want to look into the influence score of each module (or a group of modules). Users can specify their own computation groups as below

influence_groups = ["att", "mlp"]
run.influence.compute_influence_all(..., influence_groups=influence_groups)
run.influence.compute_influence(..., influence_groups=influence_groups)
run.influence.compute_self_influence(..., influence_groups=influence_groups)