QAPT: Question-Aware Path Tracing for Vision-Language Models

1 Technical University of Munich


We propose QAPT, a novel path tracing (PT) pipeline that reads the questions first, then allocates samples to optimise for the downstream vision-language model (VLM)’s accuracy, instead of the satisfaction of human eyes.

0.8spp

samples per pixel per frame, on average

98ms

to render and answer, ∼10 fps on an RTX 4090

45tokens

visual tokens per frame, down from 660


QAPT can intelligently decide the rendering regions and components from the question, and decide a different sampling budget for different cases. It naturally allows for saving significant computations in VLM inference by skipping irrelevant parts. As a result, QAPT achieves shorter end-to-end time with VLM in the loop, and brings higher VQA accuracy.

We compare against four groups of methods that can enable PT (or close-fidelity renderings) in VLM loops: rendering accelerations, image-space foveations, VLM accelerations, and uniform PT baseline.

VQA accuracy against average samples per pixel for QAPT and rendering baselines


Compared to rendering acceleration methods, instead of balancing between rendering speed and visual fidelity, we optimise for VLM understanding by offering spatially incomplete renderings with emphasised evidence, achieving both efficiency and VQA accuracy.

End-to-end render plus VLM time per question for QAPT and all baseline groups


In the right sub-figure, we visualise the end-to-end time cost (render + VLM) for different methods when their VQA accuracy reaches a close level. Please refer to our paper for the full quantitatives.

Abstract

Vision-language models (VLMs) are widely applied and evaluated on rendered images inside embodied-AI or agentic loops, where they serve as a reward or critic model. Recently, physically based path tracing (PT) is increasingly adopted in such pipelines for higher-fidelity rendering, but at considerable sampling cost, especially for difficult light transports. We observe that a visually satisfying full rendering is not always necessary for a VLM to answer the question, and not all pixels and samples contribute equally to the answer accuracy.

We propose QAPT, a question-aware PT pipeline that allocates samples with emphasis on the regions and path components that are most relevant to the question. We first introduce a relevance module that predicts the significance of each pixel and path component to the question, and a budget module that predicts the sampling budget. We allocate the samples according to the question relevance. After that, our renderings allow for a fine-tuned sample-aware VLM that ignores regions without useful samples to answer the question more efficiently and accurately.

In evaluations on our controlled synthetic VQA dataset, QAPT achieves higher VLM accuracy than rendering and VLM acceleration baselines, using only 0.8 samples per pixel per frame on average. QAPT enables PT with VLM in the loop at an interactive frame rate (∼10 frames per second) on an NVIDIA RTX 4090 GPU, with ∼+20/54 p.p. success rates and ∼1.6–2.8× end-to-end speedup, compared to other rendering baselines in two agentic scenarios.

Method

Question Relevant region and components Open-vocabDetector Text Encoder Low-reso G-Buffers Layer features FiLM & Cross Attn. ❄️ Detection boxes Diffuse Glossy Transmission ❄️ Relevance Module U 🔥 Adaptively sampledrendering Sparse probesamples Sample budgets Path tracer Path lengths G-Buffers BudgetModule D 🔥 Sampling schemeembeddings Relevant patches Background patches Asymmetricattention 🔒︎ In each attention layer: Update Frozen Sample-awareVLM 🔥

Inputs · low-resolution G-buffers, detector boxes, question

Albedo G-buffer
Albedo
Normal G-buffer
Normal
Depth G-buffer
Depth

▼

Output · relevance per path component

Diffuse relevance map
Diffuse
Glossy relevance map
Glossy
Transmission relevance map
Transmission

1Find the clue

  • For “What is behind the colourless glass container?”, the module lights up every glass container, mostly in its transmission component.
  • It reads ¼-resolution G-buffers, boxes from a frozen open-vocabulary detector and a question embedding from the VLM, and predicts a relevance map for each 4×4 pixel block and component.
  • It is supervised by evidence region labels, not by the VQA answer: the VLM still has to read and reason.
Adaptively sampled glass containerglass container
Adaptively sampled mugsmugs
1×0.82 spp 84.0% accuracy

2Render the clue

  • Our budget module predicts two factors:
    • Number of samples. A tiny MLP predicts an overall budget, which is distributed by the relevance score.
    • Path length. Controlled by Russian roulette survival probability, shortening unimportant paths and staying unbiased.
  • Shoot sparse probe samples inside the relevant region to measure its difficulty in the first place.
  • Pixels outside the relevant regions receives no samples at all.
Adaptively sampled rendering divided into image patches
relevant patches → language model black canvas: cached once, then dropped

3Read the clue

  • Our adaptively sampled renderings are naturally compute-efficient, and avoid irrelevant distractors.
  • We fine-tune Qwen3-VL-8B with:
    • Sampling scheme awareness. Each patch embedding also receives its relevances and budgets.
    • Asymmetric attention. Relevant patches attend to background ones as a black canvas, while never vice versa.
  • The "canvas" is pre-computed once and cached. Only relevant tokens enter the language model.

Pass 1 · labels from the QA generator

Relevance map after pass 1 for: What is behind the colourless glass container?
Relevance map after pass 1 for: Which way is the handle of the polished mug pointing to?
Relevance map after pass 1 for: What sits closest to the vase floating above the table?

▼

Pass 2 · labels from VLM teachers

Relevance map after pass 2 for: What is behind the colourless glass container?
Relevance map after pass 2 for: Which way is the handle of the polished mug pointing to?
Relevance map after pass 2 for: What sits closest to the vase floating above the table?

Relevance maps visualisation. Pass 1 marks the candidate objects evenly from generator labels. Pass 2 puts the weight where the VLM’s answer depends on.

4Let the VLM say what it needs

  • Where the evidence lies and how many samples suffice are not directly observable. The generator label is only a rough approximation.
  • We train our modules on generator labels, and use their outputs to train two VLM teachers
  • VLM teachers answer on unseen datasets, and we collect their attention and the smallest possible sampling budgets as fine labels
  • We improve our modules based on these labels from VLM teachers, and use their outputs to train our final VLM.

Visual comparison

Given the same scene, QAPT renders differently for different input questions, featuring the most relevant regions and components. .

Reference rendering of the scene
QAPT rendering for the selected question
QAPT · 2.04 spp · 72 ms Reference · 512 spp · 4218 ms “What is behind the colourless glass container?”

What QAPT computes

Compare against

2.04samples per pixel
72 msrender time
Transmissionmain evidence

Dataset

We build a controlled synthetic VQA dataset where reasoning about hints from accurate appearance and light transport is critical. Each scene holds pairs of objects that differ only in such cues, so the VLM must locate the cue before it can answer.

A scene from the dataset: about 25 objects on a table and a shelf at night
Scene exampleNight · lit from the hallway through a door
Proximity“Which object is located nearest to the shiny bottle?”
Orientation“Which way is the handle of the matte mug facing?”
Content“What is placed inside the shiny plate?”
Count“How many … in total are on the table?”
Identification“Seeing through it, what stands behind the glass with water?”

The evidence of a question can come from:

  • Diffuse · base colour, contact shadows
  • Glossy · highlights, reflections
  • Transmission · water, look-throughs
1,400scenes
9,800QAs
∼25objects per scene
10phrasings per QA type
960×720px

Applications

We test QAPT in two agentic applications, where the VLM serves as a critic. Compared to other rendering baselines, our pipeline achieves a higher success rate in shorter end-to-end time.

Two agentic applications with QAPT and baseline renderings as film strips

Object moving

E.g., “Turn the shiny mug so that its handle points to the left.”

Success rateTime
QAPT56%3.35 s
EEVEE36%9.05 s
RTXPT24%5.55 s
Cycles20%8.20 s

Layout design

E.g., “Rearrange the layout so that A is in B, and C is closest to D.”

Success rateTime
QAPT92%2.21 s
EEVEE38%5.58 s
RTXPT32%4.05 s
Cycles28%6.10 s

Time is averaged over successful scenes only. Baselines use 32 spp (Cycles, RTXPT) or 16 TAA samples (EEVEE).

BibTeX

          

Coming soon