Matteo Magnini

Dr. Matteo Magnini

orcid

Research Focus & Metrics

Academic Career Length

5Years (2022-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
7 January 2025 in Knowledge-Based Systems
Verified
Journal Article
Open access
Giovanni CiattoGiovanni Ciatto
Giovanni Ciatto
AAAndrea Agiollo
Andrea Agiollo
MMMatteo Magnini
Matteo Magnini
Andrea OmiciniAndrea Omicini
Andrea Omicini

13 March 2024 in ACM Computing Surveys
Verified
Journal Article
Open access
Giovanni CiattoGiovanni Ciatto
Giovanni Ciatto
FSFederico Sabbatini
Federico Sabbatini
AAAndrea Agiollo
Andrea Agiollo
MMMatteo Magnini
Matteo Magnini
Andrea OmiciniAndrea Omicini
Andrea Omicini
In this article, we focus on the opacity issue of sub-symbolic machine learning predictors by promoting two complementary activities— symbolic knowledge extraction (SKE) and symbolic knowledge injection (SKI)—from and into sub-symbolic predictors. We consider as symbolic any language being intelligible and interpretable for both humans and computers. Accordingly, we propose general meta-models for both SKE and SKI, along with two taxonomies for the classification of SKE and SKI methods. By adopting an explainable artificial intelligence (XAI) perspective, we highlight how such methods can be exploited to mitigate the aforementioned opacity issue. Our taxonomies are attained by surveying and classifying existing methods from the literature, following a systematic approach, and by generalising the results of previous surveys targeting specific sub-topics of either SKE or SKI alone. More precisely, we analyse 132 methods for SKE and 117 methods for SKI, and we categorise them according to their purpose, operation, expected input/output data and predictor types. For each method, we also indicate the presence/lack of runnable software implementations. Our work may be of interest for data scientists aiming at selecting the most adequate SKE/SKI method for their needs, and may also work as suggestions for researchers interested in filling the gaps of the current state-of-the-art as well as for developers willing to implement SKE/SKI-based technologies.

7 March 2025 in Smart Health
Verified
Journal Article
Open access
Sara MontagnaSara Montagna
Sara Montagna
SFStefano Ferretti
Stefano Ferretti
LKLorenz Cuno Klopfenstein
Lorenz Cuno Klopfenstein
MUMichelangelo Ungolo
Michelangelo Ungolo
MPMartino F Pengo
Martino F Pengo
MMMatteo Magnini
Matteo Magnini

13 November 2025 in Journal of Medical Systems
Verified
Journal Article
Open access
PDF file
Gianluca AguzziGianluca Aguzzi
Gianluca Aguzzi
MMMatteo Magnini
Matteo Magnini
AFAqila Farahmand
Aqila Farahmand
SFStefano Ferretti
Stefano Ferretti
MPMartino Francesco Pengo
Martino Francesco Pengo
Sara MontagnaSara Montagna
Sara Montagna
Chronic disease management requires continuous monitoring, lifestyle modification and therapy adherence, thus requiring constant support from healthcare professionals. Chatbots have proven to be a promising approach for engaging patients in managing their health condition at home and for offering continuous assistance by being readily available to answer questions. While large language models offer an impressive solution for chatbot implementation, third-party systems raise privacy concerns, and computational requirements limit small-scale deployment. We address these challenges by developing a chatbot for hypertensive patients based on open-source small language models (SLMs), specifically designed for running on personal resource-constrained devices and for providing assistance in QA tasks. In order to guarantee comparable conversational performances with respect to larger language models, we exploited retrieval-augmented generation (RAG) with a local knowledge base. This ensures data privacy by deploying models locally while achieving competitive accuracy and maintaining low computational costs suitable for end-user devices. We experimented with eight SLMs, two prompt configurations, and different RAG strategies – both in the embedding and retrieval components – to identify the most effective solution. The evaluation of our solution grounds on both reference metrics and expert evaluation. Our findings suggest that RAG-enhanced SLMs can improve response clarity and content accuracy. However, our results also indicate that newer SLMs like Qwen3 demonstrate strong performance even without RAG, suggesting a potential shift in the necessity for complex retrieval mechanisms with rapidly evolving model architectures.

5 April 2023 in Computer Methods and Programs in Biomedicine
Verified
Journal Article
Open access
MMMatteo Magnini
Matteo Magnini
Giovanni CiattoGiovanni Ciatto
Giovanni Ciatto
FCFurkan Cantürk
Furkan Cantürk
Reyhan AydoganReyhan Aydogan
Reyhan Aydogan
Andrea OmiciniAndrea Omicini
Andrea Omicini
This paper focuses on nutritional recommendation systems (RS), i.e. AI-powered automatic systems providing users with suggestions about what to eat to pursue their weight/body shape goals. A trade-off among (potentially) conflictual requirements must be taken into account when designing these kinds of systems, there including: (i) adherence to experts' prescriptions, (ii) adherence to users' tastes and preferences, (iii) explainability of the whole recommendation process. Accordingly, in this paper we propose a novel approach to the engineering of nutritional RS, combining machine learning and symbolic knowledge extraction to profile users-hence harmonising the aforementioned requirements. MethodsOur contribution focuses on the data processing workflow. Stemming from neural networks (NN) trained to predict user preferences, we use CART Breiman et al.(1984) to extract symbolic rules in Prolog Körner et al.(2022) form, and we combine them with expert prescriptions brought in similar form. We can then query the resulting symbolic knowledge base via logic solvers, to draw explainable recommendations. ResultsExperiments are performed involving a publicly available dataset of 45,723 recipes, plus 12 synthetic datasets about as many imaginary users, and 6 experts' prescriptions. Fully-connected 4-layered NN are trained on those datasets, reaching ∼86% test-set accuracy, on average. Extracted rules, in turn, have ∼80% fidelity w.r.t. those NN. The resulting recommendation system has a test-set precision of ∼74%. The symbolic approach makes it possible to devise how the system draws recommendations. ConclusionsThanks to our approach, intelligent agents may learn users' preferences from data, convert them into symbolic form, and extend them with experts' goal-directed prescriptions. The resulting recommendations are then simultaneously acceptable for the end user and adequate under a nutritional perspective, while the whole process of recommendation generation is made explainable.

23 June 2023 in Autonomous Agents and Multi-Agent Systems
Verified
Journal Article
Open access
PDF file
AAAndrea Agiollo
Andrea Agiollo
ARAndrea Rafanelli
Andrea Rafanelli
MMMatteo Magnini
Matteo Magnini
GCGiovanni Ciatto
Giovanni Ciatto
Andrea OmiciniAndrea Omicini
Andrea Omicini
Bridging intelligent symbolic agents and sub-symbolic predictors is a long-standing research goal in AI. Among the recent integration efforts, symbolic knowledge injection (SKI) proposes algorithms aimed at steering sub-symbolic predictors’ learning towards compliance w.r.t. pre-existing symbolic knowledge bases. However, state-of-the-art contributions about SKI mostly tackle injection from a foundational perspective, often focussing solely on improving the predictive performance of the sub-symbolic predictors undergoing injection. Technical contributions, in turn, are tailored on individual methods/experiments and therefore poorly interoperable with agent technologies as well as among each others. Intelligent agents may exploit SKI to serve many purposes other than predictive performance alone—provided that, of course, adequate technological support exists: for instance, SKI may allow agents to tune computational, energetic, or data requirements of sub-symbolic predictors. Given that different algorithms may exist to serve all those many purposes, some criteria for algorithm selection as well as a suitable technology should be available to let agents dynamically select and exploit the most suitable algorithm for the problem at hand. Along this line, in this work we design a set of quality-of-service (QoS) metrics for SKI, and a general-purpose software API to enable their application to various SKI algorithms—namely, platform for symbolic knowledge injection (PSyKI). We provide an abstract formulation of four QoS metrics for SKI, and describe the design of PSyKI according to a software engineering perspective. Then we discuss how our QoS metrics are supported by PSyKI. Finally, we demonstrate the effectiveness of both our QoS metrics and PSyKI via a number of experiments, where SKI is both applied and assessed via our proposed API. Our empirical analysis demonstrates both the soundness of our proposed metrics and the versatility of PSyKI as the first software tool supporting the application, interchange, and numerical assessment of SKI techniques. To the best of our knowledge, our proposals represent the first attempt to introduce QoS metrics for SKI, and the software tools enabling their practical exploitation for both human and computational agents. In particular, our contributions could be exploited to automate and/or compare the manifold SKI algorithms from the state of the art. Hence moving a concrete step forward the engineering of efficient, robust, and trustworthy software applications that integrate symbolic agents and sub-symbolic predictors.