<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Computer Vision | Sanjay Saha</title><link>https://www.sanjaysaha.info/tags/computer-vision/</link><atom:link href="https://www.sanjaysaha.info/tags/computer-vision/index.xml" rel="self" type="application/rss+xml"/><description>Computer Vision</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 29 Jul 2026 00:00:00 +0000</lastBuildDate><image><url>https://www.sanjaysaha.info/media/icon_hu_b85e79e7dfd721be.png</url><title>Computer Vision</title><link>https://www.sanjaysaha.info/tags/computer-vision/</link></image><item><title>The Representation Is the Product</title><link>https://www.sanjaysaha.info/blog/representation-is-the-product/</link><pubDate>Wed, 29 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.sanjaysaha.info/blog/representation-is-the-product/</guid><description>&lt;p&gt;&lt;em&gt;Four ideas behind modern multimodal image and video understanding — and why none of them are new.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I gave this talk at Curtin University on 30 July 2026, hosted by the IEEE Western Australia Computer Society Chapter, to a room of students and researchers. A few people asked for the written version, so here it is — shorter than the talk, and with the references I promised.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="meaning-lives-in-the-combination"&gt;Meaning lives in the combination&lt;/h2&gt;
&lt;p&gt;A football clip is not a sequence of frames. It is frames, plus a commentator saying &lt;em&gt;goal&lt;/em&gt;, plus a stadium roar, plus a caption someone typed, plus whatever text happens to be on screen. Any one of those channels is ambiguous. Together they are not.&lt;/p&gt;
&lt;p&gt;That is the whole reason multimodal understanding exists as a field, and it is worth stating plainly because it breaks the setting most of us learned computer vision in: one image goes in, one label comes out, on a dataset that never changes.&lt;/p&gt;
&lt;p&gt;Real systems break three of those assumptions at once. There are several modalities arriving together. The data might be ten thousand items or ten billion. And there is a latency and cost budget that quietly decides what you are actually allowed to ship.&lt;/p&gt;
&lt;p&gt;What I want to convince you of is that four reusable ideas carry you across that entire range:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Encoders&lt;/strong&gt; that turn each modality into a vector&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fusion&lt;/strong&gt; that decides when to combine those vectors&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieval&lt;/strong&gt; that searches the resulting space&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Distillation&lt;/strong&gt; that makes big-model quality affordable to run&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Learn these four and the application becomes, to a first approximation, a choice of index and output head.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="these-questions-are-older-than-you-think"&gt;These questions are older than you think&lt;/h2&gt;
&lt;p&gt;Students tend to assume this machinery arrived with CLIP. It didn&amp;rsquo;t. What arrived was a better answer to questions the field had already been asking for two decades.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before deep learning&lt;/strong&gt;, every modality had hand-engineered descriptors: SIFT and HOG for images, MFCCs for audio, TF-IDF bag-of-words for text. Retrieval already looked familiar — &lt;em&gt;Video Google&lt;/em&gt; (Sivic and Zisserman, 2003) quantised SIFT descriptors into &amp;ldquo;visual words&amp;rdquo; so you could reuse text-search machinery, inverted index and all. Turning an image into a vector and searching it like text is over twenty years old. Cross-modal linking existed too, in the form of canonical correlation analysis, which found linear projections of image and text features that maximally correlate. That is the conceptual ancestor of CLIP. Even the fusion debate was settled vocabulary: &lt;em&gt;early versus late fusion in semantic video analysis&lt;/em&gt; is a 2005 paper.&lt;/p&gt;
&lt;p&gt;The wall was that features were fixed and generic. All the learning happened in a shallow classifier on top, so every new task meant new feature engineering. People called the resulting problem the semantic gap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Then features became learned.&lt;/strong&gt; AlexNet in 2012 moved the design work from the feature engineer to the optimiser, and within a year CNN activations had replaced SIFT as the default descriptor for almost everything — crucially, they &lt;em&gt;transferred&lt;/em&gt;. Joint image–text embeddings retired CCA. Captioning and VQA brought encoder–decoder architectures and then attention, which is the seed of the cross-attention fusion we use now. Self-supervision broke the label bottleneck. Transformers took over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Then alignment, and then reasoning.&lt;/strong&gt; CLIP in 2021 produced one general-purpose, semantic, aligned space with zero-shot transfer, and retrieval stopped being a per-task engineering project. Shortly after, people bolted that representation onto a language model — frozen encoders, a small projector, an LLM backbone — and got systems that could reason and converse about pixels.&lt;/p&gt;
&lt;p&gt;Notice what did not change across any of this. How do I represent each modality? When do I fuse them? How do I search the result? How do I afford to run it? Those four questions are in a 2005 multimedia paper and in a 2026 production system. Only the answers got better.&lt;/p&gt;
&lt;p&gt;What &lt;em&gt;did&lt;/em&gt; change is which resource is scarce. It used to be good features. Then it was labels. Now it is compute and latency — which is precisely why the fourth pillar exists.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="pillar-1-turn-everything-into-a-vector-then-search-it"&gt;Pillar 1: turn everything into a vector, then search it&lt;/h2&gt;
&lt;p&gt;Every modality gets mapped to a fixed-length embedding. Vision goes CNN → ViT → hierarchical ViTs like Swin. Audio becomes a spectrogram fed to an encoder such as Whisper, which conveniently gives you both acoustic features and, through its decoder, transcribed text — two modalities for the price of one. Text goes through a transformer encoder, multilingual the moment your data isn&amp;rsquo;t English.&lt;/p&gt;
&lt;p&gt;The mental model that matters: &lt;strong&gt;an encoder is a learned function into a space where geometry means meaning.&lt;/strong&gt; Nearby vectors are similar content.&lt;/p&gt;
&lt;p&gt;We don&amp;rsquo;t hand-design that space, we learn it — usually by contrast. Self-supervised methods like MoCo learn strong visual structure with no labels by pushing an image away from many negatives. CLIP-style training does something different and, for our purposes, more important: it pulls an image and its matching text or audio together, and pushes mismatched pairs apart.&lt;/p&gt;
&lt;p&gt;That distinction is the punchline of the section. Visual similarity alone gets you &amp;ldquo;looks alike.&amp;rdquo; Alignment to language gets you &amp;ldquo;means the same.&amp;rdquo; In one system I worked on, going from self-supervised-only training to self-supervised plus cross-modal alignment moved top-5 recall from roughly 60% to roughly 90%. Same encoder, same data scale — the difference was that the space had been tied to language.&lt;/p&gt;
&lt;p&gt;Once everything is a vector, &amp;ldquo;find similar content&amp;rdquo; is nearest-neighbour search, and this is the pillar where scale becomes visible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Thousands to millions of items:&lt;/strong&gt; exact search is completely fine. A flat index in FAISS, scikit-learn, or honestly just NumPy. Full-dimension vectors, no approximation, set up in an afternoon.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Billions of items, in real time:&lt;/strong&gt; you need approximate nearest neighbour. HNSW graph indices give low latency at high recall. Keep separate indices per category so search stays relevant.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One trick worth knowing at either scale is &lt;strong&gt;Matryoshka representation learning&lt;/strong&gt;: train a model whose embedding can be &lt;em&gt;truncated&lt;/em&gt; — 768 dimensions down to 128 — with very little quality loss. Short vectors for a cheap first pass, long vectors when precision matters. One model, many operating points on the cost curve.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="pillar-2-when-do-you-combine-the-modalities"&gt;Pillar 2: when do you combine the modalities?&lt;/h2&gt;
&lt;p&gt;Once each modality is a vector, you have a genuine design choice, and it is an accuracy-versus-modularity trade-off rather than a correctness question.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pre-fusion&lt;/strong&gt; combines features &lt;em&gt;before&lt;/em&gt; the model reasons, typically with cross-attention. The network can model interactions between modalities directly, which raises the ceiling — but it is heavier, and every modality has to run together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Post-fusion&lt;/strong&gt; lets each pipeline produce its own score, then combines at the end with averaging, a small learned head, or explicit decision rules. Modular, parallelisable, easy to add or remove a modality, and cheap. It also misses fine-grained cross-modal cues.&lt;/p&gt;
&lt;p&gt;Two questions decide it. Do the modalities need to &lt;em&gt;interact&lt;/em&gt; to make this decision? Pre-fuse. Do you need to scale, cache, or swap them independently? Post-fuse. Most production systems answer &lt;em&gt;both&lt;/em&gt;, at different levels of the stack: cross-attention inside each model, decision rules between models.&lt;/p&gt;
&lt;p&gt;Worth saying out loud, because people underrate it: adding audio to a visual-only classifier in the system I mentioned lifted average precision by about six points. Audio is nearly free to compute when you&amp;rsquo;re already running Whisper. Multimodal beats unimodal even when the extra signal is cheap.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="pillar-3-mllms-and-why-you-probably-cant-ship-one"&gt;Pillar 3: MLLMs, and why you probably can&amp;rsquo;t ship one&lt;/h2&gt;
&lt;p&gt;A multimodal large language model is modality encoders, plus a projector, plus an LLM backbone. Visual and audio tokens get projected into the language model&amp;rsquo;s token space so it can reason over them in words.&lt;/p&gt;
&lt;p&gt;They are powerful for exactly one reason: world knowledge and higher-level reasoning. A question like &lt;em&gt;does this video actually depict what its caption claims?&lt;/em&gt; is not something a from-scratch classifier learns easily. An MLLM more or less already knows.&lt;/p&gt;
&lt;p&gt;They are also frequently undeployable. Billions of parameters, per item, over a high-volume stream, under a fixed latency budget. In our case the adapted MLLM was clearly the strongest model offline, at around 80% AP — and ran at roughly 14 queries per second, which is not a production system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Distillation&lt;/strong&gt; is the bridge. You train a small, fast student to imitate a big teacher, and the key insight is that you transfer more than labels:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;L = L_CE + α · L_KL + β · L_MSE
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ground truth teacher&amp;#39;s soft teacher&amp;#39;s
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; labels output distribution hidden states
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The label tells the student &lt;em&gt;what&lt;/em&gt; the answer is. The teacher&amp;rsquo;s soft distribution tells it how confident to be and which wrong answers were nearly right — often called dark knowledge, and it is a far richer signal than a one-hot vector. The hidden-state term makes the student&amp;rsquo;s internal representation resemble the teacher&amp;rsquo;s, which works even across different architectures.&lt;/p&gt;
&lt;p&gt;Does it help? In our case the same small architecture went from about 71% AP trained normally to about 76% distilled, against an 80% teacher — most of the gap closed, at roughly six times the throughput. That is the entire point of the pillar: MLLM-quality decisions at production latency.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="pillar-4-composing-them-into-something-useful"&gt;Pillar 4: composing them into something useful&lt;/h2&gt;
&lt;p&gt;Real systems put the pillars together in a shape you will recognise from web search, recommender systems, and RAG:&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;fast head&lt;/strong&gt; — the distilled classifier or embedder — handles the common, known cases at high precision and low latency. A &lt;strong&gt;retrieval-and-rerank tail path&lt;/strong&gt; embeds the item, retrieves similar references by ANN, and verifies with a multimodal re-ranker. The head is efficient; the tail catches the novel, rare, and long-tail cases a fixed classifier structurally cannot see, because it was never trained on them. In our system the retrieval path added roughly 22% coverage beyond the classifier alone. Then you combine the two with decision rules — post-fusion, at the level of the whole system.&lt;/p&gt;
&lt;p&gt;And here is why the representation is the product. Once you have it, the application is mostly a choice of index and head:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You want&lt;/th&gt;
&lt;th&gt;What changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Visual / multimodal search&lt;/td&gt;
&lt;td&gt;Nothing — retrieval used directly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Near-duplicate detection&lt;/td&gt;
&lt;td&gt;Point the index at your own corpus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copyright or reference matching&lt;/td&gt;
&lt;td&gt;Point the index at a known-content set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scene understanding, tagging, captioning&lt;/td&gt;
&lt;td&gt;Add a lightweight head on the fused features&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommendation and clustering&lt;/td&gt;
&lt;td&gt;Same embeddings, ranked by similarity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Classification, filtering, moderation&lt;/td&gt;
&lt;td&gt;The distilled head, used directly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Build the representation once; change the index and the head to change the application.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The pillars are also scale-invariant in concept, even though the engineering differs enormously:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pillar&lt;/th&gt;
&lt;th&gt;Prototype (thousands–millions)&lt;/th&gt;
&lt;th&gt;Production (billions, real time)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Encoders&lt;/td&gt;
&lt;td&gt;Off-the-shelf open models&lt;/td&gt;
&lt;td&gt;Domain pretraining and fine-tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fusion&lt;/td&gt;
&lt;td&gt;Concatenate or late-fuse&lt;/td&gt;
&lt;td&gt;Cross-attention plus system-level post-fusion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval&lt;/td&gt;
&lt;td&gt;Flat index, full-dimension vectors&lt;/td&gt;
&lt;td&gt;ANN, Matryoshka truncation, sharded indices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distillation&lt;/td&gt;
&lt;td&gt;Often skip it — run the big model&lt;/td&gt;
&lt;td&gt;Essential, plus quantisation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Building a demo over ten thousand images this weekend? Left column, and you are done in an afternoon. The right column is what you reach for at a billion items with a latency budget. Conceptually it is the same four boxes.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="a-necessary-note-on-the-numbers"&gt;A necessary note on the numbers&lt;/h2&gt;
&lt;p&gt;Every figure above comes from a single deployed system: Yew, Xu, Saha et al., KDD &amp;lsquo;26 (
). They are real, measured, and online-validated — and they are properties of &lt;em&gt;that&lt;/em&gt; system, not of the general method. Your architecture, data, and domain will move all of them.&lt;/p&gt;
&lt;p&gt;One number in particular deserves care. The paper&amp;rsquo;s headline result is a 6–8% reduction in unwanted-content views in online A/B tests, and that figure is an &lt;em&gt;aggregate&lt;/em&gt; across several pipeline upgrades. The per-pipeline components are smaller — around 1.2%, 0.6%, and 2.33% for the individual changes. If you cite the work, don&amp;rsquo;t let the headline and the components get conflated; they measure different things.&lt;/p&gt;
&lt;p&gt;What I would generalise is the &lt;em&gt;direction&lt;/em&gt; of the effects, which is consistent across the literature: adding a modality helps, cross-modal alignment helps retrieval a lot, distillation recovers most of a teacher&amp;rsquo;s quality, and retrieval covers cases classifiers miss. The magnitudes are yours to measure.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="where-this-is-heading"&gt;Where this is heading&lt;/h2&gt;
&lt;p&gt;A few threads worth watching, especially if you are looking for a research problem:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Any-to-any models.&lt;/strong&gt; Unified architectures that take and generate across modalities. The encode-then-classify split is blurring.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Long video and temporal reasoning.&lt;/strong&gt; Current models are strong on frames and weak on hours. Token compression, memory, and event-level structure are the open engineering problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Efficiency as a research question, not an afterthought.&lt;/strong&gt; How small can a student get before reasoning actually breaks? Nobody has a principled answer. That is a thesis.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agentic and retrieval-augmented multimodal systems.&lt;/strong&gt; The model calls tools, searches its own index, and re-checks itself, rather than making one forward pass.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Embodied multimodality.&lt;/strong&gt; Vision-language-action models, where the output is a policy rather than a label.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluation, which is behind capability.&lt;/strong&gt; Benchmarks saturate fast and mostly test recognition, not compositional, temporal, or causal understanding. Honest evaluation is undersupplied and you don&amp;rsquo;t need a GPU cluster to contribute to it.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="four-things-you-could-build-this-month"&gt;Four things you could build this month&lt;/h2&gt;
&lt;p&gt;None of these need proprietary data or a cluster. The pattern is fully reusable with open encoders and open datasets — scale and labels are what&amp;rsquo;s proprietary.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Semantic search over your own library.&lt;/strong&gt; An open CLIP model plus a flat index over your photos or videos. One afternoon, no training, and you will have built pillar one end to end.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add audio and measure the lift.&lt;/strong&gt; Run Whisper over a video set, fuse the transcribed text with the visual embeddings, and quantify how much retrieval improves. You will believe the multimodal argument much more once you&amp;rsquo;ve measured it yourself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reproduce a fusion ablation.&lt;/strong&gt; Visual-only versus visual-plus-audio; early versus late fusion; on a small public dataset. This is a publishable-shaped experiment at small scale.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Distil an open MLLM.&lt;/strong&gt; Pick a task you care about, distil into a small classifier, and plot the accuracy-versus-latency curve. It is the most useful curve in applied ML and almost nobody plots it for their own problem.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id="the-one-line-to-take-away"&gt;The one line to take away&lt;/h2&gt;
&lt;p&gt;Four pieces: features, fusion, retrieval, distillation. The field has been asking those same four questions since before any of it was deep learning — what changed is that the representation is now learned once and shared, which is why one stack can serve search, deduplication, copyright matching, scene understanding, and moderation.&lt;/p&gt;
&lt;p&gt;If you remember one thing: &lt;strong&gt;the representation is the product. Everything else is how you search it, and how fast you can run it.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="references-and-pointers"&gt;References and pointers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Sivic and Zisserman, &lt;em&gt;Video Google: A Text Retrieval Approach to Object Matching in Videos&lt;/em&gt;, ICCV 2003&lt;/li&gt;
&lt;li&gt;Snoek, Worring and Smeulders, &lt;em&gt;Early versus Late Fusion in Semantic Video Analysis&lt;/em&gt;, ACM Multimedia 2005&lt;/li&gt;
&lt;li&gt;Radford et al., &lt;em&gt;Learning Transferable Visual Models From Natural Language Supervision&lt;/em&gt; (CLIP), 2021&lt;/li&gt;
&lt;li&gt;Liu et al., &lt;em&gt;Visual Instruction Tuning&lt;/em&gt; (LLaVA), 2023&lt;/li&gt;
&lt;li&gt;Kusupati et al., &lt;em&gt;Matryoshka Representation Learning&lt;/em&gt;, 2022&lt;/li&gt;
&lt;li&gt;Malkov and Yashunin, &lt;em&gt;Efficient and Robust Approximate Nearest Neighbor Search Using HNSW Graphs&lt;/em&gt;, 2016&lt;/li&gt;
&lt;li&gt;Yew, Xu, Saha et al., KDD &amp;lsquo;26 —
(the running example throughout)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Thanks to the IEEE WA Computer Society Chapter and to EECMS at Curtin University for hosting the talk, and to everyone who stayed for the questions.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>