[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-160320-en":3,"doc-seo-160320-105":30,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},160320,8796095027276,"wps_ap_test_251126_0180","https://avatar.qwps.com/avatar/d3BzX2FwX3Rlc3RfMjUxMTI2XzAxODA=",4,"Exam","USC CSCI 467 - Intro to Machine Learning - Final Exam - December 7, 2023","Final examination for USC CSCI 467, Intro to Machine Learning (Fall 2023), held on December 7, 2023 (2:00–4:00pm) with instructor Robin Jia. The exam contains seven questions totaling 150 points, focused on foundational machine learning concepts including k-means clustering and global optimality, transformer self-attention and multi-headed attention behavior, and linear models with PCA for high-dimensional medical data. Students are instructed to answer in provided spaces and may use scratch work only on page backs.","| USC CSCI 467\u003Cbr>Intro to Machine Learning | Final Exam\u003Cbr>December 7, 2023, 2:00-4:00pm | Fall 2023 Instructor: Robin Jia |\n| --- | --- | --- |\n\nName:    \n[USC e-mail: ](USC e-mail:   @usc.edu)[ ](USC e-mail:   @usc.edu)[ @usc.edu](USC e-mail:   @usc.edu)  \n[Answer the questions in the spaces provided.](Answer the questions in the spaces provided. If you run out of space)[ If you run out of space](Answer the questions in the spaces provided. If you run out of space), [continue your work](continue your work)[ ](continue your work)[on the last two pages](on the last two pages), [and indicate that your answer is there](and indicate that your answer is there). You may use the backs of pages for scratch work only. Please use pen for ease of grading. This exam has 7 questions, for a total of 150 points.  \nThis content is protected and may not be shared, uploaded, or distributed. Page 1 of 20  \nQuestion 1: K-Means and Global Optima (26 points)  \nRecall the k-means objective function is  \nn  \nL (z1:n,µ1:k) =X 􀀍 x (i) − µzi 􀀍  \ni=1  \n2  \n,  \nwhere z1:n are the cluster assignments, µ 1:k are the corresponding cluster centroids, and x (i) is the i-th input datapoint. Now consider the following dataset consisting of three datapoints ina 2-D plane: {(0, 3) ,(0 , 0) ,(4 , 0)} .  \n(a) (6 points) Suppose you run k-means with k = 2 and have the initial cluster centers be µ 1 = (4 , 0) and µ2 = (0 , 3) . What will be the final cluster centers when k-means converges? Show your work and explain how you know that k-means has converged.  \n(b) (6 points) Prove that the above initialization converges to the global minimum for k = 2 .(Hint: Enumerate over all possible cluster assignments and compute the objective for each assignment.)  \nThis content is protected and may not be shared, uploaded, or distributed. Page 2 of 20  \n(c) (6 points) Suppose we pick two distinct datapoints (out of the three datapoints) uniformly at random as the cluster centers at initialization. Will k-means always converge to the global minimum on this dataset? Justify your answer.  \nThis content is protected and may not be shared, uploaded, or distributed. Page 3 of 20  \n(d) For this question, you may not use k-means as an answer for either part.  \ni. (4 points) Name one machine learning method from class (not including k-means) that is guaranteed to converge to the global optimum of its objective function. Explain why it is guaranteed.  \nii. (4 points) Name one machine learning method from class (not including k-means) that is not guaranteed to converge to the global optimum of its objective function. Explain why it is not guaranteed.  \nThis content is protected and may not be shared, uploaded, or distributed. Page 4 of 20  \nQuestion 2: Transformers and Multi-Headed Attention (24 points)  \nConsider a Transformer model with a single 1-headed self-attention layer. As input, we pass in four words, each represented with an embedding of dimension 2 . That is, the inputs are vectors w 1 , w2 , w3 , w4 ∈ R2 .  \nThe single headed self-attention layer is parameterized by matrices K, Q, V ∈ R2 ×2 . For each wi, the key, query, and value vectors are defined as ki = Kwi , qi = Qwi, and vi = V wi , respectively. For simplicity, we provide the following values:  \nq1 = 􀀔37􀀕 k 1 = 􀀔 112􀀕 v 1 = 􀀔 126􀀕  \nq2 = 􀀔10􀀕 k2 = 􀀔 112􀀕 v2 = 􀀔93􀀕  \nq3 = 􀀔02􀀕 k3 = 􀀔 112􀀕 v3 = 􀀔36􀀕  \nq4 = 􀀔25􀀕 k4 = 􀀔126􀀕 v4 = 􀀔41􀀕  \n(Note: The values here are created for ease of calculation. Technically, these values are not possible, since k 1 , k2 , k3 are identical but q1 , q2 , q3 are not.)  \n(a) (6 points) Assume this transformer is an encoder. Calculate the output of self-attention for w2 . Note that your answer should be a vector ∈ R2 .  \n(b) (6 points) Now assume this transformer is a decoder. Calculate the output of self-attention for w3 . Again, note that your answer should be a vector ∈ R2 .  \nThis content is protected and may not be shared, uploaded, or distributed. Page 5 of 20  \n(c) (4 points) During lectu","cbCaihuHjXdUtdt3","https://ap.wps.com/l/cbCaihuHjXdUtdt3","pdf",296263,1,20,"English","en",105,"# Question 1: K-Means and Global Optima\n## (a) k-means with given initialization\n## (b) Proof of global minimum for k=2\n## (c) Random initialization and global minimum\n## (d) Convergence-guaranteed vs not guaranteed methods\n# Question 2: Transformers and Multi-Headed Attention\n## (a) Encoder self-attention output for w2\n## (b) Decoder self-attention output for w3\n## (c) Why matrix form matters\n## (d) Removing multi-headed attention impact\n## (e) Reason 12 layers/12 heads is preferable\n# Question 3: Linear Models and PCA\n## (a) Classification type\n## (b) Why d much larger than n causes problems\n## (c) How PCA helps\n## (d) PCA introduces additional hyperpar","[{\"question\":\"What topics are covered in Question 1 about k-means?\",\"answer\":\"Question 1 covers k-means convergence with a specific initialization, proving convergence to the global minimum for k=2, the outcome of random center initialization, and comparing optimization-convergent vs non-convergent learning methods from class.\"},{\"question\":\"How does the exam ask you to compute transformer self-attention?\",\"answer\":\"It provides specific vectors and parameter matrices and asks for the self-attention output vector for a given word in both an encoder setting (for w2) and a decoder setting (for w3).\"},{\"question\":\"Why is PCA included in the linear models question?\",\"answer\":\"PCA is used to address the issue where the feature dimension d is much larger than the number of training examples n, by reducing dimensionality and mitigating overfitting or computational/identifiability problems.\"}]","USC CSCI 467 - Intro to Machine Learning - Final Exam - December 7, 2023 | PDF",1788053936,50,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":28},"usc-csci-467-intro-to-machine-learning-final-exam-december-7-2023","",{"@graph":36,"@context":84},[37,53,67],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/exam/",3,{"item":52,"name":13,"@type":43,"position":11},"https://docshare.wps.com/document/usc-csci-467-intro-to-machine-learning-final-exam-december-7-2023/160320/",{"url":52,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-08-30",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What topics are covered in Question 1 about k-means?","Question",{"text":74,"@type":75},"Question 1 covers k-means convergence with a specific initialization, proving convergence to the global minimum for k=2, the outcome of random center initialization, and comparing optimization-convergent vs non-convergent learning methods from class.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does the exam ask you to compute transformer self-attention?",{"text":79,"@type":75},"It provides specific vectors and parameter matrices and asks for the self-attention output vector for a given word in both an encoder setting (for w2) and a decoder setting (for w3).",{"name":81,"@type":72,"acceptedAnswer":82},"Why is PCA included in the linear models question?",{"text":83,"@type":75},"PCA is used to address the issue where the feature dimension d is much larger than the number of training examples n, by reducing dimensionality and mitigating overfitting or computational/identifiability problems.","https://schema.org",{"og:url":52,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,103,108,112,117,122,126,129,133],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":101,"slug":102},70,"exam",{"id":104,"doc_module":4,"doc_module_name":46,"category_name":105,"show_sort_weight":106,"slug":107},5,"Comic",60,"comic",{"id":109,"doc_module":4,"doc_module_name":46,"category_name":110,"show_sort_weight":29,"slug":111},6,"Technology","technology",{"id":113,"doc_module":4,"doc_module_name":46,"category_name":114,"show_sort_weight":115,"slug":116},7,"Healthcare",40,"healthcare",{"id":118,"doc_module":4,"doc_module_name":46,"category_name":119,"show_sort_weight":120,"slug":121},8,"Research & Report",30,"research-report",{"id":123,"doc_module":4,"doc_module_name":46,"category_name":124,"show_sort_weight":21,"slug":125},9,"Religion & Spirituality","religion-spirituality",{"id":21,"doc_module":4,"doc_module_name":46,"category_name":127,"show_sort_weight":21,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":46,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":46,"category_name":135,"show_sort_weight":104,"slug":136},19,"General","general"]