feat: negotiation discourse analysis — affect-text discordance, linguistic evasion, and manipulation pattern detection [INTERNAL] #21

Open
opened 2026-04-12 10:19:26 -07:00 by pyr0ball · 0 comments
Owner

Summary

Personal-use feature for high-stakes negotiations with corporate partners. Not lie detection (acoustic stress is not deception-specific). Instead: real-time discourse analysis that detects evasion patterns, manipulation signatures, and affect-text discordance in a counterparty's speech.

Scope: BSL 1.1. Local inference only. No server-side logging of analysis output. Consent-first design.

Signal Types

Affect-text discordance

  • Compare tonal valence (from existing tone classifier) against sentiment of transcribed words
  • High discordance: saying positive words in a stressed/negative vocal affect → flag

Linguistic hedge density

  • Rolling window over Whisper transcript
  • Score density of hedges: "kind of", "sort of", "I think", "probably", "it depends", "that's not really my area", "we would need to check"
  • Spike in hedge density while topic is under negotiation = evasion signal

Question deflection rate

  • Small LLM pass (local) on rolling 60s transcript window
  • Detect: direct question posed by user → counterparty response does not answer, pivots topic, or asks a counter-question
  • Accumulate deflection count per session

Baseline drift

  • Establish baseline vocal affect + hedge density in first 2 minutes of session
  • Flag when later segments deviate significantly from baseline (topic-correlated drift is more meaningful than absolute levels)

Named pattern signatures

  • Flattery pivot: positive affect spike immediately before or after a concession request
  • False urgency: temporal pressure language ("by end of week", "we need to decide now", "the window is closing") without substantive justification
  • Minimization + reframe: "it's really not a big deal" framing applied to items the user raised as concerns
  • DARVO adjacency: Deny, Attack, Reverse Victim and Offender — detectable via sentiment reversal after user raises concern

Session Mode

Add mode: "negotiation" parameter to session start. Negotiation mode:

  • Enables discourse analysis pipeline alongside standard tone annotation
  • Does NOT change standard Elcor annotation for the transcript
  • Adds NegotiationSignal event type to SSE stream
NegotiationSignal {
  pattern: string        // e.g. "hedge_spike", "flattery_pivot", "deflection"
  confidence: float      // 0.0–1.0
  explanation: string    // human-readable, e.g. "High hedge density while discussing timeline"
  segment_start_ms: int
  segment_end_ms: int
}

UI

  • Subtle concern indicator strip alongside NowPanel (not alarming, not accusatory)
  • Framed as: "discourse pattern detected" not "lying detected"
  • Session summary: pattern frequency table, timeline of signal spikes
  • All UI copy must be carefully neutral — this is analytical, not judgmental
  • Negotiation mode requires explicit one-time opt-in with plain-language explanation
  • Jurisdiction note: one-party recording consent laws vary; show a reminder before enabling
  • All analysis runs locally; no analysis output is stored on CF servers
  • Raw signals (tone vectors, transcript) follow standard Linnet retention policy
  • Analysis results (pattern detections) are session-scoped and discarded on session end

Implementation Notes

  • Reuse existing _classify_real_async pipeline — NegotiationSignal is a post-processing pass on the existing outputs
  • Hedge density and question deflection require a lightweight LLM call; use a local model (llama.cpp or ollama) — never cloud for this feature
  • Baseline establishment: accumulate first N segments, compute baseline stats, then enable drift detection
  • Pattern signatures: rule-based first (faster, more explainable), ML upgrade later

Out of Scope (this issue)

  • No export of raw analysis to third parties
  • No training data collection from user sessions
  • No cloud inference for negotiation analysis
  • No public-facing version of this feature without separate design review

Dependencies

  • #5 YAMNet acoustic events (baseline affect signals)
  • #8 Speaker diarization (needed to attribute signals to counterparty vs. self)
  • Existing tone classifier (already working)
  • Existing Whisper STT (already working)
## Summary Personal-use feature for high-stakes negotiations with corporate partners. **Not lie detection** (acoustic stress is not deception-specific). Instead: real-time discourse analysis that detects evasion patterns, manipulation signatures, and affect-text discordance in a counterparty's speech. Scope: BSL 1.1. Local inference only. No server-side logging of analysis output. Consent-first design. ## Signal Types ### Affect-text discordance - Compare tonal valence (from existing tone classifier) against sentiment of transcribed words - High discordance: saying positive words in a stressed/negative vocal affect → flag ### Linguistic hedge density - Rolling window over Whisper transcript - Score density of hedges: "kind of", "sort of", "I think", "probably", "it depends", "that's not really my area", "we would need to check" - Spike in hedge density while topic is under negotiation = evasion signal ### Question deflection rate - Small LLM pass (local) on rolling 60s transcript window - Detect: direct question posed by user → counterparty response does not answer, pivots topic, or asks a counter-question - Accumulate deflection count per session ### Baseline drift - Establish baseline vocal affect + hedge density in first 2 minutes of session - Flag when later segments deviate significantly from baseline (topic-correlated drift is more meaningful than absolute levels) ### Named pattern signatures - **Flattery pivot**: positive affect spike immediately before or after a concession request - **False urgency**: temporal pressure language ("by end of week", "we need to decide now", "the window is closing") without substantive justification - **Minimization + reframe**: "it's really not a big deal" framing applied to items the user raised as concerns - **DARVO adjacency**: Deny, Attack, Reverse Victim and Offender — detectable via sentiment reversal after user raises concern ## Session Mode Add `mode: "negotiation"` parameter to session start. Negotiation mode: - Enables discourse analysis pipeline alongside standard tone annotation - Does NOT change standard Elcor annotation for the transcript - Adds `NegotiationSignal` event type to SSE stream ``` NegotiationSignal { pattern: string // e.g. "hedge_spike", "flattery_pivot", "deflection" confidence: float // 0.0–1.0 explanation: string // human-readable, e.g. "High hedge density while discussing timeline" segment_start_ms: int segment_end_ms: int } ``` ## UI - Subtle concern indicator strip alongside NowPanel (not alarming, not accusatory) - Framed as: "discourse pattern detected" not "lying detected" - Session summary: pattern frequency table, timeline of signal spikes - All UI copy must be carefully neutral — this is analytical, not judgmental ## Privacy and Consent Design - Negotiation mode requires explicit one-time opt-in with plain-language explanation - Jurisdiction note: one-party recording consent laws vary; show a reminder before enabling - All analysis runs locally; no analysis output is stored on CF servers - Raw signals (tone vectors, transcript) follow standard Linnet retention policy - Analysis results (pattern detections) are session-scoped and discarded on session end ## Implementation Notes - Reuse existing `_classify_real_async` pipeline — NegotiationSignal is a post-processing pass on the existing outputs - Hedge density and question deflection require a lightweight LLM call; use a local model (llama.cpp or ollama) — never cloud for this feature - Baseline establishment: accumulate first N segments, compute baseline stats, then enable drift detection - Pattern signatures: rule-based first (faster, more explainable), ML upgrade later ## Out of Scope (this issue) - No export of raw analysis to third parties - No training data collection from user sessions - No cloud inference for negotiation analysis - No public-facing version of this feature without separate design review ## Dependencies - #5 YAMNet acoustic events (baseline affect signals) - #8 Speaker diarization (needed to attribute signals to counterparty vs. self) - Existing tone classifier (already working) - Existing Whisper STT (already working)
pyr0ball added the
enhancement
internal
privacy
backlog
labels 2026-04-12 10:19:26 -07:00
pyr0ball added this to the Navigation — v0.2.x milestone 2026-04-12 11:04:26 -07:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/linnet#21
No description provided.