Hierarchical Deep Learning Framework for Daily Living Activity Recognition in Smart Homes: Addressing Class Imbalance Through Dual-Path Feature Fusion and Focal Loss Optimization | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Hierarchical Deep Learning Framework for Daily Living Activity Recognition in Smart Homes: Addressing Class Imbalance Through Dual-Path Feature Fusion and Focal Loss Optimization Shaily Garg, Rohini Mahajan, Arjun Singh Rawat, Lovish Bhatia, and 2 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8618463/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract The ability to recognize users’ activities within their homes is essential for enabling assisted living and proactive health monitoring through sensor-based systems. However, in real-world smart home deployments, activity distributions are highly imbalanced: routine daily activities dominate the data, while critical yet infrequent activities remain under-represented. This imbalance significantly limits the generalization capability of conventional machine learning models. In this paper, we propose a deep learning architecture specifically designed to address class imbalance in streaming sensor data. The proposed framework employs a dual-path feature extraction mechanism that integrates hand-crafted statistical features (HCF) with high-level features (HLF) learned using Convolutional Neural Networks (CNNs). The resulting multimodal feature representations are then processed by an ensemble of temporal recurrent architectures, including (i) unidirectional Long Short-Term Memory (LSTM), (ii) Bidirectional LSTM (BiLSTM), and (iii) cascade LSTM layers. To further mitigate the effects of class imbalance, we introduce a specialized focal loss function, denoted as LDLA, which dynamically down-weights the contribution of majority classes during training. Extensive experimental evaluations conducted on five benchmark datasets from the Center for Advanced Sensors and Autonomous Systems (CASAS) demonstrate that the BiLSTM model combined with the proposed focal loss consistently outperforms traditional classifiers. Specifically, it achieves an improvement of 17% to 32% in overall accuracy while maintaining high precision and recall for minority activity classes. Bi-LSTM Smart Home Deep Learning Class Imbalance Focal Loss Activity Recognition Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8618463","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":576668499,"identity":"875a0e83-70f4-42f0-afee-b984781a578b","order_by":0,"name":"Shaily Garg","email":"","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":false,"prefix":"","firstName":"Shaily","middleName":"","lastName":"Garg","suffix":""},{"id":576668506,"identity":"f82b6b7f-3f50-4c51-9b43-e3c318ffc28e","order_by":1,"name":"Rohini Mahajan","email":"","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":false,"prefix":"","firstName":"Rohini","middleName":"","lastName":"Mahajan","suffix":""},{"id":576668510,"identity":"8dd981c9-5881-494c-9afa-ad729046a1a4","order_by":2,"name":"Arjun Singh Rawat","email":"","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":false,"prefix":"","firstName":"Arjun","middleName":"Singh","lastName":"Rawat","suffix":""},{"id":576668519,"identity":"6ec3e76a-8dd7-4409-bb5a-f55a967a4d72","order_by":3,"name":"Lovish Bhatia","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA3ElEQVRIiWNgGAWjYBACPiA+wNhwgJmNvQHINLAgrIUNqoWdj+cASIsEcVoYgFr45SQSQExitLD3GB78ueOONJvk86sbfhRIMPC3dyfg18JzxuAw75lnxmzSOWU3e4AOkzhzdgN+LRJpCYcZ2w4nA7Wk3eABajGQyCWs5eDPtsP1bZJn0m7+IU5L8oEDvG2Hmdkk2I/dJs4WnsMHDvO2PWNm48lhuy1jIMFD0C/87I3NH3+23WGWbz/+7OabPzZy/O29+LUgAR4DMEmschBgf0CK6lEwCkbBKBhBAAAml0cW3misegAAAABJRU5ErkJggg==","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":true,"prefix":"","firstName":"Lovish","middleName":"","lastName":"Bhatia","suffix":""},{"id":576668541,"identity":"defce129-1225-4b17-aad0-aa23ed024f35","order_by":4,"name":"Geeta Sikka","email":"","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":false,"prefix":"","firstName":"Geeta","middleName":"","lastName":"Sikka","suffix":""},{"id":576668553,"identity":"962ecf9a-9da2-4b88-ba31-d9c16aff3973","order_by":5,"name":"Ajay K Sharma","email":"","orcid":"","institution":"National Institute of Technology Delhi","correspondingAuthor":false,"prefix":"","firstName":"Ajay","middleName":"K","lastName":"Sharma","suffix":""}],"badges":[],"createdAt":"2026-01-16 11:44:49","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8618463/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8618463/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":106629382,"identity":"71b98a58-12ea-4deb-82c0-9baf6acc747f","added_by":"auto","created_at":"2026-04-10 15:27:16","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":4027368,"visible":true,"origin":"","legend":"","description":"","filename":"classImbalance.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8618463/v1_covered_64be1b14-699c-4073-baf4-37100f197417.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Hierarchical Deep Learning Framework for Daily Living Activity Recognition in Smart Homes: Addressing Class Imbalance Through Dual-Path Feature Fusion and Focal Loss Optimization","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Bi-LSTM, Smart Home, Deep Learning, Class Imbalance, Focal Loss, Activity Recognition","lastPublishedDoi":"10.21203/rs.3.rs-8618463/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8618463/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"The ability to recognize users’ activities within their homes is essential for enabling assisted living and proactive health monitoring through sensor-based systems. However, in real-world smart home deployments, activity distributions are highly imbalanced: routine daily activities dominate the data, while critical yet infrequent activities remain under-represented. This imbalance significantly limits the generalization capability of conventional machine learning models. In this paper, we propose a deep learning architecture specifically designed to address class imbalance in streaming sensor data. The proposed framework employs a dual-path feature extraction mechanism that integrates hand-crafted statistical features (HCF) with high-level features (HLF) learned using Convolutional Neural Networks (CNNs). The resulting multimodal feature representations are then processed by an ensemble of temporal recurrent architectures, including (i) unidirectional Long Short-Term Memory (LSTM), (ii) Bidirectional LSTM (BiLSTM), and (iii) cascade LSTM layers. To further mitigate the effects of class imbalance, we introduce a specialized focal loss function, denoted as LDLA, which dynamically down-weights the contribution of majority classes during training. Extensive experimental evaluations conducted on five benchmark datasets from the Center for Advanced Sensors and Autonomous Systems (CASAS) demonstrate that the BiLSTM model combined with the proposed focal loss consistently outperforms traditional classifiers. Specifically, it achieves an improvement of 17% to 32% in overall accuracy while maintaining high precision and recall for minority activity classes.","manuscriptTitle":"Hierarchical Deep Learning Framework for Daily Living Activity Recognition in Smart Homes: Addressing Class Imbalance Through Dual-Path Feature Fusion and Focal Loss Optimization","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-20 12:10:05","doi":"10.21203/rs.3.rs-8618463/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"3e725c67-b974-4057-9249-562eb17340ab","owner":[],"postedDate":"March 20th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-04-10T15:26:02+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-20 12:10:05","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8618463","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8618463","identity":"rs-8618463","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.