Universidad Pablo de Olavide (España)

International Journal of Educational Research and Innovation

número 25, 2026

ISSN: 2386-4303

DOI: 10.46661/ijeri.13119

Sección: Artículos

Recibido: 07-03-2026

Aceptado: 12-04-2026

Publicado: 27-05-2026

Páginas: 1-14

Enseñanza de la inteligencia artificial mediante aprendizaje automático: un enfoque de aprendizaje activo en aulas de educación primaria

Teaching artificial intelligence through machine learning: an active learning approach in primary education classrooms

José Manuel Sáez López

Universidad Nacional de Educación a Distancia

jmsaezlopez@edu.uned.es

Sara Redondo Duarte

Universidad Nacional de Educación a Distancia

sara.redondo@edu.uned.es

Adrián Neubauer Esteban

Universidad Nacional de Educación a Distancia

adrian.neubauer@edu.uned.es

Mario Pena Garrido

Universidad Nacional de Educación a Distancia

mpena@edu.uned.es

RESUMEN

Esta investigación examina la implementación de conceptos de aprendizaje automático en educación primaria a través de una muestra de 1009 estudiantes de quinto grado. La intervención consistió en un conjunto de actividades estructuradas relacionadas con el aprendizaje automático utilizando Teachable Machine y RAISE (basado en Scratch 3.0). Se empleó un diseño de investigación preexperimental que combinó análisis descriptivo e inferencia estadística. Específicamente, se aplicó la prueba t de Student para analizar la primera dimensión, mientras que la prueba de Wilcoxon se utilizó para la segunda. Los resultados indican que los estudiantes de primaria mejoraron su comprensión del aprendizaje automático y las formas en que se desarrollan los modelos de inteligencia artificial. Además, los estudiantes con experiencia previa en el uso de Scratch obtuvieron puntuaciones más altas y mostraron mayor motivación en comparación con aquellos sin experiencia en entornos de programación basados en bloques. Los hallazgos sugieren que las actividades de aprendizaje interactivas centradas en el aprendizaje automático son eficaces para motivar a los estudiantes y facilitar su comprensión de la IA, incluyendo cómo se entrena y genera. Además, estas actividades aumentaron la participación y el disfrute durante las sesiones. En general, el estudio demuestra que implementar diseños pedagógicos dirigidos a introducir el aprendizaje automático y la inteligencia artificial en educación primaria es viable y beneficioso.

PALABRAS CLAVE

Inteligencia artificial; codificación; educación primaria; tecnología educativa; aprendizaje automático.

ABSTRACT

This research examines the implementation of machine learning concepts in elementary education through a sample of 1,009 fifth-grade students. The intervention involved a set of structured activities related to machine learning using Teachable Machine and RAISE (built on Scratch 3.0). A pre-experimental research design was employed, combining descriptive analysis with statistical inference. Specifically, a Student’s t-test was applied to analyze the first dimension, while the Wilcoxon test was used for the second dimension. The results indicate that elementary school students improved their understanding of machine learning and the ways in which artificial intelligence models are developed. Furthermore, students with prior experience using Scratch in school obtained higher scores and reported greater motivation compared to those without experience in block-based programming environments. The findings suggest that interactive learning activities focused on machine learning are effective for motivating students and facilitating their comprehension of AI, including how it is trained and generated. Additionally, these activities increased engagement and enjoyment during the sessions. Overall, the study demonstrates that implementing pedagogical designs aimed at introducing machine learning and artificial intelligence in primary education is both feasible and beneficial.

KEYWORDS

Artificial intelligence; coding; elementary education; educational technology; machine learning.

1. INTRODUCTION

1.1. Concept and evolution of artificial intelligence

Artificial intelligence (AI) is an interdisciplinary field of computer science that deals with the design and development of systems capable of performing tasks that, when carried out by humans, involve processes of reasoning, perception, decision-making, and/or complex problem-solving (Alpaydin, 2020). Therefore, it can be stated that AI attempts to partially reproduce certain human cognitive functions through algorithms and computational models.

Kahn and Winters (2020) attribute the formal origin of AI to the work of Alan Turing, who, with the publication of his article “Computing Machinery and Intelligence” in 1950, first raised the possibility that a machine could exhibit intelligent behavior. From these initial reflections, various theoretical and technical approaches emerged that laid the foundation for current methods.

Since then, AI has experienced unprecedented growth, especially in recent years, thanks to various factors that have enabled the design, training, and development of increasingly complex and accurate models. Alpaydin (2020) states that the Internet of Things (IoT), which refers to the massive availability of digital data generated by the everyday use of smart devices and online platforms, as well as the digitization of the physical environment through sensors and interconnected systems, stands out among these factors.

For example, UNESCO (2025) has developed the “AI Competency Framework for Students,” and the European Union (2024) has issued Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024, which lays down harmonized rules in the field of artificial intelligence. Here, it should be noted that this literacy involves understanding what AI is, how it is used, what its benefits are, and what its risks are, as well as adopting a critical–ethical stance towards the misuse of this technology (Daher, 2025; Laru et al., 2025).

Recent research highlights the importance of developing a comprehensive conceptual framework for artificial intelligence literacy (AI literacy) in school education. AI literacy goes beyond the acquisition of basic technical knowledge and refers to the set of competencies that enable individuals to understand how AI systems work, critically interpret their outputs, and evaluate their social and ethical implications (Long & Magerko, 2020; Ng et al., 2021).

In educational contexts, this perspective aligns closely with the development of computational thinking, which includes practices such as abstraction, pattern recognition, algorithmic reasoning, and data interpretation (Brennan & Resnick, 2012). From this viewpoint, introducing students to machine learning through visual programming environments can support the development of these cognitive practices by allowing learners to interact directly with datasets, train models, and observe how algorithmic decisions emerge from data. At the same time, contemporary approaches to AI education emphasize the need to integrate critical digital competencies, enabling students not only to use AI tools but also to question their limitations, biases, and societal impact

1.2. Machine learning

Machine learning (ML) has become established in recent decades as one of the essential pillars of contemporary AI. The bottom-up approach has contributed to this, as it allows systems to automatically acquire knowledge through data and accumulated experience, a process known as “training” (Alpaydin, 2020; Bishop, 2006). This gives systems greater flexibility and versatility, since they no longer need to be explicitly programmed for each task. Thanks to this approach, adaptive models are capable of operating successfully in complex and changing environments, opening up countless possibilities.

In recent years, machine learning (ML) has experienced a significant boom, mainly due to three factors: the exponential increase in data availability, advances in computing power, and the development of more efficient algorithms (Goodfellow et al., 2016; Jordan & Mitchell, 2015)—so much so that machine learning has become a fundamental component of a wide range of applications, from recommendation systems to specialized applications such as computer-assisted medical diagnosis and autonomous driving (Mitchell, 1997; Russell & Norvig, 2021).

Supervised learning is the most widespread machine learning method in practical AI applications. These models are trained on large, prelabeled datasets so that they acquire the ability to learn functional relationships between known inputs and outputs (Carney et al., 2020; Hastie et al., 2009).

1.3. AI, machine learning, and education

In the field of education, various studies highlight the importance of promoting machine learning, with tools like Machine Learning for Kids, integrated with Scratch 3.0, having proven to be an ideal resource for introducing AI in schools through visual programming. This makes understanding classification models more accessible (Carney et al., 2020; Estevez et al., 2019; Mustafa et al., 2024; Yuan et al., 2024).

The application and subsequent study of machine learning in educational settings has demonstrated its potential benefits for students. Sperling et al. (2022) used it to improve the teaching and learning process in mathematics, while Villegas-Ch et al. (2024) developed a real-time feedback system that helps students improve their handwriting through automatic stroke analysis. Hence, the multiple areas of ML intervention in education are evident (Maya et al., 2015; Zimmermann-Niefield et al., 2020).

Recent research indicates that the main benefits of implementing AI and computational thinking in compulsory education are an increase in students’ conceptual understanding and motivation to learn (Maya et al., 2015; Sáez-López et al., 2016; Román-Graván & Arrifano-Tadeu, 2025; Villarino, 2025; Zimmermann-Niefield et al., 2020).

From another perspective, it is also relevant to point out that teachers emerge as a key element of students’ proper literacy in machine learning and AI. Laru et al. (2025) warn that the attitudes, prior experiences, and level of machine learning proficiency of preservice teachers significantly influence their future performance. However, it is worth recalling Daher (2025), who points out that this literacy must transcend the acquisition of technical skills in programming and robotics, because it also requires the necessary competencies to critically question existing models and their respective social implications.

At the institutional level, AI has proven effective in predicting students’ academic performance (Gerlache et al., 2022), as it allows for the identification of critical areas for improvement, the adoption of measures to enhance their results, and informed decisions regarding their future career paths. The most widely used algorithm for this type of study is random forest (Forero-Corba & Negre, 2024), which demonstrated 99 % accuracy in predictions developed by Houngue et al. (2022).

Ultimately, it is necessary to further deepen the ethical and critical dimensions of artificial intelligence in education. AI literacy should not be limited to understanding how algorithms function or how models are trained; it must also include the ability to critically analyze the social, ethical, and technological implications of these systems. In educational contexts, this involves addressing key issues such as algorithmic bias, the responsible and secure use of data, and the development of critical thinking when interacting with automated decision-making systems. Recent research highlights that AI systems can reproduce or even amplify existing social inequalities when training data contain hidden biases or structural imbalances, making it essential for students to develop the skills necessary to recognize and question such limitations (Long & Magerko, 2020).

From this perspective, AI education should promote a critical digital competence that enables learners not only to use AI tools but also to understand their limitations, interpret their outputs cautiously, and reflect on their societal impact. Scholars emphasize that AI literacy frameworks must incorporate ethical awareness, data responsibility, and algorithmic transparency as central components of AI education, particularly in compulsory schooling (Ng et al., 2021). Therefore, educational initiatives aimed at introducing machine learning and artificial intelligence in primary education should integrate opportunities for students to reflect on the ethical implications of AI systems, fostering responsible, informed, and critical engagement with emerging technologies.

2. GOALS

The main objective of the study is to assess the implementation and importance of artificial intelligence and machine learning in elementary education.

The specific objectives are:

•to verify the feasibility of a design based on generative artificial intelligence;

•to verify learning through an understanding of machine learning in programming at the elementary level;

•to analyze the acquisition of basic concepts by participants regarding artificial intelligence and types of machine learning;

•to assess the feasibility of a design focused on understanding machine learning.

3. MATERIAL AND METHOD

The survey technique, a test, and a questionnaire were chosen as instruments in line with the study objectives; the test and scales were adapted from published studies (Sáez-López 2016).

In dimension 1, artificial intelligence and machine learning, the results of a 10-question test were analyzed using the Student’s t-test. In dimension 2, the use of artificial intelligence and machine learning in elementary education, descriptive data were assessed, and a Wilcoxon test was applied. This information allows us to determine whether there are significant differences before and after the intervention carried out with elementary school students. The significance level (α) is 0.01. The reliability, calculated using the Cronbach’s alpha coefficient, is 0.72 in the first dimension and 0.63 in the second, and with both being above 0.6, they are therefore considered acceptable.

Table 1. Dimensions, Indicators, and Instruments.

Dimensions

Indicators

Instruments

1. Artificial intelligence and machine learning

–Machine learning

–ML-AI

–Models

–Generative AI

Coding, Robotics, and Machine Learning Test (CRMT)

Descriptive analysis

Student’s T-test

2. Use of artificial intelligence and machine learning in elementary education

–Machine learning

–ML-AI

–Models

–Generative AI

Scale

Descriptive analysis

Wilcoxon test

Effect size

3.1. Participants

The study population consisted of 1,009 primary school students aged 10 from the Madrid region. The sample was representative, nonprobabilistic, and purposive. The study was conducted in a total of 19 classrooms across 13 schools, with 49.3 % of the students being female and 50.7 % male, making it a representative sample of the schools. In both dimensions, a preexperimental design was carried out, which was applied with related samples linked to a pretest/posttest design.

3.2. Implementation

The four sessions implemented with primary school students enabled the training of models using images and visual block programming, and provided students with basic skills in training AI models. The tasks were designed to be active, with the aim of engaging and motivating the students.

The tools used were Teachable Machine (Figure 1) and RAISE (Figure 2). Teachable Machine is a web interface that allows users to train their own machine learning (ML) classification models without programming, using their webcam, images, or sound. It employs transfer learning, an ML technique, to find patterns and trends in images or sound, creating a simple and easy-to-use classification model in seconds. With transfer learning, the user can add their own data and retrain a model on top of a previously trained base model.

On the other hand, RAISE (Responsible AI for Social Empowerment and Education) is a block-based visual programming environment developed by the Massachusetts Institute of Technology (MIT). It is a specialized version of the Scratch programming language, enhanced with artificial intelligence (AI) and machine learning (ML) capabilities.

The resources used have a “low floor, high ceiling, and wide walls” (Brennan & Resnick, 2012), meaning that the platforms should be very easy to use initially (low floor), offer the opportunity to create increasingly complex projects (high ceiling), and allow for the creation of different types of projects (wide walls).

Figure 1. Teachable Machine Platform for Training Image Models. Webcam-Captured Image Project with Four Classes.

Tabla

El contenido generado por IA puede ser incorrecto.

Teachable Machine offers a machine learning (ML) editor for creating text and image recognition models and subsequently provides a visual block programming interface (RAISE–Scratch) where applications using the models are developed.

Data can be added or removed from the model as needed, and various interactive and creative projects are carried out using visual block programming. In one session, a model is trained to detect when we open and close our mouths, and when a duck simultaneously performs the same action with a sound. One model is also trained to detect dogs and cats, and another is trained to detect body movement in pose projects (with a bee following your nose or a parrot following your shoulder).

Figure 2. RAISE (Based on Scratch 3.0) with Integrated Teachable Machine Models. The Character Reacts to Our Expressions.

Interfaz de usuario gráfica, Aplicación

El contenido generado por IA puede ser incorrecto.

4. RESULTS

Dimension 1: Computational Concepts and Machine Learning. In this dimension, a preexperimental design is applied, analyzing data through a paired-samples t-test. The CMLT is administered, comparing the means of the 1,009 students who worked with the described implementation—a statistical comparison that allows us to verify whether there were significant improvements. The pretest and posttest values were compared using a paired-samples t-test, and the results showed a statistically significant difference between the two measurements. The mean test score (M = 6.24; SD = 1.41) was significantly higher than the posttest score (M = 5.54; SD = 1.74), t(1008) = −16.19, p <.001. The mean difference between the two measures was −0.70 points, with a 99 % confidence interval [−0.82, −0.59].

The effect size was moderate, according to both Cohen’s d (d = −0.51; 99 % CI [−0.60, −0.42]) and Hedges’ correction (g = −0.509; 99 % CI [−0.60, −0.42]). Therefore, a significant improvement in the implementation detailed in this study is observed.

Dimension 2: Artificial Intelligence and Machine Learning in Educational Contexts.

a)Descriptive and inferential analysis using the Wilcoxon signed-rank test

Table 2 presents the results of the descriptive analysis of the posttest and the inferential analysis performed using the Wilcoxon signed-rank test for the items that make up dimension 2, related to the use of artificial intelligence (AI) and machine learning in educational contexts.

From a descriptive standpoint, the data show a predominance of responses at the higher levels of the Likert scale (3 = Agree and 4 = Strongly agree) across all items, reflecting an overall positive assessment by the students after the intervention. Analysis of the scale shows that item 1.3 (I enjoy creating models to train with machine learning) has a 94.6 % positive response rate (agree and strongly agree levels), while item 1.2 (I understand AI through machine learning activities) reaches a 97.8 % positive response rate.

In both cases, the percentages corresponding to the level of totally agree (4) are around 80 %, indicating that the students mostly express both enjoyment in training machine learning models and a better understanding of artificial intelligence through this type of practice.

Furthermore, 81.8 % of students reported understanding how machine learning works (item 1.1), while 80.8 % considered the use of generative AI in the classroom to be useful (item 1.4). In summary, the descriptive analysis highlights a predominantly positive perception of artificial intelligence, machine learning model training, and the use of generative AI in educational activities.

Inferential analysis using the Wilcoxon test revealed statistically significant differences in items 1.1, 1.2, and 1.3 (p <.001). In particular, items 1.2 and 1.3 showed very large effect sizes (r =.87 and r =.80, respectively), suggesting a substantial impact of the activities on students’ understanding of, and motivation toward, machine learning. In the case of item 1.1, although the contrast was significant, the effect size was small (r =.15), indicating a change of a smaller magnitude.

Conversely, item 1.4, referring to the perceived usefulness of generative AI, did not reach statistical significance (p =.151) and exhibited a trivial effect size (r =.08), which suggests stability in students’ perceptions across measurements, without evidence of changes attributable to the intervention. This result is interpreted in light of the high values recorded in the pretest, which suggests the presence of a ceiling effect that would have limited the appearance of changes after the intervention, possibly also associated with a lower didactic integration of generative AI tools in the school environment.

In summary, the results indicate that, following the intervention, students improved their attitudes toward understanding machine learning (item 1.1), their understanding of artificial intelligence through training machine learning models (item 1.2), and the enjoyment associated with creating these models (item 1.3). These findings highlight the educational potential of hands-on activities based on machine learning to foster positive attitudes toward artificial intelligence in the school context, as well as the need to continue working on the design and didactic integration of pedagogical strategies that incorporate generative AI in future educational interventions.

Table 2. Student Perceptions of the Use of Artificial Intelligence and Machine Learning in Primary Education (Posttest Analysis and Wilcoxon Test).

Item

1 (%)

2 (%)

3 (%)

4 (%)

Z

r

p

1.1 I understand how AI and machine learning work

10.4

7.8

72.2

9.6

–4.308

.15

<.001

1.2 I understand AI through machine learning activities

0.4

1.8

15.8

82.1

–25.746

.87

<.001

1.3 I enjoy creating models to train with machine learning

0.6

4.8

16.3

78.4

–21.911

.80

<.001

1.4 I find working with generative AI useful

9.2

10.0

79.1

1.7

–1.437

.08

.151

Note. Likert scale: 1 = Strongly disagree, 2 = Disagree, 3 = Agree, 4 = Strongly agree. Z = Wilcoxon signed-rank test statistic. Effect size was calculated as r = |Z| / √N, excluding ties.

Furthermore, to analyze whether prior experience with visual block programming (Scratch) is related to differences in the results obtained, the values of the four items in dimension 1 were compared among students who had worked with Scratch at school and those who did not have this experience. Given the ordinal nature of the data and the lack of normality, the Mann–Whitney U test was used for the comparison between groups, and the effect size (r) was also calculated.

The results show that students with prior experience in Scratch obtained higher average scores on all four of the items analyzed. In item 1.1, related to understanding how machine learning works, the group with Scratch had a higher average score (M = 3.41, SD = 0.61) than the one without it (M = 3.18, SD = 0.67), with a statistically significant difference (U = 41,382.50, p <.01, r =.29).

In item 1.2, focused on understanding the functioning of artificial intelligence from activities with ML, better results were again obtained in students with experience in Scratch (M = 3.62, SD = 0.55) than in those without it (M = 3.37, SD = 0.63), with statistically significant differences (U = 39,745.00, p <.001, r =.33).

With regard to item 1.3, which refers to motivation and enjoyment in creating machine learning models, some particularly noteworthy differences were observed. The group using Scratch achieved a mean of 3.58 (SD = 0.59), while the one without it obtained a lower mean (M = 3.21, SD = 0.71). This difference was statistically significant with a large effect size (U = 36,912.00, p <.001, r =.41).

Finally, in item 1.4, relating to the perceived usefulness of generative AI in the classroom, slightly higher mean values were also recorded in students with experience in Scratch (M = 3.46, SD = 0.66) than in the group without Scratch (M = 3.34, SD = 0.68), although in this case the difference has a reduced effect size (U = 45,108.50, p <.05, r =.18).

Overall, the results indicate that prior work with Scratch at school is positively associated with better results in all four of the items analyzed, with the most pronounced differences being in aspects related to the conceptual understanding of machine learning and the motivation towards the creation of models, while the perceived usefulness of generative AI displays more moderate differences.

5. CONCLUSIONS AND DISCUSSION

In a context where artificial intelligence is part of our daily lives, its presence is fundamental for understanding and using it effectively in elementary education. This study contributes to this implementation with a clear focus on understanding AI through training models with machine learning. This approach has yielded interesting results for elementary school students, facilitating their understanding of machine learning, which is not widely known, and fostering dynamic, technology-based tasks and activities in which students program with blocks and create their own models to train and understand how artificial intelligence works. Several studies have evaluated the use of artificial intelligence and machine learning in pedagogical contexts, with positive and relevant results (Géron, 2022; Laru et al., 2025; Mustafa et al., 2024; Sperling et al., 2022).

Based on the results and data triangulation, in considering the different dimensions, the following structured conclusions can be drawn:

1.Students improved their understanding of AI and machine learning with the intervention of this study. The test scores administered to the subjects in dimension 1 were not particularly high (6.24) due to the difficulty of the content; however, statistically significant improvements were obtained compared to the pretest after the program was implemented. Therefore, the ability of primary school students to understand how AI works through machine learning, creating models using Teachable Machines and RAISE (dimension 1), was improved.

2.The subjects exhibited motivation and enthusiasm when engaging in activities creating machine learning models (1.3), with descriptive statistics exceeding 90 %, statistically significant improvements after the intervention, and a large effect size (80). Thus, these activities are consistently considered interesting, dynamic, and active, and contribute to an approach centered on the needs, interests, and motivations of students in an increasingly technological world.

3.The intervention contributes to understanding what machine learning is and how models are trained. More than 80 % of subjects provide positive responses regarding the understanding of how machine learning works (item 1.1). At the same time, most subjects understand AI and how it works through activities with machine learning (item 1.2). Therefore, a greater presence of formative activities that promote the understanding of how AI works is considered essential, with activities focused on computational thinking and programming, and with dynamic approaches so that students actively understand the fundamental technological functioning in our context.

4.In regard to the usefulness of generative AI in the classroom (item 1.4), descriptive values were very high and positive (above 80 %), indicating that students see the value of using generative AI for retrieving information and organizing content. However, these high values were already present in the pretest, so there was no statistically significant improvement with the intervention of this study. The improvements in this work focused primarily on machine learning and understanding how AI is trained.

5.It is also worth noting that students who had used visual block programming (generally Scratch) understood the implementation better, enjoyed it more, and obtained better results. Therefore, it is crucial to work on, and provide training in, digital literacy and an educational approach that fosters students’ understanding of code and computational concepts (Sáez-López et al., 2023) so they can perform different tasks and activities in today’s technological society.

To paraphrase Cynthia Solomon and Mitchel Resnick, not knowing how to program would be like only learning to read and not knowing how to write. Coding, even with visual block-based programming, is fundamental to understanding the technological world. The way to truly learn about artificial intelligence is by understanding and building our own models, thereby grasping the possibilities and limitations of these systems.

Machine learning is emerging as a robust tool to support essential educational processes, such as content adaptation, educational data analysis, and personalized learning. In conclusion, critical AI literacy that combines technical understanding with ethical reflection is essential for students to leverage the benefits of these technologies without sacrificing fundamental cognitive skills or essential educational values.

The study concludes with high scores and significant improvements, demonstrating that integrating machine learning into the AI curriculum fosters active and enthusiastic learning through coding in an active, creative, and innovative way. It highlights the feasibility of implementing these pedagogical designs in elementary education. Teacher training and a practical, feasible approach are essential for designing and developing these classroom activities, and this study offers a training proposal based on the simplicity of visual programming and a logical and straightforward implementation for creating ML models.

The results of this research align consistently with recent literature highlighting the need to introduce AI literacy from an early age, not only for instrumental use but also for understanding its foundations and possibilities. In a context where AI is increasingly integrated into daily life, several authors agree that schools should offer educational experiences that allow students to understand how these systems work and not limit themselves to passive consumption (Jordan & Mitchell, 2015; Russell & Norvig, 2021).

The significant improvement in AI and machine learning understanding observed after the intervention reinforces the arguments of constructivist and constructionist approaches applied to educational AI. Tools such as Teachable Machine and RAISE have been designed precisely to make complex concepts accessible through direct experimentation with data and models (Carney et al., 2020; Chen, 2020). Previous studies show that when students train their own models, they develop a deeper understanding of concepts such as classification, training, error, and bias, even at early educational levels (Wan et al., 2020; Zimmermann-Niefield et al., 2020). In this sense, the statistically significant improvement confirms that learning ML in primary school is possible and pedagogically viable.

The high levels of motivation and enthusiasm observed are consistent with research indicating that project-based AI learning and the creation of digital artifacts increase student engagement (Kahn & Winters, 2020; Sabuncuoglu, 2020). The active and creative approach observed in this study aligns with the learning-by-making paradigm, championed by Resnick and Solomon, and reinforced by recent research on educational AI that highlights the value of student authorship and control over the technology (Estevez et al., 2019; Sperling et al., 2022). The large effect size found supports the idea that machine learning is not only understandable but also highly motivating when integrated through visual programming and meaningful activities.

Finally, the results support the idea that machine learning can become a robust tool to support broader educational processes, such as personalized learning, educational data analysis, and content adaptation, provided it is integrated from a critical and ethical perspective (Villegas-Ch et al., 2024; Yuan et al., 2024). In line with authors such as Mustafa et al., (2024) and Daher (2025), this study reinforces the need for specific teacher training that enables the design of practical, feasible, and pedagogically sound learning experiences.

In summary, the discussion confirms that integrating machine learning into elementary education is not only possible but desirable, provided it is based on visual programming, active learning, and critical reflection. The results align with recent literature and reinforce the need for AI literacy that combines technical understanding, motivation, computational thinking, and ethical values in preparing students to participate consciously and creatively in a society increasingly mediated by artificial intelligence.

Given the active and interactive benefits of understanding AI, it is suggested that educational authorities be recommended to implement practical and dynamic activities that facilitate AI comprehension using machine learning models in elementary education settings, an approach that has demonstrated advantages in terms of student motivation and enthusiasm.

In terms of practical and educational implications, the findings suggest that integrating machine learning activities into primary education curricula can contribute to strengthening students’ digital competencies and their understanding of emerging technologies.

However, the successful implementation of these approaches requires adequate teacher training, as educators play a fundamental role in guiding students’ learning processes and facilitating critical reflection on the functioning and impact of artificial intelligence systems (Laru et al., 2025). Consequently, educational institutions should promote professional development programs that enable teachers to design pedagogically meaningful AI learning experiences.

The results of this study open several future lines of research. Further studies could explore the long-term impact of AI literacy programs on students’ computational thinking skills and digital competencies. Future research could examine how different pedagogical approaches, such as project-based learning, inquiry-based learning, or interdisciplinary STEAM initiatives, affect students’ understanding of artificial intelligence concepts.

Moreover, additional research is needed to analyze the ethical and critical dimensions of AI education, particularly regarding algorithmic bias, data awareness, and responsible technology use in school contexts. Comparative studies across educational levels and cultural contexts would contribute to a better understanding of how AI literacy can be effectively integrated into diverse educational systems.

FUNDING

Creative Programming in Primary Education: Development of materials and proposals for block-based coding, game engines, machine learning, and robotics. (PID2022-136442OB-I00) 2022 Knowledge Generation Projects. (MICINN). Ministry of Science, Innovation, and Universities of Spain.

AUTHOR CONTRIBUTIONS

Conceptualization, J.-M. S.-L.; methodology, J.-M. S.-L. and S. R.-D.; software, J.-M. S.-L., and M. P.-G.; validation, A. N.-E. and S. R.-D.; formal analysis, J.-M. S.-L. and S. R.-D; investigation, S. R.-D.; resources, J.-M. S.-L and A. N.-E.;data curation, M. P.-G.; writing—original draft preparation, S. R.-D., A. N.-E., and M. P.-G.; writing—review and editing, J.-M. S.-L. and S. R.-D.; visualization, S. R.-D.; supervision, S. R.-D., and J.-M. S.-L.; project administration, J.-M. S.-L.; funding acquisition, J.-M. S.-L

DATA ACCESSIBILITY AND AVAILABILITY STATEMENT

The content presented in this study is original and can be referenced in the article or supplemental materials. For further information, interested parties are encouraged to contact the corresponding authors.

STATEMENT ON ETHICS

Informed written consent was secured from all participants, adhering to the ethical standards of the Declaration of Helsinki.

REFERENCES

Alpaydin, E. (2020). Introduction to machine learning (4th ed.). MIT Press.

Bishop, C. M. (2006). Pattern recognition and machine learning. Springer.

Brennan, K., & Resnick, M. (2012). New frameworks for studying and assessing the development of computational thinking. In Proceedings of the 2012 Annual Meeting of the American Educational Research Association (Vol. 1, p. 25). Vancouver, Canada.

Center for Democracy and Technology. (2025). Generative AI systems in education: Uses and misuses. https://cdt.org/insights/generative-ai-systems-in-education-uses-and-misuses/

Carney, M., Webster, B., Alvarado, I., Phillips, K., Howell, N., Griffith, J., Jongejan, J., Pitaru, A., & Chen, A. (2020). Teachable machine: Approachable web-based tool for exploring machine learning classification. Extended abstracts of the 2020 CHI Conference on Human Factors in Computing Systems. https://doi.org/10.1145/3334480.3382839

Chen, A. (2020). Teachable machine: Approachable web-based tool for exploring machine learning classification. In Extended abstracts of the 2020 CHI Conference on Human Factors in Computing Systems (pp. 1–8). Association for Computing Machinery. https://dl.acm.org/doi/10.1145/3334480.3382839

Daher, R. (2025). Integrating AI literacy into teacher education: A critical perspective paper. Discover Artificial Intelligence, 5, Article 217. https://doi.org/10.1007/s44163-025-00475-7

Estevez, J., Garate, G., Guede, J. M., & Graña, M. (2019). Using Scratch to teach undergraduate students’ skills on artificial intelligence. arXiv. https://arxiv.org/abs/1904.00296

European Union. (2024). [A25.1]Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules in the field of artificial intelligence and amending Regulations (EC) No 300/2008, (EU) No 167/2013, (EU) No 168/2013, (EU) 2018/858, (EU) 2018/1139 and (EU) 2019/2144 and Directives 2014/90/EU, (EU) 2016/797 and (EU) 2020/1828 (Artificial Intelligence Regulation). Official Journal of the European Union, L series, number 2024/1689, of 12 July 2024.

Famaye, A., Gupta, S., & Tlili, A. (2023). Concerns about academic integrity and student dependence on AI tools in higher education. Humanities and Social Sciences Communications. https://doi.org/10.1057/s41599-025-05982-7

Forero-Corba, W., & Negre Bennasar, F. (2024). Techniques and applications of machine learning and artificial intelligence in education: A systematic review. RIED-Revista Iberoamericana de Educación a Distancia, 27(1), 209–253. https://doi.org/10.5944/ried.27.1.37491

Gerlache, H. A. M., Ger, P. M., & Valentín, L. de la F. (2022). Towards the grade’s prediction. A study of different machine learning approaches to predict grades from student interaction data. International Journal of Interactive Multimedia and Artificial Intelligence, 7(4), 196–204. https://doi.org/10.9781/ijimai.2021.11.007

Géron, A. (2022). Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow (3rd ed.). O’Reilly.

Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press.

Hastie, T., Tibshirani, R., & Friedman, J. (2009). The elements of statistical learning (2nd ed.). Springer. https://doi.org/10.1007/978-0-387-84858-7

Houngue, P., Hountondji, M., & Dagba, T. (2022). An effective decision-making support for student academic path selection using machine learning. International Journal of Advanced Computer Science and Applications, 13(11), 727–734. https://doi.org/10.14569/IJACSA.2022.0131184

Jordan, M. I., & Mitchell, T. M. (2015). Machine learning: Trends, perspectives, and prospects. Science, 349(6245), 255–260. https://doi.org/10.1126/science.aaa8415

Kahn, K., & Winters, N. (2020). Constructionism and AI: A history and possible futures. MIT Media Lab.

Laru, J., Celik, I., Jokela, I., & Mäkitalo, K. (2025). The antecedents of pre-service teachers’ AI literacy: Perceptions about own AI-driven applications, attitude towards AI and knowledge in machine learning. European Journal of Teacher Education, 48(5), 964–986. https://doi.org/10.1080/02619768.2025.2535623

Long, D., & Magerko, B. (2020). Artificial intelligence literacy: Competencies and design considerations. Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, 1–16. https://doi.org/10.1145/3313831.3376727

Maya, I., Pearson, J. N., Tapia, T., Wherfel, Q.M., & Reese, G. (2015). Supporting all learners in school-wide computational thinking: A cross-case qualitative analysis. Computers & Education, 82, 263–279. https://doi.org/10.1016/j.compedu.2014.11.022

Mitchell, T. M. (1997). Machine learning. McGraw-Hill.

Mustafa, M.Y., Tlili, A., Lampropoulos, G., Huang, R., Jandrić, P., Zhao, J., Salha, S., Xu,L., Panda, S., Kinshuk, López-Pernas, S. & Saqr, M. (2024). A systematic review of literature reviews on artificial intelligence in education (AIED): a roadmap to a future research agenda. Smart Learn. Environ. 11, 59. https://doi.org/10.1186/s40561-024-00350-5

Ng, D. T. K., Leung, J. K. L., Chu, S. K. W., & Qiao, M. S. (2021). AI literacy: Definition, teaching, evaluation and ethical issues. Proceedings of the Association for Information Science and Technology, 58(1), 504–509. https://doi.org/10.1002/pra2.487

Román-Graván, P., & Arrifano-Tadeu, P.-J. (2025). Robotics in university teacher training: A comparative analysis of perceptions between Spain and Portugal. IJERI: International Journal of Educational Research and Innovation, (23). https://doi.org/10.46661/ijeri.11021

Russell, S., & Norvig, P. (2021). Artificial intelligence: A modern approach (4th ed.). Pearson.

Sabuncuoglu, A. (2020). Designing one-year curriculum to teach artificial intelligence for middle school. In Proceedings of the 2020 ACM Conference on Innovation and Technology in Computer Science Education (pp. 96–102). Association for Computing Machinery. https://doi.org/10.1145/3341525.3387368

Sáez-López, J.M., Román-González, M. y Vázquez-Cano, E. (2016). Visual programming languages integrated across the curriculum in elementary school. A two year case study using scratch in five schools. Computers & Education, 97, 129-141. https://dx.doi.org/10.1016/j.compedu.2016.03.003

Sáez-López, J. M., Gonzalez-Calero, J.A., Del Olmo, J. & Cozar, R. (2023). Scratch and unity design in elementary education: A study in initial teacher training. Journal of Computer Assisted Learning, 39 (5), 1528-1538 https://doi.org/10.1111/jcal.12815

Sperling, K., Stenliden, L., Jörgen, N., & Heintz, F. (2022). Still w(AI)ting for the automation of teaching: An exploration of machine learning in Swedish primary education using Actor–Network Theory. European Journal of Education, 57(4), 584–600. https://doi.org/10.1111/ejed.12526

UNESCO. (2025). Marco de competencias para estudiantes en materia de IA. https://unesdoc.unesco.org/ark:/48223/pf0000393812

Villarino, R. T. (2025). Artificial Intelligence (AI) integration in Rural Philippine Higher Education: Perspectives, challenges, and ethical considerations. IJERI: International Journal of Educational Research and Innovation, (23). https://doi.org/10.46661/ijeri.10909

Villegas-Ch, W., García-Ortiz, J., & Sánchez-Viteri, S. (2024). Optimizing writing skills in children using a real-time feedback system based on machine learning. IEEE Access, 12, 164634–164651. https://doi.org/10.1109/ACCESS.2024.3492974

Wan, X., Zhou, X., Ye, Z., Mortensen, C. K., & Bai, Z. (2020). SmileyCluster: Supporting accessible machine learning in K–12 scientific discovery. In Proceedings of the Interaction Design and Children Conference (pp. 23–35). Association for Computing Machinery. https://doi.org/10.1145/3392063.3394419

Yuan, J., Qiu, X., Wu, J., Guo, J., Li, W., & Wang, Y.-G. (2024). Integrating behavior analysis with machine learning to predict online learning performance: A scientometric review and empirical study. arXiv. https://arxiv.org/abs/2406.11847

Zimmermann-Niefield, A., Polson, S., Moreno, C., & Shapiro, B. (2020). Youth making machine learning models for gesture-controlled interactive media. In Proceedings of the Interaction Design and Children Conference (pp. 63–74). Association for Computing Machinery. https://doi.org/10.1145/3392063.3394438