Skip to content

Conversation

@colehanan1
Copy link
Owner

@colehanan1 colehanan1 commented Jan 7, 2026

…SO, and Shapley methods
This pull request adds a suite of synthetic audit scripts to verify invariants and correctness for multiple importance analysis methods in the codebase. Each script constructs controlled synthetic data and checks for expected behaviors, such as permutation invariance and correct identification of driver features, across different modeling approaches (GLM, LASSO, connectome, and Shapley-proxy). These tests help ensure the robustness and reliability of the importance computation logic.

Synthetic importance audit scripts:

  • Added importance_glm_synthetic.py to audit GLM-based importance metrics, verifying driver receptor dominance and permutation invariance for weight and ablation scores.
  • Added importance_lasso_synthetic.py to audit LASSO regression importance, confirming correct identification of top receptors, permutation invariance, and sensitivity to label shuffling.
  • Added importance_connectome_synthetic.py to audit connectome amplification invariants, checking for amplification factor correctness and stability under receptor order permutations.
  • Added importance_shapley_proxy_synthetic.py to audit variance-based Shapley-proxy importance, ensuring output normalization and permutation invariance for odorant list order.

Summary by CodeRabbit

  • Tests
    • Added comprehensive validation tests for importance computation methods across connectome, GLM, LASSO, and Shapley-based approaches to ensure system accuracy and stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@colehanan1 colehanan1 merged commit e5574e8 into main Jan 7, 2026
0 of 15 checks passed
@colehanan1 colehanan1 deleted the audit/codex_repo_analysis branch January 7, 2026 22:07
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Four new synthetic validation audit scripts verify invariants of importance computation methods across connectome, GLM, LASSO, and Shapley implementations. Each script constructs controlled test scenarios, computes results, and validates permutation stability and correctness properties.

Changes

Cohort / File(s) Summary
Importance validation audit scripts
scripts/audit/importance_connectome_synthetic.py, scripts/audit/importance_glm_synthetic.py, scripts/audit/importance_lasso_synthetic.py, scripts/audit/importance_shapley_proxy_synthetic.py
Four new test modules validating invariants for connectome influence, GLM-based weights, LASSO regression, and Shapley proxy importance methods. Each constructs synthetic data, computes importance scores via their respective algorithms, and asserts stability under receptor/feature permutation and correctness properties (uniform amplification, dominance, non-negativity, permutation invariance). LASSO variant includes cross-validation MSE checks; Shapley variant verifies normalized sums; connectome variant checks amplification factors; GLM variant validates driver receptor dominance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Four paths of importance, now validated with care,
Connectome, GLM, LASSO, and Shapley fair!
Through permutations we hop, invariants held tight,
Synthetic data dances—our audit scripts shine bright! ✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8093664 and 1b83066.

📒 Files selected for processing (4)
  • scripts/audit/importance_connectome_synthetic.py
  • scripts/audit/importance_glm_synthetic.py
  • scripts/audit/importance_lasso_synthetic.py
  • scripts/audit/importance_shapley_proxy_synthetic.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants