Manuscript Offprint
arXiv:2610.40752PathoJev: Efficient Pathology Decisions from Shared Visual Context
Abstract
Pathology workflows require multiple visual judgments about the same slide, from identifying tumor type to assessing grade and invasion. Generating and parsing a separate textual response for each structured question adds latency between visual evidence and usable decisions. Building on the System One paradigm, we introduce PathoJev, a pathology model that directly predicts answer probabilities for whole-slide and region-level assessment. PathoJev encodes each slide once and evaluates independent question suffixes in batches over the shared visual context. Reusing the hybrid backbone's recurrent states further limits the computation that grows with slide-context length for each additional question. Across three whole-slide benchmarks, the 9B and 27B models achieve mean accuracies of 77.2% and 78.1%, exceeding SlideChat by 5.4 and 6.3 percentage points. Both scales also maintain competitive accuracy on five ROI benchmarks. On WSI-Bench, the 9B model runs faster than SlideChat. Shared context accelerates eight-question workloads by and over separate prefix encoding, rising to and for 64 questions. These results provide a reusable probabilistic interface for combining multiple visual judgments in whole-slide and local tissue assessment. Code: https://github.com/ChyaZhang/PathoJev.
1. Introduction
Pathology assessment brings together multiple observations about tissue, including tumor type, histologic grade, and the presence of invasion. Synoptic reporting organizes specimen-level findings into explicit data elements and responses [8, 22]. At the image level, several such judgments can draw on tissue represented in the same whole-slide image (WSI). Whole-slide visual question answering bench-
marks capture this setting through questions about tissue morphology and diagnostic interpretation [7, 16]. This setting calls for reusing tissue evidence across questions that assess different aspects of the same slide.
Recent pathology vision-language models support instruction-following conversations about tissue images [19, 23, 26], whole-slide question answering and report generation [7, 11, 16], and explicit diagnostic reasoning [29]. These models express their answers through autoregressive text generation. For questions with specified alternatives, obtaining a decision therefore requires sequential decoding followed by answer extraction (Figure 1a). The generated text also does not directly expose a normalized distribution over the alternatives. When several questions concern the same slide, this generation process is repeated for each judgment, even though the underlying tissue evidence is shared.
The shared evidence and compact answer spaces suggest separating visual context processing from question-specific decisions. The System One paradigm provides this formulation by mapping an input state directly to typed probabilistic judgments [1], with recent extensions to shared image and video context [28, 31]. Whole-slide pathology makes the cost of accessing that context particularly relevant: tissue evidence spans a long sequence of patch representations, while each question may require only a binary or multiple-choice answer. Caching the prefix saves repeated prefill, but softmax attention still reads its keys and values for each new question. Efficient whole-slide decisions thus depend on both removing answer decoding and controlling the cost of reusing a long visual context.
Building on the System One paradigm, we introduce PathoJev, a pathology model for multiple decisions over shared tissue evidence (Figure 1b). A slide input pathway aggregates spatial patch features into a shared visual prefix. Questions branch independently from this prefix and

Figure 1. PathoJev: shared visual context for multiple pathology decisions. (a,b) Autoregressive answers versus direct probabilities from isolated questions sharing slide context. Re-reading context includes accessing cached prefix keys and values. (c,d) Whole-slide and ROI accuracy–latency comparisons. Accuracy averages each model's available results across three WSI or five ROI benchmarks. Latency is GPU forward time per question on WSI-Bench and PathMMU-tiny, respectively. Zero-shot WSI baselines use thumbnails.
are evaluated in batches, with a typed head returning answer probabilities directly. Reusing the hybrid backbone's recurrent states reduces the portion of question processing that grows with slide-context length. PathoJev also retains a region-of-interest (ROI) input pathway and learns from both whole-slide and ROI supervision, bringing slide-level and local tissue judgments into the same decision framework.
We evaluate PathoJev at 9B and 27B scales on three whole-slide and five ROI benchmarks. The 9B and 27B models improve mean whole-slide accuracy over SlideChat by 5.4 and 6.3 percentage points, and over WSI-LLaVA by 7.0 and 7.9 points, respectively. PathoJev-9B is 9.1× faster than SlideChat on WSI-Bench. A same-data autoregressive control further tests the decision interface: PathoJev-9B achieves higher accuracy on six of eight benchmarks, with 3.0× lower WSI latency and 2.4× lower ROI latency. For eight-question workloads, shared context reduces total time by 6.9× at 9B and 5.9× at 27B relative to separate prefix encoding, rising to 11.2× and 8.9× for 64 questions. These comparisons connect pathology performance to the complementary benefits of direct readout and context reuse.
Our contributions are as follows:
-
We introduce PathoJev, a System One model that supports whole-slide and ROI assessment through a unified interface for language-conditioned pathology questions and direct probabilistic decisions.
-
We combine spatial patch aggregation with independent question branches that reuse attention caches and recurrent states, and analyze the cost of additional decisions over long slide contexts.
-
We evaluate 9B and 27B models on three whole-slide and five ROI benchmarks, showing accuracy gains and latency reductions against a range of general-purpose and pathology-specific baselines, and analyze inference cost as question count and slide-context length increase.
Whole-Slide Image Understanding. Whole-slide analysis requires aggregating information from large collections of tissue patches. Multiple instance learning uses slide-level supervision for this purpose: CLAM identifies diagnostically relevant regions through attention-based aggregation [17], while correlation-based approaches model relationships among patches [24]. Multimodal whole-slide pretraining further aligns slide representations with captions and pathology reports, supporting transfer to classification and retrieval [9]. Language-driven approaches extend this setting to report generation through local-global feature aggregation and cross-modal interaction [11]. SlideChat and WSI-LLaVA combine slide-level visual encoding with instruction tuning to support whole-slide question answering [7, 16]. Building on the ability to represent slide-level evidence, PathoJev addresses the repeated computation needed to evaluate multiple questions over that evidence.
System One Models. System One models expose typed probabilistic judgments as outputs that software can consume directly. Jev introduces this formulation for decisions over specified output spaces, replacing answer-string generation with structured predictions [1]. Visual Jev extends direct decision making to multiple questions about one image, sharing visual context across isolated question suffixes and reading candidate probabilities from the language-model head [28]. VideoJev uses a shared scoring head for temporal intervals and textual answer options, with cached and joint inference supporting repeated queries over video evidence [31]. PathoJev adapts shared-context decision inference to spatially aggregated whole-slide features and learns a common decision interface from WSI and ROI supervision. Its computational analysis relates the cost of additional pathology questions to prefix reuse and the hybrid backbone's recurrent states, examining both question count and slide-context length.
3. Method
PathoJev combines direct probability readout with reusable slide representations for efficient decisions over long visual contexts (Figure 2). We define a common WSI and ROI decision interface, describe independent question processing over a shared prefix, and analyze its computational cost.
3.1. A Unified Pathology Decision Framework
Problem formulation. Given a pathology image , we consider questions . Each question specifies an output type and an ordered answer set . The image can be a WSI or an ROI. The model predicts
and selects the answer with the highest probability. Multiple-choice questions provide textual alternatives, while binary judgments use a two-element answer set. For example, questions about the same image may ask for a histologic grade among named categories and whether invasion is visible. The question and its alternatives specify the judgment, while the image supplies the tissue evidence. Equation 1 makes each prediction conditional on that evidence and its own question, allowing a set of independent judgments to describe different aspects of the same tissue.
Visual inputs. For a WSI, we extract features from tissue patches at magnification using the frozen CONCH v1.5 encoder [9]. Spatial mean pooling on a grid aggregates the patch features, and a trainable multilayer perceptron projects the pooled features into the language backbone's embedding space:
(2)
where is the ordered set of occupied grid cells and indexes patches located in cell . Grid pooling preserves a spatially organized representation while reducing the visual sequence length. For ROI inputs, we retain the backbone's native visual pathway. ROI questions address local tissue findings through the same typed decision interface used for slide-level assessment. Both pathways produce visual tokens for decision making, and their visual encoders remain frozen during training.
Structured question interface. Following the System One formulation [1], we express each judgment using ordinary text markers: [state] introduces the image context, [kind] specifies the output type, [question] introduces the question, and [options] introduces its ordered alternatives. Each question ends with [decision]:. For WSI inputs, the state precedes all question-specific fields, enabling a shared prefix:
Here, E embeds text and denotes the WSI state prompt. ROI inputs place [kind] before [state] and process one question per image. Full prompts are provided in Appendix B.1.
Typed decision readout. Let denote the hidden state after the backbone's final normalization at the last token of [decision]:. A shared linear head produces . We represent the output space by 24 typed decision tokens, each associated with one logit of

Figure 2. Overview of PathoJev. Left: WSI patch features and ROI images enter through separate visual pathways. Center: WSI question rows reuse a shared visual prefix independently, with fixed-size recurrent states and shared attention keys and values; a typed head returns answer probabilities. Right: supported output types, test-set decision examples, and marginal computation per additional question as slide-context length increases. The marginal-cost comparison uses Qwen3-8B as a softmax-only baseline.
this head: 16 for textual choices, two for binary judgments, and six for ordinal scores. The output type selects the corresponding token group, and the answer set determines which tokens are valid for the current question. Writing for the output index associated with answer of type , we normalize over its valid candidates:
Here, denotes the temperature for output type . The text in [options] supplies the meaning of each choice token for the current question. Our pathology tasks use multiple-choice and binary decisions. A single read-out at this final position returns their answer probabilities directly, supporting confidence-based selection without answer decoding.
3.2. Shared Slide Context with Isolated Questions
Several questions may depend on the same tissue evidence. PathoJev therefore separates computation of the visual prefix from computation of the question suffixes. For the layout in Eq. 3, we prefill the shared state prefix once to obtain its layer-wise cache . Each question suffix then branches from this same cache:
Here, returns the hidden state at the suffix's decision position. Following shared-context visual decision in-
ference [28], questions are processed as independent rows. A token in row can attend to the shared prefix and preceding tokens within that row. The prefix is computed before the questions, and each suffix reads only its own local history. Rows can therefore be evaluated in batches while preserving the conditioning structure in Eq. 1. Adding or reordering questions leaves each row's visual and textual context unchanged.
The hybrid backbone combines recurrent Gated DeltaNet layers [27] with softmax-attention layers. Each recurrent layer summarizes the prefix in fixed-size recurrent and convolutional states. These states initialize separate question branches, whose updates remain local to each row. Each softmax-attention layer instead retains a shared set of prefix keys and values, which a row reads together with its own suffix keys and values. The prefix cache remains unchanged throughout question evaluation. This organization reuses the slide computation while maintaining independent question contexts during both training and inference. The different cache structures also determine how the cost of an additional question depends on slide length.
3.3. Efficient Multi-Question Inference
Sharing the prefix amortizes slide processing across questions about the same image. For a prefix of length and question suffix lengths , the computational work can be decomposed as
where and denote visual encoding and prefix prefill, respectively. Both are incurred once per image. For a fixed slide, their contribution to average per-question cost decreases as the number of questions increases. Each row requires a single forward evaluation of its suffix and decision head, with no additional answer-decoding steps. Batched execution processes these independent rows together.
The hybrid backbone also reduces the portion of each row's computation that depends on prefix length. Recurrent layers process the suffix from a state whose size is independent of L. Softmax-attention layers still read the shared prefix keys and values. For fixed model dimensions, the per-row cost takes the form
where is the number of softmax-attention layers and is their effective attention width. The term includes recurrent updates, suffix-local attention, projections, and feed-forward computation, all independent of L. The 9B model contains 24 recurrent and eight softmax-attention layers, while the 27B model contains 48 and 16, respectively [20, 21]. Thus, prefix-length-dependent attention is restricted to one quarter of the layers. Shared prefill and direct readout address repeated computation across questions, while recurrent state reuse limits where slide length affects the cost of each additional question.
3.4. Training Objective and Two-Stage Adaptation
Decision supervision. Both adaptation stages supervise the probability assigned to the correct answer. For a question with target index , the cross-entropy over its valid candidates is
where is defined by Eq. 4. A binary judgment is the case of the same objective. Questions sharing an image receive separate supervision through their own decision positions. For a training distribution , we write the expected question loss as
where denotes the WSI projection parameters, the LoRA parameters [13], and the decision-head parameters. The distribution reflects question sampling during training.
Stage A: slide projection alignment. We initialize the decision model from pretrained JEV checkpoints [2, 3], with LoRA parameters and head parameters . The first stage learns the WSI projection from slide questions while keeping the decision model fixed:
where samples WSI training questions. Gradients from the correct-answer probability align pooled tissue features with the pretrained decision representation. This establishes the slide input pathway before adapting the question-processing components.
Stage B: joint pathology adaptation. Starting from the aligned projection, we jointly optimize the WSI projection, LoRA adapters, and typed head:
where mixes WSI and ROI training questions. WSI supervision updates the slide projection and shared decision components, while ROI supervision adapts the same LoRA parameters and head through the native visual pathway. The pretrained language-backbone weights and visual encoders remain frozen in both stages. Joint adaptation therefore connects slide-level and local tissue judgments through a common probabilistic interface. Sampling schedules and optimization hyperparameters are given in Appendix A.
4. Experiments
4.1. Experimental Setup
Implementation details. We train PathoJev at 9B and 27B scales using the two-stage schedule in Sec. 3.4, with AdamW and rank-16 LoRA adapters on four RTX PRO 6000 GPUs with 96GB memory each. Slide projection alignment runs for one epoch, followed by two epochs of joint pathology adaptation. In the second stage, learning rates are for the WSI projection and for the LoRA adapters and decision head. Whole-slide supervision combines SlideInstruct [7], WSI-Bench [16], WSI-VQA [6], and CF-Path, a pathology training set we construct from TCGA reports to provide slide-level binary statement supervision. ROI supervision uses PathVQA [12] and the pathology subset of PMC-VQA [30]. Data composition and detailed training settings are provided in Appendix A.
Evaluation. We evaluate whole-slide decisions on WSI-VQA [6], closed-ended WSI-Bench [16], and SlideBench-TCGA [7]. Local tissue assessment uses PathMMU-tiny [25], the yes/no subset of PathVQA [12], closed-ended
Table 1. Benchmark accuracy (%, ↑) and inference latency (s/q, ↓). Avg. is the unweighted mean over five ROI or three whole-slide benchmarks. Best and second-best results within each model-size group are bold and underlined, with ties marked equally. Latency is measured on PathMMU-tiny for ROI inputs and WSI-Bench for whole-slide inputs, at batch size one.
| Model | Region of Interest | Whole Slide | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PathMMU tiny | PathVQA | Quilt VQA | OmniMed VQA | MedXpert QA | Avg. | Latency (s/q) | WSI VQA | WSI Bench | SlideBench TCGA | Avg. | Latency (s/q) | |
| 7–13B models | ||||||||||||
| Patho-R1-7B (reasoning) [29]† | 67.6 | 57.1 | 70.8 | 69.7 | 16.7 | 56.4 | 2.291 | 44.1 | 67.8 | 53.9 | 55.3 | 2.367 |
| HuatuoGPT-Vision-7B [4]† | 59.5 | 66.6 | 64.4 | 51.5 | 12.2 | 50.8 | 0.068 | 47.7 | 66.8 | 51.1 | 55.2 | 0.081 |
| Quilt-LLaVA-v1.5-7B [23]† | 46.4 | 56.7 | 70.3 | 46.9 | 17.8 | 47.6 | 0.066 | 39.7 | 49.4 | 37.4 | 42.2 | 0.066 |
| PathGen-LLaVA-13B [26]† | 71.4 | 62.7 | 68.2 | 68.9 | 31.1 | 60.5 | 0.114 | 43.8 | 69.1 | 52.4 | 55.1 | 0.116 |
| SlideChat [7] | — | — | — | — | — | — | — | 59.7 | 81.8 | 73.9 | 71.8 | 0.357 |
| WSI-LLaVA [16] | — | — | — | — | — | — | — | 50.5 | 90.0 | 70.1 | 70.2 | 0.046 |
| Qwen3.5-9B (generate)† | 69.9 | 77.8 | 65.0 | 62.6 | 10.0 | 57.1 | 0.241 | 48.5 | 74.4 | 53.0 | 58.6 | 0.208 |
| Qwen3.5-9B (thinking)† | 66.7 | 74.4 | 70.0 | 63.9 | 23.3 | 59.7 | 59.4 | 40.3 | 59.2 | 43.5 | 47.7 | 82.3 |
| JEV-9B (zero-shot)† | 72.3 | 72.4 | 57.7 | 60.8 | 21.1 | 56.9 | 0.091 | 38.7 | 65.2 | 47.4 | 50.4 | 0.089 |
| PathoJev-9B | 71.9 | 94.6 | 70.8 | 75.3 | 25.6 | 67.6 | 0.090 | 65.4 | 90.4 | 75.9 | 77.2 | 0.039 |
| 27B models | ||||||||||||
| Qwen3.8-27B (generate)† | 64.5 | 69.2 | 68.2 | 46.0 | 44.4 | 58.5 | 0.238 | 41.3 | 59.7 | 47.7 | 49.6 | 0.253 |
| Qwen3.8-27B (thinking)† | 70.3 | 70.5 | 62.4 | 70.5 | 50.0 | 64.7 | 78.6 | 48.7 | 71.3 | 55.7 | 58.6 | 69.1 |
| JEV-27B-VL (zero-shot)† | 74.5 | 68.3 | 55.7 | 59.7 | 38.9 | 59.4 | 0.217 | 37.9 | 67.4 | 50.0 | 51.8 | 0.211 |
| PathoJev-27B | 73.8 | 95.1 | 67.3 | 69.9 | 50.0 | 71.2 | 0.213 | 66.4 | 91.1 | 76.9 | 78.1 | 0.098 |
† WSI evaluation uses slide thumbnails. Thinking latency uses the first 100 questions in test-file order.
Quilt-VQA [23], and the pathology subsets of OmniMed-VQA [14] and MedXpertQA [32]. Evaluation subsets, sample counts, and baseline models are detailed in Appendix C.
Metrics. We report question-level accuracy and compute unweighted benchmark means separately for WSI and ROI evaluation. PathoJev selects the highest-probability answer; generative outputs are parsed into the supplied alternatives, with unparseable responses counted as incorrect. Probability quality is assessed using expected calibration error (ECE) [10] with 15 bins and top-1 confidence. Confidence-based prediction retention is evaluated using coverage-accuracy curves and the area under the risk-coverage curve (AURC), as detailed in Appendix C.4.
Inference latency. We measure synchronized forward time after untimed warm-up on an exclusively allocated RTX PRO 6000 GPU with 96 GB memory. Main comparisons use batch size one and report seconds per question on WSI-Bench and PathMMU-tiny. For feature-based WSI models, timing excludes offline visual feature extraction. ROI timing includes visual encoding but excludes image decoding and preprocessing. The operations timed for each WSI model are specified in Appendix C.3. PathoJev, SlideChat, and WSI-LLaVA reuse the slide prefix.
4.2. Main Results
Table 1 compares PathoJev with general-purpose and pathology-specific models on three whole-slide and five ROI benchmarks. We examine whether direct probabilistic decisions improve the accuracy–latency trade-off at both scales, from repeated judgments over shared slide context to local tissue assessment.
Whole-slide assessment. PathoJev achieves the highest accuracy among evaluated models in each size group on all three WSI benchmarks. Mean accuracy reaches 77.2% at 9B and 78.1% at 27B, compared with 71.8% for SlideChat and 70.2% for WSI-LLaVA. Relative to their respective Qwen backbones in generation mode, the two scales improve mean accuracy by 18.6 and 28.5 percentage points. PathoJev-9B also has the lowest measured WSI latency at 0.039 seconds per question, yielding a 9.1× speedup over SlideChat. Since the generative WSI baselines also reuse the slide-prefix cache, this advantage extends beyond avoiding repeated visual prefill. Direct readout produces each decision without an autoregressive answer sequence, supporting efficient repeated judgments over the same tissue context.
ROI assessment. PathoJev also improves local tissue assessment, reaching mean accuracies of 67.6% and 71.2% at 9B and 27B, respectively. These correspond to gains of 10.5 and 12.7 points over their Qwen backbones in generation mode, with 2.7× and 1.1× speedups on PathMMU-tiny. Within the 7–13B group, PathoJev-9B leads on three of five benchmarks, including a tie on Quilt-VQA. Gains vary by task, with more consistent scaling improvements in
Table 2. Decision readout versus autoregressive fine-tuning at 9B. Both models use the Qwen3.5-9B backbone, the same training data, two-stage schedule, and step counts; PathOjev starts from JEV-9B and the autoregressive model from Qwen3.5-9B. Accuracy is reported in percent and latency in seconds per question. Avg. follows Table 1. Best and second-best results are bold and underlined.
| Variant | Region of Interest | Whole Slide | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PathMMU tiny | PathVQA | Quilt VQA | OmniMed VQA | MedXpert QA | Avg. | Latency (s/q) | WSI VQA | WSI Bench | SlideBench TCGA | Avg. | Latency (s/q) | |
| Autoregressive SFT | 74.3 | 93.8 | 66.8 | 68.8 | 30.0 | 66.7 | 0.215 | 63.8 | 89.0 | 74.2 | 75.7 | 0.119 |
| PathOjev-9B | 71.9 | 94.6 | 70.8 | 75.3 | 25.6 | 67.6 | 0.090 | 65.4 | 90.4 | 75.9 | 77.2 | 0.039 |
| Δ / speedup | -2.4 | +0.8 | +4.1 | +6.5 | -4.4 | +0.9 | 2.4× | +1.5 | +1.4 | +1.7 | +1.5 | 3.0× |
Δ denotes PathOjev minus autoregressive SFT in percentage points; latency columns give speedups. Paired-bootstrap 95% confidence intervals are reported in Appendix D.1.
whole-slide assessment. The same probabilistic interface supports both slide-level and local tissue judgments, illustrated in Appendix F.
Comparison with explicit reasoning. Relative to their Thinking-mode backbones, PathOjev-9B and PathOjev-27B improve mean ROI accuracy by 7.9 and 6.5 points, with approximately 658× and 369× speedups on PathMMU-tiny, respectively. At 27B, mean WSI accuracy also increases from 58.6% to 78.1%, with an approximately 705× speedup on WSI-Bench. This comparison highlights the efficiency of matching the output interface to the task: for these structured judgments, PathOjev maps tissue evidence directly to answer probabilities without generating a reasoning trace or parsing a textual answer.
4.3. Ablation Study
We examine the decision interface and reuse of visual context through two comparisons. The first matches the 9B backbone, pathology supervision, and training steps; the second varies prefix reuse while holding the trained model and questions fixed at both scales.
Decision readout versus autoregressive fine-tuning. Table 2 compares PathOjev-9B with an autoregressive model using the same backbone, training data, and number of training steps. The control learns textual answers and uses greedy decoding with a 16-token output limit. PathOjev reduces latency by 3.0× on WSI-Bench and 2.4× on PathMMU-tiny while retaining competitive accuracy, with higher point estimates on six of eight benchmarks. Mean accuracy increases by 1.5 points on WSI tasks and 0.9 points on ROI tasks. Direct readout therefore combines efficient decisions with normalized answer probabilities. Appendix D.1 reports per-benchmark differences and paired confidence intervals.
Shared slide context. We compare shared-prefix inference with separately encoding the slide for each question (Table 3). For 9B, increasing the workload from one to eight questions changes shared-prefix time from 0.12 to 0.14 seconds, whereas separate encoding reaches 0.95 seconds. At
Table 3. Prefix-sharing ablation. Median time (seconds per slide, ↓) over 40 WSI-Bench slides with N questions. Speedups compare shared with separate encoding at N = 64. Questions are repeated when N exceeds the available set.
| Setting | N = 1 | N = 8 | N = 64 | Speedup |
|---|---|---|---|---|
| PathOjev-9B | ||||
| Separate encoding | 0.12 | 0.95 | 7.63 | — |
| Shared prefix | 0.12 | 0.14 | 0.68 | 11.2× |
| PathOjev-27B | ||||
| Separate encoding | 0.28 | 2.23 | 17.86 | — |
| Shared prefix | 0.28 | 0.38 | 2.01 | 8.9× |
64 questions, sharing reduces total time from 7.63 to 0.68 seconds at 9B and from 17.86 to 2.01 seconds at 27B. These 11.2× and 8.9× reductions show how reusing slide context amortizes prefix processing across decisions. Appendix E details the repeated-question workloads.
4.4. Analysis
Question scaling and inference efficiency. Figure 3 shows how total forward time scales with question count. At 64 questions, PathOjev-9B takes 0.68 seconds, versus 6.34 for autoregressive SFT, 2.18 for WSI-LLaVA, and 8.93 for SlideChat: speedups of 9.3×, 3.2×, and 13.1× despite all three baselines reusing the slide cache. WSI-LLaVA, with a 576-token pooled prefix, is fastest at one and two questions; PathOjev-9B leads from four questions onward. The amortized cost falls from 17.3 to 10.6 ms per question between N = 8 and N = 64 at 9B, and from 47.4 to 31.4 ms at 27B. Thus, the one-time prefix cost in Eq. 6 is spread across more decisions while question suffixes are processed in batches. Appendix E reports the measured workloads.
Cost of longer slide context. Increasing slide context from 256 to 4,096 tokens raises marginal latency from 1.46 to 2.48 ms per question at 9B and from 7.58 to 10.67 ms at 27B (Figure 4): 1.7× and 1.4× increases for a 16× longer context. The softmax-only Qwen3-8B increases from 2.40 to


Figure 3. Multi-question inference on WSI-Bench. Median forward time over 40 slides; bands and error bars show 95% bootstrap confidence intervals. Shared-prefix methods cache slide context; separate encoding repeats prefill. Questions are cycled beyond the available set. Offline feature extraction is excluded.


Figure 4. Marginal cost of longer slide contexts. Per-question time and memory increments are calculated from measurements at N = 1 and N = 16 after prefix prefill. Memory uses a log scale. All systems store one copy of the prefix keys and values.
9.72 ms (4.1×). All systems use the same shared-prefix attention implementation. Layer profiling follows Eq. 7: over 16 question rows, 9B recurrent-layer time remains nearly constant at 58.1–58.3 ms, while softmax-attention time rises from 19.0 to 33.8 ms. Recurrent states carry the prefix summary into each question, leaving length-dependent work in softmax layers. At 4,096 tokens, marginal memory is 37.4 MB for PathOJev-9B versus 68.8 MB for Qwen3-8B, further reducing the cost of additional decisions.
Confidence and calibration. Retaining the 80% most confident answers raises 9B accuracy from 90.4% to 97.0% on WSI-Bench and from 75.9% to 83.2% on SlideBench-TCGA (Table 4(b)); the latter reaches 93.2% at 50% coverage. Answer probabilities thus also support prioritizing less confident questions for further assessment. Without post-hoc calibration, WSI-Bench ECE is 2.0 and 2.1 percentage points at 9B and 27B, whereas WSI-VQA reaches 6.7 and
Table 4. Calibration and accuracy at different coverage levels. ECE uses 15 confidence bins at without post-hoc calibration. Coverage is the fraction of questions retained by confidence; is the accuracy gain in percentage points.
| (a) Calibration: ECE (percentage points, ) | ||
|---|---|---|
| Benchmark | PathOJev-9B | PathOJev-27B |
| WSI-VQA | 6.7 | 10.5 |
| WSI-Bench | 2.0 | 2.1 |
| SlideBench-TCGA | 2.2 | 4.5 |
(b) Accuracy by coverage: PathOJev-9B (%)
| Benchmark | 100% coverage | 80% coverage | |
|---|---|---|---|
| WSI-VQA | 65.4 | 71.2 | +5.8 |
| WSI-Bench | 90.4 | 97.0 | +6.6 |
| SlideBench-TCGA | 75.9 | 83.2 | +7.3 |
10.5 (Table 4(a)). Appendix C.4 provides ROI calibration and further coverage-accuracy results.
Image-conditioned pathology judgments. With the same grading question and answer set across 40 WSI-Bench slides, PathOJev-9B achieves 80.0% accuracy, versus 40.0% for SlideChat and 67.5% for WSI-LLaVA (Figure F2). CF-Path extends this comparison to binary statements. We form 117,377 positive–negative slide pairs with identical statement text within each TCGA project. The paired AUROC measures whether a supporting slide receives a higher true probability than an opposing slide according to the report-derived labels. PathOJev achieves 0.728 and 0.729 at 9B and 27B, versus 0.511 for the text-only control. Holding the question fixed across slides links both categorical answers and binary scores to the tissue context. Comparable paired scores at both scales show that this image dependence is already present at 9B. Construction and evaluation details appear in Appendices A.3 and D.3.
5. Conclusion
We presented PathoJev, a System One model for decisions over shared pathology context. It reads answer probabilities directly, while independent question branches reuse slide-prefix caches and fixed-size recurrent states. The same interface supports whole-slide and ROI assessment. Both scales surpass the evaluated pathology baselines on three whole-slide benchmarks. A same-data generative comparison and prefix-sharing ablations show complementary efficiency gains while retaining competitive accuracy across WSI and ROI tasks. These results provide a reusable probabilistic interface for pathology assessment across whole-slide and ROI inputs.
References
[1] Diogo Almeida. Introducing System One models & Jev. TypeSafe AI Blog, 2026. Published September 15, 2026; accessed October 23, 2026. 1, 3
[2] AutoTrust AI Lab. JEV-27B-VL model card. Hugging Face, 2026. Accessed: 2026-10-26. 5, 11
[3] AutoTrust AI Lab. JEV-9B model card. Hugging Face, 2026. Accessed: 2026-10-26. 5, 11
[4] Junying Chen, Chi Gui, Ruyi Ouyang, Anningzhe Gao, Shunian Chen, Guiming Hardy Chen, Xidong Wang, Zhenyang Cai, Ke Ji, Xiang Wan, and Benyou Wang. Towards injecting medical visual knowledge into multimodal LLMs at scale. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 7346–7370. Association for Computational Linguistics, 2024. 6, 14
[5] Pingyi Chen, Honglin Li, Chenglu Zhu, Sunyi Zheng, Zhongyi Shui, and Lin Yang. WsiCaption: Multiple instance generation of pathology reports for gigapixel whole-slide images. In Proceedings of Medical Image Computing and Computer Assisted Intervention – MICCAI 2024, pages 546–556. Springer Nature Switzerland, 2024. 12
[6] Pingyi Chen, Chenglu Zhu, Sunyi Zheng, Honglin Li, and Lin Yang. WSI-VQA: Interpreting whole slide images by generative visual question answering. In European Conference on Computer Vision, pages 401–417. Springer, 2025. 5
[7] Ying Chen, Guoan Wang, Yuanfeng Ji, Yanjun Li, Jin Ye, Tianbin Li, Ming Hu, Rongshan Yu, Yu Qiao, and Junjun He. SlideChat: A large vision-language assistant for whole-slide pathology image understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5134–5143, 2025. 1, 3, 5, 6, 14
[8] College of American Pathologists. Cancer protocols frequently asked questions. College of American Pathologists. Accessed: 2026-10-23. 1
[9] Tong Ding, Sophia J. Wagner, Andrew H. Song, Richard J. Chen, Ming Y. Lu, Andrew Zhang, Anurag J. Vaidya, Guil-
laume Jaume, Muhammad Shaban, Ahrong Kim, Drew F. K. Williamson, Harry Robertson, Bowen Chen, Cristina Almagro-Pérez, Paul Doucet, Sharifa Sahai, Chengkuan Chen, Christina S. Chen, Daisuke Komura, Akihiro Kawabe, Mieko Ochi, Shinya Sato, Tomoyuki Yokose, Yohei Miyagi, Shumpei Ishikawa, Georg Gerber, Tingying Peng, Long Phi Le, and Faisal Mahmood. A multimodal whole-slide foundation model for pathology. Nature Medicine, 31(11):3749–3761, 2025. 3
[10] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning, pages 1321–1330. PMLR, 2017. 6, 14
[11] Zhengrui Guo, Jiabo Ma, Yingxue Xu, Yihui Wang, Liansheng Wang, and Hao Chen. HistGen: Histopathology report generation via local-global feature encoding and cross-modal context interaction. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 189–199. Springer Nature Switzerland, 2024. 1, 3
[12] Xuehai He, Zhuo Cai, Wenlan Wei, Yichen Zhang, Luntian Mou, Eric Xing, and Pengtao Xie. Towards visual question answering on pathology images. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 708–718, 2021. 5
[13] Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. 5
[14] Yutao Hu, Tianbin Li, Quanfeng Lu, Wenqi Shao, Junjun He, Yu Qiao, and Ping Luo. OmniMedVQA: A new large-scale comprehensive evaluation benchmark for medical LVLM. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 22170–22183, 2024. 6
[15] Zhi Huang, Federico Bianchi, Mert Yuksekgonul, Thomas J. Montine, and James Zou. A visual-language foundation model for pathology image analysis using medical Twitter. Nature Medicine, 29(9):2307–2316, 2023. 2
[16] Yuci Liang, Xinheng Lyu, Wenting Chen, Meidan Ding, Jipeng Zhang, Xiangjian He, Song Wu, Xiaohan Xing, Sen Yang, Xiyue Wang, and Linlin Shen. WSI-LLaVA: A multimodal large language model for whole slide image. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22718–22727, 2025. 1, 3, 5, 6, 14
[17] Ming Y. Lu, Drew F. K. Williamson, Tiffany Y. Chen, Richard J. Chen, Matteo Barbieri, and Faisal Mahmood. Data-efficient and weakly supervised computational pathology on whole-slide images. Nature Biomedical Engineering, 5(6):555–570, 2021. 3
[18] Ming Y. Lu, Bowen Chen, Drew F. K. Williamson, Richard J. Chen, Ivy Liang, Tong Ding, Guillaume Jaume, Igor Odintsov, Long Phi Le, Georg Gerber, Anil V. Parwani, Andrew Zhang, and Faisal Mahmood. A visual-language foundation model for computational pathology. Nature Medicine, 30(3):863–874, 2024. 2
[19] Ming Y. Lu, Bowen Chen, Drew F. K. Williamson, Richard J. Chen, Melissa Zhao, Aaron K. Chow, Kenji Ikemura, Ahrong Kim, Dimitra Pouli, Ankush Patel, Amr Soliman, Chengkuan Chen, Tong Ding, Judy J. Wang, Georg Gerber, Ivy Liang, Long Phi Le, Anil V. Parwani, Luca L. Weishaupt, and Faisal Mahmood. A multimodal generative AI copilot for human pathology. Nature, 634(8033):466–473, 2024. 1, 2
[20] Qwen Team. Qwen3.5-9B model card. Hugging Face, 2026. Accessed: 2026-10-26. 5, 11
[21] Qwen Team. Qwen3.8-27B model card. Hugging Face, 2026. Accessed: 2026-10-26. 5, 11
[22] Nicole Schaad, Sabina Berezowska, Aurel Perren, and Ekkehard Hewer. Impact of template-based synoptic reporting on completeness of surgical pathology reports. Virchows Archiv, 484:31–36, 2024. 1
[23] Mehmet Saygin Seyfioglu, Wisdom O. Ikezogwo, Fatemeh Ghezloo, Ranjay Krishna, and Linda Shapiro. Quilt-LLaVA: Visual instruction tuning by extracting localized narratives from open-source histopathology videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13183–13192, 2024. 1, 2, 6, 14
[24] Zhuchen Shao, Hao Bian, Yang Chen, Yifeng Wang, Jian Zhang, Xiangyang Ji, and Yongbing Zhang. TransMIL: Transformer based correlated multiple instance learning for whole slide image classification. In Advances in Neural Information Processing Systems, pages 2136–2147, 2021. 3
[25] Yuxuan Sun, Hao Wu, Chenglu Zhu, Sunyi Zheng, Qizi Chen, Kai Zhang, Yunlong Zhang, Dan Wan, Xiaoxiao Lan, Mengyue Zheng, Jingxiong Li, Xinheng Lyu, Tao Lin, and Lin Yang. PathMMU: A massive multimodal expert-level benchmark for understanding and reasoning in pathology. In European Conference on Computer Vision, pages 56–73. Springer, 2024. 5
[26] Yuxuan Sun, Yunlong Zhang, Yixuan Si, Chenglu Zhu, Kai Zhang, Zhongyi Shui, Jingxiong Li, Xuan Gong, Xinheng Lyu, Tao Lin, and Lin Yang. PathGen-1.6M: 1.6 million pathology image-text pairs generation through multi-agent collaboration. In International Conference on Learning Representations, 2025. 1, 2, 6, 14
[27] Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving Mamba2 with delta rule. In International Conference on Learning Representations, 2025. 4
[28] Guanxu Yu and Yuhang Yao. Visual Jev: Accurate and efficient decisions from shared visual context. arXiv preprint arXiv:2609.25845, 2026. 1, 3, 4
[29] Wenchuan Zhang, Penghao Zhang, Jingru Guo, Tao Cheng, Jie Chen, Shuwan Zhang, Zhang Zhang, Yuhao Yi, and Hong Bu. Patho-R1: A multimodal reinforcement learning-based pathology expert reasoner. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 28418–28426, 2026. 1, 2, 6, 14
[30] Xiaoman Zhang, Chaoyi Wu, Ziheng Zhao, Weixiong Lin, Ya Zhang, Yanfeng Wang, and Weidi Xie. Development of a large-scale medical visual question-answering dataset. Communications Medicine, 4:277, 2024. 5
[31] Yuhan Zhu, Xiangyu Zeng, Qingyi Si, Chenxu Yang, Yifei Li, Luozheng Qin, Junhao Zhou, Dingyu Yao, Jun Zhang,
Chuanyu Qin, Zhiqiu Zhang, Yuandong Yang, Yuqi Xu, Tianyu Zhang, Hongcheng Guo, Jiaqi Wang, Nan Duan, and Limin Wang. VideoJev: System One model for video understanding and interaction. arXiv preprint arXiv:2610.18615, 2026. 1, 3
[32] Yuxin Zuo, Shang Qu, Yifei Li, Zhang-Ren Chen, Xuekai Zhu, Ermo Hua, Kaiyan Zhang, Ning Ding, and Bowen Zhou. MedXpertQA: Benchmarking expert-level medical reasoning and understanding. In Proceedings of the 42nd International Conference on Machine Learning, pages 80961–80990. PMLR, 2025. 6
PathoJev: Efficient Pathology Decisions from Shared Visual Context
Supplementary Material
Supplementary Contents
A Training and Implementation 11 A.1 Initialization and optimization 11 A.2 Hardware and checkpoints 11 A.3 Training data composition 11 B Prompt Format and Algorithms 12 B.1 Prompt serialization and readout 12 B.2 Shared-prefix inference 13 B.3 Two-stage adaptation 13 C Evaluation Protocols 13 C.1 Evaluation subsets 13 C.2 Baseline models 13 C.3 Inference timing 14 C.4 Probability evaluation 14 D Additional Ablation Results 14 D.1 Decision readout 14 D.2 Slide grid resolution 15 D.3 Visual input 15 E Inference Efficiency Analysis 15 E.1 Question-count scaling 15 E.2 Context and layer-wise costs 16 F Qualitative Examples 16 F.1 Case selection and display 16 F.2 Example predictions 17 G Limitations and Future Work 20
A. Training and Implementation
A.1. Initialization and Optimization
PathoJev-9B and PathoJev-27B are initialized from JEV-9B and JEV-27B-VL [2, 3], respectively, with Qwen3.5-9B and Qwen3.8-27B backbones [20, 21]. We retain their pretrained LoRA adapters and typed decision heads. Table A1 summarizes the two-stage schedule shared by both scales. Stage A aligns the slide projection while the decision model is fixed; Stage B adapts the projection, LoRA adapters, and head jointly using WSI and ROI questions.
Both stages use AdamW with weight decay 0.01, gradient clipping at 1.0, PyTorch's default moment and epsilon parameters, and seed 0. LoRA uses rank , scaling , and dropout 0.05. It targets the language model's query, key, value, and output projections, the feed-forward gate, up, and down projections, and the Gated DeltaNet projections in_proj_qkv, in_proj_z, and out_proj. No adapters are added to the vision encoder.
Decision temperature. We fix for all output types throughout training and evaluation and apply no post-hoc
Table A1. Two-stage training schedule, shared by the 9B and 27B models. Question counts are per optimization step.
| Setting | Stage A | Stage B |
|---|---|---|
| Trainable parameters | ||
| Training slides used | 30% | 100% |
| Epochs | 1 | 2 |
| Optimization steps | 244 | 1,624 |
| Slides per step | 8 | 8 |
| Questions per slide | ||
| ROI questions per step | 0 | 32 |
| Projection learning rate | ||
| LoRA learning rate | Frozen | |
| Head learning rate | Frozen | |
| Linear warm-up steps | 100 | 48 |
| Post-warm-up schedule | Constant | Cosine to zero |
| Optimizer | AdamW | |
| Weight decay | 0.01 | |
| Gradient clipping | 1.0 | |
| LoRA rank / scaling | 16 / 32 | |
| LoRA dropout | 0.05 | |
| Seed | 0 | |
calibration. All ECE and coverage–accuracy results use these uncalibrated probabilities.
A.2. Hardware and Checkpoint Selection
Training uses four RTX PRO 6000 GPUs with 96 GB memory each, with data parallelism and gradient all-reduce.
For 9B, validation runs every 250 Stage B steps score checkpoints by the mean of PathMMU and WSI-VQA validation accuracy and CF-Path validation paired AUROC. This rule selects the checkpoint at Stage B step 1,250; for 27B, we use the final checkpoint. WSI question rows are processed in chunks of 16 at 27B, each reading the same slide prefix with isolated question contexts. ROI micro-batches contain 32 questions at 9B and 16 at 27B. Chunking preserves the per-step sample counts and training objective.
A.3. Training Data Composition
Table A2 lists the question counts in the training mixture. Whole-slide questions come from the training portions of SlideInstruct, WSI-Bench, and WSI-VQA, together with CF-Path statements constructed from TCGA reports. ROI supervision comes from PathVQA and the pathology subset of PMC-VQA. In Stage A, we sample 30% of the training slides. Stage B uses the full training mixture, including the slides used in Stage A.
Table A2. Training mixture used for pathology adaptation.
| Source | Input | Questions |
|---|---|---|
| SlideInstruct | WSI | 48,699 |
| WSI-Bench | WSI | 34,799 |
| WSI-VQA | WSI | 2,311 |
| CF-Path | WSI | 126,467 |
| PathVQA | ROI | 9,751 |
| PMC-VQA (pathology) | ROI | 8,204 |
CF-Path construction. CF-Path uses diagnostic slides and their PathText report summaries [5] from 11 TCGA projects: BLCA, BRCA, COAD, HNSC, KIRC, LUAD, LUSC, PRAD, READ, STAD, and UCEC. Qwen3.5-9B in text-only, non-thinking mode decomposes each report into atomic statements, assigns a category to each statement, and generates a minimally modified false version. Category filtering retains diagnosis, grade, morphology, invasion, tissue type, and lymph-node metastasis pertaining to the current slide. Statements about laterality, gross findings or dimensions, and lymph nodes outside the current slide are excluded.
Statements from the case’s own report receive positive labels, and their perturbed versions receive negative labels. Two additional sources create statements shared across cases within the same TCGA project: 12 statements from other cases and the 60 most frequent eligible statements, each occurring in at least three cases. Qwen3.5-9B assesses these statements against the target case’s report using natural language inference. Entailment probability of at least 0.8 yields a positive label; contradiction probability of at least 0.8 yields a negative label. Remaining candidates are discarded. The resulting binary labels are silver-standard annotations produced automatically from reports, without statement-level manual verification.
CF-Path splits and training exclusions. We group cases by TCGA tissue source site (TSS) code and stratify by project, targeting a 70/15/15 training/validation/test split. Assignments for the initial five projects remain fixed when additional projects are incorporated; only previously unassigned TSS groups receive new assignments. Cases and TSS groups do not cross splits. Table A3 summarizes the resulting sets. For PathoJev adaptation, we remove all training rows whose case appears in the WSI-VQA, WSI-Bench, or SlideBench evaluation sets, or in CF-Path validation or test sets.
Table A3. CF-Path split sizes. TSS denotes tissue source site.
| Training | Validation | Test | |
|---|---|---|---|
| Questions | 126,467 | 36,372 | 38,088 |
| Slides | 2,926 | 627 | 628 |
| Cases | 2,721 | 595 | 623 |
| TSS groups | 111 | 66 | 76 |
B. Prompt Format and Algorithms
B.1. Prompt Serialization and Decision Readout
PathoJev uses JEV’s bare-v1 format. The markers [state], [kind], {question}, [options], and [decision]: are lowercase ordinary text processed by the existing tokenizer. The boxes below show the field order; braces indicate question-specific content, and <V> denotes inserted slide embeddings.
Whole-slide multiple-choice prompt
[state] Whole-slide image (H&E): <V> [kind] choice {question} {question} [options] A) {option A} B) {option B} ... [decision]:
The WSI prefix contains a trailing space after the colon, the projected slide embeddings, and a newline. It is encoded once. Each question suffix begins with [kind] and branches independently from the prefix cache. Multiple-choice alternatives are labeled A through P, with only the available alternatives included. Binary questions use the following suffix and preserve the order false, then true.
Binary question suffix
[kind] noul {question} {statement} [options] false true [decision]:
For ROI inputs, [kind] precedes [state]. Each image is processed with one question through the native visual pathway. The state line contains the image placeholders used by the backbone’s processor.
Algorithm A1 Shared-prefix whole-slide decisions
Require: Patch features ; questions ; parameters
Ensure: Answer distributions and predictions
1: Compute by spatial mean pooling and projection (Eq. 2)
2:
3:
4: for each batch of question indices do
5: for each do
6: Serialize using Eq. 3
7: Initialize row-local recurrent and convolutional states from
8: Share prefix keys and values from
9: end for
10: Evaluate rows independently in a batch
11: for each do
12: :
13:
14:
15:
16:
17: end for
18: end for
19: return
ROI multiple-choice prompt
[kind] choice [state] An H&E-stained histopathology image: <|vision_start|><|image_pad|><|vision_end|> [question] {question} [options] A) {option A} B) {option B} ... [decision]:
The typed head reads the final normalized hidden state at the last token of the question. With the Qwen3.5-9B tokenizer, this is the token containing ]: at the end of [decision]:. PathOJev applies the head directly to this bare prompt; the autoregressive control uses the Qwen chat template, and other generative baselines use their respective model templates.
B.2. Shared-Prefix Decision Inference
Algorithm A1 summarizes WSI inference. Each recurrent layer initializes a separate branch state for every question, while prefix attention keys and values are shared. Suffix states and keys and values remain local to each row, so batching changes execution order without changing question context. The decision head selects the output indices associated with the question type and normalizes over its valid candidates.
B.3. Two-Stage Adaptation
Algorithm A2 summarizes the optimization in Sec. 3.4. WSI questions use the shared-prefix layout; ROI questions use the native visual pathway. During training, prefix computation remains in the gradient graph so that decision su
Algorithm A2 Two-stage pathology adaptation
Require: Pretrained backbone , adapters , head ; stage-specific question distributions
1: Initialize projection ; set
2: Freeze and both visual encoders
3: for do
4: if then
5: ; freeze ;
6: else
7: ; unfreeze ;
8: end if
9: Initialize AdamW over with the Stage schedule
10: for do
11: Sample WSI questions from
12: Include ROI questions in Stage B
13: Predict using the appropriate visual pathway
14: Compute from (Eq. 9)
15: Backpropagate to and clip gradients at 1.0
16: Update using the learning rates at step
17: end for
18: end for
19: Select the checkpoint as in Appendix A.2
pervision can update the WSI projection. The stage-specific sampling and learning-rate schedules are given in Table A1.
C. Evaluation Protocols
C.1. Evaluation Subsets
Table A4 gives the subsets used for the eight-benchmark evaluation. WSI-VQA contains 85 slides, WSI-Bench contains 360, and SlideBench-TCGA contains 1,269. Accuracy is computed over questions within each benchmark. WSI and ROI means assign equal weight to each benchmark in the corresponding group. Figure 1 averages each model's available benchmark results within that group.
Table A4. Evaluation subsets and question counts.
| Benchmark / subset | Questions |
|---|---|
| Whole-slide assessment | |
| WSI-VQA | 390 |
| WSI-Bench (closed-ended) | 1,141 |
| SlideBench-TCGA | 3,127 |
| Local tissue assessment | |
| PathMMU-tiny | 1,139 |
| PathVQA (yes/no) | 3,362 |
| Quilt-VQA (closed-ended) | 343 |
| OmniMedVQA (pathology) | 890 |
| MedXpertQA (pathology) | 90 |
C.2. Baseline Models
We compare with Qwen3.5-9B and Qwen3.8-27B in generation mode, their zero-shot JEV counterparts, and Thinking-mode configurations at both scales. Specialized baselines include Patho-R1-7B [29], HuatuoGPT-Vision-7B [4], Quilt-LLaVA-v1.5-7B [23], and PathGen-LLaVA-13B [26], together with our reproductions of SlideChat [7] and WSI-LLaVA [16]. Zero-shot WSI baselines receive slide thumbnails, while PathoJev uses the patch-feature pathway in Sec. 3.1. PathoJev uses the SlideInstruct and WSI-Bench training data also used by SlideChat and WSI-LLaVA, respectively.
The thumbnail-based pathology VLMs use their own conversation templates and greedy decoding with a 32-token output limit. HuatuoGPT-Vision, Quilt-LLaVA, and PathGen-LLaVA are evaluated on all three WSI test sets; unparseable answers are counted as incorrect.
Thinking-mode decoding. Both Qwen scales use temperature 1.0, top-p 0.95, top-k 20, and presence penalty 1.5. The thinking budget is 8,192 tokens. When that budget is reached, the thinking segment is closed and at most 512 additional tokens are allowed for the final answer. Seeds are assigned by global question index, and unparseable answers count as incorrect. The latency runs use batch size one.
C.3. Inference Timing Protocol
We measure GPU forward time after untimed warm-up, with GPU synchronization around the timed computation. Measurements use an exclusively allocated RTX PRO 6000 GPU with 96 GB memory and batch size one. File loading and input preprocessing are outside the timed region.
Whole-slide inputs. PathoJev, SlideChat, and WSI-LLaVA start from pre-extracted features already resident on the GPU. CONCH or GigaPath patch-feature extraction is excluded. For PathoJev, timing includes the WSI projection MLP, shared-prefix prefill, and question-row forward passes. Mean pooling onto the grid is performed offline. For SlideChat, timing includes its LongNet slide encoder, projection, prefix prefill, and greedy decoding for each question from a copy of the prefix cache. For WSI-LLaVA, timing includes prefix prefill and decoding. Its Prov-GigaPath LongNet slide encoder and pooling to 576 visual tokens run during feature preparation and are excluded from the measured latency.
ROI inputs. The timed region covers the model's generation or forward call, including visual encoding, prefix prefill, and answer decoding or decision readout. Image decoding and processor operations run before timing begins.
Thumbnail-based WSI inputs. Qwen, JEV, and the zero-shot pathology VLMs receive a slide thumbnail separately for each question. Their timed region includes visual encoding, prefix prefill, and answer decoding or decision readout, as for ROI inputs. The three additional pathology VLM runs use five untimed warm-up questions and all 1,141 WSI-Bench questions.
Thinking-mode timing subsets. Thinking-mode latency is the mean over the first 100 questions in test-file order on PathMMU-tiny or WSI-Bench, at each model scale. This timing subset is separate from the accuracy evaluation. The 9B WSI mean is 82.3 seconds per question (median 61.5); the 27B ROI and WSI means are 78.6 and 69.1 (medians 38.9 and 40.9). Table 1 reports the means.
C.4. Probability Evaluation
For each question, confidence is the largest predicted answer probability. Expected calibration error [10] aggregates the absolute difference between accuracy and mean confidence across 15 confidence bins, weighted by the number of questions in each bin. Coverage-accuracy curves rank questions by confidence and report accuracy on the retained fraction. Risk is the error rate among retained questions, and AURC summarizes risk over coverage, with lower values indicating lower error across coverage levels. These metrics use the probabilities obtained at , as specified in Appendix A.1.
Table 4(a) reports whole-slide ECE for both model scales, and Table 4(b) reports PathoJev-9B accuracy when retaining the most confident 80% of questions. At 50% coverage, SlideBench-TCGA accuracy reaches 93.2%. On ROI inputs, the 9B model has ECEs of 14.0 and 18.1 percentage points on PathMMU-tiny and Quilt-VQA, respectively.
D. Additional Ablation Results
D.1. Decision Readout Ablation
The autoregressive control uses the Qwen3.5-9B backbone and follows PathoJev's two-stage schedule, pathology training data, and step counts. It starts from Qwen3.5-9B weights, whereas PathoJev starts from JEV-9B (Appendix A.1). The control learns textual answers with the Qwen chat template, whereas PathoJev uses the bare prompt and typed decision head described in Appendix B.1. Its checkpoint is selected with the validation rule in Appendix A.2, at Stage B step 750. Greedy decoding is limited to 16 output tokens. The WSI generative control reuses the slide-prefix cache. Table A5 reports paired-bootstrap 95% confidence intervals for accuracy differences. Per-benchmark differences are computed before rounding the displayed accuracies.
The SlideBench-TCGA interval is positive, while the WSI-VQA interval includes zero. The WSI-Bench interval touches zero at the reported precision. ROI intervals show gains on PathVQA and OmniMedVQA and a decrease on
Table A5. Accuracy differences between PathoJev-9B and autoregressive SFT, in percentage points, with paired-bootstrap 95% confidence intervals.
| Benchmark | Δ | Lower | Upper |
|---|---|---|---|
| WSI-VQA | +1.5 | -1.8 | +4.9 |
| WSI-Bench | +1.4 | 0.0 | +2.8 |
| SlideBench-TCGA | +1.7 | +0.5 | +2.9 |
| PathMMU-tiny | -2.4 | -4.5 | -0.3 |
| PathVQA | +0.8 | +0.1 | +1.5 |
| Quilt-VQA | +4.1 | 0.0 | +8.2 |
| OmniMedVQA | +6.5 | +3.9 | +9.1 |
| MedXpertQA | -4.4 | -11.1 | +2.2 |
PathMMU-tiny; the Quilt-VQA interval touches zero and the MedXpertQA interval includes zero.
D.2. Slide Grid Resolution
Table A6 compares 32 × 32 and 64 × 64 grids under the initial training-data configuration. Both runs start from JEV-9B and use the same training data, learning-rate schedule, seed 0, and step counts: 125 in Stage A and 831 in Stage B. Each step uses eight slides and 32 ROI questions. The row and column position-embedding tables match the grid size. Stage A uses up to 32 questions per slide for the 32 × 32 run and up to 64 for the 64 × 64 run. The runs use two GPUs and one GPU, respectively, with the same per-step sample counts.
Every 250 Stage B steps, we select checkpoints using the mean of PathMMU and WSI-VQA validation accuracy and CF-Path validation paired AUROC. The selected checkpoints are steps 500 and 250 for the 32 × 32 and 64 × 64 runs, respectively. Over 300 sampled slides, median visual sequence length increases from 499 to 1,755 tokens. The finer-grid run has lower accuracy on all three WSI benchmarks, with a 3.5× larger median token count. These results describe the two training configurations above; Table 1 uses the final training configuration.
Table A6. Grid-resolution comparison under the initial training-data configuration. Accuracy (%); visual token counts are medians over 300 sampled slides.
| Measure | 32 × 32 | 64 × 64 |
|---|---|---|
| Median visual tokens | 499 | 1,755 |
| WSI-VQA | 67.7 | 65.9 |
| WSI-Bench | 88.0 | 84.7 |
| SlideBench-TCGA | 73.6 | 68.8 |
| PathMMU-tiny | 75.9 | 74.4 |
| PathVQA | 93.4 | 93.0 |
| Quilt-VQA | 68.2 | 66.2 |
| OmniMedVQA | 75.3 | 77.8 |
D.3. Visual Input Ablation
Table A7 compares image-conditioned predictions with predictions made without images. Questions and answer alternatives are retained. Without the image, the 9B model loses accuracy on seven of eight benchmarks, with drops ranging from 6.7 to 35.5 percentage points. On MedX-pertQA (90 clinical-vignette questions), accuracy is 25.6% with images and 28.9% without them. The 27B model retains 86.2% accuracy on PathVQA without an image, compared with 95.1% with an image, indicating substantial predictive information in the textual input on this benchmark.
Table A7. Visual input ablation. Accuracy (%) with and without the image, and the decrease after image removal in percentage points.
| Benchmark | With image | No image | Decrease |
|---|---|---|---|
| PathoJev-9B | |||
| WSI-VQA | 65.4 | 58.7 | 6.7 |
| WSI-Bench | 90.4 | 80.3 | 10.1 |
| SlideBench-TCGA | 75.9 | 63.9 | 12.0 |
| PathMMU-tiny | 71.9 | 54.5 | 17.4 |
| PathVQA | 94.6 | 62.1 | 32.5 |
| Quilt-VQA | 70.8 | 49.6 | 21.2 |
| OmniMedVQA | 75.3 | 39.8 | 35.5 |
| PathoJev-27B | |||
| PathVQA | 95.1 | 86.2 | 8.9 |
Paired-statement diagnostic. For CF-Path evaluation, we group statements with identical normalized text within each TCGA project and form pairs with opposite binary labels. The test set contains 38,088 questions and 117,377 such positive-negative pairs. Patholev-9B and PathoJev-27B achieve within-statement paired AUROCs of 0.728 and 0.729, respectively, compared with 0.511 for the text-only control. This diagnostic holds statement content fixed across slides and measures agreement with the report-derived labels described in Appendix A.3.
E. Inference Efficiency Analysis
E.1. Question-Count Scaling
Figure 3 reports median total forward time over the same 40 WSI-Bench slides at . Table A8 gives representative values. Pointwise 95% confidence intervals use 10,000 bootstrap resamples of slides with replacement (seed 0), preserving all question counts and model settings from each resampled slide. The public WSI benchmarks contain an average of 2.5–4.6 questions per slide, with at most eight. We cycle through each slide's own questions to construct larger workloads. The generative baselines and shared-prefix Patholev reuse the prefix; the separate-encoding variant recomputes it for each ques-tion. Timing follows Appendix C.3. The matched comparison with separate prefix encoding is given in Table 3.
Table A8. Median total forward time (seconds per slide, ↓) over 40 WSI-Bench slides. All models reuse the slide-prefix cache.
| Model | N = 1 | N = 8 | N = 64 |
|---|---|---|---|
| Autoregressive SFT | 0.16 | 0.84 | 6.34 |
| WSI-LLaVA | 0.07 | 0.31 | 2.18 |
| SlideChat | 0.68 | 1.47 | 8.93 |
| PathoJev-9B | 0.12 | 0.14 | 0.68 |
Figure E1 shows the corresponding 9B analysis on 40 SlideBench-TCGA slides. At 64 questions, shared-prefix PathoJev takes 0.52 seconds, compared with 7.39 for separate encoding, 6.32 for autoregressive SFT, and 12.12 for SlideChat.

Figure E1. Question scaling on SlideBench-TCGA. Median total forward time over 40 slides; shading and capped error bars show pointwise 95% bootstrap confidence intervals. Timing and repeated-question construction follow the WSI-Bench analysis.
E.2. Context-Length and Layer-Wise Costs
After prefix prefill, we measure row execution time and peak GPU memory . Marginal costs are and , with memory in decimal MB. Table A9 supplements Figure 4 with exact values and layer timings. All systems use the same shared-prefix attention implementation, storing one copy of the prefix keys and values. The comparison measures complete models with different layer counts, dimensions, and recurrent-state sizes.
Recurrent-layer time remains stable as grows, while softmax-attention time increases. The former reuses fixed-size states; the latter reads a prefix cache whose length
grows with (Sec. 3.2).
At , Qwen3-8B has lower marginal memory than PathoJev-9B (7.4 versus 12.1 MB per question). PathoJev initializes a separate fixed-size recurrent state for each row. As context length increases to 4,096, its marginal memory grows to 37.4 MB, compared with 68.8 MB for Qwen3-8B. The memory advantage therefore emerges at longer contexts rather than holding across all measured lengths.
Table A9. Costs at three slide-context lengths with one shared prefix KV copy in every system. Marginal costs are per question; layer timings aggregate 16 rows.
| Measure | 256 | 1,024 | 4,096 |
|---|---|---|---|
| PathoJev-9B | |||
| Marginal time (ms/question) | 1.46 | 1.61 | 2.48 |
| Marginal memory (MB/question) | 12.1 | 12.1 | 37.4 |
| Recurrent layers (ms) | 58.1 | 58.2 | 58.3 |
| Softmax attention (ms) | 19.0 | 20.9 | 33.8 |
| PathoJev-27B | |||
| Marginal time (ms/question) | 7.58 | 8.21 | 10.67 |
| Marginal memory (MB/question) | 17.7 | 17.5 | 55.7 |
| Recurrent layers (ms) | 174.5 | 174.3 | 173.9 |
| Softmax attention (ms) | 55.4 | 61.3 | 99.9 |
| Qwen3-8B | |||
| Marginal time (ms/question) | 2.40 | 3.83 | 9.72 |
| Marginal memory (MB/question) | 7.4 | 19.6 | 68.8 |
| Softmax attention (ms) | 59.5 | 80.8 | 173.6 |
F. Qualitative Examples
Figures F1–F5 illustrate multi-question slide assessment, image-conditioned answers, and probability readout on WSI and ROI inputs. Figure F2 additionally reports predictions over all 40 slides asked the same grading question.
F.1. Case Selection and Image Display
Selection rules. Figure F1 uses the SlideBench-TCGA test slide with the largest number of questions, TCGA-XF-AAMJ, which has eight. For Figure F2, we use the WSI-Bench grading question whose wording and options are identical across 40 slides. Within each ground-truth grade, we shuffle cases with seed 0 and select the first case answered correctly by PathoJev-9B.
For Figures F3–F5, candidates have at most five options and question text of at most 200 characters, extended to 400 for MedXpertQA. We exclude staging, TNM, size, and negative-form questions containing “not,” “least,” or “except.” A lexical filter excludes questions containing a content word of at least five letters from the correct answer, matching the first six letters. Each example appears in one figure. Eligible question IDs are ordered by the SHA-1 hash

Figure F1. Eight benchmark questions over one slide. PathoJev-9B answers all eight SlideBench-TCGA questions for TCGA-XF-AAMJ through a batched question evaluation after shared-prefix prefill. Bars show the probability assigned to each predicted answer; the right column shows SlideChat outputs. These are the benchmark's question set, including its staging item. The displayed 0.13 s and 2.05 s are median times over 40 slides at N = 8.
of seed0: concatenated with the ID, and the first eligible case is used for each panel.
Figure F3 selects WSI questions answered correctly by PathoJev-9B and incorrectly by SlideChat, with top-1 probability above 0.95 in panel (a) and between 0.5 and 0.8 in panel (b). Figure F4 selects one microscopy example per ROI benchmark that both PathoJev scales answer correctly. Visual filtering excludes three PathVQA gross or clinical photographs and one Quilt-VQA frame showing the speaker, with the exclusions recorded in the selection script. Figure F5 selects questions both scales answer correctly and for which the 27B top-1 probability exceeds the 9B probability by at least 0.2.
Display crops. WSI insets in Figures F2, F3, and F5 show 400 µm fields from IDC slide pyramids. They use the 10× level (approximately 1 µm/pixel), except TCGA-EM-A3SY, which uses the 5× level (approximately 2 µm/pixel). Windows are ranked on the thumbnail tissue mask by mean 255 – R, a hematoxylin proxy, with at least 90% tissue coverage and background, pen marks, and very dark pixels excluded. Among up to ten non-overlapping windows in descending order, we use the first with fewer than 0.5% pixels below grayscale intensity 60. Black boxes mark the displayed fields. These crops are for visualization; WSI inference uses the whole-slide grid. Screen-recorded ROI frames are cropped to the slide viewer for display.
F.2. Example Predictions
PathoJev-9B answers all eight benchmark questions in Figure F1 correctly through batched readout over a shared slide prefix. Figure F2 isolates a repeated question across different images: accuracy over the 40 slides is 80.0% with images and 5.0% without them, compared with 40.0% for SlideChat and 67.5% for WSI-LLaVA. Figures F3 and F4 show the full candidate distributions for WSI and ROI examples.

Figure F2. The same question across different slides. Top: one correctly answered example per ground-truth grade, selected with seed 0. Bottom: predicted grade counts and question-level accuracy over all 40 WSI-Bench slides asked this question. PathoJev-9B achieves 80.0% accuracy with images; without images it predicts well differentiated for all slides and achieves 5.0%. Insets show 400 µm fields for display; the model receives the whole-slide grid.

Figure F3. Answer distributions for whole-slide decisions. Examples answered correctly by PathoJev-9B and incorrectly by SlideChat. (a) The model assigns 0.96 probability to papillary renal cell carcinoma. (b) It assigns 0.57 to focal angioinvasion, with the remaining probability distributed across the other options. Selection and display crops follow Appendix F.1.

Figure F4. Probability readout across five ROI benchmarks. One microscopy question per benchmark answered correctly by both PathoJev-9B and PathoJev-27B. Paired bars show each model's probabilities over the supplied alternatives. Screen-recorded frames are cropped to the slide viewer for display.

Figure F5. Confidence differences between model scales. Both models answer each question correctly, with examples selected for a top-1 probability increase of at least 0.2 from 9B to 27B. The displayed probabilities increase from 0.63 to 0.99 on the WSI example and from 0.49 to 0.95 on the ROI example.
G. Limitations and Future Work
Extending the decision space. PathoJev currently predicts categorical and binary answers to questions with supplied candidates. Its evaluation focuses on judgments over individual slides and ROI images. Extending the interface to continuous measurements and spatial candidates would connect these judgments to quantitative and localized tissue assessment. Such outputs would require corresponding supervision and decision rules, while retaining the separation between shared visual context and question-specific computation.
Composing pathology workflows. A higher-level pathology assistant could formulate questions from a reporting goal, propose answer candidates, and assemble PathoJev's outputs into a structured account of the tissue findings. The assistant would manage question selection and report synthesis, while PathoJev would evaluate each visual judgment against the cached slide context. Answer probabilities could help prioritize the next question or select a region for closer inspection. This direction extends the use of the decision interface from a predefined question set to an evolving sequence of pathology queries.
Connecting multiple tissue views. Another direction is to combine decisions across slides, stains, and magnifications. Maintaining a separate visual cache for each image could support repeated queries within a view, while a coordinating model selects relevant views and combines their findings. Associating each decision with its source image would preserve the connection between specimen-level summaries and the underlying tissue evidence.