Ismail Ben Alla

Lab notes

Short, dated notes: experiments with one question, one result and one lesson, and the open questions I’m working on now.

Subjects I’m working on

  1. · Ongoing

    A learning rule for every experience, not only for training

    Question. Is there a formula, like backpropagation, that lets a model learn from everything it does, at inference and from every experience, the way we do?

    Why. Today a model learns during training and is frozen when it is used. We don’t work that way: we learn from every experience. Backpropagation is the formula that made training possible; I’m looking for the one that makes learning never stop. This is what I work on and think about all day.

    learning rules, continual learning, backpropagation

  2. · Ongoing

    Smaller models, full performance: size is not complexity

    Question. Can a model be made much smaller while keeping its full performance?

    Why. For me, the size of a model and its complexity are two different things. More parameters do not mean a more complex function, and the function is what matters. I work on this part time.

    efficiency, compression

  3. · Ongoing

    Disentanglement: learning without target data

    Question. Can a model learn tasks like voice conversion and noise cancellation from data that has no target output?

    Why. I believe in disentanglement. If a model learns to separate the factors in a signal (who is speaking, what is said, what is noise), it can recombine them without ever seeing a paired example of the answer. My voice-conversion research (PairVC, JointVC) is built on this idea.

    disentanglement, voice conversion, noise cancellation

  4. · Ongoing

    Neural networks work. That doesn’t mean they are built the right way

    Question. Is today’s way of building neural networks the right one, or only the first one that worked?

    Why. Historically, once something works, industry makes millions of it and sells it; it does not go back to ask whether it was built the right way. Neural networks work today, but working is not proof that the design is right. I’m looking for a different way to build them.

    architecture, first principles

  5. · Ongoing

    LLMs: how they work, and the best way to use them in everyday life

    Question. How do LLMs really work inside, and what is the best way to use them in our day-to-day lives?

    Why. I love LLMs and how they work. Knowing what happens inside a model is what tells you where it helps and where it fails, so I study both sides: the internals, and how people can use LLMs well in their daily work and life.

    llms, interpretability, everyday ai

What I’ve learned

  1. There is no single right way to give a model information

    Lesson. Whether it is a condition, a label or any other extra signal, there is no one good way to add information to a deep learning model: concatenate it, add it, scale features with it, attend to it, and they all work. Only metrics and different evaluations prove which one works best.

    conditioning, evaluation

  2. Deep learning is forgiving

    Lesson. Deep learning is a very good space to work in because it forgives. A logical intuition often works best, even when nobody has proven it mathematically: the network learns to embrace some of our imperfections.

    intuition, deep learning

Experiments

  1. Flash Attention was a clean drop-in win in my from-scratch GPT

    Question. Is wiring PyTorch's scaled_dot_product_attention into a hand-written GPT worth it versus my manual causal mask?

    Result. Swapping the manual masked attention for scaled_dot_product_attention (Flash) kept outputs identical while cutting memory and step time, with a manual fallback retained for older PyTorch.

    Lesson. Once you understand attention well enough to write it by hand, you've also earned the right to use the fast kernel without it being a black box.

    code: Flash Attention was a clean drop-in win in my from-scratch GPTtransformers, gpt, efficiency

  2. Three patch-embedding strategies, three different ViTs

    Question. Does it matter whether ViT patches are embedded via Conv2D, LayerNorm-on-flattened-patches, or a reshape?

    Result. Implemented all three in my ViT image classifier. The Conv2D embedding trained most stably; the reshape variant was the most transparent for teaching, the LayerNorm variant sat in between.

    Lesson. Tokenization is not a detail — the very first layer that turns pixels into tokens shapes everything the transformer can learn.

    code: Three patch-embedding strategies, three different ViTsvit, vision, from-scratch

  3. Decoding strategy changed translation quality more than the model did

    Question. For English↔Darija, where does output quality actually come from — the trained weights or the decoding strategy?

    Result. Holding the model fixed, moving from greedy to beam search with length normalization, and tuning top-p, changed perceived quality more than a round of retraining.

    Lesson. At inference time the search matters as much as the model. Always sweep decoding before blaming the weights.

    code: Decoding strategy changed translation quality more than the model didnlp, decoding, transformers

  4. Latency reshaped the whole architecture in real-time voice conversion

    Question. How much does a hard real-time latency budget change the design of a voice-conversion model?

    Result. Designing NatVC around a live-latency constraint ruled out lookahead-heavy blocks and pushed the whole pipeline toward streaming, causal, low-overhead components.

    Lesson. A latency budget is an architecture constraint, not an afterthought. It belongs at the top of the design, next to the loss.

    audio, voice-conversion, latency

  5. Building autograd from scratch demystified backprop for good

    Question. Do I actually understand backpropagation, or do I just trust loss.backward()?

    Result. Writing MyTorcha's DAG and chain-rule backward pass by hand made gradients concrete; a tiny numerical gradient check confirmed the hand-derived ones.

    Lesson. Backprop is just the chain rule applied over a graph. Implementing it once turns a black box into something you can debug.

    code: Building autograd from scratch demystified backprop for goodbackprop, from-scratch, fundamentals

  6. Comparing Transformer, LSTM, and RNN on identical music data

    Question. Is a single well-tuned model or a fair three-way comparison the better way to learn sequence modeling?

    Result. In MusicGen, training all three on the same corpus with documented loss curves made the Transformer's advantage — and the RNN's limits — visible in a way one tuned model never could.

    Lesson. A controlled comparison is worth more than a leaderboard score. Fair baselines are where the understanding lives.

    code: Comparing Transformer, LSTM, and RNN on identical music datasequence-models, experiments, generative