{"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/arxiv-2605-30415","title":"Domain Adaptation and Reasoning Frameworks in Language Models: A Controlled Experiment with Historical Cosmology","arxiv_id":"2605.30415","date":"2026-05-28","proceeding":null,"authors":["Francesco De Bernardis"],"abstract":"We investigate how domain adaptation reshapes explanatory behavior in language models using historical cosmology as a controlled setting. In Phase 1, we train a small language model from scratch on a pre-Copernican corpus from which explicit heliocentric references were removed, and evaluate whether Earth-motion or heliocentric continuations nevertheless emerge. In Phase 2, we fine-tune a larger pretrained model using QLoRA on the same corpus in order to study how adaptation modifies explanatory framing and cosmological stance. Model outputs are evaluated using an LLM-as-judge framework that labels both cosmological stance (geocentric, heliocentric, or ambiguous) and explanatory frame (premodern versus modern). In the constrained setting of Phase 1, the smaller models occasionally generate local Earth-motion continuations, but these remain globally unstable and insufficient to support coherent cosmological reasoning. In Phase 2, fine-tuning induces a large and statistically significant shift toward premodern explanatory framing, while the conditional cosmological stance distributions remain comparatively stable within those frames. As a result, increases in geocentric outputs arise primarily from redistribution over explanatory regimes rather than from direct modification of stance. These results suggest that domain adaptation may primarily reshape the linguistic frameworks from which continuations are generated, with changes in stance emerging secondarily from those shifts.","url_abs":"https://arxiv.org/abs/2605.30415","url_pdf":"https://arxiv.org/pdf/2605.30415","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2605.30415","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.30415"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/fdeberna/chat-ptolemaic","reach":null}],"summary":{"ran":22,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":27,"ran":22,"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":27,"samples":[{"code_sha256_prefix":"a8685c36310c970c","entry":"apply_overrides","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/config_utils.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/config_utils.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":"a8685c36310c970c"}},{"code_sha256_prefix":"6d9ed8d69f584611","entry":"apply_repetition_penalty","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/model.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/model.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":"6d9ed8d69f584611"}},{"code_sha256_prefix":"0d42b9d7998bd299","entry":"build_user_prompt","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_eval.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":"0d42b9d7998bd299"}},{"code_sha256_prefix":"10de1588f2490205","entry":"category_key","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_eval.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":"10de1588f2490205"}},{"code_sha256_prefix":"4ef67d6db8cbccf1","entry":"clean_prompt_line","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/generate_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/generate_eval.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":"4ef67d6db8cbccf1"}},{"code_sha256_prefix":"3f0150bc77a1f7b1","entry":"ensure_output_mode","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_qwen_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_qwen_eval.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":"3f0150bc77a1f7b1"}},{"code_sha256_prefix":"e534c33b50004b25","entry":"get_banned_tokens_ngram","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/model.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/model.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":"e534c33b50004b25"}},{"code_sha256_prefix":"1ae7bdf68d4e0be6","entry":"load_completed_identities","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_qwen_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_qwen_eval.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":"1ae7bdf68d4e0be6"}},{"code_sha256_prefix":"c4aeb8a9c13aaf88","entry":"load_json_config","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/config_utils.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/config_utils.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":"c4aeb8a9c13aaf88"}},{"code_sha256_prefix":"4027d245a8e4b2a5","entry":"load_prompts","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/generate_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/generate_eval.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":"4027d245a8e4b2a5"}},{"code_sha256_prefix":"e7665179852ea548","entry":"model_key","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_eval.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":"e7665179852ea548"}},{"code_sha256_prefix":"36cf0e5e4724b513","entry":"parse_override","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/config_utils.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/config_utils.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":"36cf0e5e4724b513"}},{"code_sha256_prefix":"dd021d2eef206194","entry":"prepare_single_token_stream","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/dataset.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/dataset.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":"dd021d2eef206194"}},{"code_sha256_prefix":"b3aa40f75f347540","entry":"record_identity","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_eval.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":"b3aa40f75f347540"}},{"code_sha256_prefix":"b19cd4e1c3bcca57","entry":"record_identity","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_qwen_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_qwen_eval.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":"b19cd4e1c3bcca57"}},{"code_sha256_prefix":"4b9bd4b8482a1658","entry":"repo_relative_label","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/generate_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/generate_eval.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":"4b9bd4b8482a1658"}},{"code_sha256_prefix":"3e55b13d845a4a72","entry":"resolve_split_cache_name","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/train_finetune.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/train_finetune.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":"3e55b13d845a4a72"}},{"code_sha256_prefix":"83443ae8f887fd48","entry":"safe_div","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_eval.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":"83443ae8f887fd48"}},{"code_sha256_prefix":"d161ea6d061fc352","entry":"safe_div","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_qwen_judgments.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_qwen_judgments.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":"d161ea6d061fc352"}},{"code_sha256_prefix":"3721c8a1f9d1012c","entry":"safe_rate_or_none","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_qwen_judgments.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_qwen_judgments.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":"3721c8a1f9d1012c"}},{"code_sha256_prefix":"db58f58479dd1ee5","entry":"top_p_filtering","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/model.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/model.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":"db58f58479dd1ee5"}},{"code_sha256_prefix":"226793ee23a4ce7b","entry":"wilson_ci","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"evaluation/summarize_qwen_judgments.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/evaluation/summarize_qwen_judgments.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":"226793ee23a4ce7b"}},{"code_sha256_prefix":"c85e17e07142ae98","entry":"list_text_files","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/dataset.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/dataset.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":"c85e17e07142ae98"}},{"code_sha256_prefix":"f40932735133d20e","entry":"load_checkpoint","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/train_finetune.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/train_finetune.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":"f40932735133d20e"}},{"code_sha256_prefix":"0a52edd0b656ef67","entry":"load_completed_identities","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"judge/judge_eval.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/judge/judge_eval.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":"0a52edd0b656ef67"}},{"code_sha256_prefix":"360f46e6694d2e28","entry":"nested_get","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/train_finetune.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/train_finetune.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":"360f46e6694d2e28"}},{"code_sha256_prefix":"1957a652762deb1a","entry":"prepare_token_streams","repo":"fdeberna/chat-ptolemaic","repo_kind":"found_in_text","path":"pipeline/dataset.py","file_url":"https://github.com/fdeberna/chat-ptolemaic/blob/HEAD/pipeline/dataset.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":"1957a652762deb1a"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}