<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Active Learning in Neurosymbolic AI with Embed2Sym</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Alexander</forename><forename type="middle">Philipp</forename><surname>Rader</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Imperial College London</orgName>
							</affiliation>
						</author>
						<author role="corresp">
							<persName><forename type="first">Alessandra</forename><surname>Russo</surname></persName>
							<email>a.russo@ic.ac.uk</email>
							<affiliation key="aff0">
								<orgName type="institution">Imperial College London</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">Active Learning in Neurosymbolic AI with Embed2Sym</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">3845EAD0E1184BB5D4622B34674ADD40</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2025-04-23T18:16+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Neurosymbolic AI</term>
					<term>active learning</term>
					<term>human-in-the-loop</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Neurosymbolic AI combines neural networks with symbolic reasoners in an effort to create robust and logical machine learning frameworks. In one approach, a neural component processes raw data and outputs latent concepts. A symbolic component then conducts logical reasoning with the concepts to produce the final result. A major hurdle lies in the propagation of the end label signal to the latent space when no latent labels are available. We investigate the use of active learning to alleviate this problem. In particular, we consider the neurosymbolic framework Embed2Sym. We adapt the learning framework to incorporate active learning by gaining a latent learning signal for misclassified examples. An oracle, such as a human in the loop, provides latent labels, which are used to finetune the neural component. Using the same benchmark datasets as the original paper, we empirically evaluate our method. We demonstrate that even a small amount of labelled latent data leads to a sizeable increase in accuracy.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Neurosymbolic AI aims to combine the robustness of neural networks to real-world data with the explainability and provable correctness of symbolic reasoners <ref type="bibr" target="#b0">[1]</ref>. A particular stream is known as "[Neuro → Symbolic]" <ref type="bibr" target="#b1">[2]</ref> and is reminiscent of the two-system model of the human mind <ref type="bibr" target="#b2">[3]</ref>. The neural network represents system 1 and processes raw inputs to produce latent concepts. The symbolic component then logically reasons over the concepts, such as in system 2, to solve the given problem.</p><p>One such framework is Embed2Sym <ref type="bibr" target="#b3">[4]</ref>. It consists of a neural network that transforms raw inputs into embeddings, a clustering algorithm that assigns them categories, and a symbolic optimiser based on answer set programming (ASP), that solves a logical task. One of the biggest challenges for Embed2Sym, and [Neuro → Symbolic] architectures in general, is training the neural component without labels for the intermediate representations.</p><p>In this paper, we propose to mitigate this problem by providing latent signals using active learning, which allows the system to ask an oracle to annotate datapoints <ref type="bibr" target="#b4">[5]</ref>. We extend Embed2Sym to incorporate active learning for incorrectly classified examples. We investigate the effect in three tasks: MNIST addition, CIFAR10 addition, and Member. Despite providing only a small percentage of latent labels, we attain substantial accuracy improvements.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Background</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Task formulation</head><p>Each task contains raw and symbolic inputs and labels representing the result of a downstream operation. For example, in MNIST Addition the input consists of images of two numbers and the output equates to their sum. Crucially, no labels are provided for the intermediate, called latent, representations. In our example, there are no labels for the numbers themselves, only their sum.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Embed2Sym</head><p>The Embed2Sym framework contains a neural perception component and a symbolic reasoning component. The system works in three stages: <ref type="bibr" target="#b3">[4]</ref> 1. Fully neural model: A neural network is trained end-to-end on the downstream task.</p><p>It is a two-stage architecture containing a perception and a reasoning component, both of which are neural. Each input is processed by the perception network which creates embedding vectors. The reasoning network processes the concatenated embeddings to output the predicted label.  At inference time, the algorithm works in three steps, as illustrated on the left side in Figure <ref type="figure" target="#fig_1">1</ref>. First, the neural perception network turns the inputs into embeddings ⃗ 𝑣 𝑖 . Second, the clustering assigns each embedding a symbolic label. Third, the hard-coded symbolic reasoning component 𝑃 calculates the end result.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Active Embed2Sym</head><p>The neural component in Embed2Sym generates embeddings of the latent concepts, for which it has no labels. Instead, it uses downstream labels for training, which is a more difficult task. The core idea of this paper is to finetune the neural network with latent labels after it has been trained end-to-end. We acquire the latent labels from two sources, as shown in Figure <ref type="figure" target="#fig_1">1:</ref> 1. For all examples with a correct end prediction, we assume that the predicted latent concepts are correct as well. Therefore, we can use the cluster labels from the trained perception networks. This represents the vast majority of examples. 2. For all examples with an incorrect end prediction, we ask an oracle for the corresponding latent labels. We refer to these as active labels. For complex tasks, the oracle is typically a human in the loop. In our case, we can use existing labels for MNIST and CIFAR10 images.</p><p>Since the last layer in the original framework uses k-means clustering, it is not differentiable. Therefore, we replace the clustering layer with a multi-layer-perceptron, indicated by the green boxes labelled "dense layer".</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Results</head><p>We assess the effect of our extension by performing the tasks outlined in the original paper: MNIST and CIFAR10 addition, as well as Member. In the first two tasks, the inputs consist of images representing numbers and the output indicates their sum. In the member task, the input consists of an MNIST image and a list of numbers. The output is a binary variable indicating whether the number is a member of the list. <ref type="bibr" target="#b5">[6]</ref> We investigate two main questions:</p><p>1. What proportion of labels needs to be obtained by an oracle? 2. Does active learning improve the accuracy of the results?</p><p>We conducted each experiment for five independent runs and show the average scores and their standard deviations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Proportion of active labels</head><p>Even though the latent labels for these specific tasks are easy to come by, calls to oracles are generally very expensive. Therefore, we need to evaluate our results in light of the percentage of active labels utilised.</p><p>Table <ref type="table" target="#tab_0">1</ref> presents the number of active labels used for each task, as well as their proportion of the dataset. In each case, the percentages remain below 5%. We conclude that the number of necessary labels are feasible to obtain and the added effort is justifiable to achieve better accuracies.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Experimental results</head><p>Figure <ref type="figure" target="#fig_0">2</ref> shows the learning curves while finetuning the neural component for MNIST addition with 15 digits. The baseline is the accuracy achieved from the fully trained original framework. The extended model surpasses the baseline within a few number of epochs. The test accuracies are on average significantly higher than the baseline, with only one run being slightly below. Similar results occur for MNIST additions with a lower number of digits, as well as CIFAR10 addition, albeit not as pronounced.</p><p>In Member, the accuracy already surpasses the baseline after only round of training (epoch 0), as Figure <ref type="figure" target="#fig_2">3</ref> illustrates on the left. Interestingly, the accuracy starts to decline again after epoch 8. The graph on the right indicates that the model is overfitting, as the train and validation curves diverge. Further investigation reveals that 5.9% of incorrect latent labels were missed during the active labelling, because the downstream label was correct for them.</p><p>The nature of the member task facilitates correct end predictions despite wrong latent predictions in two major ways: First, the label is binary, so a random guess can achieve an accuracy of 50%. Second, most digits in each input list are irrelevant for the task. For example, let the list be [0,8,5] and the digit be 2. It does not matter whether any numbers in the list are misclassified, unless as a 2, the answer of "No" is still correct.  Table <ref type="table" target="#tab_1">2</ref> summarises the results. There are 3 main takeaways from this investigation:</p><p>1. Active learning improved the accuracy in every task while requiring only a small percentage of oracle-annotated labels. 2. Active learning is most effective when there is more room for improvement. The greatest accuracy increase occurred on the dataset with the lowest baseline, MNIST 15. 3. False positives are an issue when the downstream labels are forgiving to mistakes in the latent space. This was the case in the Member tasks, where incorrect digit classifications often did not affect the outcome.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusion</head><p>Active learning shows some promising results in our experiments. Providing a stronger signal in the latent space helped achieve a better performance, especially when the baseline had room for improvement. This work represents a first step towards investigating active learning in neurosymbolic AI. Future work includes extending other frameworks, such as <ref type="bibr" target="#b6">[7]</ref>, and solving more complex tasks. Using tasks that require human labelling will be able to demonstrate the wider impact of our proposal. Furthermore, we aim to use active learning also for symbolic rule learning. Embed2Sym hard-codes the rules, but for other frameworks we need to devise ways of providing active labels for them.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>2 .</head><label>2</label><figDesc>Cluster discovery The k-means algorithm divides the embedding space created by the perception network into clusters. The number of clusters is predetermined. 3. Cluster labelling An ASP algorithm assigns each cluster their symbolic meaning by means of an optimisation task. It utilises a hard-coded symbolic component to compute the downstream result from the latent concepts.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Embed2Sym framework on the left, active extension on the right, where additions are shown as green dotted lines</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Member learning curves during finetuning</figDesc><graphic coords="5,92.21,84.21,204.11,139.52" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>Active labels</figDesc><table><row><cell>Task</cell><cell cols="2">Number of active labels Percentage of dataset</cell></row><row><cell>MNIST Addition 1 digit</cell><cell>526</cell><cell>0.9%</cell></row><row><cell>MNIST Addition 15 digits</cell><cell>2723</cell><cell>4.6%</cell></row><row><cell>CIFAR10 Addition 1 digit</cell><cell>1717</cell><cell>3.6%</cell></row><row><cell>Member 3 digits</cell><cell>269</cell><cell>0.9%</cell></row><row><cell>Member 20 digits</cell><cell>425</cell><cell>1.4%</cell></row></table><note>Figure 2: MNIST Addition learning curves during finetuning</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2</head><label>2</label><figDesc>Test set accuracies on the downstream tasks</figDesc><table><row><cell>Task</cell><cell cols="2">Embed2Sym Active Embed2Sym</cell></row><row><cell>MNIST Addition 1 digit</cell><cell>0.97</cell><cell>0.98±0.002</cell></row><row><cell>MNIST Addition 15 digits</cell><cell>0.67</cell><cell>0.73±0.036</cell></row><row><cell>CIFAR10 Addition 1 digit</cell><cell>0.83</cell><cell>0.88±0.004</cell></row><row><cell>Member 3 digits</cell><cell>0.96</cell><cell>0.98±0.003</cell></row><row><cell>Member 20 digits</cell><cell>0.96</cell><cell>0.97±0.002</cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>This work was supported by UK Research and Innovation [grant number EP/S023356/1], in the UKRI Centre for Doctoral Training in Safe and Trusted Artificial Intelligence (www. safeandtrustedai.org).</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Neurosymbolic ai: the 3rd wave</title>
		<author>
			<persName><forename type="first">A</forename><surname>Garcez</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Lamb</surname></persName>
		</author>
		<idno type="DOI">10.1007/s10462-023-10448-w</idno>
	</analytic>
	<monogr>
		<title level="j">Artificial Intelligence Review</title>
		<imprint>
			<biblScope unit="page" from="1" to="20" />
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">K</forename><surname>Sarker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Zhou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Eberhart</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Hitzler</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2105.05330</idno>
		<title level="m">Neuro-symbolic artificial intelligence: Current trends</title>
				<imprint>
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<title level="m" type="main">Thinking, fast and slow</title>
		<author>
			<persName><forename type="first">D</forename><surname>Kahneman</surname></persName>
		</author>
		<ptr target="https://www.amazon.de/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374275637/ref=wl_it_dp_o_pdT1_nS_nC?ie=UTF8&amp;colid=151193SNGKJT9&amp;coliid=I3OCESLZCVDFL7" />
		<imprint>
			<date type="published" when="2011">2011</date>
			<publisher>Straus and Giroux</publisher>
			<pubPlace>New York</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Embed2Sym -Scalable Neuro-Symbolic Reasoning via Clustered Embeddings</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Aspis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Broda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Lobo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Russo</surname></persName>
		</author>
		<idno type="DOI">10.24963/kr.2022/44</idno>
		<ptr target="https://doi.org/10.24963/kr.2022/44.doi:10.24963/kr.2022/44" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 19th International Conference on Principles of Knowledge Representation and Reasoning</title>
				<meeting>the 19th International Conference on Principles of Knowledge Representation and Reasoning</meeting>
		<imprint>
			<date type="published" when="2022">2022</date>
			<biblScope unit="page" from="421" to="431" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Human-in-the-loop machine learning: a state of the art</title>
		<author>
			<persName><forename type="first">E</forename><surname>Mosqueira-Rey</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Hernández-Pereira</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Alonso-Ríos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Bobes-Bascarán</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Fernández-Leal</surname></persName>
		</author>
		<idno type="DOI">10.1007/s10462-022-10246-w</idno>
	</analytic>
	<monogr>
		<title level="j">Artificial Intelligence Review</title>
		<imprint>
			<biblScope unit="volume">56</biblScope>
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Neural-symbolic integration: A compositional perspective</title>
		<author>
			<persName><forename type="first">E</forename><surname>Tsamoura</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Hospedales</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Michael</surname></persName>
		</author>
		<idno type="DOI">10.1609/aaai.v35i6.16639</idno>
		<ptr target="https://ojs.aaai.org/index.php/AAAI/article/view/16639.doi:10.1609/aaai.v35i6.16639" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the AAAI Conference on Artificial Intelligence</title>
				<meeting>the AAAI Conference on Artificial Intelligence</meeting>
		<imprint>
			<date type="published" when="2021">2021</date>
			<biblScope unit="volume">35</biblScope>
			<biblScope unit="page" from="5051" to="5060" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<author>
			<persName><forename type="first">D</forename><surname>Cunnington</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Law</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Lobo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Russo</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2205.12735</idno>
		<title level="m">Neuro-symbolic learning of answer set programs from raw data</title>
				<imprint>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
