Enhancing Personalized Educational Content Recommendation through Cosine Similarity-Based Knowledge Graphs and Contextual Signals

: The extensive pool of content within educational software platforms can often overwhelm learners, leaving them uncertain about what materials to engage with. In this context, recommender systems oﬀer signiﬁcant support by customizing the content delivere d to learners, alleviating the confusion and enhancing the learning experience. To this end, this paper presents a novel approach for recommending adequate educational content to learners via the use of knowledge graphs. In our approach, the knowledge graph encompasses learners, educational entities, and relationships among them, creating an interconnected framework that drives personalized e -learning content recommendations. Moreover, the presented knowledge graph has been enriched with contextual signals referring to various learners’ characteristics, such as prior knowledge level, learning style, and current learning goals . To reﬁne the recommendation process, the cosine similarity technique was employed to quantify the likeness between a learner’s prefe rences and the attributes of educational entities within the knowledge graph. The above methodology was incorporated in an intelligent tutoring system for learning the programming language Java to recommend content to learners. The software was evaluated with highly promising results.


Introduction
The rapid proliferation of data has been greatly facilitated by the swift advancement of the Internet.Consequently, users often find themselves in a daunting environment where the abundance of choices makes selecting relevant information challenging.This dilemma arises from the overabundance of available data.To mitigate this issue and aid users in making optimal selections, recommender systems have emerged as a solution, offering tailored suggestions that align with specific user preferences [1].The field of recommender systems extends across diverse domains, including e-commerce platforms, elearning systems, online movie platforms, and music streaming service providers.
In the context of e-learning, recommender systems have been employed to support learners during the educational process [2].In these systems, recommendations largely hinge on both the content of the learning material and user behaviors observed during interactions with online learning platforms.For instance, e-learning recommender systems can provide personalized recommendations related to students' learning styles, resources, activities, courses, and learning pathways [3][4][5].Often, content and types of learning activities may be an obstacle for learners when selecting them.Thus, many e-learning platforms assign specific learning activities to students.However, recommender systems step in by suggesting tailored activities, thus ensuring a personalized approach that maintains the educational rigor of the learning process.
Researchers predominantly rely on collaborative filtering, content-based filtering, or hybrid approaches for developing recommender systems [6].Collaborative filtering operates on the assumption that users who have previously agreed on preferences are likely to continue doing so.Recommendations are formulated based on data obtained from rating profiles of various users or items.This method identifies similar users or objects based on historical ratings, thus generating suggestions.Content-based filtering, on the other hand, builds recommendations by focusing on item descriptions and user profiles.This approach is most effective when item information, rather than user information, is accessible.These algorithms view recommendations as user-specific classification problems, learning a user's preferences based on item attributes.The combination of these techniques yields hybrid recommender systems that leverage the strengths of both approaches and minimizes their limitations.
Recent interest has turned towards integrating knowledge graphs (KGs) as supplementary information in recommender systems [7].KGs represent intricate networks where nodes symbolize entities and relationships denote connections between these entities.KGs offer a deeper comprehension of item relationships and user preferences, enhancing recommendation quality and interpretability.Knowledge graph-based recommender systems are categorized as embedding-based methods, path-based methods, or unified methods [6].Embedding-based methods directly enhance item or user representations with KG data.Before utilizing KG data, knowledge graph embedding techniques encode the KG into compact embeddings.Path-based methods create a user-item graph, leveraging entity connectivity patterns to provide recommendations.These methods exploit connection similarity among users and objects to improve suggestions.Unified methods incorporate both semantic entity-relation representations and connectivity data, enhancing recommendation quality.The unified approach is rooted in embedding propagation theory, enhancing entity representation based on KG connectivity structure.
In view of the above, this paper presents a novel approach for enhancing personalized educational content recommendation by using a knowledge graph.The knowledge graph includes learners, educational entities, and relationships, resulting in an interconnected architecture that generates personalized e-learning material recommendations.Furthermore, it has been enhanced with contextual signals which correspond to various features and information that provide context and insights about the characteristics of learners, such as prior knowledge level, learning style, and current learning goal.To refine the recommendation process, the integration of cosine similarity is explored.Cosine similarity measures the alignment between learners' attributes and the features of educational entities, leading to refined recommendations.To recommend appropriate content to learners, the aforementioned approach was implemented in an intelligent tutoring system for learning the programming language Java.The novelty of the presented methodology arises from the fact that the knowledge graph involves multiple learner characteristics that collectively define the learner's profile and learning preferences.This multi-dimensional view enhances the granularity of recommendations.Also, the inclusion of attributes such as learning style preference and current learning goal adds a layer of contextual information, making the recommendations more relevant.

Related Work
This section presents the review of the literature on recommender systems as well as the utilization of knowledge graphs for generating recommendations.
Collaborative filtering, content-based filtering, machine learning, and hybrid methodologies represent the primary algorithmic techniques, commonly employed in the aforementioned research papers.According to a study in 2019 [23], the primary data source for most recommender systems (overall rating) is single-criterion ratings.Another study from 2020 [24] underscores the limitations of collaborative filtering, a widely used approach in constructing recommender systems, including challenges such as the cold-start problem, where insufficient data impedes making inferences about individuals or items.
The area of recommender systems within e-learning environments remains highly active.In such systems, two pivotal factors come into play: (1) the learners, who are the recipients of recommendations, possess nuanced attributes that are sometimes complex to define, such as their knowledge level; and (2) the recommendations made to learners can profoundly influence knowledge acquisition, encompassing elements such as learning activities, educational resources, and assessment components.
Given the above observations, it is evident that further investigation and advancements are required in the field of recommender systems development.
Delving into knowledge graph-based recommender systems, the authors of [42] introduced SemRec, a model that accounts for users' favored and disliked historical items.This architecture employs a weighted meta-path to incorporate attribute values into links, facilitating more precise depiction of item relationships and user similarities.This framework enables the portrayal of positive and negative preference patterns, thereby disseminating the true user preference.MCRec, introduced in [43], generates explicit meta-path representations to capture the interaction context of user-item pairs.Alternatively, a recurrent knowledge graph embedding technique was proposed in [44] to automatically uncover the route link between users and items without relying on user-provided meta-paths.The authors in [45] designed a method for sequential recommendation that capitalizes on users' evolving interests.In [46], a strategy was devised to arrange a sequence of pivotal academic papers, immensely valuable for aiding researchers in comprehending the evolution of specific topics.This approach employs both content and network structure to acquire document representations, subsequently employed to evaluate paper similarity.Finally, in [47], the authors present a path-based approach for recommender systems using knowledge graphs in an e-learning environment.This method emphasizes the sequence and progression of learning activities while the presented approach in this paper considers a broader set of interconnected elements and attributes to personalize recommendations on educational content.
When the pertinent literature in the domain of knowledge graph-based recommender systems tailored to the field of e-learning is analyzed, it is evident that substantial opportunities exist for advancements in this direction.This research is motivated by the potential of knowledge graphs to provide a fertile ground for sophisticated recommendations mechanisms customized for e-learning.

Knowledge Graph Presentation
The knowledge graph, described in this paper, represents a structured and interconnected framework that captures various aspects of e-learning, leading to personalized content recommendation.This graph serves as a visual representation of relationships between different entities, attributes, and learners within an educational context.Each element in the graph contributes significantly to improving the recommendation process and adapting it to the needs of individual learners.The explanation of the key components of the knowledge graph (Figure 1) are provided as follows: A Learners (Nodes): Learners are distinct entities within the knowledge graph, each with their own set of attributes and preferences.These learners are represented as nodes in the graph.Learner characteristics, referred to as contextual signals, provide crucial insights into their learning context:

•
Prior Knowledge Level (PKL): This attribute reflects the learner's proficiency in the programming language Java.It could be labeled as "Beginner", "Intermediate", or "Advanced", depending on their familiarity with the content.This classification aligns with established educational norms and ensures a balanced distribution of learners across distinct proficiency levels [48].

•
Learning Style Preference (LSP): This attribute describes how a learner prefers to gain knowledge.It is based on the VARK model and could be "Visual", "Auditory", "Reading"-"Writing", or "Kinesthetic" [49].The VARK model was chosen because its categories can be expressed as knowledge graph properties, allowing for integration with other contextual attributes and relationships.

•
Current Learning Goal (CLG): This attribute specifies the specific goal a learner aims to achieve.In our case, goals may include "Master Java Programming", "Improve Problem-Solving Skills", etc. and are established for the course under the guidance of its university professors.
In our methodology, we collected these signals via initial surveys and actual platform usage.Rigorous validation was conducted by comparing the signals against observed user behavior, bolstering their reliability.To accommodate changes in preferences and evolving needs over time, our system incorporates a feedback mechanism through which learners can declare any change in their preferences.

B Educational Entities (Nodes):
Educational entities include various elements that are important to the learning process.Each of these entities is represented in the graph as a node:

•
Courses: Courses represent broader subject areas and are nodes that encapsulate a collection of linked topics and learning resources.

•
Topics: Within a course, topics are finer-grained concepts.They represent individual units of study and are linked with courses.

•
Learning Resources: The learning resources are nodes, containing different materials such as articles, videos, interactive simulations, and assessments.They are linked to specific topics, demonstrating their relevance.
An example of a course in Java may be "Java Data Structures and Algorithms".The topics that it can include may be:

C Relationships (Edges):
The relationships (edges) connecting the nodes define how the entities are linked and influence the content recommendation process: The edge provides a link between a learning resource and a learner's current learning goal.This link guarantees that the recommended resources are relevant to the learner's unique goal.

D Contextual Attributes:
The attributes associated with learners play a pivotal role in shaping the content recommendation process:

•
Leveraging Prior Knowledge Level: The complexity of recommended information is influenced by the learner's previous knowledge level.For example, an "Intermediate" learner, for example, may be given more advanced resources.

•
Adapting to Learning Style Preference: Recommendations can be adjusted to the learner's learning style.For instance, visual learners may be given more video content, and auditory learners may be given podcasts.

•
Aligning with Current Learning Goal: The system customizes recommendations to assist learners in achieving their goals.For example, a learner with an objective of "Develop Java Programming Skills" would obtain resources that support that goal.In this system, learners provide information about their knowledge level, learning style preferences, and current learning goals.These attributes are used to assign values to their vectors.Additionally, attributes of educational resources are assigned values based on their relevance to learners' needs.This way, the vectors capture learners' preferences and help in providing personalized recommendations.

Personalized Educational Recommendation
The recommendation process begins with the use of the nodes and edges of the knowledge graph, which capture the dense network of connections between various educational aspects.The recommendation method uses the structure of the knowledge graph to identify educational materials that are closely related to the interests and aims of the learners.The system can intelligently forecast and recommend information that enables a continuous progression of knowledge by recognizing nodes.For instance, consider "Learner A", an Intermediate learner with a Visual Learner preference.The graph can identify "Topic Y", which matches Learner A's proficiency and learning goal, a critical step enabled by relationships between learners and educational entities.
The intricate relationships embedded inside the graph act as personalization facilitators.The interaction between topics and learning resources, as well as the relationship between learners and their courses, all contribute to the smooth orchestration of recommendations.Throughout the interaction of Learner A with the system, the graph's insights are constantly refined.Based on Learner A's interactions, the system can adapt the recommendations in a dynamic way.
To enhance the recommendation precision, we employ cosine similarity in the knowledge graph-based recommender system with the following steps: 1. Representation of learners and educational entities (courses, topics, learning resources) as vectors based on their attributes.The dimension of each vector matches with a contextual attribute (e.g., PKL, LSP, CLG). 2. Calculation of the cosine similarity between a learner's vector (numerical representation of the learner's attributes, such as PKL, LSP, and CLG) and an educational entity's vector (numerical representation of the educational entity's characteristics and content) to determine how similar a learner's vector is to an educational entity's vector, use the following formula: Cosine similarity = learner vector ⋅ entity vector �|learner vector|� ⋅ �|entity vector|� 3. Ranking of the educational entities based on their cosine similarity scores in descending order.4. Presentation of the top-ranked educational entities as recommendations to the learner.
Using cosine similarity within the context of the knowledge graph enhances the sophistication of the recommendation system by considering the multidimensional relationships and preferences of learners and educational entities.It allows for more nuanced and accurate recommendations that go beyond simplistic comparisons.
Although cosine similarity is a significant technique, its effectiveness can be influenced by the choice of attributes and features used in the calculation.While cosine similarity captures similarities in vector spaces, it may not fully account for nuanced relationships between learners and educational entities.To this end, our approach combines cosine similarity-based knowledge graphs with contextual signals to ensure a multi-dimensional assessment of learners' characteristics and preferences.As such, the contextual signals add a layer of personalization beyond the scope of cosine similarity alone.

Example of Operation
In this example, we will consider the knowledge graph for the Java programming course.The graph will illustrate how topics, resources, and learning styles can be interconnected to provide personalized recommendations for learners.

B. Example Scenario:
Emily is a postgraduate student enrolled in the Java programming course.Emily provided the input for her vectors within the system, reflecting her prior knowledge level, learning style preferences, and current learning goal.She is identified as a visual learner and has an intermediate proficiency level in Java (Intermediate).As follows, we will observe how the knowledge graph, along with cosine similarities, can provide personalized recommendations for her: 1 Contextual Attributes and Vector Representation: b.If Emily engages more with "Inheritance" resources, the graph continues to offer advanced topics like "Polymorphism" and "Exception Handling" with tailored content and challenges.

Evaluation
The assessment stage of software holds importance in gauging its effectiveness and user acceptance.In our scenario, the evaluation period spanned an entire academic semester.Students engaged with the e-learning software within the framework of their obligatory postgraduate course focused on object-oriented programming using the Java language.

Sample
The participants involved in the study are currently pursuing their postgraduate studies (a conversion course in informatics and applications), focusing on informatics and computer engineering at a public university situated in the capital city of the country (as outlined in Table 1).The experiment involved a total of 100 students, who were evenly divided into two groups by the evaluators and university professors.The first group, referred to as Group A, utilized the software with the incorporated knowledge graph-based recommender system.The second group, known as Group B, used an alternative version of the system with identical subject matter and interface.The distinction between the two versions lay in the method of providing recommendations for educational content.Group B solely relied on contextual signals to guide the recommendations.The system adopted by Group B, serving as the conventional version in our study, gathered a list of learner attributes to tailor its personalized recommendations.Specifically, it assessed the learner's prior knowledge level.Furthermore, it used the learner's learning style preferences.Moreover, it took into consideration the learner's current learning goal.Once these learner attributes were gathered, the system employed a set of predefined metrics to evaluate them.It assigned weights to each attribute based on perceived significance.Let us consider a learner with a strong background in Java programming, a preference for visual learning materials, and a specific goal of excelling in Java programming skills.In this scenario, the educational content recommendation system might apply rules that assign a higher weight to the learner's prior knowledge attribute, recognizing their expertise in Java.Additionally, it would consider the learner's preference for visual aids, giving it due importance.Furthermore, to align with the learner's specific goal of excelling in Java programming, the system would prioritize recommending content directly related to Java programming, such as video tutorials, interactive coding exercises, and Java programming materials.The rules, for this example, are as follows:

•
If the learner's prior knowledge level in Java exceeds a threshold value (e.g., prior-KnowledgeLevel > 7), assign a higher weight (e.g., priorKnowledgeWeight = 0.8) to the prior knowledge attribute.This rule recognizes and acknowledges the learner's expertise in Java programming.

•
If the learner's preferred learning style is "visual" (e.g., learningStylePreference.equals ("visual")), give weight (e.g., learningStyleWeight = 0.5) to the visual learning style preference.This rule emphasizes the importance of visual aids in the learner's educational materials.

•
If the learner's specific learning goal is "Mastering Java programming", prioritize the recommendation of content directly related to Java programming.This content may include video tutorials, interactive coding exercises, Java programming materials, and relevant resources.
The system used by Group B was selected as the most suitable choice for comparison for several key reasons: (i) The system involves the prevailing practices in the field of educational content recommendation.Many existing e-learning platforms utilize similar approaches, focusing on learner attributes such as prior knowledge, learning styles, and goals to generate personalized recommendations; (ii) by comparing our proposed approach against the system used by Group B, we ensure a realistic evaluation that aligns with the expectations and experiences of both learners and educators.This comparison provides insights into the efficacy of our novel approach within the existing educational technology landscape; (iii) by evaluating our approach against a system that solely relies on contextual signals (used by Group B), we can clarify the advantages and contributions of incorporating knowledge graph-based recommender systems enriched with cosine similarity.This comparison sheds light on how our method enhances personalized content recommendation beyond conventional approaches.The learners share a common academic year and have successfully completed preceding programming courses.

Motivation
The learners enrolled the Java programming course and wanted to attain a commendable grade.
Initially, the evaluation of the system encompasses three key dimensions: user interaction, recommender system efficiency, and its impact on learning outcomes [50,51].In light of this, a questionnaire employing a 10-point Likert scale was administered to students.This questionnaire featured two queries addressing the assessment of the first dimension, followed by three queries for gauging the second and third dimensions, respectively (as outlined in Table 2).To ascertain the questionnaire's reliability, Cronbach's alpha was applied to the sample dataset.With a calculated value of 0.93, it is evident that the scale's structure and the specific sample maintained a notably high level of internal consistency.

Aspect
No.

Questions
User experience (UX) Q.1 Rate the user interface of the software.Q.2 Rate the learning experience following your recent interaction with the software.
Recommender system effectiveness (RE) Did the educational materials align with your existing knowledge level?Q. 4 Did the educational materials align with your preferred learning style?Q. 5 Did the educational materials align with your current learning goal?
Impact on learning (IOL) Q.6 Did you observe the software aiding in enhancing your understanding of Java programming?Q. 7 Are you interested in utilizing this platform for other courses?Q.8 Would you recommend the software to your friends for their use?
Each learner provided responses to the questionnaire upon its distribution at the conclusion of the academic semester.
For a better presentation of the results, the students' responses were grouped according to the relevant aspect of the questions they concerned.Additionally, the 10-point Likert scale responses underwent conversion into three distinct classifications:
In Figure 2, the results concerning the answers of students in Groups A and B are presented.In terms of the user experience facet, the outcomes from participants in Group A revealed a notably elevated rating (70%), while those from Group B yielded a more modest 20% rating.This disparity underscores the more positive experience encountered by Group A, likely attributable to the personalized and relevant learning content recommended by the presented knowledge graph-based recommender system.Furthermore, a percentage of 88% of Group A students affirmed the efficacy of the recommender system, which stands in stark juxtaposition to the meager 36% affirmation among Group B students.This variance was expected, given that our presented recommender system incorporates our novel approach utilizing a knowledge graph-based path method.This method enables sophisticated reasoning for the provision of learning activity recommendations, setting it apart from Group B's approach, which primarily relies on contextual signals.
in terms of impact on learning, Group A registered responses at 76%, while Group B's responses were limited to 10%.This difference serves to accentuate the critical significance of our knowledge graph-based recommender system, shedding light on its profound and constructive influence on the educational process.
To further explore the impact of the recommendation system on learners, a statistical hypothesis test (t-test) was employed to compare the innovative system (used by Group A) with its conventional counterpart (Group B).This t-test was executed for questions Q3-Q5, with the results of the analysis displayed in Table 3.When the literature outlined in Section 2 is analyzed, it is evident that knowledge graph-based recommender systems have been relatively underutilized in the field of elearning.When our approach is contrasted with those previously employed in e-learning software's recommender systems, a distinctive advantage emerges.Specifically, our method integrates user attributes, educational entities, and their intricate relationships.This integration harnesses the latent potential for tailored learning content recommendations by incorporating learner attributes such as PKL, LSP, and CLG.By combining these learner characteristics, this integration has the potential to generate personalized learning content recommendations.The resulting graph structure, involving both learner attributes and educational entities, holds a broad range of personalized information, ensuring that content recommendations correspond not only to the learner's knowledge level but also to their learning style and current learning goals.This integration of learner attributes and educational entities within the graph forms a novel and impactful feature, leading to a personalized learning environment.
Finally, our approach distinguishes itself from traditional content recommendation methods, such as collaborative filtering and content-based systems, in several ways.Unlike collaborative filtering, which relies mainly on user-user interactions, our system combines knowledge graph-based recommendations and contextual signals, allowing for a more comprehensive understanding of learners' needs and preferences.Additionally, while content-based systems primarily focus on matching content attributes to user profiles, our approach takes into account the complicated relationships between learners, educational entities, and their characteristics.This rationale enables to offer tailored recommendations that go beyond simple content matching, enhancing the relevance and effectiveness of the suggested learning materials.

Conclusions
In conclusion, this study presents an innovative technique of recommending educational material to learners using knowledge graphs, while taking into consideration their prior knowledge level, their learning style as well as their current learning goal.The process of recommendation is further enhanced with the use of cosine similarity.
The above technique has been incorporated into an intelligent tutoring system for learning Java, and it was evaluated.Our findings underscore the significance of the presented technique.The personalized recommendations stemming from the synergy of knowledge graphs and contextual signals foster an intellectually enriching environment.
While our paper is centered around recommending Java programming content, our approach demonstrates potential applicability to various subjects and domains.The modularity of our system architecture enables the incorporation of domain-specific attributes and features, making it adaptable to different educational contexts.This adaptability extends the potential generalizability of our approach to diverse learning domains.
In the design of a recommender system, addressing potential algorithmic bias and ensuring diversity in content recommendations is of great importance.In view of the above, our system incorporates a balanced representation of educational resources to prevent overemphasis on certain materials.Also, we employ a hybrid approach that combines both knowledge graph-based recommendations and contextual signals, reducing the risk of creating "filter bubbles" by introducing diverse pathways for learners.
Our approach incorporates automated techniques for extracting relationships from educational resources, reducing the need for manual intervention.Additionally, we have designed our system architecture to accommodate scalability, allowing for the integration of larger educational datasets while ensuring efficient performance.
The presented approach holds practical implications that extend to diverse learning styles, offering adaptable learning experiences.Educators can gain valuable insights into students' progress, tailoring teaching strategies effectively.Its applicability spans disciplines, and collaboration with domain experts can fine-tune course-specific recommendations.
Limitations of this research include the need for consistent updates and upkeep of the knowledge graph due to the ever-changing nature of educational content and learner inclinations.Consequently, any deficiencies or inaccuracies within the graph's depiction may result in less-than-optimal recommendations.
Future research plans include the utilization of machine learning to automatically link entities mentioned in various sources to existing entities within the knowledge graph as well as to predict potential relationships between entities based on patterns and existing relationships within the graph.
Introduction to Data Structures and Algorithms, Arrays and Linked Lists in Java, Stacks and Queues Implementation, Hashing and Hash Tables, Trees and Binary Search Trees, Graphs and Graph Algorithms, Sorting Algorithms (e.g., Bubble Sort, Merge Sort), Searching Algorithms (e.g., Binary Search), Dynamic Programming and Greedy Algorithms, Advanced Data Structures (e.g., Heaps, Hash Maps) and Time and Space Complexity Analysis.The learning resources may be: Comprehensive Video Lectures on Data Structures, Interactive Code Challenges for Practicing Algorithms, Java Code Examples for Different Data Structures, Algorithm Visualizations and Demonstrations, Books and Online Resources on Algorithms in Java, Online Coding Competitions for Algorithmic Problem Solving, Case Studies on Real-World Algorithm Implementations, Discussion Forums for Algorithmic Questions and Answers, Coding Templates and Best Practices for Java Algorithms, and Online Courses on Advanced Data Structures and Algorithms.

•
Learner-Course Relationship:This edge denotes the enrollment of a learner in a specific course.It expresses the learner's intention to study a specific subject.
• Learner-CLG Relationship: This edge represents the link between a learner and his/her current learning goal.It defines the exact goal that the learner aspires to achieve through the educational process.•LearningResource-CLG Relationship:

Table 1 .
Characteristics of the population.

Table 3 .
The t-test findings.From the outcomes garnered, it can be deduced that there exists a statistically noteworthy distinction in the means between the two trials pertaining to Q.3, Q.4, and Q.5.To was observed that the software utilized by Group A exhibited a notably superior performance in suggesting educational content that aligns with students' knowledge levels compared to the conventional system used by Group B (Q.3: t-stat ≈ 7.37, p < 0.05).Moreover, a significant variance was found in the adequacy of the alignment