{"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/sequence-to-set-generative-models","title":"Sequence-to-Set Generative Models","arxiv_id":"2209.08801","date":"2022-09-19","proceeding":null,"authors":["Longtao Tang","Ying Zhou","Yu Yang"],"abstract":"In this paper, we propose a sequence-to-set method that can transform any sequence generative model based on maximum likelihood to a set generative model where we can evaluate the utility/probability of any set. An efficient importance sampling algorithm is devised to tackle the computational challenge of learning our sequence-to-set model. We present GRU2Set, which is an instance of our sequence-to-set method and employs the famous GRU model as the sequence generative model. To further obtain permutation invariant representation of sets, we devise the SetNN model which is also an instance of the sequence-to-set model. A direct application of our models is to learn an order/set distribution from a collection of e-commerce orders, which is an essential step in many important operational decisions such as inventory arrangement for fast delivery. Based on the intuition that small-sized sets are usually easier to learn than large sets, we propose a size-bias trick that can help learn better set distributions with respect to the $\\ell_1$-distance evaluation metric. Two e-commerce order datasets, TMALL and HKTVMALL, are used to conduct extensive experiments to show the effectiveness of our models. The experimental results demonstrate that our models can learn better set/order distributions from order data than the baselines. Moreover, no matter what model we use, applying the size-bias trick can always improve the quality of the set distribution learned from data.","url_abs":"https://arxiv.org/abs/2209.08801v1","url_pdf":"https://arxiv.org/pdf/2209.08801v1.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":"sequence-to-set-generative-models","repo_url":"https://github.com/longtaotang/setlearning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"gru","method_name":"GRU"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2209.08801","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.08801"}},"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":"deterministic:regex_extraction","url":"https://github.com/LongtaoTang/SetLearning","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/longtaotang/setlearning","reach":{"status":"ok"}}],"summary":{"ran":2,"unverified":4},"by_repo_kind":{"official":{"samples":6,"ran":2,"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":6,"samples":[{"code_sha256_prefix":"fbd10db9fc42acc0","entry":"GRUNet","repo":"longtaotang/setlearning","repo_kind":"official","path":"SubsetLearningFramework/GRUv2.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/SubsetLearningFramework/GRUv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fbd10db9fc42acc0"}},{"code_sha256_prefix":"6f42353a3663ca4e","entry":"GRUStateV2","repo":"longtaotang/setlearning","repo_kind":"official","path":"SubsetLearningFramework/GRUv2.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/SubsetLearningFramework/GRUv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6f42353a3663ca4e"}},{"code_sha256_prefix":"5b6a0f886571841a","entry":"GRUmodelV2","repo":"longtaotang/setlearning","repo_kind":"official","path":"SubsetLearningFramework/GRUv2.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/SubsetLearningFramework/GRUv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b6a0f886571841a"}},{"code_sha256_prefix":"08fd47a7f4f73c08","entry":"State","repo":"longtaotang/setlearning","repo_kind":"official","path":"SubsetLearningFramework/GRUv2.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/SubsetLearningFramework/GRUv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"08fd47a7f4f73c08"}},{"code_sha256_prefix":"d5109f36830f8036","entry":"SubsetLearningFramework","repo":"longtaotang/setlearning","repo_kind":"official","path":"SubsetLearningFramework/GRUv2.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/SubsetLearningFramework/GRUv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5109f36830f8036"}},{"code_sha256_prefix":"dac4293cef446a2a","entry":"l1_distance","repo":"longtaotang/setlearning","repo_kind":"official","path":"utility/metric.py","file_url":"https://github.com/longtaotang/setlearning/blob/HEAD/utility/metric.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dac4293cef446a2a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}