Educational Technology - Final Paper Kevin Menear kmenear6@gatech.edu ABSTRACT— Presented in this paper is the beginning work on a personalized, adaptive learning (PAL) system: edAstra. This work primarily consists of the development and deployment of a knowledge graph which serves as the core of the system. The knowledge graph was developed autonomously with data scraped from Wikipedia with Scrapy. Nodes of the knowledge graph are knowledge objects, and edges are the relationships between them. Each edge is weighted based on the strength of the relationship between the two connected knowledge objects. A subset of the knowledge graph is hosted in a Neo4j graph database. This database is queriable by a Node.js app hosted with Heroku. The result of each query is visualized as a 3D knowledge graph with Plotly, with the node coordinates generated using three-dimensional fastText embedding vectors. 1 INTRODUCTION Personalized, adaptive learning (PAL) is available at a scale previously incomprehensible. Generalized education was formed, in part, as an effort to provide learning to the masses. Privatized, individualized education was a luxury of the wealthy. Private tutors are expensive. To educate the masses, this cost must be amortized across larger groups of children. With this amortization came a diminution of individualized instruction. Most general education systems take a pragmatic approach and teach learners what is generally most valuable to most people. Until recently, technologies have not existed to efficiently provide personalization in education. With the advent of artificial intelligence, this has now become possible. The role of a good teacher is to provide both good resources and sound guidance to a learner. Sometimes, the teachers themselves are the resource. More often, resources come in the form of published works. The teacher guides learners through resources on a path to a predetermined objective. Because planning and instruction time is limited, most teachers provide the same path to the same objective to all learners in a given course. Most efforts to develop strategies to 1 accommodate different learning styles suffer these same limitations. In and of themselves, these accommodations are only as helpful as they are applicable. Before applying accommodations to a learner, testing must take place to determine learning styles and preferences. This testing takes time and resources, pu ing a further strain on the capacity to provide differentiation in the classroom. To overcome these obstacles, teachers often provide differentiated instruction in a generalized manner. As an example, a teacher might incorporate visual, auditory, and kinesthetic learning activities in a lesson. Though these are beneficial, what this amounts to is not individualized instruction but merely an improvement upon generalized education. Artificial intelligence suffers none of these limitations and opens the door to personalized, adaptive learning. AI can analyze student data to determine appropriate accommodations and use past experience to predict outcomes. Modern AI agents can pore over data and make choices at a rate many orders of magnitude faster than their human counterparts. A single AI agent can interact in real-time with many human users. The fundamental limitation to AI is not the time necessary to plan and instruct, but intelligence itself. The intuition available to a teacher in the classroom is their greatest tool. This intuition is a product of not just their training and experience as a teacher but the collective experience involved in the evolution of the human mind. It is not an easy task to emulate this ability. Where AI lacks in eons of evolution, it must provide in the form of good systems, structures, and data. The expertly crafted human minds can in turn create these resources. This is the art of developing artificial intelligence. Methods range from expert systems, heavy on the use of systems and structures, to machine learning algorithms made viable by the availability of vast quantities of structured data. More recently, expert systems and machine learning algorithms have been used complimentarily to develop hybrid approaches to receive the benefits of all available resources. The knowledge graph presented here is a result of leveraging large amounts of data to develop a structure upon which an artificial intelligence system can operate. The goal is to automate the acquisition and analysis of data, the development of the structure, and the operation of the system. Human input will be needed in the development of the data acquisition and analysis tools, the refinement of the structure, and the development and deployment of the AI 2 system. The first two steps have here been proven possible while the third remains a goal for future work. For the purposes of this paper, only the first two steps will be discussed in detail, with the third step discussed at the end to elucidate the purpose of the knowledge graph. 2 RELATED WORK In this section, samples are chosen from each category of related work based on traction in the education and technology communities. The priority of their inclusion in this section is in order of relevance to the developed project. 2.1 ALEKS ALEKS (Assessment and Learning in Knowledge Spaces) is a learning platform based on knowledge space theory (KST). In short, KST is the conceptualization of learning as the exploration of a knowledge space (a set of knowledge). Each possible state of a learner is a node in the knowledge space graph, and the learner progresses through the knowledge space as they gain understanding of new pieces of knowledge. ALEKS applies KST to individual courses such as 6th-grade math and College Algebra. As a learner progresses through the knowledge space, ALEKS determines what the learner already knows, doesn’t know, and is capable of learning next. Based on this knowledge, ALEKS recommends certain topics to the learner. As the learner performs tasks, ALEKS analyzes the results and makes adjustments to its recommendations. 2.2 Knowledge Graphs and Ontologies An ontology is a generalized semantic data model. A knowledge graph is the result of applying an ontology to a dataset. For instance, an ontology of animals may include the relationship “Carnivores eat animals”. After applying such an ontology to a dataset, the resulting knowledge graph may include items such as “Lions eat wildebeests”, “Hawks eat mice”, and “Sharks eat fish”. There are many examples of ontologies and knowledge graphs. ConceptNet, Google’s Knowledge Graph, DBPedia, Wikidata, and Yago are examples of knowledge graphs. SUMO is an example of a single ontology while NCBO BioPortal and OBO Foundry are examples of ontology repositories. The Cyc project, started in 1984, is an example of both an ontology and a knowledge graph. 3 2.3 OER Commons and OER Metafinder OER (Open Educational Resources) Commons is a repository for open educational resources. These resources are largely governed by Creative Commons licenses. The resources, numbering over sixty thousand, are freely available and filterable by subject area, education standards, education level, and more. The OER Commons is one of many offsprings of the Open Education movement, which aims at increasing access to learning and training. The Mason OER Metafinder (MOM) is a search engine for OERs across the web. 2.4 Adaptive Learning Systems An adaptive learning system modifies the learning experience based on user data. This provides a personalized learning experience to help the learner gain and retain knowledge and fill in knowledge gaps. Adaptive learning platforms abound on the web. IXL and iReady are popular in public school systems. ReadTheory is a free platform for reading comprehension. DreamBox is a popular paid platform for mathematics. 2.5 MOOCs MOOC (Massive Open Online Course) platforms such as Udemy, Udacity, EdX, and Coursera provide learning resources at a large scale over the internet. The level of human input ranges from none at all, as is often the case in the most massive courses, to more traditional teacher-led environments. Most MOOCs require limited human input, which allows for scalability. Most MOOCs are always-available standalone courses, though there has been a recent pivot to providing support for degree programs at traditional institutions. 2.6 Ongoing research Academic tools in this field are abundant. There are tools for developing knowledge-graph-based adaptive learning systems, for automatic development of a knowledge graph, and for determining optimal learning paths. Though each academic tool contributes to the field, most are not comprehensive in scope. Some notable exceptions are ALEKS (mentioned above), MIT OpenCourseWare, and the CMU Open Learning Initiative. These last two examples are the most notable predecessors to MOOCs. 4 3 PRESENTATION OF DEVELOPED WORK 3.1 High-level description Data was scraped from Wikipedia (Wikimedia Foundation 2022) with Scrapy (Scrapy 2022). This data was then analyzed to determine nodes, edges, and edge-weights for the knowledge graph. Three-dimensional vector representations of the nodes were generated with fastText embeddings (Joulin et al. 2016). A subset of these nodes and edges were then added to a Neo4j graph database (Neo4j 2022a). A Node.js app was developed to query the database. The app is hosted with Heroku (Heroku 2022). The results of the query are visualized as a 3D knowledge graph with Plotly (Plotly 2022) on the front end of the Node.js app. Each of these steps is discussed in detail in this section. Figure 1— A high-level diagram of the system presented here. The front-end actions are shown in black with white text, while the thick arrows represent the flow of data in the system. 3.2 Scraping data with Scrapy The knowledge graph is meant to cover the range of all human knowledge. The structured data source best for this broad range is Wikipedia, which contains nearly 6.5 million articles consisting of nearly 4 billion words in the English language, the equivalent of more than 3,000 volumes of Encyclopædia Britannica (see Figure 2 below). 5 Figure 2— A visual representation of the size of the Wikipedia corpus. Source: Wikimedia User FireFlyingly. Wikipedia. This file is licensed under the Creative Commons A ribution-Share Alike 4.0 International license. Two aspects of the Wikipedia data structure are convenient for this work. First, Wikipedia pages are highly interconnected with hyperlinks. Second, the vast majority of the Wikipedia corpus is organized hierarchically within an Outline format, with the Contents/Outlines page at the highest level. On that page are links to all other outlines with varying levels of specificity (e.g. Science, Biology, Botany). Each of these outlines contains links to further outlines as well as individual articles. Nearly all of the English language Wikipedia can be accessed by beginning at the Contents/Outlines page and progressively following links. The Scrapy Python package was used to scrape Wikipedia data (Scrapy 2022). With this tool, an initial URL is provided to a web-scraping “spider”. The spider crawls the page pointed to by this initial URL according to the instructions provided by the developer. The spider can optionally follow any links it finds while crawling the page and then crawl the pages pointed to by those links according to the same or a different set of instructions. The spider autonomously crawls the web by progressively following links until the search has been exhausted or another stopping criterion is met. The following specifications were set for the spider used to crawl Wikipedia: Initial URL: h ps://en.wikipedia.org/wiki/ Outline_of_academic_disciplines This subset of Wikipedia was chosen to give results specifically focused on academia, which is convenient for this proof-of-concept task. Extracted Data: Link and page title Each time the spider encounters a link, it records the title of the link (the title of the hyperlinked page) and the title of the page it is currently scraping. This 6 information is necessary for the extraction of nodes and relationships, which is discussed in the next subsection. Stopping Criteria: Article page reached When an article page (as opposed to an outline page) is reached, only the introduction section of the page is scraped, and links on the page are not followed. This method was chosen to decrease the prevalence of weak relationships and limit the size of the scraped corpus. If this stopping criterion had not been implemented, it is feasible that the spider would scrape nearly all of Wikipedia, which, for purposes presented here, would provide an unnecessarily large dataset. Pages Ignored: Categories, Portals, Lists, Timelines, Files, Templates, Help, Special, Wikipedia. The first 4 page types (Categories, Portals, Lists, and Timelines) are potentially useful for this task, but their structure and contents served to generate weak relationships which make the data noisy. The remaining page types are Wikipedia administration pages and contain no relevant data. The spider was thro led to decrease the load on the Wikipedia servers. The scraping process took a li le more than 12 hours and resulted in 5,495,703 rows of data. 3.2 Extracting nodes and edges Each row of scraped data contained the title of a page and the title of a page linked to on that page. Each of these titles was considered a node. Each row of scraped data effectively described a relationship: two nodes are considered connected by a relationship if one page is linked to by another page. Duplicate nodes were discarded. Weights were calculated by counting the number of times a relationship showed up in the dataset. As an example, there are two links to weaving on the textile page and one link to textile on the weaving page, so the relationship between these two nodes has a weight of 3. The node and edge extraction process resulted in 640,032 nodes and 4,506,245 relationships with an average weight of 1.219 and a median weight of 1. Each node has ~7 relationships and ~1 relationship with a weight greater than 1, on average. The median number of relationships per node is 2. A detailed list of 7 edge weights, relationship counts, and a random sample of nodes are displayed in the tables below. Note the words relationship and edge are being used interchangeably here. Table 1— A detailed list of edge weights. The first row is the edge weight and the second row is the number of relationships with that weight. Weight 1 2 3 4 5 6 7 8 9 10 >10 Count 3,785,998 561,249 103,801 32,706 11,648 4,937 2,198 1,277 974 513 944 Table 2— A detailed list of relationship counts. The first row is the number of relationships and the second row is the number of nodes with that number of relationships. # Rels 1 2 3 4 5 6 Count 200,040 53,135 26,641 17,058 12,985 11,371 # Rels 7 8 9 10 (10,30] > 30 Count 9,250 7,822 6,530 5,879 50,250 31,716 Table 3— A random sample of 30 nodes from the dataset. Note the nodes have been forma ed to all lowercase le ers. law enforcement in montenegro antipope alexander v bhimfedi pope zephyrinus hello world program farooqi dynasty bengal fox population history of china united andhra pradesh education in venezuela markarian 501 jamalul kiram i national anthem of cuba suriname air force bossou net generation salvador jorge blanco dione (titaness) growth investing 2004 california proposition 66 lily ross taylor somalia governorate powassan capital market line angel stadium klaus voormann g-protein coupled receptor bengal fox education in venezuela national anthem of cuba 8 3.3 Generating node vector representations with fastText Knowledge graphs are most often visually represented with 2D diagrams. The locations of the nodes in the diagrams are usually calculated by a “best-fit” algorithm, with each system plo ing the graph according to its own specifications. The edges between nodes are usually represented by lines between the nodes, with or without arrows indicating the direction of the relationship (e.g. Tom Hanks –[ACTED_IN] → Forrest Gump). Beyond this directionality, there is no inherent meaning displayed in the representation of the knowledge graph. To overcome this lack of visual information, vector representations of the nodes were generated with a fastText vector embedding (fastText 2022). Vector embeddings encode semantics into word representations. In short, an unsupervised machine learning model is given a large amount of text data with the goal of learning the meanings of the words present in the corpus. The output of the model is an n -dimensional vector. In the case of the fastText vector embedding used here, the model was trained on Wikipedia and output 300-dimension word vectors. These 300D vectors were converted to 3D with a fastText dimensional-reduction algorithm. These 3D vectors were then stored in the database to be used in plo ing the knowledge graph. 3.4 Creating the knowledge graph database with Neo4j Neo4j is a leading graph database provider (Neo4j 2022a). The choice of using a graph database provider was determined by the data. For knowledge graph data, a native graph database is both easier to use and more efficient than a relational database. With the nodes and edges extracted, the following steps were necessary to migrate the data to a Neo4j database: 1. Reformat the data into CSV The data was originally wri en in JSON. Though Neo4j does offer support for JSON data, the support is be er for CSV data. This includes a convenient web interface data import tool. 2. Set up a free-tier Aura database Aura is the Neo4j cloud service (Neo4j 2022b). With the free tier, up to 50,000 nodes and 175,000 relationships can be added to a database. 9 Though this is significantly smaller than the dataset, this is large enough to prove the concept. Using the cloud service bypasses the need to set up a dedicated local server for the database. 3. Migrate the data to the database This step was made simple by the Neo4j web interface import tool. 3.5 Developing the Node.js app to query the database Node.js was chosen to develop the web application because there is native support for Node.js with Neo4j, Plotly, and Heroku. The purpose of the web app is to: 1. Query the Neo4j database according to user input Neo4j uses its own language (Cypher) for querying a database (Neo4j 2022c). To query the database according to user input, a front-end input field and submit bu on were implemented. Clicking the submit bu on sends the user input to a specific route which takes the input and generates the Cypher query. The query is sent to the database and the results are returned. The app in its current form gets a node name from the user and queries the database for all nodes connected to the input node with edge weights greater than 3. 2. Return the results to the requesting service Once the query results are returned from the database, they are sent as a response to the route used when requesting the query. 3. Plot the results With the database results sent to the appropriate route, they can be plo ed. The plo ing process is discussed in detail below. These steps were implemented locally and then pushed to a Heroku repository (Heroku 2022). Heroku is a leading Platform-as-a-Service (PaaS) and provides a free tier with unlimited deployment time for a single web application. After se ing up a free-tier account, the app was deployed to the cloud with the Heroku command line interface. This app can be found at h ps://edastra.herokuapp.com/ or at h p://www.edastra.org/. The routes used for querying the database begin with /read. As an example, www.edastra.org/read/science will query the 10 database for the science node. Visiting that link directly will display the raw data used for plo ing. A screenshot of the front end of the Node.js app is shown in Figure 3 below. Figure 3— A screenshot of the front end of the Node.js app. Note the input field and the Get Knowledge Graph submit bu on. 3.6 Plo ing the query results with Plotly Plotly is an open-source data visualization application (Plotly 2022). Plotly offers native support for multiple programming languages. The Javascript implementation was chosen for coherence with the Node.js app. A method within the Node.js app was developed to get the results from a database query and use this data to create data traces to plot the nodes and the edges between them. The 3D fastText node vector representations were used as 3D coordinates for each node. The knowledge graph is plo ed as a 3D sca erplot with edges represented by lines connecting the nodes and edge weight represented by the width of these lines. To the author’s knowledge, this is the first knowledge graph visual representation of this kind. Screenshots of the plots for physics , drama , religion , and space exploration are displayed in Figure 4 below. The Plotly user interface allows for zoom, pan, orbital rotation, and turntable rotation of the resulting plots. 11 Figure 4— Screenshots of the visual representations of the query results with Plotly. Moving clockwise from the top-left image, the queries are for physics , drama , space exploration , and religion 4 FUTURE WORK The work presented here was developed to serve as a proof-of-concept of the knowledge graph development and deployment process. This knowledge graph will serve as the core of the edAstra PAL system. The knowledge graph will be traversed by learners with the guidance of an artificial intelligence. The system will adapt the learning path to the preferences, characteristics, and previous choices of each learner. Each node will host a set of relevant learning objects. The entire system will be open source and the knowledge graph will be editable by the community via a wiki interface at wikilearn.network. To be er understand the spirit and mission of edAstra, please watch this video. 12 5 REFERENCES 1. ALEKS. McGraw Hill. (n.d.). Retrieved February 28, 2022, from h ps://www.aleks.com/ 2. ConceptNet. (n.d.). Retrieved February 28, 2022, from h ps://conceptnet.io/ 3. Cyc. Machine reasoning ai (n.d.). Retrieved February 28, 2022, from h ps://cyc.com/ 4. DBPedia. (2021, February 17). Home . DBpedia Association. Retrieved February 28, 2022, from h ps://dbpedia.org/ 5. DreamBox Learning - Online Math Learning for Students, K–8. (n.d.). Retrieved February 28, 2022, from h ps://www.dreambox.com/ 6. fastText. (May 1, 2022). Word vectors for 157 languages · fas ext . Retrieved May 1, 2022, from h ps://fas ext.cc/docs/en/crawl-vectors.html 7. Google. (n.d.). Google Knowledge Graph Search API | google developers. Retrieved February 28, 2022, from h ps://developers.google.com/knowledge-graph 8. Heroku . Cloud Application Platform. (May 1, 2022). Retrieved May 1, 2022, from h ps://www.heroku.com/ 9. iReady assessment suite (n.d.). Retrieved February 28, 2022, from h ps://www.curriculumassociates.com/programs/i-ready-assessment 10. IXL: Math, Language Arts, science, Social Studies, and Spanish . IXL Learning. (n.d.). Retrieved February 28, 2022, from h ps://www.ixl.com/ 11. Joulin, A., Grave, E., Bojanowski, P., & Mikolov, T. (2016). Bag of tricks for efficient text classification. arXiv preprint arXiv:1607.01759. 12. Mason OER Metafinder. (n.d.). Retrieved February 28, 2022, from h ps://oer.deepwebaccess.com/oer/desktop/en/search.html 13. NCBO Bioportal . Welcome to the NCBO BioPortal | NCBO BioPortal. (n.d.). Retrieved February 28, 2022, from h ps://bioportal.bioontology.org/ 14. Neo4j Graph Data Platform. (2022, April 12). The leader in Graph databases Retrieved May 1, 2022, from h ps://neo4j.com/ 15. Neo4j Graph Data Platform. (2022, April 12). Neo4j aura - fully managed cloud solution Retrieved May 1, 2022, from h ps://neo4j.com/cloud/platform/ aura-graph-database/ 13 16. Neo4j Graph Data Platform. (May 1, 2022). Cypher query language - developer guides Retrieved May 1, 2022, from h ps://neo4j.com/developer/cypher/ 17. OBO Foundry . (n.d.). Sitewide ATOM. Retrieved February 28, 2022, from h ps://obofoundry.org/ 18. OER Commons. (n.d.). Explore. create. collaborate. Retrieved February 28, 2022, from h ps://www.oercommons.org/ 19. Plotly. (May 1, 2022). The front end for ML and data science models . Retrieved May 1, 2022, from h ps://plotly.com/ 20. ReadTheory. (2021, June 14). Reading comprehension exercises for all grades & Levels . Retrieved February 28, 2022, from h ps://readtheory.org/ 21. Scrapy. (May 1, 2022). A fast and powerful scraping and web crawling framework . Retrieved May 1, 2022, from h ps://scrapy.org/ 22. Suggested upper merged ontology (SUMO) - ontology portal . The Suggested Upper Merged Ontology (SUMO) - Ontology Portal. (n.d.). Retrieved February 28, 2022, from h ps://www.ontologyportal.org/ 23. Wikidata. (n.d.). Retrieved February 28, 2022, from h ps://www.wikidata.org/wiki/Wikidata:Main_Page 24. Wikimedia Foundation. (2022, April 28). Wikipedia. Retrieved May 1, 2022, from h ps://en.wikipedia.org/wiki/Wikipedia 25. Yago: A high-quality knowledge base . Yago Project - Select Knowledge. (n.d.). Retrieved February 28, 2022, from h ps://yago-knowledge.org/ 14