REVIEW 4 major objections 5 minor 1 cited by
Extracting Explainable Dates From Medical Images By Reverse-Engineering UNIX Timestamps
T0 review · 4 major / 5 minor · reviewed 2026-08-15 · deepseek-v4-flash
Pith's one-line read Regular expressions synthesized from reverse-engineered UNIX timestamps extract medical dates with far fewer false positives than hand-built ones.
desk verdict Plausible practical trick, but the paper garbles its own metrics and the central comparison may be less favorable than it looks once you notice the synthesized regex's training grammar omits exactly the date-range forms the bespoke regex handles. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing mechanism is a synthetic dataset built by reverse-engineering UNIX timestamps. The paper generates the timestamp for every date from 1900 through 2100, decomposes it into day, month, and year, and renders it as many textual forms—numeric with zero-padding, month names and abbreviations, ordinal quantifiers, separators '-', '.', '/', and space, and hyphenated day ranges—using a hand-selected vocabulary. These positive examples are fed to a regular-expression synthesiser (the paper's implementation of Regex+) that builds a directed acyclic graph of candidate regexes and picks the one with the lowest cost under a minimum-description-length-style measure balancing specificity and simplicity. Because the examples cover the entire date range, synthesis runs without negative examples; the regexes are stored in key:value maps that specify which captured group yields which date part, keeping the final extraction decomposable and inspectable.
What would settle it
Run the pipeline on a held-out collection of medical documents that deliberately include date expressions absent from the generator's vocabulary—month names leading the date, centuries written as words, or date ranges spanning different months. If the synthesized regexes miss those dates at a rate far higher than the bespoke regexes (for example, recall falling well below the 82.96% observed here), the claim that reverse-engineered timestamps cover the space of real date expressions is falsified.
Extended reading notes
Core claim
The central claim is that regular expressions created by regular-expression synthesis—fed with positive examples obtained by reverse-engineering UNIX timestamps—detect far fewer sequences of text that look like dates than manually created regexes, at the cost of a slight increase in missed real dates. The paper quantifies this on 20 medical documents: synthesized regexes found 1,052 true dates, missed 228, and flagged 1,402 false positives; bespoke hand-built regexes found 1,120, missed 160, and flagged 2,570 false positives. The mechanism is a many-one mapping: each UNIX timestamp corresponds to multiple text representations, so enumerating all timestamps in a range and rendering them in several formats covers the intended input space, making negative examples unnecessary. The paper presents the overall pipeline—reverse-engineer a many-one mapping, synthesize positive examples, feed them to a synthesiser—as a new approach to learning deterministic, explainable logic for structured data.
Load-bearing premise
The pipeline's reach is capped by the manually chosen vocabulary of date formats, separators, month spellings, and year rules used to render the synthetic examples; if real documents contain date expressions outside that vocabulary, the synthesized regexes will miss them, and the paper gives no evidence the vocabulary extends beyond the 20 sampled documents.
Editorial extensions
If this is right
- Medical date extraction can be kept explainable: the synthesized regexes decompose into day, month, and year parts that map directly to UNIX timestamps.
- Because the synthesiser is re-run on freshly generated examples, adding a new date format, separator, or language requires no manual regex editing.
- The roughly halved false-positive count (1,402 versus 2,570) makes the synthesized regexes attractive where date-like text is expensive to review, even at 68 additional missed dates.
- The reverse-engineering pipeline is proposed as a general recipe for learning deterministic logic from many-one mappings, not just for dates.
Reading between the lines
- The same reverse-engineering trick may generalize to any field where a canonical value (a timestamp, serial number, coordinate, or barcode) has many textual renderings: generate the full numeric range, render variants, and let a synthesiser learn the extractor.
- A failure analysis of the 228 missed dates would likely show which real-world date shapes are missing from the hand-selected vocabulary; adding those shapes to the generator is a concrete test of the method's ceiling.
- The 1,402 residual false positives may stem from format ambiguity (for example, '03/04/1998' being both 3 April and 4 March); pairing the regexes with a calendar-validity post-check or a small negative-example set could raise precision without losing decomposability.
- Extending the generator to date ranges that cross month boundaries, which the paper lists as future work, could be done by enumerating timestamp intervals rather than combinatorial string templates.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes an explainable pipeline for extracting dates and date ranges from medical document images. Documents are transcribed with OCR/HCR tools, and the text is then matched against regular expressions. The authors compare three kinds of regexes: highly accessible public regexes, a manually crafted 'bespoke' regex, and regexes produced by a regular expression synthesiser (Regex+) trained on positive-only examples generated by reverse-engineering UNIX timestamps for every date between 1900 and 2100. The central claim is that the synthesized regexes detect far fewer date-like non-dates than the bespoke regex (1402 vs 2570 false positives) at a modest cost in missed real dates (228 vs 160 false negatives), thereby establishing regular expression synthesis as a practical, explainable route to complex date extraction. The paper also reports a small experiment showing an LLM produces unreliable UNIX timestamps.
Significance. The reverse-engineering idea is genuinely interesting: UNIX timestamps have a one-to-many relationship with textual date forms, and converting timestamp ranges into synthetic positive examples for regex synthesis is a novel and potentially useful technique. The evaluation uses real transcribed medical documents with human annotations, which is a strength, and the confusion matrices are included, allowing independent recalculation of the metrics. The explainability motivation is well placed. However, the significance is currently undercut by three issues: swapped precision/recall definitions and labels throughout, a synthetic grammar that omits date-range and contextual forms present in the test corpus, and a same-corpus evaluation without a held-out set. These are repairable but require corrected reporting and additional experiments.
major comments (4)
- [Sec. II-F, Figs. 3-5] The precision and recall formulas in Sec. II-F are swapped relative to standard definitions: precision should be TP/(TP+FP) and recall should be TP/(TP+FN). The caption labels are likewise swapped; for Fig. 4 the matrix gives standard precision 30.35% and standard recall 87.5%, but the caption reports 'Recall: 30.35%, Precision: 87.5%'. Fig. 5's caption also contains an internal inconsistency: with TP=1052 and FN=228 the standard recall is 82.19%, not 82.96%. Every precision/recall value in the paper therefore needs to be recalculated and the definitions corrected; as written, no quantitative claim based on these metrics is reliable.
- [Sec. IV-G, IV-H] The synthetic grammar explicitly excludes month-to-month ranges, contextual dates, and keyword synonyms, and the 20 test documents are the same ones used to motivate the vocabulary. The claim in Sec. IV-G that 'we captured the entire input space' is therefore unsupported: the input space was deliberately restricted. The 228 false negatives of the synthesized regex are never decomposed by cause, so the reader cannot tell whether the precision gain comes from the synthesis procedure itself or simply from a narrower grammar. An ablation that adds the excluded date types to the synthetic examples, or at least a breakdown of false negatives by date type, is needed to support the central comparison.
- [Sec. IV-F, IV-A] The bespoke regex was developed on 81 pages from 2 of the 20 documents, and all 20 documents are then used in the main comparison (Figs. 4 and 5). Because the synthetic vocabulary was also derived from the same documents, the evaluation is optimistic for both methods and likely overstates performance on unseen documents. A held-out document set or document-level cross-validation is required before the generalization claim can be made.
- [Sec. IV-H] The first bullet of the three research findings states that regex synthesis 'achieved higher recall by sacrificing precision.' This directly contradicts the corrected numbers in Figs. 4 and 5, where the synthesized regex has lower recall (82.2% vs 87.5%) and higher precision (42.9% vs 30.4%). This internal contradiction in the discussion of the main result must be resolved.
minor comments (5)
- [Throughout] The manuscript contains numerous typographical errors (e.g., 'seperators', 'furtherest', 'prepropositions', 'Georgian months' for 'Gregorian months', 'covert' for 'convert', 'seperated'); a careful proofreading pass is needed.
- [Sec. II-F] The verbal definition of false positives ('the number of target dates that were wrongly predicted') is incorrect; false positives are non-date strings that the regex matches as dates. This should be reworded alongside the corrected formulas.
- [Fig. 2] The figure caption says dates between 1970 and 2031 while the text says 1970-2030; the ranges should be made consistent.
- [Figs. 3-5] The confusion matrices do not state explicitly whether rows are targets and columns are predictions; please add a sentence or axis labels to clarify the layout.
- [Sec. I] The introduction states that 'computer vision and Large Language Models are not able to solve this task,' but only a single small LLM experiment is reported and no computer vision experiments were actually run on the task; the claim should be qualified accordingly.
Circularity Check
No significant circularity: the comparison of synthesized and manual regexes is an empirical test against independent human annotations, not a reduction to the method's inputs.
full rationale
The central derivation chain is not circular. The synthesized regexes are produced by Regex+ from synthetic positive examples that are generated by enumerating UNIX timestamps for 1900-2100 and mapping each timestamp to text under a hand-specified grammar (Sec. IV-G). The evaluation then applies these regexes to transcriptions of 20 real medical documents and compares their detections with independent human annotations (Sec. IV-C), so no test label is used in constructing the synthetic examples or in choosing the regex. The paper's own grammar omits month-to-month ranges, contextual dates, and keyword synonyms, which are listed as future work (Sec. IV-H); because the bespoke regex in Sec. IV-F was built to capture long dates and month-to-month expressions, the reported false-positive reduction may partly reflect this grammar gap rather than the synthesis procedure itself. That is a threat to the strength of the comparison, but it is not a circular step: the Fig. 4-vs-Fig. 5 outcomes are not equivalent to the synthetic inputs by construction, and no fitted parameter is renamed as a prediction. There are no load-bearing self-citations and no imported uniqueness theorem. Hence no qualifying circularity is present.
Assumptions & free parameters
free parameters (3)
- binarisation threshold =
100 (out of 255)
- two-digit year pivot =
40
- synthetic date range =
1900-01-01 to 2100-12-31
assumptions (5)
- domain assumption The hand-selected format vocabulary (numeric day-month-year, month-year, ordinal day-month-year, with separators {-./} and {-./ plus space}) covers the date formats occurring in the real medical documents.
- domain assumption The leap-year rule as stated in Sec IV-A ('divisible by 4, but not by 400') correctly identifies leap years.
- domain assumption Regex+ trained on all positive examples within the synthetic range will not overgeneralize, so negative examples are unnecessary.
- domain assumption OCR/HCR transcription with LLaVA-13b preserves date strings accurately enough for the evaluation.
- standard math UNIX timestamps at midnight UTC are valid canonical representations of the annotated dates.
Cite this review
Pith. "Pith review of Extracting Explainable Dates From Medical Images By Reverse-Engineering UNIX Timestamps." pith.science (2026). https://pith.science/paper/LV73OVIR
@misc{pith2026250511451,
author = {Pith},
title = {Pith review of: Extracting Explainable Dates From Medical Images By Reverse-Engineering UNIX Timestamps},
year = {2026},
howpublished = {\url{https://pith.science/paper/LV73OVIR}},
note = {Machine review of arXiv:2505.11451}
}
read the original abstract
Dates often contribute towards highly impactful medical decisions, but it is rarely clear how to extract this data. AI has only just begun to be used transcribe such documents, and common methods are either to trust that the output produced by a complex AI model, or to parse the text using regular expressions. Recent work has established that regular expressions are an explainable form of logic, but it is difficult to decompose these into the component parts that are required to construct precise UNIX timestamps. First, we test publicly-available regular expressions, and we found that these were unable to capture a significant number of our dates. Next, we manually created easily-decomposable regular expressions, and we found that these were able to detect the majority of real dates, but also a lot of sequences of text that look like dates. Finally, we used regular expression synthesis to automatically identify regular expressions from the reverse-engineered UNIX timestamps that we created. We find that regular expressions created by regular expression synthesis detect far fewer sequences of text that look like dates than those that were manually created, at the cost of a slight increase to the number of missed dates. Overall, our results show that regular expressions can be created through regular expression synthesis to identify complex dates and date ranges in text transcriptions. To our knowledge, our proposed way of learning deterministic logic by reverse-engineering several many-one mappings and feeding these into a regular expression synthesiser is a new approach.
Figures
Forward citations
Cited by 1 Pith paper
-
Fast and Accurate Contextual Knowledge Extraction Using Cascading Language Model Chains and Candidate Answers
Cascading cheap and expensive language models, with answers validated against regex-extracted candidate dates, improved speed and modestly improved accuracy when extracting dates of birth from medical documents.
Reference graph
Works this paper leans on
-
[1]
Long, often quite boring, notes of meetings,
M. Marx, “Long, often quite boring, notes of meetings,” inProceedings of the Workshop on Exploiting Semantic Annotations in Information Retrieval (2009), 2009, pp. 46–53
work page 2009
-
[2]
Date field extraction from handwritten documents using hmms,
R. Mandal, P. P. Roy, U. Palz, and M. Blumenstein, “Date field extraction from handwritten documents using hmms,” in2015 13th International Conference on Document Analysis and Recognition (ICDAR). IEEE, 2015, pp. 866–870
work page 2015
-
[3]
DateFinder: detecting date regions on handwritten document images based on positional expectancy,
S. Zhenwei, “DateFinder: detecting date regions on handwritten document images based on positional expectancy,” Master’s thesis, Faculty of Science and Engineering, University of Groningen, the Netherlands, 2016. [Online]. Available: https://fse.studenttheses.ub.rug. nl/13900/1/Master Thesis Zhenwei.pdf
work page 2016
-
[4]
M. Veale and F. Zuiderveen Borgesius, “Demystifying the draft EU artificial intelligence act—analysing the good, the bad, and the unclear elements of the proposed approach,”Computer Law Review Interna- tional, vol. 22, no. 4, pp. 97–112, 2021
work page 2021
-
[5]
Dates and times made easy with lubridate,
G. Grolemund and H. Wickham, “Dates and times made easy with lubridate,”Journal of statistical software, vol. 40, pp. 1–25, 2011
work page 2011
- [6]
-
[7]
Historical review of ocr research and development,
S. Mori, C. Y . Suen, and K. Yamamoto, “Historical review of ocr research and development,”Proceedings of the IEEE, vol. 80, no. 7, pp. 1029–1058, 1992
work page 1992
-
[8]
Handwritten optical character recognition (OCR): A comprehensive systematic literature review,
J. Memon, M. Sami, R. A. Khan, and M. Uddin, “Handwritten optical character recognition (OCR): A comprehensive systematic literature review,”IEEE access, vol. 8, pp. 142 642–142 668, 2020
work page 2020
Show all 33 references
-
[9]
The process of creating a font,
A. Kaicheva, “The process of creating a font,” Ph.D. dissertation, Karelia, Finland, 2015
2015
-
[10]
TrOCR: Transformer-based optical character recognition with pre-trained models,
M. Li, T. Lv, J. Chen, L. Cui, Y . Lu, D. Florencio, C. Zhang, Z. Li, and F. Wei, “TrOCR: Transformer-based optical character recognition with pre-trained models,” inAAAI Conference Proceedings, vol. 37, 2023, pp. 13 094–13 102
2023
-
[11]
AttnLRP: attention-aware layer-wise rele- vance propagation for transformers,
R. Achtibat, S. M. V . Hatefi, M. Dreyer, A. Jain, T. Wiegand, S. La- puschkin, and W. Samek, “AttnLRP: attention-aware layer-wise rele- vance propagation for transformers,”arXiv preprint arXiv:2402.05602, 2024
2024 arXiv
-
[12]
Darpa’s explainable artificial intelligence (XAI) program,
D. Gunning and D. Aha, “Darpa’s explainable artificial intelligence (XAI) program,”AI magazine, vol. 40, no. 2, pp. 44–58, 2019
2019
-
[13]
Ultra-strong machine learning: comprehensibility of pro- grams learned with ilp,
S. H. Muggleton, U. Schmid, C. Zeller, A. Tamaddoni-Nezhad, and T. Besold, “Ultra-strong machine learning: comprehensibility of pro- grams learned with ilp,”Machine Learning, vol. 107, pp. 1119–1140, 2018
2018
-
[14]
Accountable artificial intelligence: Holding algorithms to account,
M. Busuioc, “Accountable artificial intelligence: Holding algorithms to account,”Public administration review, vol. 81, no. 5, pp. 825–836, 2021
2021
-
[15]
Explainable case-based reasoning: a survey,
J. M. Schoenborn, R. O. Weber, D. W. Aha, J. Cassens, and K.- D. Althoff, “Explainable case-based reasoning: a survey,” inAAAI-21 Workshop Proceedings, 2021
2021
-
[16]
Tutorial: Neuro-symbolic AI for mental healthcare,
K. Roy, U. Lokala, M. Gaur, and A. P. Sheth, “Tutorial: Neuro-symbolic AI for mental healthcare,” inProceedings of the Second International Conference on AI-ML Systems, 2022, pp. 1–3
2022
-
[17]
Methods for interpreting and understanding deep neural networks,
G. Montavon, W. Samek, and K.-R. M ¨uller, “Methods for interpreting and understanding deep neural networks,”Digital signal processing, vol. 73, pp. 1–15, 2018
2018
-
[18]
Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead,
C. Rudin, “Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead,”Nature machine intelligence, vol. 1, no. 5, pp. 206–215, 2019
2019
-
[19]
Learning interpretable temporal properties from positive examples only,
R. Roy, J.-R. Gaglione, N. Baharisangari, D. Neider, Z. Xu, and U. Topcu, “Learning interpretable temporal properties from positive examples only,” inAAAI Conference Proceedings, 2023
2023
-
[20]
FOREST: an interactive multi-tree synthesizer for regular expressions,
M. Ferreira, M. Terra-Neves, M. Ventura, I. Lynce, and R. Martins, “FOREST: an interactive multi-tree synthesizer for regular expressions,” inICTACAS. Springer, 2021, pp. 152–169. [Online]. Available: https://github.com/Marghrid/FOREST
2021
-
[21]
Inference of reg- ular expressions for text extraction from examples,
A. Bartoli, A. De Lorenzo, E. Medvet, and F. Tarlao, “Inference of reg- ular expressions for text extraction from examples,”IEEE Transactions on Knowledge and Data Engineering, vol. 28, no. 5, pp. 1217–1230, 2016
2016
-
[22]
Data extraction via semantic regular expression synthesis,
Q. Chen, A. Banerjee, C ¸ . Demiralp, G. Durrett, and I. Dillig, “Data extraction via semantic regular expression synthesis,”Proceedings of the ACM on Programming Languages, vol. 7, pp. 1848–1877, 2023
2023
-
[23]
Regex+: Synthesizing regular expressions from positive examples,
E. Pertseva, M. Barbone, J. Rudek, and N. Polikarpova, “Regex+: Synthesizing regular expressions from positive examples,” in11TH Workshop on Synthesis, 2022. [Online]. Available: https://par.nsf.gov/ servlets/purl/10336574
2022
-
[24]
Inferring dfa without negative exam- ples,
F. Avellaneda and A. Petrenko, “Inferring dfa without negative exam- ples,” inInternational Conference on Grammatical Inference. PMLR, 2019, pp. 17–29
2019
-
[25]
Rich feature hierarchies for accurate object detection and semantic segmentation,
R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” inProceedings of the IEEE conference on computer vision and pattern recognition, 2014, pp. 580–587
2014
-
[26]
Llama: Open and efficient foundation language models,
H. Touvron, T. Lavril, G. Izacard, X. Martinet, M.-A. Lachaux, T. Lacroix, B. Rozi `ere, N. Goyal, E. Hambro, F. Azharet al., “Llama: Open and efficient foundation language models,”arXiv preprint arXiv:2302.13971, 2023
2023 arXiv
-
[27]
The llama 3 herd of models,
A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman, A. Mathur, A. Schelten, A. Yang, A. Fanet al., “The llama 3 herd of models,”arXiv preprint arXiv:2407.21783, 2024
2024 arXiv
-
[28]
Is your code generated by ChatGPT really correct? rigorous evaluation of large language models for code generation,
J. Liu, C. S. Xia, Y . Wang, and L. Zhang, “Is your code generated by ChatGPT really correct? rigorous evaluation of large language models for code generation,”Advances in neural information processing systems, vol. 36, 2024
2024
-
[29]
Preprocessing techniques in character recognition,
Y . Alginahiet al., “Preprocessing techniques in character recognition,” Character recognition, pp. 1–19, 2010
2010
-
[30]
An additional 1,440 minutes: What will you do with an extra day?
J. A. Newland, “An additional 1,440 minutes: What will you do with an extra day?”The Nurse Practitioner, vol. 49, no. 2, p. 4, 2024
2024
-
[31]
An overview of the tesseract ocr engine,
R. Smith, “An overview of the tesseract ocr engine,” inNinth international conference on document analysis and recognition (ICDAR 2007), vol. 2. IEEE, 2007, pp. 629–633. [Online]. Available: https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4376991&casa token=MZFZGdZ0YhwAAA...
2007
-
[32]
Visual instruction tuning,
H. Liu, C. Li, Q. Wu, and Y . J. Lee, “Visual instruction tuning,” Advances in neural information processing systems, vol. 36, 2024
2024
-
[33]
Construe/tis: A system for content- based indexing of a database of news stories
P. J. Hayes and S. P. Weinstein, “Construe/tis: A system for content- based indexing of a database of news stories.” inIAAI, vol. 90, 1990, pp. 49–64
1990
Reviewed August 15, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.