{"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/mist-cf-chemical-formula-inference-from","title":"MIST-CF: Chemical formula inference from tandem mass spectra","arxiv_id":"2307.08240","date":"2023-07-17","proceeding":null,"authors":["Samuel Goldman","Jiayi Xin","Joules Provenzano","Connor W. Coley"],"abstract":"Chemical formula annotation for tandem mass spectrometry (MS/MS) data is the first step toward structurally elucidating unknown metabolites. While great strides have been made toward solving this problem, the current state-of-the-art method depends on time-intensive, proprietary, and expert-parameterized fragmentation tree construction and scoring. In this work we extend our previous spectrum Transformer methodology into an energy based modeling framework, MIST-CF, for learning to rank chemical formula and adduct assignments given an unannotated MS/MS spectrum. Importantly, MIST-CF learns in a data dependent fashion using a Formula Transformer neural network architecture and circumvents the need for fragmentation tree construction. We train and evaluate our model on a large open-access database, showing an absolute improvement of 10% top 1 accuracy over other neural network architectures. We further validate our approach on the CASMI2022 challenge dataset, achieving nearly equivalent performance to the winning entry within the positive mode category without any manual curation or post-processing of our results. These results demonstrate an exciting strategy to more powerfully leverage MS2 fragment peaks for predicting MS1 precursor chemical formula with data driven learning.","url_abs":"https://arxiv.org/abs/2307.08240v1","url_pdf":"https://arxiv.org/pdf/2307.08240v1.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":"mist-cf-chemical-formula-inference-from","repo_url":"https://github.com/samgoldman97/mist-cf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"learning-to-rank","task_name":"Learning-To-Rank"}],"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":"fragmentation","method_name":"Fragmentation"},{"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":"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":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.08240","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.08240"}},"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/samgoldman97/mist-cf","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":13,"ran_violates":1,"unverified":3},"by_repo_kind":{"official":{"samples":17,"ran":14,"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":"3d86f40324ba0a2c","entry":"clamped_log_np","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/misc_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/misc_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d86f40324ba0a2c"}},{"code_sha256_prefix":"a9cd3385008cabd7","entry":"cm2inch","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/plot_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/plot_utils.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9cd3385008cabd7"}},{"code_sha256_prefix":"bb4baa6a14cd5d15","entry":"extract_ar","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/fast_form_score/fast_form_data.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/fast_form_score/fast_form_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb4baa6a14cd5d15"}},{"code_sha256_prefix":"2b795c71fe9f09a2","entry":"get_data_dir","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/misc_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/misc_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2b795c71fe9f09a2"}},{"code_sha256_prefix":"7a4efff97c96f932","entry":"get_instr_idx","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/chem_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/chem_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7a4efff97c96f932"}},{"code_sha256_prefix":"c8defd5c0d9ea9f0","entry":"get_instr_tol","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/chem_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/chem_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c8defd5c0d9ea9f0"}},{"code_sha256_prefix":"6c5e73cb477c83f7","entry":"get_ion_idx","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/chem_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/chem_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c5e73cb477c83f7"}},{"code_sha256_prefix":"7ec3536d0ceb8542","entry":"get_rounded_masses","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/decomp/sirius_decomp.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/decomp/sirius_decomp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7ec3536d0ceb8542"}},{"code_sha256_prefix":"4f7b84bcfae202f9","entry":"get_splits","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/splitter.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/splitter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f7b84bcfae202f9"}},{"code_sha256_prefix":"ec84a9ba70c311b1","entry":"max_thresh_spec","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/parse_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/parse_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ec84a9ba70c311b1"}},{"code_sha256_prefix":"b6896b30b438c83d","entry":"parse_element_str","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/decomp/sirius_decomp.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/decomp/sirius_decomp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6896b30b438c83d"}},{"code_sha256_prefix":"a52ac883c5ef6b19","entry":"process_spec_file","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/parse_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/parse_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a52ac883c5ef6b19"}},{"code_sha256_prefix":"1ce22fc7117ae7bd","entry":"random_split","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/splitter.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/splitter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1ce22fc7117ae7bd"}},{"code_sha256_prefix":"3338dabc50f8f122","entry":"unravel_index","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/misc_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/misc_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3338dabc50f8f122"}},{"code_sha256_prefix":"6bf05accd83a54c0","entry":"chunked_parallel","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/parallel_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/parallel_utils.py","link_basis":"first_harvest_node","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":"6bf05accd83a54c0"}},{"code_sha256_prefix":"6640791d28598124","entry":"process_spec_file_unbinned","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/parse_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/parse_utils.py","link_basis":"first_harvest_node","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":"6640791d28598124"}},{"code_sha256_prefix":"4d717f8f5be31876","entry":"simple_parallel","repo":"samgoldman97/mist-cf","repo_kind":"official","path":"src/mist_cf/common/parallel_utils.py","file_url":"https://github.com/samgoldman97/mist-cf/blob/HEAD/src/mist_cf/common/parallel_utils.py","link_basis":"first_harvest_node","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":"4d717f8f5be31876"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}