Skip to content

feat(psychometric): restore Driver p.16 discreteDIFFUSIONstd QΔt/p on main - #477

Closed
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-discrete-diffusion-std-restore-on-main
Closed

feat(psychometric): restore Driver p.16 discreteDIFFUSIONstd QΔt/p on main#477
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-discrete-diffusion-std-restore-on-main

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Superseded by the Longitudinal Modeling landing vehicle

Closed after source-level verification against surviving PR #310 exact head 4e7435f6dd232ae8e1e019f1393e7285e32c6527.

This Draft's unique scientific evidence is preserved rather than discarded: #310 now implements the event-time scalar discrete diffusion-standardisation candidate in crates/longitudinal_core/src/diffusion.rs, preserves the strictly positive stationary-within admission contract, typed EventTimeInterval, interval ordering, scale invariance, signed-zero underflow refusal, asymptotic unit limit, named-estimand refusals and research-candidate status, with executable coverage in crates/longitudinal_core/tests/standardised_diffusion_contract.rs. The owner move is intentional: event-time/state composition belongs to TEPP Longitudinal Modeling, not the generic psychometric_core technical layer.

The immutable discussion and this branch remain scientific lineage. Do not merge this predecessor independently. #310 is the landing authority for the folded behavior and must satisfy its own exact-head checks/review before protected-main integration.


Original scope preserved below for lineage.

Restore one named Driver, Oud, and Voelkle (2017) p. 16 scalar candidate discreteDIFFUSIONstd = Q_Δt / p = 1 − exp(2 a Δt) after strictly positive stationary within-person variance. The 2017-era ctsem source emits unstandardised discreteDIFFUSION but not a named discreteDIFFUSIONstd matrix, so this remains a research-candidate extension rather than canonical ctsem output.

… main

Restore the exact scalar Driver, Oud, and Voelkle (2017) p.16
discreteDIFFUSIONstd map independently on current main. Form
strictly positive asymDIFFUSION p = −q/(2a) first, then Q_Δt,
then Q_Δt/p. The scalar stationary ratio is 1−exp(2aΔt).
2017-era summary.ctsemFit.R forms unstandardised
discreteDIFFUSION and does not form a discreteDIFFUSIONstd
matrix; footnote 4 still licenses this map.

Do not convert stale draft #311. One named std map per PR.
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 84231ead-3571-4882-a310-903f60b79a1e

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc02f5 and 89c4808.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • crates/psychometric_core/src/error.rs
  • crates/psychometric_core/src/event_time.rs
  • crates/psychometric_core/src/lib.rs
  • crates/psychometric_core/tests/multilevel_event_time_recovery_contract.rs
  • crates/psychometric_core/tests/scientific_claim_boundary_contract.rs
  • docs/adr/0005-posterior-esem-dsem.md
  • docs/research/multilevel-event-time-recovery.md

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.

@seonghobae
seonghobae marked this pull request as draft September 1, 2026 20:00

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +2562 to +2564
let process_noise =
recover_discrete_process_noise(continuous_diffusion, log_rate, event_delta, clock)?;
require_finite(process_noise / stationary)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Small intervals erase standardized diffusion

When process noise underflows but stationary variance remains positive, process_noise / stationary returns zero instead of the representable standardized ratio.

Prompt for agents
Make recover_standardised_discrete_diffusion evaluate Q_Δt / p without dividing independently rounded f64 values. For example, after preserving all existing validation and the strictly-positive-stationary-variance gate, use the algebraically equivalent stable scalar expression -expm1(2 * (log_rate * event_delta)), with the same overflow/underflow conventions used elsewhere. Add cases where Q_Δt underflows although the ratio remains representable, such as q=1e-100, a=-1, and Δt=1e-308, plus subnormal q cases that expose numerator/denominator rounding.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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