CounterfactualExplanations.jl
CounterfactualExplanations.jl copied to clipboard
Add faithfulness metric
Observations
- Posterior sampling is very sensitive to scale of underlying data (step size for SGLD is in absolute terms).
To Do
- [x] ~Need to ensure that is standardized/normalized before running sampling.~ Can instead just make the parameters for the sampling rule (ImproperSGLD) dependent on the second moment of the prior distribution.
- [x] Get rid of clipping again.
- [x] Support for mini-batch sampling?
- [x] Make
EnergySamplerpart of modelM.fitresultso that it can be recycled. - [ ] Add MLJFlux extension
- [x] Actually train a good model in JEM.jl
- [ ] Complete tutorial
- [x] Closer look at role of reg loss
- [x] Let decay depend on maximum number of iterations
- [x] ~Why not use Normalized Compression Distance?~ Only available package only applicable to strings
- [ ] Cosine distance has advantage of being (-1,1)
@alifarukyucel to see
Is faithful here different or equal to from graphical "faithfulness"? https://www.cmu.edu/dietrich/philosophy/docs/scheines/introtocausalinference.pdf
Is faithful here different or equal to from graphical "faithfulness"? https://www.cmu.edu/dietrich/philosophy/docs/scheines/introtocausalinference.pdf
I'm not familiar with this work but from briefly looking at their definition of faithfulness, it's different. We define faithful counterfactuals as "consistent with what the model has learned about the data" in our AAAI paper: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=e7KRRa8AAAAJ&citation_for_view=e7KRRa8AAAAJ:_FxGoFyzp5QC
Happy to chat more about it in one of our meetings
Codecov Report
Attention: Patch coverage is 20.09804% with 163 lines in your changes missing coverage. Please review.
Project coverage is 81.80%. Comparing base (
0d5d16e) to head (509fc05). Report is 19 commits behind head on main.
:exclamation: Current head 509fc05 differs from pull request most recent head 7d50a87
Please upload reports for the commit 7d50a87 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## main #455 +/- ##
==========================================
- Coverage 90.37% 81.80% -8.58%
==========================================
Files 80 86 +6
Lines 1559 1671 +112
==========================================
- Hits 1409 1367 -42
- Misses 150 304 +154
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @MaritRadder, tagging you here already but the tutorial is still bare bones (just code). I'll try to fill it with some text asap and will probably merge this then and complete the remaining tasks here in another PR.
@MaritRadder the code here is already updated: TaijaBase.Samplers has been moved into its own new package EnergyBasedSamplers.