[ MSc Artificial Intelligence Systems · Trento, 2026 ]

AndreaGiampietro

  • Machine learning
  • Evaluation
  • Interpretability

I build machine-learning models in Python and PyTorch, and test what they have actually learned: from language and vision-language models to EEG decoding.

Genoa, Italy open to relocation

Illustration of Andrea at his desk, wearing a graduation laurel wreath, next to his thesis, a guitar, a sleeping cat and a backpack.
what a vision model would see

[ 01 — selected work ]

Selected work

01 / 05MSc thesis

What are we really decoding in musical attention?

University of Trento · Supervisor: Daniel Baldauf

I reproduced a published EEG decoder of musical attention, then upgraded it with a frozen LAION-CLAP audio tower. Digging through the legacy code, I ran the test the original paper never ran: holding whole songs out. Accuracy fell to chance, and a classifier that never sees the EEG still recovered the labels. The model had learned the song, not the attention.

On a second dataset designed to rule out that shortcut, controlled experiments showed the models following the statistics of the music and of their training data instead of the listener’s attention.

  • PyTorch
  • EEG
  • Interpretability
  • Experimental design
How the thesis model works EEG and four separated audio stems (vocals, drums, bass, other) are encoded. The model compares the EEG with each stem by cosine similarity and predicts the attended instrument. Looking closer, the same prediction is recovered without any EEG, from the identity of the song. EEG EEG enc. vocals drums bass other audio encoder CLAP cosine similarity prediction: drums song identity no EEG

schematic · similarity values are illustrative

What the metric says: the EEG points to the instrument the listener attends to.

  • 01 · reproduce87.5%the published baseline, rebuilt
  • 02 · upgrade94.6%with a frozen CLAP audio tower
  • 03 · audit25.8%songs held out, a test the paper never ran · chance 25%

02 / 05Group project

A claim and its opposite, both true?

Language and Social Cognition · University of Trento · my part: the technical and statistical side

With 150 triplets (a statement, its negation and an antonym) I tested whether GPT-4o stays consistent or goes along with whatever it is shown. Asked plainly, it got about 96% of single statements right, but whole triplets only 49% of the time.

Prompts that make the logical rule explicit removed most of the contradictions, at the cost of more abstentions. Calibration held throughout.

  • GPT-4o
  • Prompting
  • Consistency
  • Calibration

prompt

Is this statement true, false, or is there insufficient info? Give a confidence from 0 to 100.

one of the 150 triplets · ground truth

  1. ALight travels faster than sound.true
  2. not-ALight does not travel faster than sound.false
  3. antonymSound travels faster than light.false
  • same answer to A and not-A0.36
  • same answer to A and its antonym0.42

Neutral: right on single statements, yet often the same answer to a claim and its opposite.

  • triplet accuracy49.2%A, not-A and antonym all right · neutral prompt
  • single statements≈96%plain statement right · neutral prompt
  • calibration≈0.025Brier score: confidence matches accuracy

03 / 05Open source

Bias in the model, or in the prompts?

Extension of OpenBias (CVPR 2024) · SDXL images from COCO captions

I extended OpenBias from single attributes to pairs of attributes: a permutation test per pair, Benjamini–Hochberg correction, and a filter for captions that state the attribute outright. Of 1,957 pairs scanned, 12 couplings survived.

Tested within a single prompt, only two held, both about dogs. The couplings between attributes of people came from pooling prompts that each carry their own bias, not from the generator tying them together.

  • Python
  • Permutation tests
  • Text-to-image
  • Tested code

coupling strength across prompts · normalised mutual information

  • dog · breed × size0.48
  • person · age × style0.30
  • person · age × attire0.24
  • person · gender × occupation0.23
  • dog · age × size0.19
  • person · ability × age0.11
  • person · age × occupation0.08
  • person · activity × age0.05

8 of the 12 couplings that survive the leakage filter (q ≤ 0.05)

Across prompts, attributes of people look tightly coupled in the generated images.

  • scanned1,957attribute pairs in SDXL images
  • significant12couplings after FDR and the leakage filter
  • real2hold within a single prompt, both about dogs

04 / 05Group project

Adapting CLIP without losing what it knew

ProtoCoCoOp · prompt learning on Flowers102 · University of Trento

Adapted CLIP to dataset-specific visual classes through prompt learning. Our group combined CoCoOp with knowledge distillation from frozen CLIP and class prototypes, balancing performance on familiar and unseen classes.

On Flowers102 the method came out ahead of CoCoOp on the base–novel harmonic mean: accuracy on the familiar classes rose sharply while unseen classes stayed close to zero-shot CLIP.

  • PyTorch
  • Vision-language
  • Prompt learning
  • Distillation
How prompt learning adapts CLIP An image and a text prompt pass through CLIP’s frozen image and text encoders and are matched by similarity. Zero-shot CLIP uses a hand-written prompt and here picks the wrong flower; ProtoCoCoOp learns the prompt tokens, conditions them on the image and picks the right one. image image enc. frozen text enc. frozen prompt · learned v1 v2 v3 v4 class conditionsthe prompt similarity primrose lotus daisy → primrose ✓

schematic · example prediction, values illustrative

ProtoCoCoOp: learned prompts conditioned on the image, plus prototypes and distillation from frozen CLIP.

  • harmonic mean84.44base–novel balance · CoCoOp: 83.38
  • base classes93.85accuracy on the familiar flowers
  • novel classes76.74accuracy on unseen flowers

05 / 05Academic project

Teaching BERT to book a flight

Intent classification and slot filling on ATIS · University of Trento

Fine-tuned BERT for intent classification and slot filling on ATIS, handling tokenisation, label alignment and task-specific evaluation. Compared results with LSTM and BiLSTM baselines; a separate component investigated language-model regularisation.

  • PyTorch
  • Hugging Face Transformers
  • NLU

example sentence · slot labels

  1. [CLS]intent
  2. showO
  3. meO
  4. flightsO
  5. fromO
  6. bostonB-fromloc
  7. toO
  8. denverB-toloc
  9. tomorrowB-date
  10. [SEP]

intentflight

[CLS] carries the intent; every other token gets a slot label, O for none.

  • intent accuracy96.9%BERT, fine-tuned
  • slot F10.943best model: BiLSTM with dropout

[ 02 — toolbox ]

Toolbox

Machine learning

  • PyTorch
  • Hugging Face Transformers
  • scikit-learn

Programming

  • Python
  • C
  • C++
  • Java
  • PHP
  • JavaScript

Tools

  • NumPy
  • Pandas
  • Jupyter
  • Git
  • Linux

Methods

  • Fine-tuning
  • Prompt learning
  • Model evaluation
  • Experimental design

CS foundations

  • Algorithms
  • Data structures
  • Parallel algorithms
  • Object-oriented programming

[ 03 — path ]

Education & experience

  1. 2024–2026

    MSc Artificial Intelligence Systems

    University of Trento · Neurocognitive Architectures

  2. 2026

    International academic projects, ECIU

    A preventive-healthcare dashboard prototype in Aveiro; analysis of a medical robotics research project at the University of Twente.

  3. 2023–2024

    Orientation Tutor, University of Genoa

    Supported prospective students and the department’s orientation activities.

  4. 2021–2024

    BSc Computer Science

    University of Genoa · Algorithms, data structures and object-oriented programming

  5. 2018, 2023

    Science Communicator, Albissola / Genoa

    Presented scientific material to audiences with different ages and backgrounds.

[ 04 — manifesto ]

What does a model’s score actually show?

My goal is to understand what AI systems actually learn, and to make what we claim about them checkable.

Read the research manifesto

[ 05 — contact ]

Get in touch

andrea.giampietro@proton.me

© 2026 Andrea Giampietro · Illustration by @disegniniconlaiiiBack to top ↑