{"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/devil-is-in-the-uniformity-exploring-diverse","title":"Devil is in the Uniformity: Exploring Diverse Learners within Transformer for Image Restoration","arxiv_id":"2503.20174","date":"2025-03-26","proceeding":null,"authors":["Shihao Zhou","Dayu Li","Jinshan Pan","Juncheng Zhou","Jinglei Shi","Jufeng Yang"],"abstract":"Transformer-based approaches have gained significant attention in image restoration, where the core component, i.e, Multi-Head Attention (MHA), plays a crucial role in capturing diverse features and recovering high-quality results. In MHA, heads perform attention calculation independently from uniform split subspaces, and a redundancy issue is triggered to hinder the model from achieving satisfactory outputs. In this paper, we propose to improve MHA by exploring diverse learners and introducing various interactions between heads, which results in a Hierarchical multI-head atteNtion driven Transformer model, termed HINT, for image restoration. HINT contains two modules, i.e., the Hierarchical Multi-Head Attention (HMHA) and the Query-Key Cache Updating (QKCU) module, to address the redundancy problem that is rooted in vanilla MHA. Specifically, HMHA extracts diverse contextual features by employing heads to learn from subspaces of varying sizes and containing different information. Moreover, QKCU, comprising intra- and inter-layer schemes, further reduces the redundancy problem by facilitating enhanced interactions between attention heads within and across layers. Extensive experiments are conducted on 12 benchmarks across 5 image restoration tasks, including low-light enhancement, dehazing, desnowing, denoising, and deraining, to demonstrate the superiority of HINT. The source code is available in the supplementary materials.","url_abs":"https://arxiv.org/abs/2503.20174v1","url_pdf":"https://arxiv.org/pdf/2503.20174v1.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":"devil-is-in-the-uniformity-exploring-diverse","repo_url":"https://github.com/joshyZhou/HINT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"rain-removal","task_name":"Rain Removal"}],"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":"hint","method_name":"HINT"},{"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=2503.20174","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.20174"}},"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/joshyZhou/HINT","reach":null}],"summary":{"ran":3,"unverified":4},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"5cf65a1f653cb88f","entry":"CalculateCurrentLayerCache","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"5cf65a1f653cb88f"}},{"code_sha256_prefix":"a29718baf718f824","entry":"Intra_CacheModulation","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a29718baf718f824"}},{"code_sha256_prefix":"1278980045fa2701","entry":"ReGroup","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"1278980045fa2701"}},{"code_sha256_prefix":"c5a0abf39590344f","entry":"Attention","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"c5a0abf39590344f"}},{"code_sha256_prefix":"7bc89bca33cae58c","entry":"HINT","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"7bc89bca33cae58c"}},{"code_sha256_prefix":"7ea2ebc651380844","entry":"Inter_CacheModulation","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"7ea2ebc651380844"}},{"code_sha256_prefix":"888eb051383154ce","entry":"TransformerBlock","repo":"joshyZhou/HINT","repo_kind":"official","path":"basicsr/models/archs/HINT_arch.py","file_url":"https://github.com/joshyZhou/HINT/blob/HEAD/basicsr/models/archs/HINT_arch.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":"888eb051383154ce"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}