# A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning
## 3 Architecture
### Never-Ending Learning  
Never-ending learning is a learning approach that combines multiple tasks and constraints coupled together to acquire more knowledge and improve future learning [21]. A knowledge base in a never-ending learning system is updated constantly as more data are acquired and self-reflection is performed, which prevents the system from being stuck in a learning plateau. A study case for this proposal is never-ending language learning (NELL), a system designed to learn the web by starting from an initial ontology with hundreds of categories and relations between them. NELL has been running continually forever in a semi-supervised manner, and its knowledge base has millions of beliefs, showing that an agent could improve its reading over time. This behavior of continuous learning over time is what is desired in a conversational system, which could learn to answer new questions without explicit human intervention. In this work, our interest is a specific domain, and our knowledge base should only include information relevant to that domain. Therefore, our approach was to apply the concepts of a never-ending learning system to a limited and specific domain. We aim to reduce the learning problem so that only domain knowledge is gained, but continued learning is still in effect, which is accomplished by using a limited quantity of in-domain input texts given to the agent. Architecturally, the solution is very similar to NELL; the main difference lies in which learning method modules were selected so that the learning tasks and constraints can adapt to the domain and are feasible on a smaller scale. The never-ending learning architecture used is shown in Figure 3. The initial ontology was created manually by using the information available in one of the input documents, which was also used for the knowledge producer models' initial training. Another difference is the amount of data: while NELL was designed for big data, it may have some difficulties in learning specific concepts; in addition to being a defined domain, the dataset of the present work is also restricted, with low redundancy (small data [22]). The modules in our architecture are the following:  
* Instance Popular: A neural network for named entity recognition that was trained to identify classes from the current ontology in the text. These entities will then be candidate instances of those classes to be added;
* Property Popular: A set of simple heuristic rules to identify common ontology properties such as label and description, as well as other custom properties based on the data properties available in the ontology; for example, matching dates in the text with ontology instances that can have a date property;
* Category Popular: Another neural network for named entity recognition, but this time, it is used to search for other entity types that are not currently in the ontology [16];
* OpenNRE: An open-source neural network for relation extraction [23], which is used to find new relations between instances of the current ontology;
* Relation Popular: A random forest classifier [24] trained to find new relations between instances of the current ontology;
* Knowledge Integrator: This is the same module as in NELL; it accesses confidence in new beliefs so as to only integrate high-confidence beliefs and perform consistency checks, for example, if the subject and object of relations are of the correct type. With these learning tasks, two coupling types could be observed, which is an important factor in never-ending learning systems when avoiding concept-drift [25]. The first is between those modules with different goals, such as the instance popular and the relation popular. In one step, these modules can produce some candidate beliefs that can be inserted into the ontology. Then, in the next step, when passing by the same input data, the relation popular was able to find new relations between instances that were just added to the previous step, showing the effect from one learning task to another.