{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<h2 style=\"text-align: center;\">Data-centric AI: The Underdog Game Changer in AI's Evolution</h2>\n\n<p style=\"text-align: center;\"><strong>Author:</strong> Muhammad Irfan Akbar </p>\n<p style=\"text-align: center;\"><strong>Category:</strong>  Other </p>","metadata":{}},{"cell_type":"markdown","source":"## 1. Introduction\n---\nArtificial Intelligence (AI) has grown at an exponential rate, fueled by an abundance of data and advancements in computational power. Within this thriving field, different methodologies have emerged on how best to leverage these elements for optimum AI performance. One such approach that this report highlights is data-centric AI - a paradigm that prioritizes the quality of data used for training AI models over the complexities of the model architectures [[1]](#7.1).\n\nTraditionally, AI development has been model-centric, needing massive volumes of data and significant computational resources. However, as we continue pushing the boundaries of AI, we often encounter situations where data is scarce or the computational power for complex models is impractical. Here is where a data-centric approach comes into play. By emphasizing the quality, cleanliness, and relevance of data, we can often achieve superior performance even with less complex models.\n\nThe impact of a data-centric approach is more profound than it seems, touching our daily interactions with AI. From Exploratory Data Analysis (EDA) that uses quality data insights for effective model design, to prompt engineering in language models that generate useful outputs from well-crafted inputs - a data-centric strategy underpins many AI applications.\n\nThe intent behind this report is not just to simplify and explore the concepts and methodologies of data-centric AI, but also to emphasize its irreplaceable yet underrated role in the era of AI innovation. It seeks to spread awareness about the importance and advancements in the data-centric AI field, which is increasingly shaping the landscape of AI research and development. To give this topic the thorough analysis it deserves, the report unfolds over several sections. It begins by posing the question 'Why Data-centric AI?', followed by an examination of the tasks involved in this approach. From there, it discusses the recent advancements in the field before delving into its impact on the Kaggle Community. Finally, it wraps up with some concluding thoughts, tying all these aspects together.\n\nFor a practical understanding, this report incorporates coding snippets used in my analysis, also accessible in a separate notebook found [here](https://www.kaggle.com/muhammadirfanakbar/kaggle-ai-report-viz).\n\n## 2. Why Data-centric AI?\n---\nIn the bustling realm of AI, the spotlight has traditionally been on sophisticated models and cutting-edge algorithms. However, recent trends indicate a significant paradigm shift towards a data-centric approach. This evolution is based on a growing recognition of the pivotal role data plays in achieving successful AI models. Let's dive into why data-centric AI has become an area of focus and how it's transforming the AI landscape.\n\n### 2.1 Understanding the Problem: Kaggle's Insight\n\nKaggle, a platform widely recognized for hosting machine learning competitions, provides a unique window into the changing trends in the data science community, which extensively utilizes AI. Building upon the significance of Kaggle, I transition to my hypothesis, suggesting that within this community, individuals often ascribe their success more to the models they utilize than the data they proces\n\nThis hypothesis is tested by analyzing the meta Kaggle dataset [[2]](#7.2), where a stark contrast is observed between the topics discussed in the Kaggle forums and those highlighted in the winners' write-ups [(Fig.1)](#fig1).\n\nTo substantiate this claim, two bar graphs were constructed. These graphs compare the word count of terminologies in the winners' write-ups against the word count in forum discussions. It is intriguing to note that despite the prevalence of data-related discussions in the forums - indicated by a higher word count - success in the winners' write-ups is predominantly attributed to the models. This is evident by a lower word count for data-related terms, demonstrating that models often outshine data in the attribution of success.\n","metadata":{}},{"cell_type":"code","source":"#Import Libraries\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport json\nimport matplotlib.pyplot as plt\n\nfrom wordcloud import WordCloud\nimport matplotlib.pyplot as plt\nfrom nltk.corpus import stopwords as sw\nimport nltk\nfrom bs4 import BeautifulSoup\n\nfrom collections import Counter\nimport matplotlib.pyplot as plt\nimport nltk\nfrom nltk.tokenize import word_tokenize\nimport string\n\n\nnltk.download('stopwords')\nnltk.download('punkt')\n\n# Load a dataset into a Pandas Dataframe\nwriteups_df = pd.read_csv('/kaggle/input/2023-kaggle-ai-report/kaggle_writeups_20230510.csv')\nforumtop_df = pd.read_csv('/kaggle/input/meta-kaggle/ForumTopics.csv')\n\ndef clean_html(text):\n    if isinstance(text, str):\n        return BeautifulSoup(text, \"html.parser\").get_text()\n    return text\n\ndef generate_word_histogram(df, column_name, num_words=10, title='Most Common Words'):\n    # Define the set of stopwords to filter out\n    stop_words = set(sw.words('english'))\n\n    words = []\n    for text in df[column_name]:\n        if isinstance(text, str):\n            # Tokenize the text\n            text_words = word_tokenize(text)\n            for word in text_words:\n                # Convert to lower case\n                word = word.lower()\n                # Remove punctuation\n                word = word.translate(str.maketrans('', '', string.punctuation))\n                if word and word not in stop_words:\n                    words.append(word)\n    \n    # Count word frequencies\n    word_counts = Counter(words)\n\n    # Get the most common words and their counts\n    common_words = word_counts.most_common(num_words)\n\n    # Create a bar chart to show the frequency of the most common words\n    words, counts = zip(*common_words)\n    plt.figure(figsize=(10,6))\n    plt.bar(words, counts, color='skyblue', edgecolor='black')\n    plt.title(title)\n    plt.xlabel('Words')\n    plt.ylabel('Count')\n    plt.xticks(rotation=45)\n    plt.show()\n    \nwriteups_df['Writeup'] = writeups_df['Writeup'].apply(clean_html)\n\ngenerate_word_histogram(writeups_df, 'Writeup', title='Most Common Words in Winner Writeups')\ngenerate_word_histogram(forumtop_df, 'Title', title='Most Common Words in Forum Titles')","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-07-15T15:21:19.335700Z","iopub.execute_input":"2023-07-15T15:21:19.336149Z","iopub.status.idle":"2023-07-15T15:22:48.765056Z","shell.execute_reply.started":"2023-07-15T15:21:19.336086Z","shell.execute_reply":"2023-07-15T15:22:48.763347Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=fig1> </a>\n<p>\n  <img src=\"https://drive.google.com/uc?id=1_YEfGjT3k__kN5S9imEDXE8nZ5uIDbV_\" width=\"49%\" />\n  <img src=\"https://drive.google.com/uc?id=1NgQgh-s-QqoTgVZRpygp43TII105KNPy\" width=\"49%\" />\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.1.</strong> The Comparison of Frequent Word used between Winner's Writeup and Forum Discussion\n</p>","metadata":{}},{"cell_type":"markdown","source":"This discrepancy suggests that while data-centric challenges often cause the most significant difficulties, the spotlight is frequently received by the models. Interestingly, I used a simple method to retrieve these trends, demonstrating my belief that complex models aren't always necessary. In fact, this perfectly mirrors the philosophy of data-centric AI: simplicity can often outperform complexity, especially when the quality and handling of the data are taken into account.\n\n### 2.2 The ~~Art~~ Science of Data Techniques\n\nhis underscores an important point: a state-of-the-art model powered by poor-quality data will yield subpar results. Simply put, high-quality data is a non-negotiable ingredient in the recipe for a successful AI model. Without clean, relevant, and diverse data, even the most advanced algorithms may fail to perform effectively.\n\nHowever, securing high-quality data isn't straightforward. While multiple model architectures are easily accessible on platforms like GitHub, there's no universal remedy when it comes to data preparation. Each dataset brings its own set of challenges and requires a particular finesse in its management - a process that includes everything from data collection and preprocessing to feature engineering and data augmentation.\n\nCertainly, some argue that data analysis leans more towards an art than a science, requiring creativity [[17]](#7.17) [[18]](#7.18).  The art side is more apparent especially when handling qualitative data or deciding how to present findings. The subtleties in qualitative data call for careful interpretation, much like creating a narrative from a collection of ideas. Similarly, presenting data isn't just tabulation or graphing, but an artistic endeavor to tell a clear and compelling story. Additionally, data analysis isn't a straightforward process. It's often exploratory, involving probing and refining data, akin to an artist sketching a scene or a scientist running experiments. Despite the artistry involved, I believe the advent of data-centric AI is shifting the field towards a more scientific approach. It's systematizing data analysis and making it more empirical, combining the strengths of both art and science.\n\nThe emergence of data-centric AI is subtly reshaping the field. It's shifting data analysis from a practice primarily guided by intuition to one underpinned by methodical, scientific precision. An excellent example lies in  data augmentation, which was previously deemed an intuitive process without a systematic method. However, the emergence of comprehensive data augmentation papers, such as [[19]](#7.19) [[20]](#7.20) [[21]](#7.21), has provided a structured way to carry out augmentation, irrespective of the shape of the data. Similar transformations are being seen in other aspects of data preprocessing as well.","metadata":{}},{"cell_type":"markdown","source":"<a id=fig2> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1uN8PhreE73eJ07UBe4teyOUYv0_PYpUA\" alt=\"drawing\" style=\"width:800px;\"/>\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.2.</strong> The Systematic Diagram of Data Augmentation, referenced from <a href=\"#7.21\">[21]</a>. The paper also mentioned the use case of each data augmentation techniques within the diagram.\n</p>","metadata":{}},{"cell_type":"markdown","source":"\nThe shift towards data-centric AI is influenced by an in-depth understanding of the vital role data plays in building successful AI pipelines. The combined art and emerging science of handling data, although often more complicated than model development, holds the key to unlocking AI's true potential. As we forge ahead in this field, a solid, data-centric approach will become the bedrock of AI's future success, which will be progressively backed by a more scientific approach to data processing.\n\n## 3. Tasks in Data-centric AI\n---\nThe operational framework of data-centric AI does not follow a linear or sequential process, but rather consists of several tasks, each with its own significance and role. These tasks, although interdependent, can be concurrently addressed. They include Training Data Development, Inference Data Development, and Data Maintenance. [[3]](#7.3) [[4]](#7.4)\n\n### 3.1 Training Data Development\n\nTraining Data Development forms one of the pillars of a data-centric approach. As seen from [Fig.3](#fig3), This phase involves the collection, labeling, preparation, reduction, and augmentation of data that is fed into machine learning models for training. As the saying goes, \"garbage in, garbage out\" – the quality of the input data is instrumental in determining the accuracy and reliability of the output or prediction generated by the mode [[5]](#7.5). High-quality data aids in ensuring that our models learn and derive meaningful and reliable patterns.","metadata":{}},{"cell_type":"markdown","source":"<a id=fig3> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1HQf1dTdg_LUKcCLbBsLI9ebiaxu8f9wb\" alt=\"drawing\" style=\"width:1000px;\"/>\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.3.</strong> The process of Training Data Development, referenced from <a href=\"#7.3\">[3]</a>\n</p>","metadata":{}},{"cell_type":"markdown","source":"### 3.2 Inference Data Development\nIn the model-centric framework, inference data usually means test and validation sets used to gauge predictive performance through certain metrics, such as accuracy. In contrast, the Data-Centric AI (DCAI) approach seeks a more holistic model evaluation, aiming to provide finer details about model capabilities that extend beyond just performance metrics. In real-world scenarios, where models are fixed post-training, it becomes crucial to ensure the model's effectiveness on unseen data, known as inference data. The autonomous vehicles navigating unfamiliar routes exemplify the real-world application of this process.\n\nInference Data Development encompasses In-distribution Evaluation, Out-distribution Evaluation, and Prompt Engineering:\n\n1. **In-distribution Evaluation** assesses the model's performance on data that mirrors the distribution of the training data.\n2. **Out-distribution Evaluation** measures how well the model performs on data that diverges from the training data's distribution. A widely recognized application of this evaluation technique is in autonomous vehicle software, where the model frequently encounters data points that were not included or foreseen during training. [[6]](#7.6) [[7]](#7.7). A rather recent example of Out-distribution case can be seen in [Fig.4](#fig4)\n3. **Prompt Engineering** focuses on devising effective inputs to procure the desired output from the model. This crucial aspect of data-centric AI, involving the art and science of crafting optimal prompts, will be discussed in more detail in the subsequent section.\n","metadata":{}},{"cell_type":"markdown","source":"<a id=fig4> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1AULNRJ0-Tse4tGSzf84BmeqswUxr97sD\" alt=\"Image\">\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.4.</strong> Example of Out-distribution Case in Autonomous Vehicle, referenced from <a href=\"#7.8\">[8]</a>\n</p>","metadata":{}},{"cell_type":"markdown","source":"### 3.3 Data Maintenance\n\nIn contrast to the static datasets typical of a Kaggle competition, real-world data is dynamic and ever-evolving. Data Maintenance addresses this aspect, dealing with the continuous processing and integration of this data influx to keep the training data updated and relevant. This process is sometimes referred to as Continual Learning, and it allows AI systems to evolve with the changing data, maintaining the model's accuracy and reliability.\n\nTogether, these tasks form the bedrock of a data-centric AI approach. Each is vital in its own right, ensuring that our AI systems can learn from the best quality data, generalize effectively to new data, and adapt to evolving data landscapes.\n\n\n## 4. Recent Advancement in Data-centric AI\n---\nData-centric AI has seen unprecedented growth over the past two years, driven by significant advancements in diverse areas. This section focuses on some of notable advancements that underscore the shifting focus from model-centric to data-centric approaches in the past two years.\n\n### 4.1 Prompt Engineering for Large Language Models (LLMs) and Text-to-Image Models\n\nPrompt engineering, the meticulous process of designing and choosing optimal inputs to maximize a model's performance, has gained significant traction in the past few years. The advent of accessible LLMs like ChatGPT [[9]](#7.9) and text-to-image models like Dall-E [[10]](#7.10) and Stable Diffusion [[11]](#7.11) has further accentuated the need for competent prompt engineering to enhance these models' efficiency.\n\nIn the realm of prompt engineering, the focus is solely on refining the inference data, given that the underlying model is final and unalterable. Consequently, this approach fosters a shift towards data-centric AI, leading companies to establish specialized roles for \"prompt engineering.\"\n\nTo comprehend the value of prompt engineering, it's useful to contrast the outcomes from well-crafted versus poorly-crafted prompts. Take, for instance, the LLM ChatGPT. When given a well-designed prompt like \"Generate a code to show the trend of column A using a bar graph in matplotlib\", the model returns an accurate code. However, a vague or poorly constructed prompt like \"show the trend of dataset A\" may result in a ambiguous and poor-performance code.\n\nSimilarly, in the case of text-to-image models such as Dall-E, a prompt like \"An armchair in the shape of an avocado\" generates an image of exactly that, a fusion of an armchair and an avocado. But a vague or confusing prompt, such as \"A unique chair\" can lead to images that do not align with the intended concept. The output of the prompt is shown in [Fig.5](#fig5)\n\nThese examples underline how critical prompt engineering is to LLMs and the growing importance of this skill set in the AI community. The transition towards data-centric AI represents not just a passing trend, but a substantial shift in our approach to AI problem-solving.\n","metadata":{}},{"cell_type":"markdown","source":"<a id=fig5> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1D-ARDLQVHk2EBGzOMILXhFhJX-zGArci\" width=\"30%\" />\n  <img src=\"https://drive.google.com/uc?id=1FEoCnDTud0thGYGtgCsjQazMfYyYCBPQ\" width=\"30%\" />\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.5.</strong> The Comparison of the output from Good vs Bad Prompt using DALL-E\n</p>","metadata":{}},{"cell_type":"markdown","source":"### 4.2 \"Segment Anything\": A Leap in Segmentation and Data Engine  \n  \n  \n#### **4.2.1 Introduction: the relevance of Data-centric AI in SAM**  \nIn April 2023, the field of segmentation, a rather mature domain in AI, witnessed a groundbreaking innovation with Facebook AI's \"Segment Anything\" [[12]](#7.12). Not just claiming state-of-the-art results, but also setting the tone for future development by introducing a 'Foundation Model' in segmentation.\n\nTo accomplish this impressive feat, the team focused on addressing three key questions:\n\n1. What task will enable zero-shot generalization?\n2. What is the corresponding model architecture?\n3. What data can power this task and model?\n\nFascinatingly, two of these three questions revolve around data, echoing the rising importance of data-centric AI. The paper further spotlighted the critical role of data by utilizing a straightforward model for their implementation, robustly asserting that data, not model complexity, holds the key to groundbreaking AI achievements. \n\n\n#### **4.2.2 Data Engine and Dataset Components**  \nThe training process utilizes the **SA-1B Dataset**, which possesses a collection of 11 million images and 1.1 billion segmentation masks, standing out in comparison to other image and mask segments. Given the scarcity of segmentation masks online, the paper underscores a data engine designed specifically for efficient data gathering. This process is carried out in three distinct stages:\n\n1. **Assisted Manual:** At this stage, annotators work hand-in-hand with SAM to capture all masks within an image.\n\n2. **Semi-Automatic:** In this phase, annotators are tasked with annotating masks for which SAM is unable to generate a confident prediction.\n\n3. **Full-Auto:** In the final stage, SAM is given the liberty to fully predict masks, leveraging its capacity to differentiate ambiguous masks through a comprehensive sweep.\n\nNotably, the core strength and distinguishing feature of SAM lies in its data engine, which epitomizes the concept of a **data-centric approach**. This approach places the spotlight firmly on the quality, diversity, and application-specific nature of the data used, rather than solely on the sophistication of the model's architecture. This transition places more importance on the creation and use of relevant, diverse datasets rather than innovating intricate models. SAM's ability to learn, evolve, and perform a wide array of image segmentation tasks with commendable accuracy, underscores the potential breakthroughs that can be achieved in AI by focusing on data.\n  \n#### **4.2.3 Model**  \nThe Segment Anything Model (SAM) for promptable segmentation, as illustrated in Fig. 5, is composed of three key components.\n\n1. **Image Encoder:** Leveraging scalability and advanced pretraining methods, this component employs a pre-trained Vision Transformer (ViT) specifically adapted to handle high-resolution image inputs.\n\n2. **Prompt Encoder:** This module manages two categories of prompts - sparse and dense, utilizing positional encodings and learned embeddings for sparse prompts like points, boxes, and text, while employing convolutions for dense prompts such as masks.\n\n3. **Mask Decoder:** This part effectively maps the image and prompt embeddings to a mask, utilizing a variant of a Transformer decoder block followed by a dynamic mask prediction head.","metadata":{}},{"cell_type":"markdown","source":"<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1ApTB82LehrdOhr1wlCEqYB5p734-lG65\" alt=\"drawing\" style=\"width:500px;\"/>\n</p>\n<center>\n  <strong>Fig.6.</strong> The Illustration of The Model Structure of Segment Anything from <a href=\"#7.22\">[22]</a>\n</center>","metadata":{}},{"cell_type":"markdown","source":"#### **4.2.4 Application Scenarios**\n\nSAM has the capability to accept specific user prompts, providing precise image segmentation. In its current version, SAM accommodates three types of prompts:\n\n* By user-clicked points\n* By user-drawn bounding boxes\n* By drawn mask on an object by the user\n\nIn essence, SAM successfully addresses all aspects of image segmentation, localization, and classification in a unified manner [(Fig.7)](#fig7). Consequently, it empowers more accessible features like assisted labeling, real-time augmented reality, and Bio-Medical Image Segmentation.","metadata":{}},{"cell_type":"markdown","source":"<a id=fig7> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1Diy4-jF8DK95oQvzRHg0lT39S7HAJWZ2\" alt=\"image\" style=\"width:700px;\"/>\n</p>\n<center>\n  <strong>Fig.7.</strong> The diverse applications of the 'Segment Anything' demo. Users can (1) upload a personal image, (2) create masks from prompted points, (3) produce multi-layer masks, (4) create bounding boxes, (5) effortlessly obtain cut-out masks, and (6) just simply segment every object within the image. <a href=\"#7.23\">[23]</a>\n</center>\n","metadata":{}},{"cell_type":"markdown","source":"### 4.3 General Trend: Data-centric Paper Trend for the Past Two Years\n\nA clear indication of the rapidly growing interest in data-centric AI is the remarkable increase in related research papers over the past few years. This trend can be observed using the metadata available from arXiv on Kaggle [[15]](#7.15).\n\nTo project the increase in research interest, we count the number of papers published with titles or abstracts that include keywords related to the data-centric field. The selected keywords, available in the code below, were extracted using LLM from [[13]](#7.13). This technique, while straightforward, provides a sweeping overview of the field's escalating popularity.\n\nFor 2023, since the year is ongoing, the projected number is calculated based on the monthly average paper count in 2023 multiplied by 12.","metadata":{}},{"cell_type":"code","source":"data_file = '/kaggle/input/arxiv/arxiv-metadata-oai-snapshot.json'\n\nwith open(data_file, 'r') as f:\n    arxiv_df = pd.DataFrame(json.loads(line) for line in f)\n\narxiv_df['update_date'] = pd.to_datetime(arxiv_df['update_date'])\n\n# Define keywords related to data-centric AI\nkeywords = ['data-centric', 'data quality', 'data cleaning', 'data augmentation', \n            'data labeling', 'data governance', 'data preparation',\n            \"training data development\", \"data collection\", \"data labeling\", \"data preparation\",\n            \"data reduction\", \"data augmentation\", \"pipeline search\", \"inference data development\",\n            \"in-distribution evaluation\", \"out-of-distribution evaluation\", \"prompt engineering\",\n            \"data maintenance\", \"data understanding\", \"data quality assurance\",\n            \"data storage and retrieval\", \"data benchmark\", \"data-centric evaluation\",\n            \"data-centric methods\", \"data-centric ai development\", \"data-centric systems\",\n            \"data-centric machine learning\", \"active learning\", \"feature selection\",\n            \"feature extraction\", \"data discovery\", \"data integration\",\n            \"data curation\", \"data normalization\", \"data standardization\", \"imbalanced learning\",\n            \"synthetic data\", \"data valuation\", \"data quality verification\",\n            \"automated machine learning\", \"domain adaptation\",\n            \"data semantics\", \"feature engineering\", \"machine learning pipelines\"]\n\n# Function to check whether a paper is related to data-centric AI\ndef is_data_centric(text):\n    for keyword in keywords:\n        if keyword in text:\n            return True\n    return False\n\n# Apply the function to the 'title' and 'abstract' columns\narxiv_df['title'] = arxiv_df['title'].str.lower()\narxiv_df['abstract'] = arxiv_df['abstract'].str.lower()\narxiv_df['Data_Centric'] = arxiv_df['title'].apply(is_data_centric) | arxiv_df['abstract'].apply(is_data_centric)\narxiv_df['Year'] = arxiv_df['update_date'].dt.year\n\n# Filter for the years 2017-2023\narxiv_df_filtered = arxiv_df[(arxiv_df['Year'] >= 2017) & (arxiv_df['Year'] <= 2023)]\n\n# Group by year and sum the new column\ndata_centric_papers_per_year = arxiv_df_filtered.groupby('Year')['Data_Centric'].sum()\n\n# Plot the number of data-centric papers per year\nplt.figure(figsize=(10,6))\ndata_centric_papers_per_year.plot(kind='bar', color='skyblue', edgecolor='black')\nplt.title('Number of Data-Centric Related Arxiv Papers Published per Year (2017-2023)')\nplt.xlabel('Year')\nplt.ylabel('Number of Papers')\nplt.xticks(rotation=45)\nplt.show()","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-07-15T15:22:48.767849Z","iopub.execute_input":"2023-07-15T15:22:48.768239Z","iopub.status.idle":"2023-07-15T15:27:16.688813Z","shell.execute_reply.started":"2023-07-15T15:22:48.768204Z","shell.execute_reply":"2023-07-15T15:27:16.687558Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=fig8> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1-x7-llqSPFyO8xuZ2YzVrhd81gycUqHh\" alt=\"Image\" style=\"width:600px;\"/>\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.8.</strong> The Data-centric Papers Amount Extracted from Arxiv\n</p>","metadata":{}},{"cell_type":"markdown","source":"As [Fig.8](#fig8) suggest, remarkably, the number of papers related to data-centric AI has seen a remarkable increase over the past two years, specifically between 2021 and 2023 (projected). This surge in papers highlights the escalating interest in the data-centric approach within the AI research community. It also further underscores the shift in AI research from being predominantly model-centric to increasingly data-centric.\n\nThis trend not only reflects the scientific community's recognition of the value of data-centric approaches but also their commitment to furthering this field. As more researchers turn their focus to the power of data, we can expect continued advancements and innovations in data-centric AI.\n\n## 5. The Impact of Data-centric AI towards Kaggle Community\n---\n\nData-centric AI techniques have revolutionized the approach of problem-solving in the Kaggle and other data science communities. The emphasis on data quality, curation, and intelligent data processing have provided individuals the tools to unearth complex patterns and derive actionable insights.\n\n### 5.1 Kaggle Competitions: Then and Now\nThe transformation due to data-centric AI is evident when we revisit the Kaggle's \"Titanic - Machine Learning from Disaster\" [[14]](#7.14), a Getting Started Prediction Competition. Please note that the following outlines a general approach typically seen in forum discussions; however, individual approaches to the problem may vary.","metadata":{}},{"cell_type":"markdown","source":"<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1rJ63kskshffLauupqxNoRSr7FXuG3xcL\" alt=\"Image\" style=\"width:1000px;\"/>\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.9.</strong> Kaggle Titanic Competition Cover <a href=\"#7.14\">[14]</a>\n</p>","metadata":{}},{"cell_type":"markdown","source":"**Past Approach:**\n\n1. **Exploratory Data Analysis (EDA):** Manual exploration of Titanic data which includes recognizing patterns, handling missing values, such as 'Age', 'Cabin' and 'Embarked' columns, and understanding relationships between variables like 'Sex', 'Pclass', and 'Survived'.\n\n2. **Data Preprocessing:** Treatment of missing values, for instance, filling the 'Age' column with the median age, filling 'Embarked' with the most common port, and handling outliers based on the findings from EDA.\n\n3. **Feature Engineering:** Manual creation of new features, for example, creating a 'Family Size' feature based on 'SibSp' and 'Parch', or 'IsAlone' feature for passengers travelling alone to enhance modeling.\n\n4. **Model Selection and Tuning:** Experimentation with a variety of machine learning models like Logistic Regression, Random Forests, and their parameters. However, due to the Titanic dataset's small size and artificial nature, model choice wasn't highly impactful.\n\n**Present Approach:**\n\n1. **ChatGPT-assisted EDA:** Using AI for a more comprehensive exploratory data analysis. For example, the AI might suggest investigating survival rates for different passenger classes or age groups in the Titanic dataset.\n\n2. **Data Preprocessing & Feature Engineering with ChatGPT:** Leveraging AI to suggest strategies and generate code for data preprocessing and feature engineering. This might include the AI recommending imputation techniques for missing age values or creating a feature to indicate if a passenger was alone or not.\n\n3. **Prompt Engineering with ChatGPT:** Shifting the focus from model selection to crafting effective prompts for improved data handling. For instance, the AI can help design prompts to guide the model to understand the influence of variables like 'Pclass', 'Sex', and 'Age' on survival.\n\nThe present approach emphasizes that, especially in small, artificially created datasets like those in Getting Started Prediction Competitions, data quality and prompt crafting are significantly more crucial than the choice of a complex model.\n\n\n### 5.2 The Art of Winning Big Competitions: It's All About Data\nWhen we delve into the winner write-ups of major Kaggle competitions, we find an interesting trend. Regardless of the complexity of the competition, the winning solutions often rely on simple models or state-of-the-art (SOTA) models easily accessible on the internet. The differentiating factor lies in the art of data processing.\n\nTo illustrate, [Fig.10](#fig10) depicts a bar graph showcasing the top 10 most frequently employed methods by Kaggle competition winners, retrieved from the \"Kaggle Winning Solutions Methods\" dataset [[16]](#7.16). When it comes to model techniques, there are plenty and they are fairly straightforward to implement - ensembles, CNNs, and the like. These techniques are widely known and easily accessible.\n\nHowever, the techniques related to data - the behind-the-scenes work of cleaning, shaping, and enhancing the data - are not as straightforward or well understood. It is in the mastery of these lesser-known, data-centric techniques where we see the winners distinguish themselves. The art of data processing holds the secret to unlocking the true power of AI in these competitions.","metadata":{}},{"cell_type":"code","source":"winsol_df = pd.read_csv('/kaggle/input/kaggle-winning-solutions-methods/kaggle_winning_solutions_methods_detail.csv')\n\n# Assuming 'cleaned_methods' are separated by commas, if not you can replace ',' with the appropriate separator.\nmethods = winsol_df['cleaned_methods'].str.split(',', expand=True).stack().str.strip()\n\n# Count the frequency of each method\nmethod_counts = methods.value_counts()\n\n# Select the top 10 methods\ntop_10_methods = method_counts.head(10)\n\n# Plot the bar chart for top 10 methods\nplt.figure(figsize=(10,6))\ntop_10_methods.plot(kind='bar', color='skyblue', edgecolor='black')\nplt.title('Frequency of Top 10 Methods Used in Winning Solution')\nplt.xlabel('Method')\nplt.ylabel('Frequency')\n# plt.xticks(rotation=45)\nplt.show()","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-07-15T15:27:16.690372Z","iopub.execute_input":"2023-07-15T15:27:16.690827Z","iopub.status.idle":"2023-07-15T15:27:22.195078Z","shell.execute_reply.started":"2023-07-15T15:27:16.690795Z","shell.execute_reply":"2023-07-15T15:27:22.193682Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=fig10> </a>\n<p style=\"text-align:center;\">\n  <img src=\"https://drive.google.com/uc?id=1J2n7bSaYKCDJcPxOtJ1v6tklaq80eR9D\" alt=\"Image\" style=\"width:600px;\"/>\n</p>\n<p style=\"text-align:center;\">\n  <strong>Fig.10.</strong> The Top 10 Frequency of Used Method in the Winning Solution in Kaggle Competitions\n</p>","metadata":{}},{"cell_type":"markdown","source":"The heart of these winning solutions often lies not in the model architecture but in the sophisticated techniques used to prepare and curate the data. Methods such as advanced feature engineering, careful outlier detection, strategic handling of missing data, or insightful exploratory data analysis are typically at the core of these winning solutions.\n\nThese insights underscore the importance of data-centric AI approaches. Despite the advancements in AI models, the value of high-quality, well-prepared data cannot be underestimated. This revelation also aligns with the growing consensus in the AI community that we should shift our focus from a model-centric approach, where we attempt to design ever more complex models, to a data-centric approach, where we concentrate on improving the quality of our data.\n\nThe transformative impact of data-centric AI on the Kaggle community is profound. It has changed the focus from model complexity to data quality and prompted innovations in handling and processing techniques. It's clear that this paradigm shift towards data-centric AI is reshaping the way Kagglers approach competitions, leading to a more nuanced understanding of data and its potential to improve prediction accuracy. As we look to the future, it's evident that data-centric AI will continue to influence and drive the strategies employed by Kaggle competitors and the wider data science community.\n\n## 6. Conclusion\n---\n\nIn essence, the growing prominence of data-centric AI underscores a fundamental paradigm shift in artificial intelligence from model complexity to data quality. As observed in Kaggle competitions and advancements in areas like prompt engineering and image segmentation, the emphasis is increasingly on the quality, preparation, and effective handling of data over the complexity of AI models. This shift is profoundly reshaping AI problem-solving approaches, promising more nuanced understandings of data and fostering a new wave of AI innovation. As we advance in this field, a robust data-centric approach will undoubtedly underpin the future success of AI, signifying that data, indeed, is a powerful underdog.\n\n<a id=7> </a>\n## 7. References\n---\n\n**Note regarding ChatGPT usage:** All concepts and ideas originate from me. I utilize ChatGPT solely for improving the grammar and enhancing the language usage in the essay.  \n\n\n<a id=7.1> </a>\n[1] \"Data-centric AI resource hub,\" Data-centric AI Resource Hub. https://datacentricai.org/ (accessed Jul. 04, 2023).  \n\n<a id=7.2> </a>\n[2]\tKaggle, “Meta Kaggle.” https://www.kaggle.com/datasets/kaggle/meta-kaggle (accessed Jul. 04, 2023). \n\n<a id=7.3> </a>\n[3]\tD. Zha et al., “Data-centric artificial intelligence: A survey,” arXiv.org, Mar. 17, 2023. https://arxiv.org/abs/2303.10158 \n\n<a id=7.4> </a>\n[4]\tD. Zha, Z. P. Bhat, K.-H. Lai, F. Yang, and X. Hu, “Data-centric AI: Perspectives and Challenges,” arXiv.org, Jan. 12, 2023. https://arxiv.org/abs/2301.04819  \n\n<a id=7.5> </a>\n[5]\tR. S. Geiger et al., “‘Garbage in, garbage out’ revisited: What do machine learning application papers report about human-labeled training data?,” Quantitative Science Studies, vol. 2, no. 3, pp. 795–827, 2021, doi: 10.1162/qss_a_00144.  \n\n<a id=7.6> </a>\n[6]\tJ. Nitsch et al., “Out-of-Distribution Detection for Automotive Perception,” arXiv.org, Nov. 03, 2020. https://arxiv.org/abs/2011.01413  \n\n<a id=7.7> </a>\n[7]\tJ. Yang, K. Zhou, Y. Li, and Z. Liu, “Generalized Out-of-Distribution Detection: A Survey,” arXiv.org, Oct. 21, 2021. https://arxiv.org/abs/2110.11334  \n\n<a id=7.8> </a>\n[8]\tH. Abu Alhaija, S. K. Mustikovela, L. Mescheder, A. Geiger, and C. Rother, “Augmented Reality Meets Computer Vision: Efficient Data Generation for Urban Driving Scenes,” International Journal of Computer Vision, vol. 126, no. 9, pp. 961–972, Mar. 2018, doi: 10.1007/s11263-018-1070-x  \n\n<a id=7.9> </a>\n[9]\t“ChatGPT.” https://openai.com/chatgpt (accessed Jul. 04, 2023).  \n\n<a id=7.10> </a>\n[10]\t“DALL·E 2.” https://openai.com/dall-e-2 (accessed Jul. 04, 2023).  \n\n<a id=7.11> </a>\n[11]\tR. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer, “High-Resolution Image Synthesis with Latent Diffusion Models,” arXiv.org, Dec. 20, 2021. https://arxiv.org/abs/2112.10752  \n\n<a id=7.12> </a>\n[12]\tA. Kirillov et al., “Segment Anything,” arXiv.org, Apr. 05, 2023. https://arxiv.org/abs/2304.02643  \n\n<a id=7.13> </a>\n[13]\t“Titanic - Machine Learning from Disaster,” Kaggle. https://www.kaggle.com/c/titanic (accessed Jul. 04, 2023).  \n\n<a id=7.14> </a>\n[14]\tM. Mayo, “Prompt Engineering for Effective Interaction with ChatGPT,” MachineLearningMastery.com, Jun. 16, 2023. https://machinelearningmastery.com/prompt-engineering-for-effective-interaction-with-chatgpt/ (accessed Jul. 04, 2023).  \n\n<a id=7.15> </a>\n[15]\tC. University, “arXiv Dataset,” Kaggle. https://www.kaggle.com/datasets/Cornell-University/arxiv (accessed Jul. 04, 2023).  \n\n<a id=7.16> </a>\n[16]\tD. Kłeczek, “Kaggle Winning Solutions Methods.” https://www.kaggle.com/datasets/thedrcat/kaggle-winning-solutions-methods (accessed Jul. 05, 2023).  \n<a id=7.17> </a>  \n[17]\t“Creative decision making - how data science is both an art and a science,” UNSW Online. https://studyonline.unsw.edu.au/blog/how-data-science-is-art-and-science (accessed Jul. 10, 2023).\n\n<a id=7.18> </a>\n[18]\tElsevier, “Why data science is an art – and how to support the people who do it,” Elsevier Connect. https://www.elsevier.com/connect/why-data-science-is-an-art-and-how-to-support-the-people-who-do-it (accessed Jul. 10, 2023).\n  \n<a id=7.19> </a>\n[19]\tC. Shorten and T. M. Khoshgoftaar, “A survey on Image Data Augmentation for Deep Learning,” Journal of Big Data, vol. 6, no. 1, Jul. 2019, doi: 10.1186/s40537-019-0197-0.\n  \n<a id=7.20> </a>\n[20]\tS. Yang, W. Xiao, M. Zhang, S. Guo, J. Zhao, and F. Shen, “Image Data Augmentation for Deep Learning: A Survey,” arXiv.org, Apr. 19, 2022. https://arxiv.org/abs/2204.08610\n\n<a id=7.21> </a>\n  \n[21]\tA. Mumuni and F. Mumuni, “Data augmentation: A comprehensive survey of modern approaches,” Array, vol. 16, p. 100258, Dec. 2022, doi: 10.1016/j.array.2022.100258.\n\n<a id=7.22> </a>\n[22]\t“Segment Anything,” Meta AI. https://segment-anything.com/ (accessed Jul. 10, 2023).\n\n<a id=7.23> </a>\n[23]\t“Segment Anything,” Meta AI. https://segment-anything.com/demo (accessed Jul. 10, 2023).","metadata":{}},{"cell_type":"code","source":"# Submission Code\n\n# Load the CSV file\ndf = pd.read_csv('/kaggle/input/2023-kaggle-ai-report/sample_submission.csv')\n\n# Change the values\ndf.loc[df['type'] == 'essay_category', 'value'] = 'Other'\ndf.loc[df['type'] == 'essay_url', 'value'] = 'https://www.kaggle.com/code/muhammadirfanakbar/data-centric-ai-the-underdog-game-changer-in-ai'\ndf.loc[df['type'] == 'feedback1_url', 'value'] = 'https://www.kaggle.com/code/pluvias/kaggle-ai-report-optimization/comments#2336516'\ndf.loc[df['type'] == 'feedback2_url', 'value'] = 'https://www.kaggle.com/code/sriramm2010/autonomous-cars-a-new-way-of-getting-around/comments#2336291'\ndf.loc[df['type'] == 'feedback3_url', 'value'] = 'https://www.kaggle.com/code/manjeshhb0066hb/kaggle-ai-report-for-others-creating-an-ai-world/comments#2343759'\n\n# Save the modified DataFrame to a new CSV file\ndf.to_csv('/kaggle/working/submission.csv', index=False)","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-07-15T15:27:22.197336Z","iopub.execute_input":"2023-07-15T15:27:22.197692Z","iopub.status.idle":"2023-07-15T15:27:22.224300Z","shell.execute_reply.started":"2023-07-15T15:27:22.197663Z","shell.execute_reply":"2023-07-15T15:27:22.222622Z"},"trusted":true},"execution_count":null,"outputs":[]}]}