My Bachelor Thesis

python
xai
transformers
shap
gradio
captum
academic
  • my bachelor thesis about XAI, LLMs and ChatBots
  • build in python with Huggingface, Gradio and SHAP/CAPTUM
  • anlysing how LLM output and ChatBots can be more understandable

About the Project

When the time came to write me thesis, as the last bit of my bachelors degree the topic of Explainable AI was suggest to me by one of the professors at my Uni. I decided to specifically look into ChatBots, as they are pretty much category defining in the field of LLM applications. The offical topic of my thesis was

Building an Interpretable Natural Language AI Tool based on Transformer Models and approaches of Explainable AI.

The result of this is a 70 page thesis that explored how techniques of XAI can be applied to LLMs and ChatBots. For this I explored several different approaches and open source implementations after outlining all important fundamentals.

I also produced a working prototype, that tired to interpret and explain decision of a Mistral 7B Instruct Model inside the chat interface. This was meant to improve explainability towards common users.

Technology

Technology

PythonJupyter NotebooksHuggingfaceGradio

The implementation of my thesis relied on several open source technologies, because of their availability. Most importantly this was the Huggingface Ecosystem, specifically transformers. Which I have already used in the past.

For XAI Implementation I relied on captum but also tried out SHAP. In the end I settled with captum and implemented KernelSHAP with Mistral.

The rest of the application and UI is built in Python with Gradio and FastAPI.