Leonardo Cofone

Leonardo Cofone

17 years old · Trento, Italy

I'm Leonardo. I do machine learning research, mostly on how deep models learn and how to make them cheaper. I'm 17, I live in Trento, Italy, and yes, I still have to go to high school in the mornings :(

How it started

I started programming in 2022, mostly thanks to my family. The real hook came later, from a less serious place: Jarvis, in the Avengers movies. An assistant that actually understands you looked like the coolest thing anyone could build. Then I found out about machine learning, realized people were seriously working on it, and that was it. Kind of an easy story, no tearjerker.

What I'm after

I think AI is the biggest thing humans have ever built (huge words, I know), and it's being built right now. My generation is growing up in the middle of it, with tools that were science fiction ten years ago. I don't want to live through it passively. I want to help build it and, if I'm lucky, leave a real mark on it.

A few things I try to stick to

Things I got wrong

A normal day

School, library, work, study, training, study, sleep. Repeat.

I do triple jump: hop, step, jump. Basically a looped model with three iterations. I also play chess.

Things that help: pizza, Laufey, VS Code, a good paper (lately Exclusive Self Attention), and Understanding Analysis by Stephen Abbott, which I read for fun. Yes, I know.

I love people :) If you want to talk about any of this, write me.

Lately

Yeah, this might be a little outdated. I'm usually too busy doing the things I should be writing about. ;)

Research

  1. Where the Loss Is Applied Shapes the Timing of Looped Language Models

    Leonardo Cofone · Preprint, 2026

    Why do looped language models trained at a fixed number of loops get worse when they are run for more loops at test time? This work studies how the placement of the loss shapes the timing of their internal dynamics.

    Developed during my guest research at the Max Planck Institute for Intelligent Systems, where all models were trained on the institute's compute cluster. Big thanks to Antonio Orvieto, Sajad Movahedi and Vera Milovanović for their feedback and discussions.

    An earlier version is on Zenodo as “Depth-Locked Dynamics in Looped Language Models”.

    Paper (Zenodo) · Code

  2. DSALT: Sparse Attention with Adaptive Windows and Content-Selected Landmarks

    Leonardo Cofone · Preprint, 2026

    Looks at how dense softmax attention degrades token representations as layers stack up, and proposes a sparse attention that combines an adaptive local window with a few landmark tokens chosen by content.

    Experiments run on compute provided by ICAR-CNR, the Institute for High Performance Computing and Networking of the National Research Council of Italy.

    Read more

    Dense softmax attention spreads some weight over every token. Over long contexts and many layers that adds up to noise, and token embeddings start to look more and more alike.

    DSALT keeps a local window around each token and adds a few landmark tokens picked from the whole sequence. The landmarks are chosen with an energy-based score that weighs how strong a token's representation is and how much it matters for the output.

    The goal is to cut the token interactions that add nothing while keeping long-range dependencies, so representations get better and the computation gets cheaper. Along the way I also look at how attention structure relates to rank and to how information flows through deep networks.

    Paper (Zenodo) · Code · Python library

Experience

  1. Guest Researcher – Max Planck Institute for Intelligent Systems

    July 2026 – Present · Tübingen, Germany · Hybrid

    Six months in the Deep Models and Optimization group, working on looped models and on making deep architectures more efficient.

    I read a lot, presented my paper to the group and got feedback from people with far more experience than me. It changed how I do research.

  2. Python Developer – Airpim Srl

    June 2026 · 1 month · Mori, Italy · On-site · Internship

    I built a Python tool that finds memory leaks on its own, with zero dependencies, so it drops into any codebase.

    The hard part was telling real leaks apart from normal allocation noise without fixed thresholds, so the tool adapts its statistics to the process it's watching. When it finds something, it walks the object graph to show what's actually holding the reference, instead of just telling you memory is growing. It was validated in production.

  3. AI Developer – EgoLog Srl

    August 2025 – February 2026 · 7 months · Milan, Italy · Remote

    I built AI agents in n8n for social media management, data enrichment, lead generation and a few other things.

    All of it end to end: figuring out what the client actually needed automated, designing the agents, plugging them into the systems already in place and keeping them running once they were live.

  4. AI Developer – Top Evolutions Srl

    June 2025 – September 2025 · 4 months · Trento, Italy · Hybrid

    My first real job. I worked on AI automation for businesses in payments, building prompt-driven systems that matched merchants with the payment provider that actually fit them, plus some lead generation automation.

    At first I trained models on the client's data, then the work moved to prompt engineering: getting the model to reason over real business constraints instead of giving recommendations that only sounded plausible.

Programs & Collaborations

  1. Mentee – LeadTheFuture Mentorship

    September 2026 – Present · Milan, Italy · Remote

    Got into LeadTheFuture, a STEM mentorship program that takes fewer than 20% of applicants. I'm paired with a mentor from the tech and research world, and we meet regularly to talk about research, school and what comes next.

  2. Research Collaboration – ICAR-CNR, National Research Council of Italy

    May 2026 – September 2026 · 5 months

    They liked the idea behind DSALT and gave me access to their HPC cluster (ICAR is the CNR's Institute for High Performance Computing and Networking), so that's where its experiments ran.

    I also presented my research there and talked through recent papers and experimental results with the researchers.

Education

  1. Galileo Galilei Scientific High School

    Graduating in June 2028 · Trento, Italy

    Still in high school, on the scientific track, so a lot of math and science.

  2. Independent study in Artificial Intelligence

    Ongoing

    Projects, online courses, competitions, books and a LOT of research papers. ;)
    I probably read more papers than I drink glasses of water.

Certifications

The courses I took when I was starting out: the theory, plus hands-on work on real datasets. Click a title to see the certificate.

Say hi

Questions, research ideas, collaborations, or just to tell me my attention mechanism is wrong: write me at leonardo.cofone5@gmail.com or use the form below.