--- license: apache-2.0 library_name: resyn pipeline_tag: token-classification tags: - regex - regex-synthesis - program-synthesis - pytorch - model_hub_mixin - pytorch_model_hub_mixin - segmenter datasets: - mrseongminkim/ReSyn --- # ReSyn — Segmenter This repository contains the pre-trained **Segmenter** model presented in the paper [ReSyn: A Generalized Recursive Regular Expression Synthesis Framework](https://huggingface.co/papers/2603.24624). ReSyn is a synthesizer-agnostic divide-and-conquer framework that decomposes complex regular expression synthesis problems into manageable sub-problems by adaptively predicting whether to split examples sequentially (Concatenation) or group them by structural similarity (Union). **Segmenter** performs the **Concatenation** decomposition. Given a set of positive example strings, it labels each character with a segment id so that the strings are split into positionally-aligned sub-groups, each of which can be synthesized independently and concatenated back together. ## Links - **Paper:** [ReSyn: A Generalized Recursive Regular Expression Synthesis Framework](https://huggingface.co/papers/2603.24624) - **GitHub Repository:** [mrseongminkim/ReSyn](https://github.com/mrseongminkim/ReSyn) - **Dataset:** [mrseongminkim/ReSyn](https://huggingface.co/datasets/mrseongminkim/ReSyn) ## Usage These are custom PyTorch models that use [`PyTorchModelHubMixin`](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin). The model class is defined in the [GitHub repository](https://github.com/mrseongminkim/ReSyn); clone it first so that the `ReSyn` package is importable, then: ```python from ReSyn.model import Segmenter model = Segmenter.from_pretrained("mrseongminkim/ReSyn-Segmenter").eval() ``` See [`ReSyn/server.py`](https://github.com/mrseongminkim/ReSyn/blob/main/ReSyn/server.py) for the full input encoding / output decoding used at inference time. ## Citation If you find this work useful, please cite: ```bibtex @inproceedings{kim2026resyn, title={ReSyn: A Generalized Recursive Regular Expression Synthesis Framework}, author={Kim, Seongmin and Cheon, Hyunjoon and Kim, Su-Hyeon and Han, Yo-Sub and Ko, Sang-Ki}, booktitle={Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence (IJCAI-26)}, year={2026} } ```