{"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/on-the-effect-of-pre-training-for-transformer","title":"On the Effect of Pre-training for Transformer in Different Modality on Offline Reinforcement Learning","arxiv_id":"2211.09817","date":"2022-11-17","proceeding":null,"authors":["Shiro Takagi"],"abstract":"We empirically investigate how pre-training on data of different modalities, such as language and vision, affects fine-tuning of Transformer-based models to Mujoco offline reinforcement learning tasks. Analysis of the internal representation reveals that the pre-trained Transformers acquire largely different representations before and after pre-training, but acquire less information of data in fine-tuning than the randomly initialized one. A closer look at the parameter changes of the pre-trained Transformers reveals that their parameters do not change that much and that the bad performance of the model pre-trained with image data could partially come from large gradients and gradient clipping. To study what information the Transformer pre-trained with language data utilizes, we fine-tune this model with no context provided, finding that the model learns efficiently even without context information. Subsequent follow-up analysis supports the hypothesis that pre-training with language data is likely to make the Transformer get context-like information and utilize it to solve the downstream task.","url_abs":"https://arxiv.org/abs/2211.09817v1","url_pdf":"https://arxiv.org/pdf/2211.09817v1.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":"on-the-effect-of-pre-training-for-transformer","repo_url":"https://github.com/t46/paper-pre-training-different-modality-offline-rl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"on-the-effect-of-pre-training-for-transformer","repo_url":"https://github.com/t46/pre-training-different-modality-offline-rl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"mujoco","task_name":"MuJoCo"}],"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":"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=2211.09817","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.09817"}},"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/google-research/google-research","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/rail-berkeley/d4rl","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/t46/pre-training-different-modality-offline-rl","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/t46/paper-pre-training-different-modality-offline-rl","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/machelreid/can-wikipedia-help-offline-rl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/gtegner/mine-pytorch","reach":null}],"summary":{"ran_fixture":2,"ran":4,"unverified":8},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":13,"ran":5,"repositories":2}},"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":"0161b27cbe3cc58d","entry":"discount_cumsum","repo":"machelreid/can-wikipedia-help-offline-rl","repo_kind":"found_in_text","path":"code/eval_model.py","file_url":"https://github.com/machelreid/can-wikipedia-help-offline-rl/blob/HEAD/code/eval_model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0161b27cbe3cc58d"}},{"code_sha256_prefix":"0d4fc87c387d9018","entry":"discount_cumsum","repo":"t46/pre-training-different-modality-offline-rl","repo_kind":"official","path":"can-wikipedia-help-offline-rl/experiment.py","file_url":"https://github.com/t46/pre-training-different-modality-offline-rl/blob/HEAD/can-wikipedia-help-offline-rl/experiment.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d4fc87c387d9018"}},{"code_sha256_prefix":"ccc25780948874cb","entry":"clamp","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/carla/carla_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/carla/carla_env.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ccc25780948874cb"}},{"code_sha256_prefix":"0817d0a04cd3f2f1","entry":"get_returns","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/ope.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/ope.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0817d0a04cd3f2f1"}},{"code_sha256_prefix":"ea95f69594dd2e9c","entry":"parse_maze","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/pointmaze/maze_model.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/pointmaze/maze_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea95f69594dd2e9c"}},{"code_sha256_prefix":"ec64670acc5c32df","entry":"ranking_correlation_metric","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/ope.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/ope.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ec64670acc5c32df"}},{"code_sha256_prefix":"b7eec81dfe2b1b23","entry":"compute_distance","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/carla/carla_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/carla/carla_env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b7eec81dfe2b1b23"}},{"code_sha256_prefix":"88d6d21f699682b1","entry":"download_dataset_from_url","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/offline_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/offline_env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88d6d21f699682b1"}},{"code_sha256_prefix":"e14321aa0b5c0b78","entry":"filepath_from_url","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/offline_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/offline_env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e14321aa0b5c0b78"}},{"code_sha256_prefix":"395635db622171fa","entry":"get_keys","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/offline_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/offline_env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"395635db622171fa"}},{"code_sha256_prefix":"1b1a9ee7bf5220cb","entry":"get_optimizer","repo":"machelreid/can-wikipedia-help-offline-rl","repo_kind":"found_in_text","path":"code/utils.py","file_url":"https://github.com/machelreid/can-wikipedia-help-offline-rl/blob/HEAD/code/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":"1b1a9ee7bf5220cb"}},{"code_sha256_prefix":"8e09cf1821466315","entry":"get_optimizer","repo":"machelreid/can-wikipedia-help-offline-rl","repo_kind":"found_in_text","path":"code/lm_cotraining/utils.py","file_url":"https://github.com/machelreid/can-wikipedia-help-offline-rl/blob/HEAD/code/lm_cotraining/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":"8e09cf1821466315"}},{"code_sha256_prefix":"de9c8fb5e38fa8ed","entry":"is_within_distance","repo":"rail-berkeley/d4rl","repo_kind":"found_in_text","path":"d4rl/carla/carla_env.py","file_url":"https://github.com/rail-berkeley/d4rl/blob/HEAD/d4rl/carla/carla_env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"de9c8fb5e38fa8ed"}},{"code_sha256_prefix":"cb4e99dd4b50f69d","entry":"load_tf_weights_in_gpt2","repo":"machelreid/can-wikipedia-help-offline-rl","repo_kind":"found_in_text","path":"code/decision_transformer/models/trajectory_gpt2.py","file_url":"https://github.com/machelreid/can-wikipedia-help-offline-rl/blob/HEAD/code/decision_transformer/models/trajectory_gpt2.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":"cb4e99dd4b50f69d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}