Feature request: semiparametric (monotone-spline) link for qualitative/ordinal data — learn the measurement-model shape instead of fixing probit/logit
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- bioinformatics
Direzione di ricerca
Start from the existing fixed-link code behind qualitative_scale (probit/logit/hinge) and the SBML/PEtab observable measurement-model layer the issue names as the likely attachment point; #976 holds the MPRA setup. Reproduce the default probit path and its likelihood/profile-likelihood plumbing first, then add the I-spline link, ordered thresholds, and the qualitative_link/df/knot-placement config keys. Done means the identity-spline case reproduces probit exactly, the fitted monotone m stays differentiable under the existing gradient machinery, and a fixed-vs-flexible profile-likelihood comparison runs end to end.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
For qualitative/ordinal data, PyBNF's likelihood models use a link of fixed shape: the probit (confidence/tolerance), the logit (logit scale), or the hinge. qualitative_scale = fit s lets a fit estimate the link's width, but not its shape.
This is a feature request for a semiparametric link: let the fit learn the shape of the map from a model prediction to category probabilities, using a monotone spline. In statistical terms, the current models are single-index models with a known link; this would allow an unknown link.
Motivation
1. Misspecification of the link biases biophysical parameters, silently.
Concrete case (MPRA-style data, one promoter variant per BNGL function, one BPSL constraint per sequenced cell; see #976 for the setup). Fitting a thermodynamic model to above/below-wild-type calls with the fixed probit gave an apparently well-determined RNAP concentration, with a likelihood-ratio statistic of 24.7 against the weak-binding limit. A synthetic-data check then showed that two plausible departures from the assumed link — noise whose width grows with the predicted value, and the stratified sorting design the real experiment actually used — each manufacture a larger signal (51–114) from data generated with no such parameter at all. The estimate was an artifact of the link, not evidence in the data.
A fit cannot currently distinguish "the data say this" from "my assumed link says this".
2. There is precedent, and theory.
MAVE-NN (Tareen et al., Genome Biology 23:98, 2022) fits the same class of models to the same class of data, and learns the measurement process p(y|φ) from the data: "a multilayer perceptron with one hidden layer (having tanh activations) and a softmax output layer", trained jointly with the genotype-phenotype map by maximizing the likelihood.
More generally this is the semiparametric single-index model with an unknown link (Ichimura; Härdle & Stoker; Horowitz), where the response depends on the covariates only through a scalar index. The relevant known result is that the index is then identified only up to location and scale — MAVE-NN calls these "diffeomorphic modes" and fixes them by convention. That identifiability cost is the honest price of the robustness, and it is the point of item 4 below.
Proposed feature
A monotone-spline link, not a neural network. The index here is scalar, so a 1-D monotone transformation is the natural object and is much better suited than an MLP: few parameters, monotone by construction, interpretable, and differentiable, so it works with the existing gradient and profile-likelihood machinery.
For a predicted value q (the constraint margin, as the probit/logit models already compute it), replace the fixed CDF with a cumulative-link model
P(category <= k | q) = Phi( t_k - m(q) ) k = 1 .. K-1
where m is a monotone spline (an I-spline basis with non-negative coefficients, or a monotone PCHIP through fitted knot heights) and t_k are ordered thresholds. With m the identity this reduces exactly to the present probit, so the existing behaviour is the default and a special case.
Sketch of the configuration surface, parallel to qualitative_scale:
qualitative_link = spline, df = 5 # or: probit (default), logit
qualitative_link_knots = quantile # knot placement over the observed range of q
As with qualitative_scale, one link would be tied across all qualitative constraints, which is the identifiable case.
What this buys, in four parts:
- Robustness. Biophysical parameters stop absorbing the link's misspecification.
- A measurement model worth reading. The fitted
mis itself informative about the assay (saturation, bin nonlinearity, drift). - Parity with MAVE-NN on the data type where that comparison will be made, within a general rule-based framework.
- A robustness diagnostic, which is the most valuable part. Fit twice, once with the fixed link and once with the flexible one, and compare. If the parameter estimates move materially, the assumed link was carrying the result. This pairs directly with
job_type = profile_likelihood, and in the case above it would have caught the artifact immediately.
Caveats, which belong in the documentation
- Identifiability is traded away deliberately. A flexible link absorbs exactly the signal that identifies parameters acting only through a reshaping of the index. Parameters estimable under a fixed link may become unidentifiable. That is a feature when the fixed link is wrong and a real loss when it is right, so both fits are worth reporting.
- It needs enough categories and enough data. With only two categories there is little shape to learn and much to lose; the feature is aimed at ordinal data with several categories, or several conditions.
- Monotonicity should be enforced, not hoped for, or the link and the model will trade places.
Related
- #976 (the setup these data come from), and the measurement-model layer already present for SBML/PEtab observables, which may be the natural place to attach this.
- Lingua principale
- Python
- Stelle
- 25
- Fork
- 25
- Merge medio
- 4h 5m
- PR unite (30g)
- 10
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lanl/PyBNF
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug silent-incorrectness
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Quick Installation step 2 installs from the plugin manager, but the plugin isn't published yetAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
gh-sync ship audits cards before writing station done, so every ship reports false STATUS findingsApertaharness
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mruangutai/harness#2455 ·
I maintainer di solito rispondono entro 1 giorno
-
stripthink leaves thinking text in place when the chat template opens the think tag in the promptForse già presa @MaiAditya l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
xcorr sizes its bin array from the largest observed m/z, so one out-of-range peak kills the runForse già presa @BioGeek l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
instadeepai/winnow#312 ·