{"id":{"repo_id":"ohiolink","oai_identifier":"oai:etd.ohiolink.edu:case1763308274699537"},"canonical_url":"https://search.ndltd.org/etd/ohiolink/oai:etd.ohiolink.edu:case1763308274699537","repository":{"repo_id":"ohiolink","name":"OhioLINK","base_url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai"},"display":{"title":"Optimized KV-Cache Using Attention Head-Wise Similarity","abstract":"Extended context windows in large language models (32K-1M tokens) have unlocked applications in multi-document analysis and codebase understanding, but the computational costs of managing key value caches remain prohibitive. Semantic clustering addresses this through offline grouping of attention keys for query-dependent sparse loading, but it introduces a critical bottleneck: preprocessing a 32K-token document with LLaMA-2-7B requires over 7 hours on an H100 GPU, limiting practical adoption. We observe that attention heads across layers exhibit substantial redundancy, particularly in middle layers, where different layers produce highly similar attentionpatterns. Our method exploits this redundancy through similarity-based reuse of cluster centroids, guided by adaptive thresholds that protect shallow and deep layers while enabling aggressive reuse in redundant middle layers. We conduct evaluations on three long-context LLMs (LLaMA-2-7B-32K, LongChat-v1.5-7B-32K, LWM-Text-Chat-1M) across eight LongBench tasks. We achieve up to 28.4% reduction in clustering time and 17% average additional memory reduction during inference. Our approach maintains accuracy within 5% of baselines, often matching or exceeding them, making semantic clustering practically deployable for long-context applications at scale.","abstract_html":"Extended context windows in large language models (32K-1M tokens) have unlocked applications in multi-document analysis and codebase understanding, but the computational costs of managing key value caches remain prohibitive. Semantic clustering addresses this through offline grouping of attention keys for query-dependent sparse loading, but it introduces a critical bottleneck: preprocessing a 32K-token document with LLaMA-2-7B requires over 7 hours on an H100 GPU, limiting practical adoption. We observe that attention heads across layers exhibit substantial redundancy, particularly in middle layers, where different layers produce highly similar attentionpatterns. Our method exploits this redundancy through similarity-based reuse of cluster centroids, guided by adaptive thresholds that protect shallow and deep layers while enabling aggressive reuse in redundant middle layers. We conduct evaluations on three long-context LLMs (LLaMA-2-7B-32K, LongChat-v1.5-7B-32K, LWM-Text-Chat-1M) across eight LongBench tasks. We achieve up to 28.4% reduction in clustering time and 17% average additional memory reduction during inference. Our approach maintains accuracy within 5% of baselines, often matching or exceeding them, making semantic clustering practically deployable for long-context applications at scale.","abstract_has_math":false,"creators":["Nakayama , Hiroki"],"institution":"Case Western Reserve University School of Graduate Studies","degree_name":"Master of Sciences","degree_level":"masters","degree_discipline":"EECS - Computer and Information Sciences","degree_department":null,"school":null,"contributors":[],"advisors":["Wang, An"],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026-01-27","date_published":"2026-01-27","updated_at":"2026-11-27T05:02:56Z","subjects":["Computer Science"],"languages":["English"],"rights":["unrestricted","This thesis or dissertation is protected by copyright: some rights reserved. It is licensed for use under a Creative Commons license. Specific terms and permissions are available from this document's record in the OhioLINK ETD Center."],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://rave.ohiolink.edu/etdc/view?acc_num=case1763308274699537","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"http://rave.ohiolink.edu/etdc/view?acc_num=case1763308274699537","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aohiolink%3Aoai%3Aetd.ohiolink.edu%3Acase1763308274699537","prefix":"oai_dc"},"source_record":{"url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Aetd.ohiolink.edu%3Acase1763308274699537","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Wang, An"]},{"key":"dc:creator","label":"Author","values":["Nakayama , Hiroki"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026-01-27"]},{"key":"dc:publisher","label":"Institution","values":["Case Western Reserve University School of Graduate Studies / OhioLINK"]},{"key":"dc:type","label":"Dc Type","values":["Electronic Thesis or Dissertation"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["EECS - Computer and Information Sciences"]},{"key":"thesis:degree_level","label":"Degree Level","values":["masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Sciences"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Case Western Reserve University School of Graduate Studies"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Computer Science"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["English"]},{"key":"dc:rights","label":"Dc Rights","values":["unrestricted","This thesis or dissertation is protected by copyright: some rights reserved. It is licensed for use under a Creative Commons license. Specific terms and permissions are available from this document's record in the OhioLINK ETD Center."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["http://rave.ohiolink.edu/etdc/view?acc_num=case1763308274699537"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Extended context windows in large language models (32K-1M tokens) have unlocked applications in multi-document analysis and codebase understanding, but the computational costs of managing key value caches remain prohibitive. Semantic clustering addresses this through offline grouping of attention keys for query-dependent sparse loading, but it introduces a critical bottleneck: preprocessing a 32K-token document with LLaMA-2-7B requires over 7 hours on an H100 GPU, limiting practical adoption. We observe that attention heads across layers exhibit substantial redundancy, particularly in middle layers, where different layers produce highly similar attentionpatterns. Our method exploits this redundancy through similarity-based reuse of cluster centroids, guided by adaptive thresholds that protect shallow and deep layers while enabling aggressive reuse in redundant middle layers. We conduct evaluations on three long-context LLMs (LLaMA-2-7B-32K, LongChat-v1.5-7B-32K, LWM-Text-Chat-1M) across eight LongBench tasks. We achieve up to 28.4% reduction in clustering time and 17% average additional memory reduction during inference. Our approach maintains accuracy within 5% of baselines, often matching or exceeding them, making semantic clustering practically deployable for long-context applications at scale."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf","2.15 MB"]},{"key":"dc:title","label":"Title","values":["Optimized KV-Cache Using Attention Head-Wise Similarity"]}]}],"canonical_facts":{"dc:contributor.advisor":["Wang, An"],"dc:creator":["Nakayama , Hiroki"],"dc:date":["2026-01-27"],"dc:description":["Extended context windows in large language models (32K-1M tokens) have unlocked applications in multi-document analysis and codebase understanding, but the computational costs of managing key value caches remain prohibitive. Semantic clustering addresses this through offline grouping of attention keys for query-dependent sparse loading, but it introduces a critical bottleneck: preprocessing a 32K-token document with LLaMA-2-7B requires over 7 hours on an H100 GPU, limiting practical adoption. We observe that attention heads across layers exhibit substantial redundancy, particularly in middle layers, where different layers produce highly similar attentionpatterns. Our method exploits this redundancy through similarity-based reuse of cluster centroids, guided by adaptive thresholds that protect shallow and deep layers while enabling aggressive reuse in redundant middle layers. We conduct evaluations on three long-context LLMs (LLaMA-2-7B-32K, LongChat-v1.5-7B-32K, LWM-Text-Chat-1M) across eight LongBench tasks. We achieve up to 28.4% reduction in clustering time and 17% average additional memory reduction during inference. Our approach maintains accuracy within 5% of baselines, often matching or exceeding them, making semantic clustering practically deployable for long-context applications at scale."],"dc:format":["application/pdf","2.15 MB"],"dc:identifier":["http://rave.ohiolink.edu/etdc/view?acc_num=case1763308274699537"],"dc:language":["English"],"dc:publisher":["Case Western Reserve University School of Graduate Studies / OhioLINK"],"dc:rights":["unrestricted","This thesis or dissertation is protected by copyright: some rights reserved. It is licensed for use under a Creative Commons license. Specific terms and permissions are available from this document's record in the OhioLINK ETD Center."],"dc:subject":["Computer Science"],"dc:title":["Optimized KV-Cache Using Attention Head-Wise Similarity"],"dc:type":["Electronic Thesis or Dissertation"],"thesis:degree_discipline":["EECS - Computer and Information Sciences"],"thesis:degree_level":["masters"],"thesis:degree_name":["Master of Sciences"],"thesis:institution_name":["Case Western Reserve University School of Graduate Studies"]},"updated_at":"2026-11-27T05:02:56Z"}