--- tags: - lan - ssm - hssm - angle - collapsing-bound library_name: onnx license: bsd-2-clause --- # angle_extended (LAN) Likelihood approximation network for the angle_extended sequential sampling model: the standard angle model -- constant drift v with a linearly collapsing decision bound whose collapse angle is theta -- with the drift bounds widened from (-3, 3) to (-6, 6) for designs that produce strong evidence. Parameters are v, a, z, t, theta, in that order, and the network was trained on the full ssm-simulators bounds for the model. Recovery verdict: PASS. Judged alone on a 240-fit sweep (12 design cells x 20 paired datasets, 81 family-corrected tests) this network records zero coverage failures, zero bias failures, and zero cells the design could not identify, with 84% of parameter records converged (r-hat <= 1.01, bulk ESS >= 400). The extended drift range is exercised, not merely declared: density checks and recovery truths reach |v| near 4.5 and beyond. The sweep contains no analytical or blackbox reference arm -- none exists for a collapsing- bound model -- so, as with every LAN in this family, coverage is judged against nominal rather than against an exact-likelihood ceiling. Density: the worst Hellinger distance to a 20k-trial simulation is 0.054, which is BELOW the Monte Carlo sampling floor at that sample size (ratio 0.92 against a gate bar of 3.0) -- the network is closer to the simulator than the simulator is to itself at 20k trials. Total probability mass stays within 0.4% of 1.0 on every draw. A minority of truth draws produce genuinely hard posteriors -- long sampler trajectories, occasional non-convergence; wall time and convergence correlate at -0.50 across the sweep. This is posterior geometry at specific truths, not a defect localised to the network, and no design cell fell below the judgement threshold because of it. ## Architecture - **Network Type:** lan - **Layer Sizes:** [128, 128, 128, 128, 1] - **Activations:** ['tanh', 'tanh', 'tanh', 'tanh', 'linear'] ## Training - **Epochs:** 20 - **Optimizer:** adam - **Learning Rate:** 0.001 - **Loss:** huber ## Usage with HSSM ```python import hssm # p_outlier=0.0 is deliberate. HSSM attaches a 5% lapse by default, but the # training data contains no lapses, so the default misspecifies every fit -- # the bias stays fixed while the posterior sd shrinks as 1/sqrt(n), so # coverage gets WORSE as the dataset grows. Set a lapse only if your data # actually has one. model = hssm.HSSM(data=data, model="angle_extended", p_outlier=0.0) # On an HSSM release that predates the built-in config, pass the network # and the box explicitly. Keep the parameter order exactly as written: it # is the ONNX input column order, and a wrong order does not raise -- it # silently evaluates the wrong likelihood. model = hssm.HSSM( data=data, model="angle_extended", loglik="angle_extended.onnx", loglik_kind="approx_differentiable", p_outlier=0.0, model_config={ "list_params": ["v", "a", "z", "t", "theta"], "backend": "jax", "bounds": { "v": (-6.0, 6.0), "a": (0.3, 3.0), "z": (0.1, 0.9), "t": (0.001, 2.0), "theta": (-0.1, 1.3), }, }, ) ``` ## Citation If you use this model, please cite: - [LANfactory](https://github.com/lnccbrown/LANfactory) - [HSSM](https://github.com/lnccbrown/HSSM)