Training Data Attribution for Image Generation using Ontology-Aligned Knowledge Graphs