CFS-R: Conditional Field Reconstruction

Reddit r/artificial Tools

Summary

CFS-R is a novel retrieval method that addresses partial-evidence dilution by treating candidate memories as basis vectors and solving for positive coefficients that reconstruct the query, improving multi-hop reasoning in RAG systems.

I evaluated CFS-R on LoCoMo (1,982 questions, same setup as the CFS evaluation), holding cosine and BM25 fixed and varying only the third leg. baseline cosine top-10: NDCG@10 0.5123, Recall@10 0.6924 rrf(cos, BM25): NDCG@10 0.5196, Recall@10 0.6989 rrf(cos, BM25, MMR tuned): NDCG@10 0.5330, Recall@10 0.7228 rrf(cos, BM25, CFS-long): NDCG@10 0.5362, Recall@10 0.7295 rrf(cos, BM25, CFS-R top50 w3): NDCG@10 0.5447, Recall@10 0.7303 Against tuned MMR: **+1.17 pp NDCG@10** (95% CI \[+0.66, +1.69\], p < 0.001). Against CFS-long: **+0.85 pp NDCG@10** (95% CI \[+0.33, +1.35\], p = 0.0006). Against baseline cosine: **+3.24 pp NDCG@10, +3.79 pp Recall@10**. The sweep wasn’t fragile.. the top configurations clustered tightly between 0.5441 and 0.5447 NDCG@10, which means the operator is on a stable plateau rather than a single magic hyperparameter. The category breakdown is where the conceptual difference shows up: single-hop multi-hop temporal open-dom adversarial tuned MMR 0.3479 0.6377 0.2938 0.6144 0.4705 CFS-long 0.3615 0.6376 0.2959 0.6157 0.4734 CFS-R top50 w3 0.3646 0.6344 0.2948 0.6209 0.5018 The adversarial line is the result that matters: **+3.13 pp over tuned MMR, +2.84 pp over CFS-long.** If the adversarial problem were only pairwise diversity, MMR should be very hard to beat but it isn’t. That supports the main claim: ***long-memory retrieval is not just about avoiding similar chunks. It is about reconstructing the evidence behind the query***. Temporal is no longer a glaring weakness either, CFS-long still slightly leads, but CFS-R has closed the gap while keeping the adversarial gains. [https://gist.github.com/M-Garcia22/542a9a38d93aae1b5cf21fc604253718](https://gist.github.com/M-Garcia22/542a9a38d93aae1b5cf21fc604253718)
Original Article
View Cached Full Text

Cached at: 05/13/26, 08:19 PM

# CFS-R: Conditional Field Reconstruction Source: [https://medium.com/@mauro.dev/cfs-r-conditional-field-reconstruction-4939a48444cc](https://medium.com/@mauro.dev/cfs-r-conditional-field-reconstruction-4939a48444cc) [![Mauro Garcia](https://miro.medium.com/v2/resize:fill:64:64/1*I_BIRlzQRU2x6VJwi7iaFA.png)](https://medium.com/@mauro.dev?source=post_page---byline--4939a48444cc---------------------------------------) Selects relevant candidates by asking which memories, combined, best rebuild the query itself\. Press enter or click to view image in full size ## The failure mode that started this CFS fixed paraphrase pile\-up by subtracting coverage\. But there is a second failure mode underneath, and subtraction does not touch it\. Try a multi\-hop question against cosine top\-K: ``` Query: "Why did we end up over budget on the kitchen?" ``` ``` Top 5:1. "The kitchen budget was about $40k." ← topical, not causal2. "Kitchen costs ran high this quarter." ← topical, not causal3. "We talked about the kitchen renovation again." ← topical, not causal4. "Quartz countertops came in at $9k over quote." ← actual cause5. "Cabinets were delayed and the installer charged rush fees." ← actual cause ``` The top three resemble the query\. The bottom two answer it\. Cosine ranks by “looks like the query,” but the query is a question and the answer is often a set of partial evidence whose combination matches the query’s content\. The individually\-most\-similar memory is topical filler\. The useful memories sit lower because each carries only part of the answer\. This is**partial\-evidence dilution**, and it shows up constantly in long conversational histories\. A user asks “why,” “how,” “what happened with,” “what did we decide” — and the answer is not one perfect memory\. It’s a span of evidence\. CFS handles paraphrase clusters\. CFS\-R handles the next problem:*which memories, together, reconstruct what the query is asking for?* ## The core idea CFS treats selected memories as points that emit coverage fields\. Once a region is represented, nearby repeats become more expensive\. CFS\-R treats candidates as basis vectors and tries to express the query as a positive combination of them\. Vectors that receive nonzero weight are doing work explaining the query\. Vectors that receive little or no weight are redundant given everyone else\. In linear algebra terms, CFS\-R solves: Press enter or click to view image in full size where z\_q is the unit\-normalized query \(a d\-dimensional vector\), C is the matrix that stacks the unit\-normalized candidate embeddings as rows \(P rows by d columns\), a is the nonnegative coefficient vector of length P, and λ ≥ 0 is the ridge weight\. The nonnegativity constraint is the load\-bearing piece\. Without it, the solver can use negative weights to cancel candidates against each other, which may be mathematically valid but is semantically useless for retrieval\. A memory should not score well because it helps erase another memory\. CFS\-R constrains every coefficient to be positive or zero:`a\_i \>= 0`\. That means each surviving coefficient has a real retrieval meaning:***this memory adds evidence toward reconstructing the query direction\.*** The candidates with the largest positive coefficients are the ones doing the most reconstructive work\. That ranking, blended with raw cosine relevance, becomes the CFS\-R leg in the hybrid retriever\. ## Why CFS\-R is not MMR MMR asks: is this candidate relevant, but not too similar to what I already picked? That is*pairwise diversity*\. CFS\-R asks: does this candidate positively contribute to reconstructing the query? That is*evidence reconstruction*\. MMR is a greedy relevance\-diversity tradeoff\. It penalizes each candidate by similarity to already\-selected items, one pick at a time\. CFS\-R solves a joint optimization over the entire candidate pool — candidate interaction is baked into the coefficient solution instead of being unrolled greedily\. The short version:**MMR diversifies\. CFS subtracts\. CFS\-R reconstructs\.** ## The math Given a unit\-normalized query vector`z\_q`and a candidate matrix`C`, where each row of`C`is a unit\-normalized candidate embedding, CFS\-R first builds a candidate pool using a cosine prefilter: Press enter or click to view image in full size Projected gradient descent is enough for the solve — one matrix\-vector product per step, projection is clipping negatives to zero: Press enter or click to view image in full size Each candidate’s final CFS\-R score blends its normalized coefficient ã\_i with its normalized cosine r̃\_i: The current locked setup uses w = 0\.90, λ = 0\.005, P = 150, and 80 iterations\. The solver is small\. The idea is the important part: CFS\-R does not rank candidates by isolated similarity\. It ranks them by positive contribution to reconstructing the query\. ## Why “Conditional Field Reconstruction” CFS\-R is a sibling operator, not a bolt\-on: ``` CFS = Conditional Field SubtractionCFS-R = Conditional Field Reconstruction ``` They share the same field intuition — retrieval should care about the shape of the evidence set, not each candidate’s independent score — but the mechanism is different\. CFS is subtractive and sequential: pick one, deform the scoring field, pick the next, deform again\. CFS\-R is reconstructive and joint: solve for the whole coefficient vector at once\. Greedy subtraction is useful when paraphrase redundancy is the main leak\. Joint reconstruction is useful when the answer requires complementary partial evidence\. They are not redundant\. They solve different failures\. ## How CFS\-R behaves **Dense paraphrase cluster\.**CFS\-R will assign weight across near\-collinear candidates — not ideal if pure diversification is the goal\. But coefficients compete inside the pool and the cosine prior helps reorder things; CFS\-R doesn’t collapse as badly as plain cosine\. In practice I don’t run it alone\. **Complementary partial answers\.**The regime CFS\-R was built for\. Two candidates each carry half the answer at cosine 0\.60; a topical filler scores 0\.70; cosine picks the filler\. CFS\-R sees that the partial\-answer memories explain dimensions the filler does not, gives them positive reconstruction mass, and moves them up\. **Cosine top\-1 is sufficient\.**No harm\. The top result reconstructs the query well, receives a large coefficient, stays high\. **Adversarial inputs\.**Not a truth validator — a wrong candidate that’s nearly identical to the query embedding can still fool it\. But on LoCoMo adversarial, CFS\-R outperformed every other operator I tested, which suggests reconstruction helps when the adversarial issue is a broader similarity trap rather than a single planted near\-duplicate\. **Temporal questions\.**The weakest spot\. CFS\-R reconstructs semantic evidence, not chronology\. The weighted fusion mostly closes the temporal gap, but pure temporal reasoning likely needs a time\-aware variant\. ## CFS\-R as part of a hybrid retriever Standalone CFS\-R is one signal, and single signals are brittle\. The deployable shape is RRF over three legs, with the CFS\-R leg taking a larger pool and an explicit weight: ``` RRF(cosine top-10, BM25 top-10, CFS-R top-50), CFS-R weighted 3x → final top-10 ``` The weighted RRF score: Press enter or click to view image in full size Earlier configs used a smaller or equally\-weighted CFS\-R leg\. The sweep showed CFS\-R wants more influence in the fusion stack — not infinite \(pure CFS\-R underperforms the hybrid on LoCoMo\), but a CFS\-R\-dominant RRF stack gives the best early\-rank quality, which is exactly what you want in a memory retriever\. ## Does it work? Empirical results I evaluated CFS\-R on LoCoMo \(1,982 questions, same setup as the CFS evaluation\), holding cosine and BM25 fixed and varying only the third leg\. ``` baseline cosine top-10: NDCG@10 0.5123, Recall@10 0.6924rrf(cos, BM25): NDCG@10 0.5196, Recall@10 0.6989rrf(cos, BM25, MMR tuned): NDCG@10 0.5330, Recall@10 0.7228rrf(cos, BM25, CFS-long): NDCG@10 0.5362, Recall@10 0.7295rrf(cos, BM25, CFS-R top50 w3): NDCG@10 0.5447, Recall@10 0.7303 ``` Against tuned MMR:**\+1\.17 pp NDCG@10**\(95% CI \[\+0\.66, \+1\.69\], p < 0\.001\)\. Against CFS\-long:**\+0\.85 pp NDCG@10**\(95% CI \[\+0\.33, \+1\.35\], p = 0\.0006\)\. Against baseline cosine:**\+3\.24 pp NDCG@10, \+3\.79 pp Recall@10**\. The sweep wasn’t fragile\.\. the top configurations clustered tightly between 0\.5441 and 0\.5447 NDCG@10, which means the operator is on a stable plateau rather than a single magic hyperparameter\. The category breakdown is where the conceptual difference shows up: ``` single-hop multi-hop temporal open-dom adversarialtuned MMR 0.3479 0.6377 0.2938 0.6144 0.4705CFS-long 0.3615 0.6376 0.2959 0.6157 0.4734CFS-R top50 w3 0.3646 0.6344 0.2948 0.6209 0.5018 ``` The adversarial line is the result that matters:**\+3\.13 pp over tuned MMR, \+2\.84 pp over CFS\-long\.**If the adversarial problem were only pairwise diversity, MMR should be very hard to beat but it isn’t\. That supports the main claim:***long\-memory retrieval is not just about avoiding similar chunks\. It is about reconstructing the evidence behind the query***\. Temporal is no longer a glaring weakness either, CFS\-long still slightly leads, but CFS\-R has closed the gap while keeping the adversarial gains\. ## When to use CFS\-R CFS\-R earns its place when answers are***combinations***rather than single hits “why,” “how,” “what happened with,” “what changed,” “what did we decide\.” Long conversational corpora with repeated topics\. Cases where cosine over\-selects topical filler\. Cases where MMR helps but feels too shallow or pairwise\. Cases where adversarial or misleading\-neighbor retrieval matters\. It’s especially useful when the top few context slots matter\. CFS\-R improves NDCG@5 strongly, which means it improves the part of the ranking most likely to make it into the model’s actual context window\. ## When not to use CFS\-R Purely timestamp\-sensitive tasks \- CFS\-R reconstructs semantics, not chronology\. Tiny candidate pools, sparse non\-redundant corpora, or workloads where exact lexical lookup dominates\. Anywhere you actually need a truth validator rather than a retriever\. And, like CFS, it isn’t meant to be deployed alone\. The deployable form is`RRF\(cosine, BM25, CFS\-R\)`\. In the v1 setup the CFS\-R leg gets extra weight because the reconstruction signal is strong enough to deserve more influence\. ## Closing CFS\-R is a retrieval operator\. Like CFS, it adds a small amount of code on top of a standard retriever\. The shift is conceptual: don’t only rank candidates by how much they resemble the query but rather rank them by how much they help***reconstruct***it\. Cosine answers: what looks closest? MMR answers: what is close but not too redundant? CFS answers: what region has not been covered? CFS\-R answers: what memories, together, rebuild the query field? That last framing is the one that matters for long memory\. When people ask questions about their history, they usually aren’t asking for a single nearest sentence\. They’re asking for the evidence behind a situation, a decision, a change, a conflict, or a pattern\. That evidence is distributed\. CFS\-R is built for that\. **MMR diversifies\. CFS subtracts\. CFS\-R reconstructs\.**That is the operator\. Reference repo:[https://gist\.github\.com/M\-Garcia22/542a9a38d93aae1b5cf21fc604253718](https://gist.github.com/M-Garcia22/542a9a38d93aae1b5cf21fc604253718)

Similar Articles

GRACE-RAG: Governed Retrieval Architecture for Canonical Evidence Synthesis, Enabling Lightweight Deployment in Closed-Domain Institutional Settings

arXiv cs.AI

This paper introduces GRACE-RAG, a retrieval-governed, graph-augmented RAG architecture that externalizes structural reasoning from generation to a structured retrieval layer, enabling lightweight deployment in closed-domain institutional settings. Experiments show up to 20% quality gains with mid-scale models, reducing computational and latency footprint.