Skip to content

Fix sheaf-theoretic rigor: Laplacian restriction maps, terminology al…#2

Open
MikeHLee wants to merge 1 commit intomainfrom
review/bugfix
Open

Fix sheaf-theoretic rigor: Laplacian restriction maps, terminology al…#2
MikeHLee wants to merge 1 commit intomainfrom
review/bugfix

Conversation

@MikeHLee
Copy link
Owner

@MikeHLee MikeHLee commented Jan 7, 2026

…ignment, and neuro validation

  • Add matrix property to Transformation class for explicit restriction map representation
  • Fix compute_sheaf_laplacian to use actual restriction maps R instead of identity matrices
    • Off-diagonal blocks: L_ij = -R_ij (not -I)
    • Diagonal blocks: L_ii = Σ_k R_ik^T @ R_ik
    • Enables detection of twist inconsistencies (rotations, calibrations)
  • Correct docstring terminology in transforms.py
    • text_to_tokens, image_to_patches: Restriction maps (Global → Local)
    • tokens_to_text, patches_to_image: Gluing/Extension maps (Local → Global)
  • Add validate_signal_assumptions() to BrainSheaf
    • Checks variance disparity (>10x warns about z-scoring needed)
    • Checks mean centering across regions
    • Auto-validates on first detect_dissonance call
    • Prevents false dissonance from high-variance regions

Addresses conceptual gaps identified in math rigor review.

…ignment, and neuro validation

- Add matrix property to Transformation class for explicit restriction map representation
- Fix compute_sheaf_laplacian to use actual restriction maps R instead of identity matrices
  * Off-diagonal blocks: L_ij = -R_ij (not -I)
  * Diagonal blocks: L_ii = Σ_k R_ik^T @ R_ik
  * Enables detection of twist inconsistencies (rotations, calibrations)
- Correct docstring terminology in transforms.py
  * text_to_tokens, image_to_patches: Restriction maps (Global → Local)
  * tokens_to_text, patches_to_image: Gluing/Extension maps (Local → Global)
- Add validate_signal_assumptions() to BrainSheaf
  * Checks variance disparity (>10x warns about z-scoring needed)
  * Checks mean centering across regions
  * Auto-validates on first detect_dissonance call
  * Prevents false dissonance from high-variance regions

Addresses conceptual gaps identified in math rigor review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant