{"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/token-prediction-as-implicit-classification","title":"Token Prediction as Implicit Classification to Identify LLM-Generated Text","arxiv_id":"2311.08723","date":"2023-11-15","proceeding":null,"authors":["Yutian Chen","Hao Kang","Vivian Zhai","Liangze Li","Rita Singh","Bhiksha Raj"],"abstract":"This paper introduces a novel approach for identifying the possible large language models (LLMs) involved in text generation. Instead of adding an additional classification layer to a base LM, we reframe the classification task as a next-token prediction task and directly fine-tune the base LM to perform it. We utilize the Text-to-Text Transfer Transformer (T5) model as the backbone for our experiments. We compared our approach to the more direct approach of utilizing hidden states for classification. Evaluation shows the exceptional performance of our method in the text classification task, highlighting its simplicity and efficiency. Furthermore, interpretability studies on the features extracted by our model reveal its ability to differentiate distinctive writing styles among various LLMs even in the absence of an explicit classifier. We also collected a dataset named OpenLLMText, containing approximately 340k text samples from human and LLMs, including GPT3.5, PaLM, LLaMA, and GPT2.","url_abs":"https://arxiv.org/abs/2311.08723v1","url_pdf":"https://arxiv.org/pdf/2311.08723v1.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":"token-prediction-as-implicit-classification","repo_url":"https://github.com/markchenyutian/t5-sentinel-public","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"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":"base","method_name":"BASE"},{"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":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"palm","method_name":"PaLM"},{"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=2311.08723","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.08723"}},"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/markchenyutian/t5-sentinel-public","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/MarkChenYutian/T5-Sentinel-public","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":3,"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":"f8ef5f7c3db1a340","entry":"argeq","repo":"markchenyutian/t5-sentinel-public","repo_kind":"official","path":"evaluator/models/t5_sentinel/t5_get_hidden_states.py","file_url":"https://github.com/markchenyutian/t5-sentinel-public/blob/HEAD/evaluator/models/t5_sentinel/t5_get_hidden_states.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":"f8ef5f7c3db1a340"}},{"code_sha256_prefix":"4d06f96ea485f098","entry":"list_reduce","repo":"markchenyutian/t5-sentinel-public","repo_kind":"official","path":"evaluator/models/t5_sentinel/t5_get_hidden_states.py","file_url":"https://github.com/markchenyutian/t5-sentinel-public/blob/HEAD/evaluator/models/t5_sentinel/t5_get_hidden_states.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":"4d06f96ea485f098"}},{"code_sha256_prefix":"1a6fb91bef271314","entry":"memoize","repo":"markchenyutian/t5-sentinel-public","repo_kind":"official","path":"memoizer/memoizer.py","file_url":"https://github.com/markchenyutian/t5-sentinel-public/blob/HEAD/memoizer/memoizer.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":"1a6fb91bef271314"}},{"code_sha256_prefix":"6668016faa304e65","entry":"Sentinel","repo":"MarkChenYutian/T5-Sentinel-public","repo_kind":"official","path":"detector/t5_sentinel/model.py","file_url":"https://github.com/MarkChenYutian/T5-Sentinel-public/blob/HEAD/detector/t5_sentinel/model.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":"6668016faa304e65"}},{"code_sha256_prefix":"cbdf08bcf97ba9b2","entry":"SentinelOutput","repo":"MarkChenYutian/T5-Sentinel-public","repo_kind":"official","path":"detector/t5_sentinel/model.py","file_url":"https://github.com/MarkChenYutian/T5-Sentinel-public/blob/HEAD/detector/t5_sentinel/model.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":"cbdf08bcf97ba9b2"}},{"code_sha256_prefix":"888a361361dbd102","entry":"binary_eq","repo":"markchenyutian/t5-sentinel-public","repo_kind":"official","path":"evaluator/models/t5_sentinel/t5_get_hidden_states.py","file_url":"https://github.com/markchenyutian/t5-sentinel-public/blob/HEAD/evaluator/models/t5_sentinel/t5_get_hidden_states.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":"888a361361dbd102"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}