{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/regression-transformer-concurrent-conditional","title":"Regression Transformer: Concurrent sequence regression and generation for molecular language modeling","arxiv_id":"2202.01338","date":"2022-02-01","proceeding":null,"authors":["Jannis Born","Matteo Manica"],"abstract":"Despite significant progress of generative models in the natural sciences, their controllability remains challenging. One fundamentally missing aspect of molecular or protein generative models is an inductive bias that can reflect continuous properties of interest. To that end, we propose the Regression Transformer (RT), a novel method that abstracts regression as a conditional sequence modeling problem. This introduces a new paradigm of multitask language models which seamlessly bridge sequence regression and conditional sequence generation. We thoroughly demonstrate that, despite using a nominal-scale training objective, the RT matches or surpasses the performance of conventional regression models in property prediction tasks of small molecules, proteins and chemical reactions. Critically, priming the same model with continuous properties yields a highly competitive conditional generative model that outperforms specialized approaches in a substructure-constrained, property-driven molecule generation benchmark. Our dichotomous approach is facilitated by a novel, alternating training scheme that enables the model to decorate seed sequences by desired properties, e.g., to optimize reaction yield. In sum, the RT is the first report of a multitask model that concurrently excels at predictive and generative tasks in biochemistry. This finds particular application in property-driven, local exploration of the chemical or protein space and could pave the road toward foundation models in material design. The code to reproduce all experiments of the paper is available at: https://github.com/IBM/regression-transformer","url_abs":"https://arxiv.org/abs/2202.01338v3","url_pdf":"https://arxiv.org/pdf/2202.01338v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"regression-transformer-concurrent-conditional","repo_url":"https://github.com/ibm/regression-transformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"conditional-text-generation","task_name":"Conditional Text Generation"},{"task_slug":"inductive-bias","task_name":"Inductive Bias"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"property-prediction","task_name":"Property Prediction"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"sentencepiece","method_name":"SentencePiece"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"xlnet","method_name":"XLNet"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.01338","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.01338"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ibm/regression-transformer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"100e9f3b953bcfb6","entry":"compute_topk","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/nlp.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/nlp.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"100e9f3b953bcfb6"}},{"code_sha256_prefix":"24afafc0ea6c786a","entry":"get_dataset","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/datasets.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"24afafc0ea6c786a"}},{"code_sha256_prefix":"9646da7dc237e893","entry":"get_float_encoding","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/numerical_encodings.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/numerical_encodings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9646da7dc237e893"}},{"code_sha256_prefix":"290f0252f9af1408","entry":"get_full_float_encoding","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/numerical_encodings.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/numerical_encodings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"290f0252f9af1408"}},{"code_sha256_prefix":"81a43a8a922be123","entry":"get_int_encoding","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/numerical_encodings.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/numerical_encodings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"81a43a8a922be123"}},{"code_sha256_prefix":"9f88ac0aac4b7c4e","entry":"get_mask","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/collator_utils.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/collator_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f88ac0aac4b7c4e"}},{"code_sha256_prefix":"74a9c516c326e6ce","entry":"get_permutation_order","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/collator_utils.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/collator_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74a9c516c326e6ce"}},{"code_sha256_prefix":"8953d3949889abaa","entry":"parse_humicroedit","repo":"ibm/regression-transformer","repo_kind":"official","path":"terminator/nlp.py","file_url":"https://github.com/ibm/regression-transformer/blob/HEAD/terminator/nlp.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8953d3949889abaa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}