Podcast

Adventures in Building CLIP & Other (Largeish) LMs

Sachin Abeywardana, Canva AIEpisode 180 · 1:06:38 · Oct 2023 · 432 viewsHosted by Demetrios Brinkmann
Thumbnail for Adventures in Building CLIP & Other (Largeish) LMs Watch on YouTube
TL;DR
  1. 1

    Sachin Abeywardana argues that machine learning engineers need to understand product goals and product metrics, since model metrics alone can point work in the wrong direction.

  2. 2

    CLIP can improve multilingual image search by placing text and image embeddings in a shared space, then using vector search and reranking to find relevant images.

  3. 3

    Sachin recommends testing ideas quickly with external APIs when possible, then deciding whether an in-house model is worth its engineering and maintenance cost.

Summary

Sachin Abeywardana discusses his move from Bayesian machine learning research into deep learning and industry work at Canva. He explains why he values deep learning while still seeing a place for models such as XGBoost, especially for tabular data. Much of the conversation focuses on product judgment. Sachin describes a proposed payment model for Canva creators that would have rewarded the wrong behavior, even though it could be framed as a machine learning problem. He also explains a CLIP-based approach to multilingual image search, where text and images are mapped into a shared embedding space. The model had not yet been tested in production, so the business case remained a goal rather than a measured result. Later, he discusses GPT fine-tuning, external APIs, graph machine learning, Transformers, and the pressure of keeping up with research while raising two children. His advice is practical: move quickly, use existing tools, check product metrics early, and choose projects with care.

Key ideas
06:01

Agents become useful when they can act on errors and tools, but reliability remains the hard problem

Demetrios Brinkmann describes a hackathon project where agents took generated code, captured errors, sent them back to ChatGPT, and updated the code. Sachin Abeywardana agrees that automating this loop would help, since he currently copies errors back manually. He is less convinced by agents that only contain detailed prompts and fixed boundaries. Language understanding is improving quickly, so prompt-defined agents may improve with better models and feedback. Agents that can access the web or a Python terminal extend their capabilities more substantially. Sachin says reliability is where many agent demos fail, especially once the system must act beyond a simple prompt.

08:50

Sachin sees his PhD as mathematically valuable but poorly matched to the pace of industry

Sachin Abeywardana says his four-and-a-half-year PhD in Bayesian machine learning was the biggest waste of time he had experienced. His work focused on Gaussian processes, where datasets were much smaller than those used by emerging neural network systems. During the PhD, a thousand data points was a strong result for the work he was doing, and later reaching a million felt remarkable. Afterward, a short course using the MNIST dataset showed him how quickly a neural network could reach high accuracy, which pushed him toward deep learning. He says six months in industry taught him more useful material than the PhD, while also acknowledging that he remains interested in the mathematics.

16:16

Deep learning can add value inside a larger search pipeline, especially when text context matters

Sachin argues that deep learning should not be dismissed as too heavy for production. He says XGBoost remains better for tabular data, but text columns create an opportunity to use language models for additional features. For search, traditional keyword extraction and stemming can lose word order and context. A query such as "bird sitting on a tree" differs from "bird sitting on a bench" even when the individual words are similar. Sachin is exploring CLIP for image search at Canva, using keyword search to gather a broad set and deep learning to rerank it. He presents this combination as safer than relying on one method for every case.

19:09

CLIP aligns text and image embeddings so multilingual queries can search the same image collection

Sachin explains CLIP as two models that project text and images into a shared numerical space. Similar text and image concepts should point in similar directions within that space. For multilingual search, a text encoder can map a query in one language to an embedding close to the equivalent query in another language, while the image embedding stays language-independent. A vector database can then search the image collection using that embedding. Sachin's Canva use case is improving search for languages with weaker stemming and fewer language resources. He was building a smaller, multilingual version rather than using the original CLIP model because the original was relatively bulky. He had not yet tested the approach in production.

28:08

A machine learning solution can be technically sound while creating harmful product incentives

Sachin describes a proposed way to divide payments among Canva template creators using clicks and whether a template led to Canva Pro revenue. He later recognized that this could reward the wrong activity. Creators might focus on short Instagram posts because they could produce them more often, rather than spending time on longer, higher-quality presentations. People could also manipulate the system by appearing to come from more valuable markets. Sachin calls this a bad use of machine learning because the incentives could reduce the quality of Canva's templates. The example changed his view of how product context and ethics should shape model decisions.

01:01:26

Product metrics can differ sharply from familiar model metrics

Sachin says he used to focus too much on mathematical problems and not enough on product needs. For a keyword model, his machine learning evaluation used precision and recall, while the product team cared about pick rate, meaning how often users selected a suggested keyword. Those measures were close for English and further apart for non-English search. He wishes he had tested the model against the product metric sooner and iterated from there. Since he had moved to another project, he could not immediately continue improving that model. His advice is to measure the outcome the product team cares about, not only the scores in an experiment dashboard.

58:04

Speed and scope matter more than finishing every interesting research problem

Sachin recommends a maximum development period of about three months for a model iteration. If work is heading beyond that, he says the team should reconsider the solution or move to another problem. He does not argue that every model should be simple. Larger and more complicated models can be worth using, especially with tools from Hugging Face and similar libraries. The practical point is to avoid rebuilding everything from scratch. He also admits that engineers can become attached to their projects and prefer tinkering with a custom solution. Product work requires balancing that long-term engineering satisfaction against the business need to deliver quickly.

44:21

Graph machine learning could combine data types that models usually examine separately

Sachin distinguishes graph machine learning from GraphQL. Graph machine learning performs inference over nodes and edges, so a system can use how information spreads through a network as part of a prediction. He gives fake news detection as an example: instead of judging only the text of a tweet, a model could examine how quickly accounts and bots retweet it. The network pattern may provide a stronger signal than the content, which can change meaning over time. Sachin is interested in graphs because they can connect images, text, and tabular data, and can handle a variable number of connected data points. He also says the available libraries are not yet mature.

"The biggest mistake that I've done in the past is really not aligning or understanding product."Sachin Abeywardana58:29
Who should watch
  • Machine learning engineers who spend most of their time on model quality and want to connect that work to product outcomes.
  • Teams deciding whether to prototype with an external language model API or build and maintain a model in-house.
  • Engineers working on multilingual search, image retrieval, embeddings, or graph-based prediction.