Skip to content

Multimodal foundations: diffusion, image inputs and audio/speech lifecycles

14 min reading

Trace visual and speech evidence and distinguish perception from image generation.

Page details

GenAI · Lesson 6 of 45 · 1 / 1.2

Sources · 14 min reading · 30 min with practice

Published · Last edited:

More
20px

Progress is saved in this browser when storage is available.

View guided paths and progress

Know first: Model families: decoder-only, masked encoders and encoder-decoder decisions. Optional help: GenAI foundations.

Optional background references

Hypothetical scenario. Northwind has chosen a text-generation interface, but its policy evidence is not all text. Maya brings a scanned eligibility table and a spoken clarification. Dev can extract readable text from both; Priya asks what would let a reviewer check the interpretation against the source.

Maya: “The extracted amounts look right, but which column did this amount belong to?”

Dev: “The parser returned the words without the table relationships.”

Priya: “Keep the page and region with the interpretation. A readable result still needs an evidence trail.”

You will trace image and speech evidence through derived representations, then distinguish that perception task from diffusion-based image generation. The question is how to preserve meaning and inspect uncertainty when an input changes form.

What survives when evidence changes form?

Ho, Jain and Abbeel's diffusion-model paper describes image generation through a learned denoising process. A text-conditioned diffusion system uses the text as conditioning while iteratively refining a noisy image representation. That is different from extracting evidence from a supplied scan. The noise schedule, denoising steps and conditioning interface belong in its generation contract; a document-perception pipeline needs provenance and evidence checks instead.

Radford and colleagues' speech-recognition study provides a concrete audio-to-transcript example. A transcript is a derived representation, not the original sound. Speaker attribution, uncertain words and time alignment can matter to a later decision. Preserve the permitted audio reference rather than pretending that readable text establishes what was said.

Hypothetical scenario. Suppose Northwind divides 60 seconds of audio into six nonoverlapping ten-second segments. Six × 10 = 60 seconds are covered. Adding two seconds of left overlap to each segment after the first adds 5 × 2 = 10 seconds of repeated processing, producing 70 segment-seconds. This is an input-accounting example, not a speech-model benchmark. Reconcile overlap and deduplicate time-aligned evidence before counting assertions as independent observations.

Hypothetical scenario. A scanned supplier table loses its column headers during extraction.

In short. Retain page and region provenance. Validate tables before indexing their text.

The parser loses the exception in the table

Hypothetical scenario. A policy PDF contains a table whose footnote limits eligibility for one product. Text extraction captures the amounts but loses the column headings and footnote association. The assistant later cites the correct page while interpreting the wrong row. Retrieval succeeded at finding a page, but the evidence representation failed.

This application ingests mixed text and visually structured documents into a versioned evidence collection. It supports searchable text, page images and source references where appropriate. Scope includes parsing, table and image interpretation, review, indexing and deletion. It excludes an automatic guarantee that every scanned page can be understood.

The central requirement is traceability: a derived passage or visual representation should identify the source version and page or region it describes. Without that link, an apparently well-supported answer can be impossible to inspect.

Preserve provenance across image and audio transformations

Hypothetical scenario. A scanned policy table becomes an image crop, OCR text and a summary. An audio policy briefing becomes time-bounded transcript segments. Each representation needs its source revision and location, not just a derived filename.

Preserve provenance across image and audio transformations
ArtifactConcrete evidenceDecision boundary
Sourcedocument revision or audio identityAuthority and permission
Derived segmentpage/crop or time interval, transform versionTraceable location
Published representationverified child set and source revisionConditional selection
Versioned transform + location: Original source → OCR / transcript.Versioned transform + location: Original source → OCR / transcript. Original source to OCR / transcript: versioned transform + location; OCR / transcript to Evidence-bearing answer: validate relevant source meaning.Original sourceOCR / transcriptEvidence-bearinganswerversioned transform + locationvalidate relevant source meaning
Versioned transform + location: Original source → OCR / transcript. Enlarge the diagram to inspect its labels; the surrounding records and explanation give the text alternative.

An OCR error can reverse a qualification while still producing fluent text. A generated image or reconstructed audio is a model output, not an independent observation of the original event. Treat transforms as versioned, fallible steps and retain enough source evidence for review. Publication accepts a specific compatible set of derived artifacts; an older transform finishing late cannot overwrite the current source revision. Deletion and permission changes apply to crops, transcripts and summaries as well as the original file.

Plain text is one view of a document

Reading order, layout, headers, figures and footnotes can carry meaning that a text stream does not preserve. OCR can also confuse identifiers or numbers. A clean-looking extraction is not proof that the transformation retained the relevant relationship.

A vision-language model offers another interpretation path, not an infallible replacement. It can misread small text, overlook a legend or infer an unsupported relationship. The system should preserve the original evidence and identify uncertain transformations rather than silently declaring every extraction correct.

ColPali studies retrieval using visual page representations and late interaction. It supplies a concrete alternative to purely text-derived retrieval. Its reported results do not prove that a particular organization's tables, permissions or downstream answers are handled correctly.

Preserve source identity through every transformation

Record the original object's identity, version, content integrity and access scope. Parsing produces a versioned text and layout representation. OCR or visual interpretation records which page or region it used and which transform produced the result. Index construction references those artifacts rather than replacing their identity.

A document pipeline retains provenance across text and visual pathsA versioned original produces text-layout and page-image representations. Quality review and source-region references precede publication into a compatible evidence collection.Original versionaccess + pagesText + layoutPage-image evidenceReview + provenancepublish index version

Choose representation per task. Exact identifiers may need reliable text fields; a chart question may need image evidence and its legend. A mixed collection requires an explicit ranking and evidence-expansion policy. Similarity scores from unrelated representations are not automatically interchangeable.

Publish a collection version only when its required source and transform coverage is ready. Keep a manifest of failed or excluded pages. A successful batch job should not hide individual documents that never became usable evidence.

Apply Case: Document Pipelines and Visual Evidence at the acceptance boundary

A document pipeline changes representations several times: original file, extracted text or image regions, chunks, retrieval candidates and answer context. Each transformation can lose relationships. A table heading separated from its rows can turn an exception into an apparently unconditional rule. An OCR result that looks fluent is therefore an intermediate artifact to evaluate, not an authoritative replacement for its source.

Suppose a hypothetical batch contains two hundred pages, with three relevant regions per page under the chosen annotation rule. The reference set has 200 × 3 = 600 regions. If extraction preserves five hundred and forty of them in usable form, region coverage is 540 / 600 = 0.90 = 90%. That calculation says nothing yet about whether retrieval finds the right preserved region or whether generation uses it correctly.

Now suppose retrieval receives one hundred reference questions and finds adequate current evidence for eighty. Its evidence-coverage fraction is 80 / 100 = 80% for that set. It would be wrong to multiply the region percentage by this question percentage and label the product an observed answer-success rate: the denominators describe different units and the stages need not fail independently. Evaluate accepted answers on the actual question set as a separate outcome.

Preserve source and region identity across every representation that can reach the model. A page image and an extracted paragraph can be complementary evidence, but they still need compatible versions and current permissions. If a source page is withdrawn, identify which chunks, image representations and cached answers depend on it. Rebuilding one text index does not prove that every derived artifact stopped serving the old content.

Choose transformations from the evidence the task needs. Plain text can be sufficient for an ordinary prose paragraph. A layout-sensitive table or diagram needs its relationships preserved through a representation that can express them. Compare the stages against labeled examples, inspect where information disappeared, and prefer the intervention that repairs that boundary over a larger model applied to already damaged evidence.

Derive page work and review coverage

Hypothetical scenario. Choose 200 documents averaging ten pages, giving 200 × 10 = 2,000 pages. Suppose 1,200 pages are reliably text-oriented,500 are scanned text and 300 contain visually important tables or figures. These deliberately disjoint groups sum to 2,000.

If all scanned and visual pages require an additional interpretation step, that path handles 500 +300 = 800 pages. At a chosen two seconds per page in a purely illustrative serial model, processing time is 800 × 2 = 1,600 seconds, or 26 minutes 40 seconds. Parallel execution changes scheduling and shared resource demand; the chosen time is not a measured model latency.

Suppose quality checks flag 80 of those 800 pages for human inspection. The flagged fraction is 80 ÷ 800 = 0.1. Reviewing only those 80 does not verify the remaining 720; use an additional sampling rationale to investigate failures the flagger misses.

For retained images, choose an average 250 KB per page. Two thousand pages use 2,000 × 250 KB = 500,000 KB, or 500 MB in decimal units. Text, visual embeddings, intermediate artifacts and replicas are additional. A representation choice can shift storage from text into images and multi-vector state.

A test table has four rows and three amount columns, yielding 4 × 3 = 12 amount cells. If extraction gets eleven values right but associates one with the wrong product, cell accuracy is 11 ÷ 12 ≈0.917. That apparently favorable fraction does not establish the correctness of a consequential answer about the mistaken row.

In the wild: Case: Document Pipelines and Visual Evidence

ColPali: ColPali studies visual page retrieval with multi-vector representations and late interaction.

Provenance must be useful to a reviewer

A page number is helpful but may be insufficient for a dense table. Preserve row, column, bounding region or another stable locator where the transformation can support it. Display the original evidence alongside the derived interpretation for review.

Version locators carefully. A page reference from one PDF version can point to different content after repagination. A passage identifier should not silently acquire a new meaning because a source file was replaced under the same name.

Access rules apply to all derivatives: page images, OCR text, embeddings, cached answers and review exports. A restricted source does not become public because its content was transformed into another representation. Deletion needs a manifest that identifies those related artifacts.

The source is deleted but its image remains searchable

Hypothetical scenario. A connector removes a document's text chunks after revocation, but the visual collection and review export still retain searchable page images. A query returns the page through the alternate representation.

Use source-version identity as the common deletion and eligibility key across representations. Reconcile deletion coverage and prevent serving a derivative whose required source authority cannot be established. Background cleanup can follow, but current access cannot depend on remembering every storage location manually.

Record unresolved transformations and source changes for controlled reprocessing. An older OCR job finishing later must not republish a withdrawn source. The same conditional-publication idea used for media processing applies to evidence collections.

Three document-processing misconceptions

“The page was retrieved, so the answer has evidence.” The represented relationship may be wrong or insufficient for the claim.

“A visual model removes the need for parsing quality checks.” It changes the interpretation mechanism and failure modes. Evaluation remains necessary.

“Deleting the text index deletes the document.” Images, embeddings, caches and exports can remain. Track the full derivative set.

Evaluate the transformation before the answer

Build cases for reading order, table association, footnotes, charts, scanned identifiers and version changes. Separate extraction correctness, retrieval relevance and answer support. A final answer score alone can conceal a fragile interpretation that happened to produce the expected sentence.

Use a text baseline and add a visual path where failures justify it. Compare resource demand and evidence inspectability as well as retrieval quality. Keep explicit unsupported-document behavior rather than accepting every file and fabricating confidence.

Reject a pipeline that cannot map answers back to the exact source version. Reject image-based retrieval without permission and deletion semantics. A useful document system should explain where interpretation is uncertain before that uncertainty becomes an authoritative answer.

Limits of Case: Document Pipelines and Visual Evidence

Region coverage and question-level evidence coverage use different units. Neither establishes answer correctness by itself. Version every transformed artifact and preserve permission and withdrawal behavior across both text and image representations.

Test the source boundary

The transcript is accurate except for one missing negation. Can a successful parser status approve it?

Reveal the design reasoning

No. The task needs meaning-preserving evidence for that claim. Check the source interval, correct or exclude the segment and propagate the changed revision to dependent summaries.

Decision: Keep source locations and transform versions through every modality boundary.

Check yourself: review the pipeline

All numbers are extracted correctly, but columns are associated with the wrong products. Is the page reliable evidence?

Not for claims that depend on those relationships. Evaluate structure and source-region association, not just character or cell recognition.

A source is revoked. Which representations need attention?

Every derivative tied to that source version, including images, text, embeddings, caches and exports. Serving eligibility and eventual physical cleanup are separate obligations.

A visual path improves chart queries but costs more and harms identifiers. What should the design do?

Inspect task slices and representation routing. Use the suitable path under a coherent evidence contract rather than declaring one representation universally superior.

Northwind decision log

Retain page and region provenance.
Validate tables before indexing their text.
Escalate evidence that extraction cannot preserve.

Go deeper into visual evidence and indexing

Check the mechanism in this lesson

Does a readable transcript remove the need to retain an audio evidence reference?

Compare the explanation

No. The transcript is a derived representation. An uncertain name, speaker or timestamp can change its meaning. Preserve a permitted source reference and inspect uncertainty before using the transcript as authoritative evidence.

Carry the decision forward

Northwind can preserve the source behind a scan or transcript, but that does not tell the assistant what to do with it. Page 07 turns the evidence into a task contract, including how to respond when the material does not settle the question.