A Deterministic Consistency Checker for Implicit Sentiment Reasoning

Language models are bad at reading sentiment in sentences that never use an opinion word. Take "the battery lasted forty minutes": the sentence is plainly a complaint, yet models tend to call it neutral. The best current fix asks the model to reason in steps: name the hidden target, state the implied opinion, then give the polarity. This is chain-of-thought prompting, where the model writes out intermediate reasoning before its answer. These chains fail in a recognizable way. The model often writes a correct rationale ("the user expected all-day battery life and was let down") and then outputs a label that contradicts it ("neutral"). It also does the reverse, attaching a fabricated rationale to a lucky label. Code-repair systems handle a similar problem by running the program and feeding the error back. Sentiment has no interpreter, though, and simply asking a model to recheck itself is known to make reasoning worse.

We propose to build a small interpreter that sentiment does not have. The model writes its rationale as a structured record: the event, who it affects, whether the effect helps or hurts, whether the event actually happened, the aspect category, and the quoted evidence span. A deterministic program then executes a fixed polarity calculus over that record and checks that the evidence span is really in the review. When the computed polarity disagrees with the model's label, or the evidence is not in the text, the program returns a concrete error message, much like a compiler. Only those instances get another pass. The bet is that this checker supplies an outside signal that is cheap, needs no learning, and fires on exactly the cases where reasoning broke. That would let a small refinement budget beat both uniform multi-path reasoning and majority voting at a fraction of the token cost.

Core Claim

The claim is narrow, and it can be shown false. The checker cannot verify world knowledge, so it cannot tell us that forty minutes is a short battery life. It can verify two things the model's own reasoning commits to. The first is grounding: the cited evidence appears in the review. The second is coherence: the stated label follows from the stated effect, beneficiary and factuality under a fixed calculus. We claim that a large share of errors on implicit-sentiment benchmarks are coherence or grounding failures rather than knowledge failures. If so, checker-gated repair should fix them with one or two extra passes, and it should spend nothing on the majority of inputs that pass the check.

If coherence failures turn out to be rare, the idea fails. The first experiment measures exactly that.

The calculus follows How Factuality Determines Sentiment Inferences, which argues that implicit sentiment depends on whether an event actually happened and on who benefits or suffers from it. We write the derived polarity as

$$\hat{y} = \phi \cdot s_{\text{effect}} \cdot s_{\text{holder}},$$

where $\phi \in \{0,1\}$ is 1 if the event is asserted as having happened and 0 if it is hypothetical or negated. A zero yields neutral. $s_{\text{effect}} \in \{+1,-1\}$ says whether the event helps or harms the target. $s_{\text{holder}} \in \{+1,-1\}$ says whether the reviewer is aligned with the target, which is ordinarily $+1$ when the reviewer is the user. The rule is deliberately crude. Its value lies in being fixed and outside the model.

Relation to Prior Work

Three papers motivate this work by showing the failure modes. THOR breaks implicit sentiment into three prompted hops: aspect, then opinion, then polarity. It shows that this escapes the neutral default, but it also reports that chains break mid-way in small models and that supervised models learn shortcuts, producing correct labels with ungrounded rationales. DRCR/TRCR argues for each candidate polarity in turn and compares the arguments. This repairs some linear-chain errors, but it triples generation on every instance, and the model acts as both arguer and judge. RVISA keeps only those teacher rationales that lead to the gold label and distills them into Flan-T5. That verification happens offline against gold labels; at inference time the student checks nothing. Our checker differs from all three because it runs at test time, needs no gold label, and is not the model.

Two papers constrain the design. Large Language Models Cannot Self-Correct Reasoning Yet shows that asking a model to critique itself degrades accuracy; for example, GPT-4 on GSM8K fell from 95.5% to 89.0%. It also shows that majority voting beats debate at equal sample counts. This rules out any design in which the "verifier" is just another prompt, and it obliges us to compare against voting at matched compute. CodeTransOcean reports two relevant findings. First, compiler-guided self-debugging gains mostly arrive in round one, moving the debugging success rate from 48.57% to 52.57% over three rounds. Second, step-by-step reasoning hurt code translation by narrowing the model's focus. We therefore cap refinement at a few rounds, and we test whether free-text reasoning before the structured record helps or harms.

Three papers supply methods. CRITIC shows that self-correction works when the critique is grounded in tool output, such as interpreter results or search, and it reports gains like +16% on TabMWP for LLaMA-2-70B. It never covers sentiment and runs a fixed number of rounds. PAL moves computation into executed code; we move only the final logical step, not the knowledge. Multi-pass Decoding learns a small classifier that decides whether another pass will help, and it keeps 83% of single-pass speed. This gives us a learned-gate competitor to our rule-based gate.

The survey Code to Think, Think to Code names the open question we address: how to give "executability" to subjective language tasks. Our answer is partial on purpose. We execute the logic of the rationale, not its premises.

Research Program

The work has four parts.

First, we define the rationale schema and the checker. The schema has six fields: aspect category, drawn from the SemEval category inventory; evidence span; event; effect sign; holder alignment; and factuality. The checker is a few hundred lines of Python. It verifies the span by exact or fuzzy match, verifies schema validity, computes $\hat{y}$, and compares it with the model's label. When a check fails, it returns a templated message, for example: "your rationale implies negative (event asserted, harms user) but you answered neutral," or "evidence span not found in review."

Second, we build the gated loop. The model produces one structured pass. If the check passes, we stop. If it fails, the error message is appended and the model regenerates, up to $R$ rounds with $R \le 3$. As in the rollback design of Fang et al., if no round passes, we return to the first answer instead of the latest one, so that repair cannot drift.

Third, we run a cost analysis. We record generated tokens, wall-clock time and accuracy for each round, and we plot accuracy against tokens per instance for every method. This is where the saturation question becomes measurable for sentiment: does round two add anything?

Fourth, we probe the reasoning paradox. We compare two variants: writing the structured record directly, and writing THOR-style free-text reasoning first and then the record. This tests whether deliberation improves the premises or, as in CodeTransOcean, mostly adds tokens and narrows the model's focus.

Baselines

The naive reference point is direct label prediction with no reasoning, using the same backbone models: Flan-T5 fine-tuned, as in prior work, and an open instruction-tuned LLM used zero-shot. This anchors the token-cost axis at its minimum, and it shows the neutral default on the implicit-sentiment slices.

The strongest existing system is RVISA. It reports 88.00 F1 on the Laptop implicit-sentiment slice and 82.02 F1 on the Restaurant implicit-sentiment slice with a Flan-T5 student (RVISA). We reproduce it with its released recipe on the same backbone and splits. We then add our checker loop on top of the RVISA student at inference time. This is the fairest test of whether test-time checking adds anything beyond offline verified distillation. Beating it means a statistically significant F1 gain over our reproduced RVISA number across seeds while spending fewer than twice its tokens per instance.

THOR is the standard chain baseline; RVISA reports it at 76.57 F1 on the Laptop implicit slice. TRCR is the strongest multi-path baseline. The file gives no exact TRCR number, only that it is about 6% better than THOR with Flan-T5-xxl, so we will reproduce it ourselves. All of these run on the same backbone with the same prompt-tuning budget.

Self-consistency, meaning sampling $K$ THOR chains and voting, runs with $K$ chosen so that its average token count matches ours. Its main use is a matched-compute accuracy comparison.

The learned gate follows Multi-pass Decoding. It is a logistic-regression classifier on the final hidden state that decides whether to run another pass, given the same round cap. It tests whether our rule-based check matters or whether any uncertainty gate would do.

The key ablation is "check-and-select." Here we sample several structured passes and return the first one that passes the checker, with no error message fed back. This separates the value of the checker's signal from the value of feeding errors back for repair.

For self-consistency on implicit-sentiment slices, and for any code- or checker-based sentiment method, there is no reported result found on Lacuna, so these numbers will all come from our own runs.

Why not just…?

Why not just use self-consistency voting? Voting is the baseline that Large Language Models Cannot Self-Correct Reasoning Yet found hardest to beat at matched compute, so it is a real threat. Voting cannot escape a bias that every sample shares. If the model defaults to neutral on factual sentences, all $K$ samples lean neutral. Voting also spends $K$ times the compute on easy explicit sentences, which SCAPT puts at roughly 70% of reviews. The matched-token comparison settles this. If voting equals our method on the implicit slices at equal tokens, our method offers only a cost advantage, and we will report that.

Why not just ask the model to re-check its reasoning? The evidence against unaided self-critique is strong. Llama-2-70b fell from 62.0% to 36.5% on GSM8K after self-correction rounds. We include this condition so that we can show the degradation also happens on sentiment. The difference in our setup is that the critique message comes from a program and points to a specific contradiction.

Why not just gate TRCR with a confidence classifier, as in Multi-pass Decoding? This could recover most of the cost savings, and it is the alternative most likely to match us. It differs from our approach in one way: a confidence gate says "unsure" but not why, so the extra pass receives no specific information. The learned-gate baseline, run at equal round caps, measures whether the specific error message adds accuracy beyond routing. If it does not, the contribution shrinks to "a free gate that needs no training," and we will say so.

Why not just distill better, as RVISA does? Offline verification raises the quality of the student's rationales but cannot catch the student's own test-time inconsistencies. THOR documents shortcut rationales even in supervised models. Running our checker on RVISA's outputs measures directly how often its rationales and labels disagree.

Proposed Experiments

We use the explicit and implicit slices of SemEval-2014 Restaurant and Laptop, the standard testbed for THOR, RVISA and TRCR. We report macro-F1 and accuracy on each slice, with mean tokens and latency per instance. DMASTE provides long multi-domain reviews in which implicit targets sit far from their evidence. There we test whether the grounding check matters more as reviews get longer, binned by review length.

The first decisive check comes before any loop is built. We run THOR and RVISA as-is, parse their rationales into the schema with a separate extraction pass, and count how many of their errors on the implicit slices are coherence or grounding failures that the checker would flag. We also measure the checker's false-alarm rate on correct answers. If flagged errors are below about a quarter of all errors, or if false alarms dominate, the project shifts to studying knowledge failures instead.

The second decisive check is the accuracy-versus-tokens curve. Our gated loop must lie above both self-consistency and TRCR somewhere on the curve, and it must beat RVISA on the implicit slices. The "check-and-select" ablation then tells us whether feedback-driven repair or simple filtering produces the gain.

The third check is round-by-round saturation. We expect most of the gain in round one, as in CodeTransOcean. Measuring it fixes a sensible cap.

The last check is the paradox probe. If free-text reasoning before the record reduces checker failures without lowering premise accuracy, as judged by human annotation on 300 implicit items, then deliberation helps here, unlike in code translation. If it adds tokens without reducing failures, the cheaper direct-record variant is the method to use.