<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Concept Induction</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Samatha Ereshi Akkamahadevi</string-name>
          <email>samatha94@ksu.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Abhilekha Dalal</string-name>
          <email>adalal@ksu.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pascal Hitzler</string-name>
          <email>hitzler@ksu.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Explainable Artificial Intelligence, Deep Learning, Knowledge Graph, Semantic Web, Automation in AI</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, Kansas State University</institution>
          ,
          <addr-line>Manhattan, KS</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <fpage>13</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>This paper presents an automation pipeline for interpreting hidden neuron activations in Convolutional Neural Networks (CNNs), a crucial objective of Explainable AI (XAI). Previously, our research group addressed this objective by employing concept induction and semantic reasoning using a concept hierarchy derived from the Wikipedia knowledge graph. However, the process was executed manually, taking several days to complete. In this study, we have fully automated the workflow, achieving consistent results while significantly reducing the execution time. The automation pipeline streamlines model training, data preparation, concept induction, image retrieval, classification, and statistical validation, thereby completely eliminating the manual intervention. This automation enables us to eficiently interpret and validate CNN neuron activations by modifying parameters, such as incorporating a broader range of training images and classes and examining additional concept induction results across various neuron layers using diferent analytical tools.</p>
      </abstract>
      <kwd-group>
        <kwd>Demo video</kwd>
        <kwd>https</kwd>
        <kwd>//youtu</kwd>
        <kwd>be/a_tHVwexlEE</kwd>
        <kwd>Github</kwd>
        <kwd>https</kwd>
        <kwd>//bit</kwd>
        <kwd>ly/ExAI_Automation_DaSe</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR
ceur-ws.org</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction and Related</title>
    </sec>
    <sec id="sec-3">
      <title>Work</title>
      <p>
        Deep learning has revolutionized the field of artificial intelligence (AI), achieving breakthroughs
in fields such as image recognition, speech recognition, drug discovery, robotics etc. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
However, its “black box” nature poses challenges, especially in critical domains needing transparency
and explainability [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Explainable AI steps in to address these issues, striving to make AI
systems more interpretable and their decision-making processes more transparent [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Previously,
Dalal et al. has demonstrated that hidden neuron activations in CNNs could be meaningfully
interpreted using structured background knowledge and ontology reasoning [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5, 6</xref>
        ]. This
approach utilized a large-scale knowledge base derived from Wikipedia’s concept hierarchy [7]
and employed concept induction [8, 9] to generate interpretable class labels for hidden neurons.
Building on this foundation, the current study automates the entire interpretability process to
enhance eficiency and ensure reproducibility, eliminating the need for human intervention.
We optimized resource allocation and implemented parallel processing to significantly reduce
the execution time. This paper provides a detailed description of our automated approach, its
technical components, performance evaluation results, and broader implications for XAI.
      </p>
    </sec>
    <sec id="sec-4">
      <title>2. System Architecture and Implementation</title>
      <p>Our system uses automation in four stages (Figure 1) below to streamline processes and to
enhance eficiency.</p>
      <sec id="sec-4-1">
        <title>2.1. Stage 1: Model Training and Data Configuration</title>
        <p>Initially, our automation pipeline trains and configures a CNN model using the ADE20K dataset
[10]. This process is executed on Beocat [11], a high-performance computing environment
optimized for managing extensive datasets. A Bash script automates job scheduling, resource
allocation via SLURM, initializes the Python environment, securely clones the stage 1 repository
from GitHub, and installs the necessary dependencies to establish the training environment.
We employ a ResNet50V2 architecture implemented in TensorFlow, fine-tuned to enhance
model performance using techniques such as data augmentation, early stopping, and batch
normalization. Our model is trained on 6,187 images, using Adam optimization algorithm
(learning rate 0.001) and categorical cross-entropy as the loss function. Post-training, the model
is saved and used to analyze activations within the dense layer across 1,370 ADE20K images
and it generates positive and negative example sets based on activation thresholds. P consists of
images activating a neuron above 80% of maximum activation, while N includes images activating
below 20%. These sets are annotated with classes from background knowledge and will generate
configuration files for each neuron which are pivotal for the Concept Induction analysis in
Stage 2, providing structured input data for generating and validating label hypotheses.</p>
      </sec>
      <sec id="sec-4-2">
        <title>2.2. Stage 2: Parallelized Concept Induction and Label Hypothesis Generation</title>
        <p>We used the concept induction process to generate label hypotheses for each of the 64 neuron
activations in the CNN’s dense layer using the heuristic Concept Induction system ECII [9]. We
automated the simultaneous execution of tasks for all 64 neurons by employing parallel
processing with a SLURM-configured Bash script in Beocat. The script initializes the environment,
installs necessary Java and Maven dependencies, and clones the latest stage 2 repository from
GitHub. Each neuron-specific configuration file from Stage 1 was used to generate semantic
concepts, producing output concept files with hypothesized labels and coverage scores using a
background knowledge base from the Wikipedia concept hierarchy.</p>
      </sec>
      <sec id="sec-4-3">
        <title>2.3. Stage 3: Parallelized Image Retrieval and Classification</title>
        <p>Image retrieval and classification were automated for all neurons to validate the label hypotheses
generated in Stage 2. A Bash script manages parallel task execution using SLURM, generating
indices for neurons with configuration files. It clones the Stage 3 project repository, sets up
the environment, installs dependencies. The script runs a Python program that utilizes the
pygoogle_image library to extract labels from the top 3 solutions for each neuron, retrieves
100 images per label from Google, and classifies them using the trained CNN model. Retrieved
images are divided into evaluation and verification sets for statistical analysis.</p>
      </sec>
      <sec id="sec-4-4">
        <title>2.4. Stage 4: Statistical Analysis and Verification of Neuron Activations</title>
        <p>Label hypotheses are validated through statistical analysis of neuron activations. A Bash script
sets up the environment, clones the stage 4 repository, and installs dependencies. The script runs
a Python program that combines activation data from evaluation and verification sets, generates
summary statistics, and conducts a Mann-Whitney U test [12] to compare activation values for
target and non-target images. Evaluation sets, containing images that strongly activate neurons,
provide initial activation metrics. Verification sets undergo further statistical testing to confirm
the accuracy and robustness of the label hypotheses.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3. Results and Conclusion</title>
      <p>The automation pipeline, executed to enhance the interpretation of hidden neuron activations
in CNNs, achieved significant performance improvements.</p>
      <p>In stage 1, it eliminated the need for manual analysis to identify and categorize the positive
and negative images from the model output. It also generated neuron-specific configuration files
with embedded ontology references in OWL format, which serve as input for the subsequent
concept induction analysis, completing the execution under 40 minutes.</p>
      <p>In stage 2, parallel execution of ECII tool for all 64 neurons reduced the concept induction
execution time from over 10 hours to 20 minutes. The ECII tool processed neuron-specific
configuration files to generate output concept files with hypothesized labels, sorted by coverage
scores, along with precision, recall, and f-measure metrics.</p>
      <p>In Stage 3, the image retrieval and classification processes were automated to run concurrently
for all neurons to validate label hypotheses from Stage 2. It extracted labels from ECII output,
retrieved relevant images from the internet, and classified them using our trained CNN model
from stage 1. Model generated the evaluation sets to include activations from images that
activate the neuron, providing initial insights into neuron activation patterns while verification
sets were generated for detailed statistical analysis in the next stage. This parallelized approach
reduced processing time to about 10 minutes, compared to 16 hours without parallelization.</p>
      <p>Finally, Stage 4 performed statistical analysis and validated the results in just 3 minutes. The
system analyzed activation data, generated a detailed summary of statistics, and verified the
label hypotheses. The statistical analysis showed that concept induction analysis with structured
background knowledge yields meaningful labels that consistently explain neuron activation. The
Mann-Whitney U test rejected the null hypothesis (p &lt; 0.05), confirming significant diferences
in activation values between target and non-target images.</p>
      <p>Overall, the entire pipeline was completed in approximately 1 hour 15 minutes, demonstrating
substantial improvements in performance, indeed the explainability of the CNN model. The
automation and parallelization strategies drastically reduced execution times, minimized manual
efort, and ensured consistent and reproducible results, demonstrating the robustness and
eficiency of our approach.</p>
    </sec>
    <sec id="sec-6">
      <title>4. Future work</title>
      <p>We will expand and diversify the dataset, explore various neural network architectures, and
integrate various analytical tools. Additionally, we aim to enhance model interpretability by
examining additional concept induction results across various neuron layers.
[6] A. Dalal, R. Rayan, P. Hitzler, Error-margin analysis for hidden neuron activation labels,
arXiv preprint arXiv:2405.09580 (2024). doi:10.48550/arXiv.2405.09580.
[7] B. Villazón-Terrazas, F. Ortiz-Rodríguez, S. M. Tiwari, S. K. Shandilya (Eds.), Wikipedia
knowledge graph for explainable AI, 2020. doi:10.1007/978-3-030-65384-2_6.
[8] J. Lehmann, P. Hitzler, Concept learning in description logics using refinement operators,</p>
      <p>Machine Learning 78 (2010) 203–250. doi:10.1007/s10994-009-5146-2.
[9] M. Kamruzzaman Sarker, P. Hitzler, Eficient concept induction for description logics,
Proceedings of the AAAI Conference on Artificial Intelligence 33 (2019) 3036–3043. doi: 10.
1609/aaai.v33i01.33013036.
[10] B. Zhou, H. Zhao, X. Puig, T. Xiao, S. Fidler, A. Barriuso, A. Torralba, Semantic
understanding of scenes through the ade20k dataset, International Journal of Computer Vision
127 (2019) 302–321. doi:10.1007/s11263-018-1140-0.
[11] K. Hutson, D. Andresen, A. Tygart, D. Turner, Managing a heterogeneous cluster, in:
Proceedings of the Practice and Experience in Advanced Research Computing on Rise of
the Machines (learning), Association for Computing Machinery, New York, NY, USA, 2019,
pp. 1–6. doi:10.1145/3332186.3332251.
[12] P. E. McKnight, J. Najab, Mann-whitney u test, The Corsini encyclopedia of psychology
(2010) 1–1. doi:10.1002/9780470479216.corpsy0524.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>LeCun</surname>
          </string-name>
          , Y. Bengio, G. Hinton,
          <article-title>Deep learning</article-title>
          ,
          <source>Nature</source>
          <volume>521</volume>
          (
          <year>2015</year>
          )
          <fpage>436</fpage>
          -
          <lpage>444</lpage>
          . doi:
          <volume>10</volume>
          .1038/ nature14539.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Adadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Berrada</surname>
          </string-name>
          ,
          <article-title>Peeking inside the black-box: a survey on explainable artificial intelligence (XAI)</article-title>
          ,
          <source>IEEE access 6</source>
          (
          <year>2018</year>
          )
          <fpage>52138</fpage>
          -
          <lpage>52160</lpage>
          . doi:
          <volume>10</volume>
          .1109/ACCESS.
          <year>2018</year>
          .
          <volume>2870052</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Gunning</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Stefik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Choi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Stumpf</surname>
          </string-name>
          , G.-
          <string-name>
            <given-names>Z.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <article-title>Xai-explainable artificial intelligence</article-title>
          ,
          <source>Science robotics 4</source>
          (
          <year>2019</year>
          )
          <article-title>eaay7120</article-title>
          . doi:
          <volume>10</volume>
          .1126/scirobotics.aay7120.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dalal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Barua</surname>
          </string-name>
          , E. Vasserman,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>Understanding CNN hidden neuron activations using structured background knowledge and deductive reasoning</article-title>
          ,
          <source>arXiv preprint arXiv:2308.03999</source>
          (
          <year>2023</year>
          ). doi:
          <volume>10</volume>
          .48550/arXiv.2308.03999.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dalal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rayan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Barua</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. Y.</given-names>
            <surname>Vasserman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>On the value of labeled data and symbolic methods for hidden neuron activation analysis</article-title>
          ,
          <source>arXiv preprint arXiv:2404.13567</source>
          (
          <year>2024</year>
          ). doi:
          <volume>10</volume>
          .48550/arXiv.2404.13567.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>