hv-wall

Where the reader stops believing a text.

Not from difficulty. From a claim that outruns its evidence, a claim that contradicts an earlier one, or a conclusion that no prior sentence supports.

The claim in one sentence

hv-wall predicts the point in a text where a reasonable reader will stop believing it β€” and why β€” from the text alone, with no external reference and no reader model.

What it produces

A WallReport containing:

  • wall_id β€” the sentence index where the reader stops
  • wall_type β€” overclaim, contradiction, gap, or neutral
  • wall_score β€” a scalar in [0, 1]
  • wall_text β€” the sentence itself
  • confidence_trajectory β€” per-sentence certainty level
  • evidence_trajectory β€” per-sentence evidence level
  • trust_curve β€” cumulative exp(βˆ’Ξ£ wall) starting at 1.0
  • profiles β€” per-sentence breakdown with reasons

Install

pip install numpy

Actually β€” no dependencies. Pure stdlib.

## Usage

### Demo

```bash
python hv_wall.py



Runs four synthetic samples β€” one for each wall type plus a clean
control β€” and prints the full report for each.

### Analyze a text

```bash
python hv_wall.py --text "The data suggests X. Therefore X is definitely true."
python hv_wall.py --text - < memo.txt
python hv_wall.py --text "..." --wall      # just the wall sentence
python hv_wall.py --text "..." --json      # JSON report

Python

from hv_wall import HVWall

m = HVWall()
report = m.analyze(text)

print(report.wall_id)            # 3
print(report.wall_type)          # 'overclaim'
print(report.wall_score)         # 0.775
print(report.trust_curve)        # [1.0, 1.0, 1.0, 0.46]
for p in report.profiles:
    print(p.id, p.wall_type, p.wall, p.reasons)

The three wall types

type what the reader feels detection
contradiction "the text disagrees with itself" literal antonym pairs, or direction-group conflicts (up vs down, cause vs prevent, support vs oppose)
overclaim "the text is too sure of itself" certainty markers minus hedge markers, minus evidence
gap "the text jumped to a conclusion" conclusion marker + low prior evidence + confidence jump

Priority order when multiple fire at once: contradiction first, then overclaim, then gap. A reader experiences self-disagreement as the strongest signal because it needs no external reference β€” the text's own earlier statement is the counter-evidence.

The detection signals

Certainty vs hedge

Two lexicons. Certainty words (definitely, proven, unquestionably, guaranteed, …) raise confidence. Hedge words (might, appears, likely, suggests, approximately, …) lower it. Net confidence is certainty βˆ’ 0.5 Γ— hedge.

Evidence

Composite of three surface features:

  1. Specificity β€” numeric density, proper-noun density, rare-word density
  2. Attribution β€” the sentence cites a source (according to, studies show, we measured, …)
  3. Hedge β€” hedged claims are weakly evidential

evidence = 0.6 Γ— specificity + 0.4 Γ— attribution.

Overclaim

overclaim = max(0, confidence βˆ’ evidence)

A sentence is an overclaim when it asserts more than it demonstrates.

Contradiction

Two mechanisms:

  1. Literal antonym table β€” reduce ↔ raise, increase ↔ decrease, safe ↔ unsafe, and about 40 more pairs. Any pair appearing in two sentences counts.
  2. Direction groups β€” six clusters (up, down, cause, prevent, support, oppose). Two sentences assigning the same topic to opposite groups contradict, even if neither word is the other's literal antonym. "reduces employment" vs "increases employment" is caught by this where the table alone fails.

Gap

gap = max(0, confidence βˆ’ prior_evidence_mean)
    + 0.5 Γ— max(0, confidence βˆ’ prior_confidence_mean)

Fires only on sentences with a conclusion marker (therefore, thus, hence, …). A conclusion that outruns both the evidence and the confidence of everything preceding it is a gap.

Trust curve

trust[0] = 1.0
trust[i] = trust[i-1] Γ— exp(βˆ’wall[i])

The trust value at any sentence is the reader's cumulative belief that the text is still making sense. Falls below 0.5 at the wall.

Benchmarks

Four synthetic samples

sample sents wall type score
Overclaim 4 3 overclaim 0.77
Contradiction 4 3 contradiction 0.40
Gap 5 4 gap 0.49
Clean 5 β€” neutral 0.00

All three wall types fire on the intended sentence. The clean sample produces no wall.

Reading the numbers

  • Overclaim β€” three hedged sentences, then one with three certainty markers and no attribution. Confidence jumps from 0.00 to 1.00; evidence stays near 0.23. Overclaim = 0.77.
  • Contradiction β€” first sentence says minimum wage reduces employment; last sentence says it increases employment. The direction-group detector fires on the shared topic employment.
  • Gap β€” four sentences of specific evidence, then "the stock is guaranteed to rise 50 percent." The conclusion marker plus the confidence jump produce a gap score of 0.49.
  • Clean β€” no certainty markers, no conclusions, no contradictions. All confidences are 0.00; no wall fires.

When to use it

  • Editing β€” find the sentence your reader will not believe.
  • Peer review β€” flag overclaims before publication.
  • Fact-checking β€” the wall location is where the claim stops matching the evidence, regardless of external data.
  • Rhetoric analysis β€” where does this speech break?
  • Self-review β€” where does my own draft overreach?
  • Teaching β€” show students where an argument fails structurally.

When not to use it

  • As fact-checking. hv-wall detects rhetorical overreach, not factual error. A sentence with strong attribution and false claims will not fire.
  • For non-English text. Both lexicons and the antonym tables are English.
  • For very short texts. Fewer than three sentences rarely produce a wall, because there is not enough prior context for contradiction or gap.
  • For poetry or deliberately unreliable narration. The wall is a feature, not a bug, in those genres.

Honest limitations

  • The antonym table is hand-curated. About 40 pairs and six direction groups. Real language contains more. hv-wall will miss contradictions that rely on entailment or world knowledge.
  • The confidence and hedge lexicons are hand-curated. Roughly 100 words total. Real hedging is broader.
  • Specificity is a surface proxy for evidence. Numbers and proper nouns correlate with evidential writing; they are not the same thing. A mathematically dense paragraph of nonsense will score as high-evidence.
  • The trust curve assumes exponential decay. Real readers do not discount linearly. The exp(βˆ’wall) choice is a convenience, not a model.
  • One wall per text. Real texts can have multiple walls. The current model reports the highest-scoring one.
  • Priority ordering is a design choice. Contradiction beats overclaim beats gap. Other orderings are defensible; this one matches the introspection that self-disagreement is felt first.
  • No calibration against real readers. All four demo samples are synthetic. The model has not been validated against a corpus of reader-annotated wall locations.

Reference

Part of the reader-model series, which has grown beyond reading and into rhetorical structure.

Companion to hv-core (argument robustness), hv-fold (reading passes), hv-tempo (pace variation), hv-sign (symbolic audio), hv-contour (contour hypervectors), hv-drift (textual wandering).

Where hv-core measures the structural robustness of an argument, hv-wall measures the rhetorical point of reader refusal. The two are orthogonal: an argument can be structurally robust and rhetorically broken, or vice versa.

License

Apache-2.0

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support