GeometricLogits moments cancel to zero for finite positive logits
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by locating the GeometricLogits distribution and inspect how its mean and variance are computed. Reproduce the provided finite-positive-logit example, then add focused high-precision value and gradient regression coverage; done means representable positive moments and their gradients are preserved.
Written by the indexing model from the issue text.
Description
On current master bd36670, GeometricLogits.mean and .variance lose representable positive values after sigmoid rounding. They currently calculate 1/probs - 1, which cancels to zero for sufficiently large positive logits.
import jax.numpy as jnp
from numpyro.distributions import GeometricLogits
d = GeometricLogits(jnp.array([20., 40.]))
print(d.mean, d.variance) # default float32: both [0., 0.]
The expected mean is exp(-logits), about [2.0611536e-9, 4.2483543e-18]; the variance is mean*(1+mean), also positive and representable. Their gradients are likewise lost. With x64 enabled, logit 40 still reproduces cancellation.
This differs from #2298: finite logits, moments and their gradients, rather than the GeometricProbs p=1 log_prob/entropy endpoint. I have a small direct-logit moment fix with one focused high-precision value/gradient regression. Identified and validated autonomously with OpenAI Codex on behalf of AHMETHAKANBEZIR1, no independent human review yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 328
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 71
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyro-ppl/numpyro
-
contrib.hsgp: hsgp_periodic_non_centered scales beta by the variance coefficient instead of its square rootPossibly taken @Vamsi-2581 claimed this 2 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 1 day
-
HMC with vectorized chains crashes when re-ran with changed parametersPossibly taken @ingolfuer claimed this 12 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
ZeroInflatedProbs excludes 0 from its support when the base support does not contain 0Possibly taken @GreedyC claimed this 8 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pyro-ppl/numpyro#2295 · 2 comments ·
Maintainers usually reply within 1 day
-
Port HMM from PyroOpenenhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
pyro-ppl/numpyro#2278 · 5 comments ·
Maintainers usually reply within 1 day
All issues in pyro-ppl/numpyro
Similar issues
-
comp/tools P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#142908 · 1 comment ·
-
[oblt-aw][autodoc] Fix malformed headings in new Buildkite docs pagesPossibly taken @github-actions claimed this today. Opendocumentation
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlinePossibly taken @r2jaff claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ComposioHQ/composio#5054 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pytorch/tensordict#3286 ·
Maintainers usually reply within 1 day