Expand description
Causal collapse prediction via O(1) analytical perturbation + EML correction.
Predicts how adding a new edge will change the causal graph’s algebraic connectivity (lambda_2) without recomputing the full O(k*m) Lanczos eigenvalue iteration. The core insight comes from first-order eigenvalue perturbation theory:
delta_lambda_2 = w * (phi[u] - phi[v])^2where phi is the Fiedler vector and w is the edge weight. Edges that bridge the spectral partition (phi[u] and phi[v] have opposite signs) produce the largest coherence gains.
§Components
predict_delta_lambda2– O(1) analytical perturbation formularank_evidence_by_impact– rank candidate edges by predicted impactdetect_conversation_cycle– detect stuck/oscillating conversationsCausalCollapseModel– EML-enhanced prediction with learned correctionsCausalGraph::rank_candidates– convenience method on the causal graph
§References
See .planning/development_notes/eml-causal-collapse-research.md for the
full mathematical derivation and design rationale.
Structs§
- Causal
Collapse Model - EML-enhanced delta prediction for when the analytical formula is insufficient.
- Causal
Rank Request - Request payload for the
causal.rankRPC endpoint. - Causal
Rank Response - Response payload for the
causal.rankRPC endpoint. - Coherence
Tracker - Tracks coherence history for conversation cycle detection.
- Collapse
Features - Feature vector for the causal collapse correction model.
- Evidence
Ranking - Result of ranking a candidate evidence addition.
Enums§
- Conversation
State - State of a conversation’s coherence trajectory.
Functions§
- detect_
conversation_ cycle - Detect if coherence changes indicate a circular/stuck conversation.
- is_
redundant - Check if a candidate edge is redundant given recent additions.
- predict_
delta_ lambda2 - First-order perturbation prediction: delta_lambda_2 = w * (phi[u] - phi[v])^2
- rank_
evidence_ by_ impact - Rank candidate evidence by predicted coherence impact.