Laya_bound: micro-chain boundary detector in logs
2 min readupdated
Laya_bound is a fine-tuned version of the 0.42B parameter model convaiinnovations/laya, designed to detect micro-chain boundaries in user interface logs from electronic health records (EHR). The model takes a window of 8 events before the target, the target event itself enclosed in [TARGET] tags, and 8 events after, while also accounting for time pauses before the next action via a separate GapFilm module (FiLM: a feature-wise linear modulation layer for numerical parameters). Unlike the standard baseline, time is not written into the text but passed as a scalar, which significantly improves accuracy during long pauses. This tool is useful for developers and analysts parsing user sessions and sequential action logs in interfaces.
Key features
- Accounting for time intervals via a separate
gap_film.safetensorsmodule using the formulax = log(1 + Δt). - Extended tokenizer (50,370 token vocabulary) with special
[TARGET]and[/TARGET]tags to highlight the target event. - Built on the ModernBERT-large encoder, reading logits at
[MASK]positions without text generation. - Ability to run the checkpoint either with the pause module via
gap_film.pyor with the standardlayaloader without accounting for time.
What you can do
- Integrate the model into an interface log parsing pipeline to automatically split user sessions into logical micro-chains.
- Evaluate the impact of extended idle times (over 120 seconds) on completing workflows in medical or other complex systems.
- Use the open dataset
Aleksandr95/laya-boundary-datasetand the GapFilm architecture as a reference for classifying event sequences with uneven pauses.
Example
from laya.train import load_checkpoint
# Загрузка базовой головы без модуля учета пауз (GapFilm)
model, tok, cfg = load_checkpoint("Aleksandr95/Laya_bound")Read more
DetailsTest (N = 4514, boundary share 18.7%): accuracy 0.968 (vs 0.967 without pause), recall 0.854, Brier 0.063, ECE 0.032, AP 0.917.
On pauses >120 s, accuracy with GapFilm reaches 0.974 vs 0.944 without pause consideration; on intervals <1 s, recall is 0.
Training: 12 epochs (~7.6 h) on 22,870 examples, calibration on 2,551 examples (temperature T ≈ 4.923).










Comments