
Ilyass Ouardi
M.Sc. Computer Science · Università degli Studi di Milano
ilyassouardi@gmail.com github.com/OUARDI-ILYASS linkedin.com/in/ilyass-ouardi
Research Interests
I am interested in AI safety and mechanistic interpretability. To me, interpretability is not an academic exercise for its own sake, but a pragmatic tool to make model safety measurable and verifiable on the path toward safe AGI. Right now I am particularly focused on the geometry of representations: how abstract concepts — like refusal and truth — are encoded within a model’s activation space.
Two questions follow from this:
- Model biology: whether such concepts conform strictly to single linear directions, or rely instead on higher-dimensional, possibly non-linear manifolds.
- Applied interpretability: whether representation-level edits — steering, abliteration, concept erasure — are genuinely surgical when evaluated against practical baselines, with off-target side-effects measured as rigorously as the primary behavioral change.
The two are connected, since an intervention built on the wrong picture of the geometry is precisely one whose side-effects go unmeasured.
Education
M.Sc. in Computer Science (Laurea Magistrale in Informatica, LM-18)
University of Milan, Italy Sep 2024 – Present
- Thesis (proposal stage): What Does Forgetting Look Like? Where activations land after concept erasure
- Advisors: Prof. Alfio Ferrara & Elisabetta Rocchetti (University of Milan)
- Focus: Thesis on concept erasure in large language models: after an erasure intervention, where the edited activations land relative to the activations the model produces naturally, and whether they carry any meaning (representational vs. semantic absence of a concept).
- Expected defense: Summer 2027 (July 2027)
- Weighted average: 29.22/30 (3.90/4.00)
M.Sc. Advanced Coursework & Examinations (Weighted Avg: 29.22/30 • GPA: 3.90/4.00)
| Course / Examination | Grade | Date | Area & Topics |
|---|---|---|---|
| Natural Language Processing | 30 e lode | 27/11/2025 | LLMs & Deep Learning for NLP, Syntactic & Semantic Analysis, Transfer Learning, Text Classification & Generation (PyTorch) |
| Distributed and Pervasive Systems | 30 e lode | 10/06/2026 | Distribution Transparency, Consistency & Replication, Distributed Consensus, P2P/Cloud/Edge Architectures, Context-Awareness & Sensor Streams |
| Security of Service-Oriented Architectures | 30 e lode | 26/02/2026 | Confidentiality & Integrity in Semi-Structured Data, Web Services Identity & Access Control, Authorization Languages, Security Assurance & Certification |
| Audio Pattern Recognition | 30 | 02/07/2026 | Audio Signal Processing & Feature Extraction, Statistical Modeling, Hidden Markov Models, Neural Networks, Clustering & Classification Pipelines |
| Enterprise Security Management (Gestione della Sicurezza nelle Imprese) | 30 | 23/09/2026 | Enterprise Risk Management, Information Security Governance, Business Continuity, Compliance & Regulatory Frameworks (ISO 27001, GDPR), Security Economics & Threat Modeling |
| Advanced Biometrics (Complementi di Biometria) | 30 | 15/01/2026 | Biometric Systems Design & Evaluation, Behavioral Biometrics, Continuous Authentication, Mobile Biometrics, Template Protection & User Privacy |
| Privacy and Data Protection | 29 | 04/02/2025 | Authentication & Access Control, Privacy-Preserving Data Publishing, Microdata/Macrodata Protection, Cloud Security, Third-Party Processing Risks |
| Methods for Image Processing | 28 | 21/02/2025 | Spatial & Frequency Domain Filtering, Intensity Transformations & Histograms, Morphological Processing, Segmentation & Edge Detection, Image Compression |
B.Sc. in Computer Science (Laurea in Informatica, L-31)
University of Milan, Italy Sep 2020 – Oct 2024
- Final grade: 110/110 cum laude • Weighted Average: 28.55/30 (3.81/4.00)
- Thesis: Design and development of a donation-tracking system for RECUP APS (Sviluppo di uno strumento di supporto all’associazione Recup)
- Advisor: Prof. Carlo Maria Bellettini
B.Sc. Mathematical & Theoretical Foundations (Graduated 110/110 cum laude)
| Subject / Examination | Grade | Date | Area & Topics |
|---|---|---|---|
| Mathematical Logic (Logica Matematica) | 30 e lode | 22/09/2023 | Propositional & First-Order Predicate Logic, Formal Proof Systems, Soundness & Completeness, Model Theory & Countermodels |
| Discrete Mathematics (Matematica Discreta) | 30 e lode | 21/06/2022 | Set Theory & Relations, Combinatorics, Modular Arithmetic, Algebraic Structures (Groups, Rings), Linear Algebra & Graph Theory |
| Automata and Formal Languages (Automi e Linguaggi Formali) | 30 e lode | 26/01/2022 | Chomsky Hierarchy, Regular Languages, DFAs/NFAs, Kleene's Theorem, State Minimization, Context-Free Grammars & Pushdown Automata |
| Programming Languages (Linguaggi di Programmazione) | 30 e lode | 19/02/2024 | Programming Paradigms (Functional, Concurrent, OOP, Declarative), Operational Semantics, Type Systems & Memory Models |
| Artificial Intelligence I (Intelligenza Artificiale I) | 30 e lode | 23/01/2024 | Problem Solving & Heuristic Search (A*, Minimax), Constraint Satisfaction (CSP), Knowledge Representation & Automated Reasoning, Planning & ML Basics |
| Computer Programming (Programmazione I) | 30 e lode | 25/01/2021 | Imperative Structured Programming, Elementary Algorithms, Data Types & Scope, Control Flow, Functions, Memory Layout & Debugging |
| Computer Architecture (Architettura degli Elaboratori I) | 30 e lode | 28/01/2021 | Digital Logic & Boolean Algebra, Combinational/Sequential Circuits, ALU Design, MIPS Instruction Set Architecture, Datapath & Memory Hierarchy |
| Databases (Basi di Dati) | 30 e lode | 26/06/2023 | Relational Data Model & Relational Algebra, SQL (DDL/DML), Conceptual & Logical E-R Design, DBMS Architecture, Transaction Management (ACID) |
| Algorithms and Data Structures (Algoritmi e Strutture Dati) | 30 | 10/03/2022 | Asymptotic Complexity (O, Ω, Θ), Sorting & Searching, Fundamental Data Structures (Trees, Heaps, Hash Tables), Graph Algorithms & Dynamic Programming |
| Continuo Mathematics / Calculus (Matematica del Continuo) | 30 | 15/06/2022 | Differential & Integral Calculus (Limits, Derivatives, Taylor Expansions, Riemann Integrals), Sequences & Series, Multivariable Functions |
| Statistics and Data Analysis (Statistica e Analisi Dati) | 30 | 04/10/2022 | Descriptive Statistics, Probability Distributions, Parametric Statistical Inference (Hypothesis Testing, Confidence Intervals), Exploratory Data Analysis (Python) |
| Software Engineering (Ingegneria del Software) | 29 | 24/07/2023 | Software Lifecycle (Agile, Scrum), Requirements Engineering, UML Modeling, Architectural & Design Patterns (GoF), Unit/Integration Testing & QA |
Diploma, Computer Science (Perito Informatico)
ITT “G. e M. Montani”, Fermo, Italy Sep 2015 – Jul 2020
- Final grade: 100/100 cum laude (Focus on Programming and Computer Networks)
Research Experience
Independent Research — Representation Geometry of Truth
University of Milan (Sole author; Natural Language Processing course)
Dec 2025 – Jul 2026
- Tested whether propositional truth is mediated by one linear direction or by a $k$-dimensional concept cone. Adapted from Wollschläger et al. (2025), TDO and TCO: gradient-optimised directions and cones under causal necessity, sufficiency and KL-retention losses. Evaluated on six instruction-tuned models from three families (Qwen-2.5 1.5/7/14B, Gemma-2 2/9B, Llama-3.1-8B).
- Result: A single direction is insufficient for the larger models, and a low-dimensional cone ($k=2$) is the better model of the concept. Its basis is near-orthogonal to the Difference-in-Means probe yet individually causally effective. For the three larger models, a single direction also exceeded the KL side-effect threshold on unrelated prompts; a 2D cone resolved both effectiveness and side effects for every model.
- Manuscript: The Multidimensional Geometry of Truth in LLMs: A Concept-Cone Extension of the Linear Representation Hypothesis (2026). [Draft] [Code]
- Techniques: activation patching, directional ablation/addition, Difference-in-Means probes,
nnsight, PyTorch; single-GPU (A40).
Research Project — What a Heart-Sound Classifier Actually Learns
University of Milan (Sole author; Audio Pattern Recognition course)
Apr 2026 – Jul 2026
- Compared three feature representations (MFCC, log-Mel, perceptual wavelet packet) against three classifier families (SVM, Random Forest, CNN) on PhysioNet/CinC 2016 under one recording-level protocol, pairing every performance claim with a diagnostic capable of refuting it.
- Result: The headline MAcc of 0.866 is largely a recording-site artefact — site recoverable from the same features at 0.647 against 0.167 chance, diagnosis collapsing from 0.840 to 0.457 under leave-one-site-out. Attribution leans systolic, but no more so on correct than on incorrect predictions.
- Manuscript: What Does a Heart Sound Classifier Actually Learn? (2026). [Draft] [Code]
Research Project — Empirical Test of the Legends Hypothesis
SESAR Lab, University of Milan (With F. Bylyshi & H. El-Khazri, equal contribution)
Feb 2026 – Jun 2026
- Tested whether a model learns a regulation better from stories showing it being followed than from the regulation itself. Built a pipeline producing training corpora matched on everything but content, and GenderEqGLUE, a five-task benchmark evaluated on documents held out from training.
- Result: The two regimes teach complementary competences — training on the rule wins overall, training on the stories wins on the tasks that require applying it.
- Manuscript: The Legend Challenge: Embedding Ethical Compliance into LLMs through Champion Narratives (2026). [Draft] [Code]
Teaching Experience
Teaching Assistant — Computer Programming (Python)
University of Milan (Lecturer: Prof. Stefano Ferrari)
Oct 2026 – Present
- Teaching assistant for “Computer Programming”, the first-year Python course of the inter-university Bachelor’s in Artificial Intelligence (University of Pavia, University of Milan, University of Milano-Bicocca), taught in English. Lecturer: Prof. Stefano Ferrari.
- Support students during weekly lab sessions on imperative and object-oriented programming in Python; run weekly tutoring hours; assist with computer-based exams.
Teaching Assistant — Accertamento delle Competenze Informatiche (3 CFU)
University of Milan (Scientific lead: Prof. Stefano Montanelli; delivered by CTU)
Jan 2026 – Sep 2026
- Prepared and delivered lectures to classes of students, authoring the accompanying teaching material.
- Led lab sessions of a blended-learning course shared across numerous undergraduate degree programmes, and supervised examinations.
Engineering Experience
Lead Developer / Consultant
RECUP APS — University of Milan
Jan 2024 – Dec 2025
- Designed and built a donation-tracking web platform (React + TypeScript, Supabase DB/Auth/Storage, Netlify Functions); began as B.Sc. thesis, continued as a consultancy with me as lead developer.
- RecupGPT (2025): Retrieval-augmented natural-language querying over the production database (LangChain, LangGraph, NL2SQL with query rewriting and routing).
Full-Stack Developer Consultant
Value Process Srl, Milan
Jun 2022 – Sep 2022
- Developed microservices architecture in Spring Boot and React; led migration of a legacy system to a serverless architecture.
Full Stack Developer Intern
PC & Informatica SRL
Apr 2019 – Jun 2019
- Created responsive front-end interfaces; optimized SQL queries improving performance by 40% (PHP, JavaScript, MySQL).
Fellowships, Awards, and Honours
- Full academic + merit scholarships (tuition and housing), University of Milan (
Sep 2020 – Sep 2026) - Lead the Future — STEM mentorship community, Mentee (
Sep 2025 – Present) - BOOST ‘24 — Selected for the Bologna Orthogonal Summer Term for outstanding B.Sc./M.Sc. CS students (
Aug 2024) - Futuro Annunciato ‘24 — Selected for the event, for outstanding students (
Jul 2024) - Nomination, “Alfieri del Lavoro” Award — Presidency of the Italian Republic (
Jul 2020) - Participant, National Olympiads in Informatics & Mathematics (
2017 – 2020)
Technical Skills
- Mechanistic Interpretability: Denoising activation patching, directional ablation and activation addition, Difference-in-Means probes, gradient-based direction/cone optimisation, concept erasure (INLP, LEACE), activation steering
- Post-hoc XAI: SHAP (tree and kernel estimators), Grad-CAM with saliency sanity checks, structured occlusion
- Experimental Method: Causal mediation protocols, permutation and analytic nulls, grouped / leave-one-group-out cross-validation, paired significance testing with multiple-comparison correction, bootstrap over the correct unit of independence
- ML & LLM Tooling: PyTorch, nnsight, scikit-learn, LangChain, LangGraph, RAG, NL2SQL, supervised fine-tuning
- Programming Languages: Python, Java, TypeScript (proficient); Go, C, Scala, OCaml, Erlang (familiar)
- Web, Data & Cloud: React, SQL / PL-SQL, Supabase (PostgreSQL + RBAC), Netlify Functions, CI/CD
- Languages: Italian (native), Arabic (native), English (fluent, working language)
Projects
RecupGPT — Intelligent Natural-Language Querying
Retrieval-Augmented Generation over a food-surplus database
- Built with LangChain and LangGraph, integrating NL2SQL translation with query rewriting and routing
- Natural-language access to a Supabase database with thousands of records
- Cloud-native deployment (React, Supabase, Netlify Functions)
Extended Ricart–Agrawala — Distributed Mutual Exclusion
Distributed and Pervasive Systems (30 cum laude)
- Implemented and extended the Ricart–Agrawala algorithm, resolving correctness issues arising from removing the Lamport-clock assumptions
- Developed test-first (TDD); code under a 1-year embargo
Non-Profit Information System (B.Sc. Thesis Project)
Full-stack web application for NGO operations
- React + TypeScript frontend and Netlify Functions backend
- Real-time data synchronization using Supabase
- Custom multi-role access control (RBAC)
- Features: donation tracking, volunteer management, reporting dashboards
- In use by volunteers and coordinators in the markets of Milan and Rome