xaibase.jl

Core package defining the Julia-XAI interface.

https://github.com/julia-xai/xaibase.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Core package defining the Julia-XAI interface.

Basic Info
  • Host: GitHub
  • Owner: Julia-XAI
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 1.83 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 2
  • Releases: 10
Created over 2 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Citation

README.md

XAIBase.jl

Stable Dev Build Status Coverage Code Style: Runic Aqua JET ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

XAIBase is a light-weight dependency that defines the interface of XAI methods in the Julia-XAI ecosystem, which focusses on post-hoc, local input space explanations of black-box models. In simpler terms, methods that try to answer the question "Which part of the input is responsible for the model's output?"

Building on top of XAIBase (or providing an interface via package extensions) makes your package compatible with the Julia-XAI ecosystem, allowing you to automatically compute heatmaps for vision and language models using VisionHeatmaps.jl and TextHeatmaps.jl. It also allows you to use input-augmentations from ExplainableAI.jl.

Interface description

XAIBase only requires you to fulfill the following two requirements:

  1. An XAI algorithm has to be a subtype of AbstractXAIMethod
  2. An XAI algorithm has to implement a call_analyzer method:

```julia import XAIBase: call_analyzer

callanalyzer(input, method::MyMethod, outputselector::AbstractOutputSelector; kwargs...) ```

  • call_analyzer has to return an Explanation
  • the input is expected to have a batch dimensions as its last dimension
  • when applied to a batch, the method returns a single Explanation, which contains the batched output in the val field.
  • AbstractOutputSelector are predefined callable structs that select scalar values from a model's output, e.g. the maximally activated output of a classifier using MaxActivationSelector.

Refer to the Explanation documentation for a description of the expected fields. For more information, take a look at the documentation.

Example implementation

Julia-XAI methods will usually follow the following template:

```julia using XAIBase import XAIBase: call_analyzer

struct MyMethod{M} <: AbstractXAIMethod model::M
end

function callanalyzer(input, method::MyMethod, outputselector::AbstractOutputSelector; kwargs...) output = method.model(input) outputselection = outputselector(output)

val = ...         # your method's implementation
extras = nothing  # optionally add additional information using a named tuple
return Explanation(val, input, output, output_selection, :MyMethod, :attribution, extras)

end ```

[!TIP] For full implementation examples, refer to the examples in the XAIBase documentation.

Acknowledgements

Adrian Hill acknowledges support by the Federal Ministry of Education and Research (BMBF) for the Berlin Institute for the Foundations of Learning and Data (BIFOLD) (01IS18037A).

Owner

  • Name: Julia Explainable AI
  • Login: Julia-XAI
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: "Hill"
    given-names: "Adrian"
    orcid: "https://orcid.org/0009-0009-5977-301X"
title: "XAIBase.jl"
version: 1.0.0
date-released: 2023-10-16
url: "https://github.com/Julia-XAI/XAIBase.jl"

GitHub Events

Total
  • Create event: 2
  • Commit comment event: 3
  • Release event: 2
  • Delete event: 3
  • Push event: 14
  • Pull request event: 1
Last Year
  • Create event: 2
  • Commit comment event: 3
  • Release event: 2
  • Delete event: 3
  • Push event: 14
  • Pull request event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 46
  • Total Committers: 1
  • Avg Commits per committer: 46.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Adrian Hill a****l@m****g 46
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 15
  • Average time to close issues: 18 days
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 1.83
  • Average comments per pull request: 0.67
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 3
  • Average time to close issues: 5 days
  • Average time to close pull requests: about 14 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • adrhill (5)
  • JuliaTagBot (1)
Pull Request Authors
  • adrhill (21)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite