TIS 2.0: Token Importance Scoring Now Eliminates Position Bias in RAG

**An update to the Token Importance Scoring series — new passage reordering capability, transfer learning findings, and open-source checkpoints.**

Following the initial [TIS release](Presenting TIS (Token Importance Scoring) - A new way to compress KV cache), we’ve significantly expanded TIS capabilities. The biggest finding: **a learned importance head trained for KV cache compression also eliminates position bias in retrieval-augmented generation without any retraining** — suggesting TIS learns generalizable importance patterns.

## What’s New in TIS 2.0

### 1. Position Bias Elimination (Lost-in-the-Middle)

The core discovery: reordering retrieved passages by TIS importance scores completely eliminates the LITM position gap while improving overall accuracy.

| Pipeline | EM (early) | EM (middle) | EM (end) | LITM Gap |

|—|—|—|—|—|

| Baseline (no reordering) | 18.3% | 13.3% | 18.3% | **0.050** |

| Lexical (TF-IDF) | 16.7% | 18.3% | 18.3% | −0.008 |

| **TIS (passage reranker)** | **21.7%** | **21.7%** | **21.7%** | **0.000** |

| Oracle | 18.3% | 18.3% | 18.3% | 0.000 |

**Result**: TIS reduces the LITM gap to **zero** (matching Oracle) while improving EM by +5pp over baseline. Evaluation on 60 MS-MARCO queries × 3 positions = 180 test cases.

### 2. Zero-Shot Transfer Finding

Even more surprising: the existing `tis-stage3-ert` checkpoint (trained for KV cache compression on synthetic data) achieves identical passage reordering performance:

| Checkpoint | LITM Gap | EM (all positions) | Training |

|—|—|—|—|

| `tis-stage3-ert` (KV eviction) | **0.000** | **21.7%** | None (existing) |

| `tis-passage-reranker` (contrastive) | **0.000** | **21.7%** | MS-MARCO passage pairs |

This suggests TIS learns abstract “importance” patterns that generalize across task granularities (tokens ↔ passages) and objectives (compression ↔ ranking).

### 3. Query-Aware Architecture

`QueryAwareImportanceHead` extends the base `ImportanceUpdateHead` with:

- Cross-attention query-context interaction

- Per-passage relevance scoring

- RMSNorm output stabilization

- InfoNCE contrastive training on passage pairs

### 4. Speculative Decoding Integration

TIS importance bias applied to drafter predictions improves acceptance:

| Condition | Accept Length | Speedup | Notes |

|—|—|—|—|

| No TIS | 5.80 / 8 | 0.644 | Baseline |

| **TIS depth-scaled** | **6.57 / 8** | **0.730** | +12.5% |

(LLaMA-3.1-8B target + LLaMA-3.2-1B drafter, n=30)

### 5. Improved Benchmarking

New evaluation framework with 4 concurrent pipelines:

- `baseline`: original retrieval order

- `lexical`: TF-IDF cosine similarity reordering

- `tis`: learned passage importance

- `oracle`: gold passage always first

Enables direct comparison of ranking quality vs. baseline and oracle bounds.

## Checkpoints

**HuggingFace**:

- [`tis-stage3-ert`](oldman-dev/tis-stage3-ert · Hugging Face): KV compression + passage reordering (no additional training needed)

- **[`tis-passage-reranker`](oldman-dev/tis-passage-reranker · Hugging Face)** (new): dedicated passage reordering head

- [`tis-v8b-hard-anchor`](oldman-dev/tis-v8b-hard-anchor · Hugging Face): 82% NIAH @ 25% budget

**GitHub**: GitHub - nitroxido/token-importance-scoring: Public repository for TIS system · GitHub

## Key Code Changes

**New modules:**

- `QueryAwareImportanceHead` — contrastive query-aware scoring

- `CrossAttentionImportanceScorer` — per-passage relevance

- `TISCompositeLoss` — 5-component objective (task + KL + budget + churn + saliency)

- `TISDrafter` — speculative decoding adapter

- Evaluation: `run_litm_with_baselines.py` (4-pipeline comparison)

**Updated:**

- `ImportanceUpdateHead.direct_score()` — explicit named scorer path (evaluation-only)

- `PatchedCausalLM` — Transformers 5 SDPA compatibility warning + generation prefix fix

- `eval/benchmarks.py` — full LITM pipeline with scoring policies

## Technical Insights

1. **Generalizable importance**: Token-level and passage-level importance share underlying patterns. A head trained for KV compression can score entire passage relevance.

2. **Position bias root cause**: The position effect is strongest at positions where passage content is sparse (middle positions lose context) — not just a positional encoding issue. Reordering addresses this directly.

3. **Trade-offs**: Improved passage ordering does not guarantee proportional answer quality gains. ~76% of test cases remain incorrect after reordering, indicating answer extraction (not ranking) is the bottleneck in this domain.

## Reproducibility

```bash

git clone GitHub - nitroxido/token-importance-scoring: Public repository for TIS system · GitHub

cd token-importance-scoring

python -m venv .venv && source .venv/bin/activate

pip install -e .

# Download checkpoint

hf download oldman-dev/tis-stage3-ert --local-dir checkpoints/stage3_ert

# Run 4-pipeline LITM evaluation

python scripts/run_litm_with_baselines.py \

--checkpoint checkpoints/stage3_ert \\

--n-examples 60 \

--seed 42

```

Expected: baseline LITM gap 0.050 → TIS gap 0.000, baseline EM 16.7% → TIS EM 21.7%

## Open Questions for the Community

1. **Does this transfer to other domains?** We validated on MS-MARCO. Does passage reordering work on e.g., NaturalQuestions, HotpotQA, or multi-document summarization?

2. **Beginning-position ceiling**: All learned scorers (including ours) achieve 0% on beginning-position tokens due to causal masking. Our oracle `key_match` scorer (text parsing) reaches 67%. Can we close this gap with a non-causal architecture?

3. **Cross-model transfer**: Can a TIS head trained on Mistral-7B transfer to Llama-3-8B or Qwen-72B without retraining?

4. **Inference cost**: TIS adds ~276ms per query (score computation). Is this acceptable for real-time RAG, or should we optimize further?

## Links

- **GitHub**: GitHub - nitroxido/token-importance-scoring: Public repository for TIS system · GitHub

- **HuggingFace**: oldman-dev (Old Man Developer)

- **Reproducibility guide**: [REPRODUCIBILITY-GUIDE.md](token-importance-scoring/REPRODUCIBILITY-GUIDE.md at main · nitroxido/token-importance-scoring · GitHub)

- **Architecture & specs**: [ARCHITECTURE-TECHNICAL-SPECS.md](token-importance-scoring/ARCHITECTURE-TECHNICAL-SPECS.md at main · nitroxido/token-importance-scoring · GitHub)

**We’d love to hear from the community:** Have you tested TIS on your domain? Do the transfer findings hold for other model families? What would make passage reordering more useful for your RAG pipeline?

Impressive update! The zero-shot transfer and complete removal of the lost-in-the-middle gap are especially promising. love to see how it performs on larger datasets and different model families. Thanks for sharing the benchmarks and open-source checkpoints.

I currently want to use the Jina embedding model, which can embed entire documents at once. And then I noticed that there was too much noise and that tokens that are close to each other had a strong influence and probably also the tokens at the beginning and end of the document were given more weight. I tried using “distance-residual attention” and your technique could perhaps reduce the noise even more:

https://huggingface.co/proxy/discuss.huggingface.co/t/attention-weighted-memory-graphs/178271/3

Thanks! Being able to flatten LITM (my original motivation) was a nice milestone! Being able to use any TIS trained head for it, even one used in KV cache compression (another nice “side-effect”) for that was also surprising!

If you like my work here, don’t forget to check also STANNO work! It’s a very old architecture that I up-to-date’d so it now can be used as an image-similarity-finder model on ComfyUI-based imaging systems. It can help you a lot when doing consistent characters, because you can generate a bunch of images and use my STANNO system as the filter to just keep those that have a good enough similarity to the original ones!

Feel free to experiment with TIS (it’s a very lightweight addition to any pipeline) and let us know how it’s doing on your Jina work!

Well .. after some comments on this new version made by @John6666 on the original thread here, I have added some of the missing pieces of the new system, and also updated the documentation to show the correct numbers and new results from the latest experiments made!

I hope you users can find this useful enough and keep commenting on any missing code, checkpoints, models, documents, etc… Maybe I should just clean up a bit the working version, the one I use internally, and upload that instead, but the code and the documents are messier and cleaning them would be more hard work than just doing a cleaned release each time a major milestone is reached! :wink:

Hmm… I think most of the pieces fit now, but they seem to describe two slightly different things:


I tried a small independent replication using only the public 60-query evaluation set, the public checkpoints, and a fixed set of natural scoring wrappers.

The public Colab notebook is here.

The short version is more positive than where I started:

The broad numerical result appears reproducible. What remains unclear is not whether the public TIS checkpoints can produce useful context layouts, but whether their scalar scores are already calibrated as query-relevance scores.

I did not try to recover the exact private trainer or evaluator that produced the published numbers. Instead, I fixed a few ordinary public-artifact-based routes in advance and ran them over all 60 queries.

On a set this size, one answer changes EM by about 1.67 percentage points, so I would treat 20% and 21.7% as the same broad performance regime rather than attach much meaning to a one-answer difference.

Route Reported in TIS 2.0 Independent notebook
Baseline average 16.7% 16.7%
Stage 3 21.7% 20.0%
v8b 20.0%
Dedicated reranker 21.7% 20.0%
TF-IDF 17.8% average 18.3%
BM25 18.3%
Passage length 20.0%
Fixed random 16.7%

So the broad 16.7% → approximately 20–22% result looks real enough to me.

The more interesting question is what kind of signal produced it.

Story A — context-layout policy
───────────────────────────────
same five passages
        ↓
discard the original retrieval slot
        ↓
produce one deterministic final order
        ↓
same prompt for early / middle / end
        ↓
measured position gap = 0


Story B — relevance scoring
───────────────────────────────
question + passages
        ↓
learned importance score
        ↓
relevant passage receives a higher score
        ↓
better passage ranking
        ↓
better answer generation

My results support Story A fairly strongly.

Story B still looks plausible, but only partially established.

The broad result appears reproducible

The notebook uses:

  • the public MS-MARCO query IDs from the published result artifact;
  • five passages per query;
  • all 60 queries;
  • the public Mistral backbone;
  • the public Stage 3, v8b, and dedicated reranker checkpoints;
  • fixed evaluator routes rather than searching until a particular EM number appeared;
  • one generated result per canonicalized route and query;
  • separate early, middle, and end prompts only for the unreordered baseline.

The independent baseline results were:

Baseline position Relaxed EM
Early 18.3%
Middle 15.0%
End 16.7%
Average 16.7%

Several public-checkpoint routes then reached 20%:

Canonical route Relaxed EM
Stage 3, high score first 20.0%
v8b, high score first 20.0%
Dedicated best.pt, correct query 20.0%

This is enough for me to say that the direction is not obviously a dead end. Public TIS checkpoints can construct context layouts that operate in roughly the reported accuracy range.

It is not yet enough to say that they consistently outperform all simpler ordering rules.

Zero position gap is real, but it is a property of the final layout

The early, middle, and end examples contain the same five passages. Only the original gold-passage slot changes.

Once a deterministic reranker discards that original slot and produces one final order, the three variants collapse into the same prompt:

early input  ┐
middle input ├─ same passages ─ deterministic order ─ same prompt
end input    ┘
                                                     ↓
                                             same prediction
                                                     ↓
                                                zero gap

That means zero gap is a genuine result, but it does not by itself measure scorer quality.

TF-IDF, passage length, a learned scorer, or even a fixed random canonical order can all structurally remove the original early/middle/end distinction.

I think the cleanest interpretation is therefore to report two properties separately:

Position invariance
    Does the method remove dependence on the original retrieval slot?

Ordering quality
    Does the selected canonical order improve ranking or answer quality?

This does not weaken the context-layout result. It makes it easier to see exactly what was achieved.

Stage 3 looks usable as a layout signal, but not yet calibrated as passage relevance

For Stage 3, I used separate passage encoding and aggregated the top 10% of the public sigmoid token scores.

This was not the degenerate all-100/max route: the passage scores were non-flat and normally produced five distinct passage values.

Generation results were:

Stage 3 condition Relaxed EM
High score first 20.0%
Low score first 16.7%
Fixed random order 16.7%
Raw-logit mean, high first 15.0%

That provides a small directional hint in favor of the descending Stage 3 order.

However, the passage-ranking result points in the opposite direction:

Stage 3 direction Selected-passage MRR
High score first 0.408
Low score first 0.537

So the Stage 3 checkpoint clearly produces a non-trivial signal that changes passage layout, and one natural wrapper reaches 20% without passage-ranking retraining.

But the scalar direction does not currently behave like a calibrated passage-relevance score.

My current reading would be:

Stage 3 may transfer as a general context-utility or layout signal, but the stronger interpretation—high token importance directly means high query relevance at passage granularity—still needs calibration.

This also fits the original purpose of the Stage 3 checkpoint: it was trained for KV-cache compression and retrieval preservation, not originally as a query-specific passage reranker.

The smallest useful controls here seem to be:

  • always report descending and ascending;
  • expose both raw logits and sigmoid scores;
  • state the token-to-passage aggregation rule;
  • check length-normalized aggregation;
  • calibrate score direction on held-out passage-ranking data;
  • report answer-bearing-passage MRR separately from generation EM.

v8b reaches the same performance band, but its direction is ambiguous

For v8b, I used mean pre-sigmoid token logits.

v8b direction Relaxed EM Selected-passage MRR
High score first 20.0% 0.451
Low score first 20.0% 0.454

The two directions frequently produced different prompts and predictions, but they ended with the same accuracy and almost identical passage-ranking MRR.

So v8b also contains a layout-sensitive signal that can reach the broad reported range, but I could not identify a stable relevance orientation from this test.

The v8b checkpoint was trained with ranking, retrieval, stability, and hard-anchor objectives, so it is not especially surprising if its scalar captures several notions of utility rather than one clean passage-relevance axis.

The dedicated checkpoint is query-conditioned, but correct-query relevance is not yet isolated

The dedicated checkpoint is definitely responsive to the query.

Replacing each correct question with a lexical-near question from another example changed:

  • the top-ranked passage in 36.7% of cases;
  • the complete passage order in 81.7% of cases.

So the query branch is not being ignored.

However, the correct query did not improve the relevance metrics:

True-query minus wrong-query selected-passage MRR:
    -0.007

Bootstrap interval:
    approximately -0.073 to +0.058

Generation was also:

Dedicated condition Relaxed EM
Correct query 20.0%
Lexical-near wrong query 25.0%

I would not interpret the 25% wrong-query result as evidence of a reliable inverse effect—the paired uncertainty is much too large for that.

But I also would not interpret the current result as evidence that the checkpoint has learned correct-query relevance.

The narrower conclusion is:

Does query input affect the scores?
YES

Does the correct query reliably improve the ranking?
NOT DEMONSTRATED

The TIS 2.0 post describes the dedicated route in terms of cross-attention, per-passage relevance, RMSNorm, and InfoNCE passage-pair training.

The public checkpoint is usable, and it is genuinely query-conditioned. The part that seems to need another step is alignment between the query-conditioned movement and the desired relevant-passage direction.

The most direct repair path would be:

  • optimize positive-vs-negative passage margins within the same query;
  • use lexical-near hard negatives;
  • include correct-query versus wrong-query validation;
  • subtract or normalize query-common score shifts;
  • select checkpoints using passage MRR or pairwise accuracy, not only an absolute token score loss.

Simple baselines remain highly competitive

Ranking on all 60 examples looked like this:

Route Selected-passage MRR
TF-IDF 0.606
BM25 0.606
Passage length 0.545
Stage 3, low score first 0.537
Dedicated, wrong query 0.478
Dedicated, correct query 0.470
v8b, high score first 0.451
Stage 3, high score first 0.408

Generation was much flatter:

Route Relaxed EM
TIS checkpoint routes 20.0%
Passage length 20.0%
TF-IDF 18.3%
BM25 18.3%
Fixed random 16.7%

So I would avoid reading the current experiment as evidence that learned TIS scores already dominate lexical or structural baselines.

What it does show is that several public TIS checkpoints can independently construct competitive context layouts.

The length result is also worth retaining as a control. In this particular five-passage MS-MARCO construction, selected passages appear to carry a useful length bias.

Ranking and answer extraction appear to be separate bottlenecks

The evaluation contains several stages:

token score
    ↓
passage score
    ↓
passage ranking
    ↓
context layout
    ↓
generator attention
    ↓
answer extraction
    ↓
exact match

A route can improve one stage without improving the later stages proportionally.

For example:

  • TF-IDF and BM25 had the strongest passage-ranking MRR;
  • their generation EM was only 18.3%;
  • baseline_early already places the selected/gold passage first, but reached only 18.3%;
  • multiple weaker ranking routes reached 20%.

That supports one of the useful observations already made in the TIS 2.0 post: reordering does not solve the remaining answer-extraction problem.

I would therefore report ranking and generation as separate endpoints:

Ranking endpoint Generation endpoint
Selected-passage R@1 Relaxed EM
Selected-passage MRR Strict EM
Answer-bearing-passage MRR Token F1
Descending vs. ascending Prediction-change rate
Correct vs. wrong query Generator or prompt sensitivity

A two-component interpretation may fit the evidence better

One possible way to organize the current results is:

final passage score
        =
intrinsic context utility
        +
λ × query-specific relevance
        +
μ × lexical relevance

The first term could be what Stage 3 and v8b are already partly providing:

  • information density;
  • structural salience;
  • anchor-like content;
  • generator-friendly placement;
  • query-independent passage utility.

The second term would be the job of the dedicated query-aware model:

  • positive passage above hard negatives;
  • correct question above wrong-question controls;
  • relative scoring within one candidate set;
  • semantic relevance rather than a common score shift.

The third term is optional, but the TF-IDF/BM25 results show that lexical relevance is still a strong prior in this benchmark.

This decomposition would make the transfer result easier to interpret:

KV/token training
        ↓
intrinsic context-utility prior
        ↓
usable without passage retraining

query-aware passage training
        ↓
query-specific correction
        ↓
relevance calibration

At the moment, those two ideas seem to be compressed into one scalar called “importance.”

Separating them may allow the current Stage 3 result to remain useful without requiring its high-score direction to already mean query relevance.

The shortest repair paths I can see

If Stage 3 / v8b is intended as context utility:

    keep descending and ascending controls
    publish the intended token aggregation
    expose logits and post-sigmoid scores
    calibrate direction on held-out examples
    report layout stability separately from relevance


If the dedicated head is intended as query relevance:

    train on within-query passage pairs
    use lexical-near hard negatives
    normalize query-common score shifts
    validate correct query against wrong queries
    report passage ranking before generation


If the main result is position robustness:

    describe deterministic canonicalization as the intervention
    compare TIS, TF-IDF, length, and random canonical orders
    report zero gap separately from accuracy gain

The missing internal route would still be useful, but it is no longer a prerequisite

The exact internal trainer and evaluator are still not uniquely identifiable from the current clean release.

That seems understandable given the explanation in post #6 that the clean releases are assembled from a messier internal working version.

But I no longer think the missing internal route prevents the broad result from being tested.

The independent public implementation already reaches the same general range.

The internal route would now mainly help answer narrower questions:

  • Was Stage 3 intended to be sorted ascending or descending at passage level?
  • Which token-to-passage aggregation was used?
  • Were passages encoded independently or with the question/context?
  • Which exact wrapper was intended for the dedicated best.pt checkpoint?

In other words:

The missing wrapper now looks less like a prerequisite for reproducing the broad result, and more like the shortest way to identify the intended score orientation and aggregation contract.

Independent notebook and evaluation protocol

The independent public notebook pins the public source and checkpoint revisions used in the run.

The evaluator uses:

  • 60 public query IDs;
  • five passages per query;
  • Mistral-based hidden states;
  • greedy answer generation;
  • relaxed EM, strict EM, and token F1;
  • per-route passage orders and passage-ranking metrics;
  • correct-query and lexical-near wrong-query controls;
  • exact ascending controls for Stage 3 and v8b;
  • TF-IDF, BM25, passage length, and deterministic random controls.

The canonicalized routes are evaluated once per query.

They are not copied into three nominal early/middle/end rows, because those copies would contain exactly the same prompt and prediction.

Only the unreordered baseline retains three position variants.

baseline_early already places the selected/gold passage in the first slot, so a second gold_first condition would be an exact duplicate and is intentionally omitted.

Stage 3 and v8b score-direction controls

Stage 3

The public direct scorer is applied to final hidden states. The main route uses post-sigmoid token scores and averages the top 10%.

The route was checked for:

  • flat passage scores;
  • all-100 saturation;
  • unique passage values;
  • descending-versus-ascending equality;
  • random-order equivalence.

It was non-degenerate.

Results:

Metric Descending Ascending
Generation EM 20.0% 16.7%
Selected-passage MRR 0.408 0.537

The raw-logit mean descending route reached 15.0% EM.

v8b

The fixed route averages pre-sigmoid token logits.

Metric Descending Ascending
Generation EM 20.0% 20.0%
Selected-passage MRR 0.451 0.454

These controls make it difficult to interpret either scalar direction as universally equivalent to passage relevance.

Correct-query versus wrong-query controls

Each query was paired with the most lexically similar different query among the 60 examples.

The dedicated checkpoint was evaluated with:

  • the correct query;
  • that lexical-near wrong query;
  • the same five passages;
  • the same token aggregation;
  • no checkpoint updates.

Results:

Diagnostic Result
Full order changed 81.7%
Top passage changed 36.7%
True − wrong selected-MRR −0.007
Bootstrap interval approximately −0.073 to +0.058
Correct-query generation EM 20.0%
Wrong-query generation EM 25.0%

This establishes functional query dependence, but not a reliable correct-query relevance benefit.

Public architecture and checkpoint observations

The current public source revision includes several neighboring routes:

  • direct scoring from ImportanceUpdateHead;
  • a concat-style QueryAwareImportanceHead;
  • CrossAttentionImportanceScorer;
  • multiple training scripts and objectives.

The public dedicated checkpoint strictly matches the concat-style query-aware head:

mean-pooled query projection
        +
per-token context projection
        ↓
concatenation
        ↓
MLP
        ↓
sigmoid token score

This is enough to evaluate the checkpoint independently.

It does not establish which exact trainer or evaluator from the internal working version produced the published checkpoint and number.

That provenance distinction is why I treat this as an independent public implementation rather than an exact historical reproduction.

What I am not concluding

This test does not establish that:

  • the TIS idea is invalid;
  • the published result was fabricated;
  • the public checkpoints are random or broken;
  • query input is ignored;
  • Stage 3 contains no transferable signal;
  • TF-IDF or passage length will dominate on other datasets;
  • 20.0% is meaningfully different from 21.7%;
  • the independent wrapper matches the private historical evaluator;
  • a good passage rank should automatically produce a correct answer;
  • the scalar can never be calibrated into a useful relevance score.

The narrower conclusions are:

  • the broad numerical range is independently reproducible;
  • deterministic reordering removes the original slot dependence;
  • Stage 3, v8b, and the dedicated checkpoint all affect context layout;
  • score direction and query-semantic calibration remain unresolved;
  • simple lexical and structural controls should remain in the main result table.

My current reading is therefore more positive than where I started.

The broad 16.7% → approximately 20–22% result is independently reproducible from the public artifacts, and deterministic context reordering really does remove dependence on the original retrieval slot.

The unresolved part is narrower:

Is the scalar called “importance” already a calibrated query-relevance score, or is it currently better understood as a more general context-utility signal?

The context-layout interpretation already looks useful.

The query-relevance interpretation seems to need score-direction calibration and stronger query-relative supervision.

The public notebook is linked above. The most useful comparison with the internal working route would probably be the intended passage-level score direction and token aggregation, rather than another exact-decimal reproduction run.

As always, thanks for the deep insights! Should I give you access to the whole set, I mean, the base system, where I distill the public code? I believe we could collaborate somehow, if you are really interested, so when/if I publish this to ArXiv or similar places, your name will be attached and your contributions acknowledged as they should!

Initially, while I await your answers, I’ll be running your analysis through the final repository, to see if more information can be extracted from the main one and uploaded to the public, and then I will run again your analysis against the original repo, so I can make sure everything is acknowledged and taken care off!

Your ideas about making the “importance” to be a 2D-like vector, with the KVtoken training being one dimension and the query-aware passage training be the second one, then use those as two filters and use some kind of norm on the final matrix (when operating the data with the vector) to make it again 1D-like .. could this unfold the final power of TIS tech ? :thinking:

While I await for my testing / mending of the code to run, these are some of the (temporary) conclussions after a quick review of the current system and comparing with your notes:

Hmm… I have absolutely no problem with my handle being mentioned anywhere, as often as you like. But honestly, it is easier for me if you decide which parts you want to make public and I simply verify that public surface from the outside. Methodologically, public artifacts and posts are unusually easy to inspect with generative-AI assistance. Anyway, setting that aside, let me add a few clarifications on the technical points where our interpretations might diverge:


I think your plan to run the analysis against the final repository first, and then against the original working repository, is probably the most useful route.

If the relevant findings can then be distilled back into the public code, model cards, documentation, or reproducibility artifacts, that also leaves a clearer trail for later readers. I am generally more comfortable operating as an external replicator than as a private collaborator: you can inspect the internal lineage, while I can later check whether the resulting public surface is self-consistent and independently reproducible.

For that internal pass, I would not make exact recovery of a particular EM decimal the primary target. The more valuable result would be a compact mapping such as:

public checkpoint
    → actual model class
    → trainer, supervision data, and loss
    → inference wrapper
    → query-conditioning path
    → token-to-passage aggregation
    → score representation and ordering direction
    → evaluator, configuration, and published result artifact

In particular, it would be useful to establish:

  • whether higher or lower scores were intended to come first;
  • whether the evaluator consumed raw logits, sigmoid outputs, or rescaled values;
  • how token scores were aggregated into passage scores;
  • exactly where and how the query entered the model;
  • which trainer produced each public checkpoint;
  • and which checkpoint/evaluator pair produced each reported result.

That is more informative than trying several plausible wrappers until one happens to recover the expected number. The public surface currently appears to contain multiple plausible training and inference routes, so the lineage itself is part of the reproducibility contract.

I would keep four claims separate

My reading of your temporary conclusions is substantially positive, but I would separate four questions that are easy to collapse into one another:

  1. Structural position invariance
    Does deterministic canonicalization remove dependence on whether the relevant passage was originally placed early, in the middle, or late?

  2. Query-relevance ranking
    Does the scorer place passages that are relevant to the particular query above irrelevant passages?

  3. Generator-specific context or layout utility
    Does the resulting order make the supplied generator more likely to use the context successfully?

  4. Final answer quality
    Does the complete retrieval, layout, prompting, generation, and answer-evaluation pipeline produce the correct answer?

These are related, but none of them automatically proves the others.

1. “Position-invariance is real”

Yes, with one qualification: I would describe this as a property of the deterministic final layout.

Once the same passage set is transformed into the same canonical order, the original early/middle/end slot no longer changes the final prompt. The zero gap is therefore real, but it does not by itself measure query relevance or the quality of the scoring function.

Even a simple deterministic policy can remove dependence on the original slot. The harder question is whether the chosen canonical order is useful.

2. “Transfer is real”

I also agree, but I would currently call it useful behavioral transfer into context layout, or perhaps general context-utility transfer.

The Stage 3 checkpoint is clearly not inert when applied to passages: it produces non-flat scores, changes ordering, and reaches the same broad generation-performance region as the passage-trained route without passage-specific retraining.

What remains unresolved is whether the transferred semantics are specifically:

  • query relevance;
  • intrinsic context utility;
  • generator-friendly salience;
  • structural or length-related information;
  • or some mixture of these.

So I think the transfer claim is real, while the stronger claim of calibrated query-relevance transfer remains open.

3. “Non-trivial signal”

Agreed.

The checkpoints produce non-flat, ordering-sensitive behavior, and the resulting ordering can alter generation outcomes. That is sufficient to reject the interpretation that the model learned nothing useful.

However:

non-trivial signal
    ≠ calibrated relevance signal
    ≠ TIS-specific advantage over simple baselines

Identifying that a signal exists is different from identifying what the signal means.

4. “Competitive generation”

Agreed within the tested public setup.

The public TIS routes reached the same broad performance band as the reported result, which is a meaningful independent replication. At the same time, passage length also reached that band, while differences among several routes were small relative to the 60-query sample.

I would therefore describe the present result as:

TIS produces competitive generation and non-trivial layout behavior in the tested setup.

I would not yet extend that to:

TIS has demonstrated a consistent, TIS-specific advantage over strong simple ordering baselines.

That stronger comparison needs either a larger evaluation or more stable paired evidence.

5. “Answer extraction bottleneck”

I agree that there is a major downstream bottleneck, but I would use slightly broader language than “answer extraction.”

Something like reader-side or downstream generation bottleneck seems safer, because the remaining failures may combine:

  • extraction of an answer that is present;
  • whether the selected context is actually answerable;
  • distractor interference;
  • prompt sensitivity;
  • generator-specific context use;
  • output formatting;
  • and answer normalization by the evaluator.

The current controls show that improved ordering alone does not solve most failures. They do not yet isolate which of those reader-side mechanisms dominates.

6. “Methodological validation”

The agreement between the independent and paired evaluations is useful validation of a specific point: the observed comparison is not merely an artifact of evaluating the methods on examples of different difficulty.

I would not treat it as validation of every part of the original methodology, because the paired design does not by itself determine:

  • the intended score direction;
  • the correct token-to-passage aggregation;
  • the semantics of the scalar;
  • or whether the public wrapper exactly matches the original evaluator.

So I would phrase this more narrowly:

The paired evaluation validates the robustness of that particular comparison against the sample-difficulty confound.

About the two-component importance idea

I think the two-component interpretation is promising. However, I would treat it as a new model hypothesis rather than immediately use it as an explanation of the current scalar.

A useful conceptual separation might be:

r(q, p)
    = query-specific relevance of passage p

u_G(p | q, S, layout)
    = utility of passage p to generator G,
      given the query, the other selected passages,
      and the final context layout

The original KV-token signal may be related to the second term, but perhaps at a lower token-level granularity.

This distinction matters because the two proposed dimensions may not be:

  • independent;
  • orthogonal;
  • calibrated to the same scale;
  • defined at the same granularity;
  • or stable across generators and context layouts.

Query relevance is primarily a query–passage relation. Generator utility can also depend on the other passages, ordering, prompt structure, and the particular generator. KV utility is finer-grained again because it concerns individual tokens and model state.

For that reason, I would avoid immediately reducing the two outputs with a norm.

For example:

high utility + low relevance
low utility  + high relevance

can have the same Euclidean norm, even though they represent very different cases. A norm also removes information about which component produced the magnitude.

I would instead keep the outputs separately observable for as long as possible:

  1. train or recover each component;
  2. evaluate each component against the behavior it is supposed to represent;
  3. calibrate them separately;
  4. and only then choose a scalarization or selection policy for a specific downstream task.

For the relevance component, useful checks would include:

  • passage ranking metrics;
  • correct-query versus wrong-query scoring;
  • query permutation;
  • pairwise positive/negative passage comparisons;
  • and carefully filtered hard negatives.

For the utility component, the checks should be reader- or generator-facing:

  • KV retention or compression behavior;
  • generation quality after passage reordering;
  • sensitivity to distractor passages;
  • and possibly changes across generators or prompt layouts.

Only after those two axes behave as intended would I choose among approaches such as:

  • a learned weighted combination;
  • relevance as a gate followed by utility ordering;
  • a minimum utility threshold followed by relevance ranking;
  • or an explicitly multi-objective selection policy.

The best fusion rule may depend on the application. A cache-compression policy and a passage-reranking policy do not necessarily need the same scalar.

A minimal diagnostic pass

Before redesigning the model, I think the smallest useful internal matrix would be:

  • ascending versus descending ordering;
  • raw versus sigmoid/rescaled score space;
  • each historically intended aggregation rule;
  • query-conditioned versus query-absent scoring;
  • correct query versus wrong or shuffled query;
  • passage-ranking metrics reported separately from generation metrics;
  • and passage length plus lexical baselines retained as controls.

The main purpose would not be to search for the best-performing combination. It would be to determine which combination corresponds to the intended historical implementation, and what semantics that implementation actually supports.

So overall, my conclusion remains substantially positive:

  • the public checkpoints produce real, non-flat ordering behavior;
  • deterministic canonical layout removes dependence on the original slot;
  • the broad reported generation region is independently reproducible;
  • and a useful context-layout signal appears to transfer beyond its original training setting.

The remaining question is now narrower:

What is the scalar calibrated to mean, and how does its internal training and evaluation lineage map onto the public release?

Once that is clear, the two-component design becomes much easier to formulate and test without mixing diagnosis of TIS 2.0 with development of its successor.

I found that this was left behind, so I must be more careful with the “sanitization” part for the public model. This capture is from an internal document:

so I already run against EM and SQuAD EM and 100 queries. A new run with 300 and a longer one are planned to be run on the cloud, and also some other ablations that must be run. But making the change to your suggested architecture wont damage the current system (I also saved a checkpoint, just in case) because the system is built additively. Nothing is deleted, just deprecated and left behind, so I can use the checkpoint/code/tests any time for running new regressions or retesting the past versions!

Stay tuned for new results to be pulled from the “hidden state” in the next runs, and also for the results of your suggestions for testing and documenting.

Check this plan out!