Medication-trajectory anomaly detection stops scoring whole records: L2G-Joint pinpoints the few suspicious visits
Suspicious deviations in longitudinal medication trajectories often sit in only a few visits, and scoring the whole account can dilute that local signal. L2G-Joint builds multi-granularity proxy anomalies constrained by a drug knowledge graph and reimbursement-catalogue categories, adds knowledge-consistent plausible variants as negatives, and gives every scoreable visit a shared anomaly score that is selectively aggregated by Top-20% into an account-level decision. On the City-A proxy benchmark it reaches a Macro AP of 0.7844, Macro AUROC of 0.7707 and Localization Macro AP of 0.7215, relative gains of about 2.4%, 3.6% and 9.2% over the strongest respective comparators.