SHIVAGAMI GUGAN's BLOG
Thoughts penned during leisure (the views expressed in here are my own views and doesn't reflect my employer's views)
Saturday, 26 October 2024
Tuesday, 24 September 2024
Key differences between a Transformer Architecture and a State space model Architecture for Building LLMs
A transformer architecture primarily focuses on capturing local relationships within a sequence by using attention mechanisms, while a state space model architecture is designed to model the evolution of a system over time by maintaining a fixed-size "state" that represents the current system status, making it more efficient for handling long sequences but potentially limiting its ability to capture fine-grained details within the data; essentially, transformers excel at short-range dependencies while state space models prioritize long-range dependencies and overall system dynamics.
Key differences:
Attention mechanism:
Transformers heavily rely on attention mechanisms to weigh the importance of different parts of an input sequence when generating the output, allowing for flexible context understanding. State space models typically do not use attention mechanisms in the same way.
State representation:
In a transformer, the "state" is essentially the current hidden representation at each layer, which can dynamically change with the sequence length. In a state space model, the "state" is a fixed-size vector representing the system's current status, which is updated based on input and system dynamics.
Handling long sequences:
Transformers can struggle with very long sequences due to quadratic computational complexity, while state space models are generally better suited for handling long sequences because of their fixed-size state representation.
Applications:
Transformers are widely used in natural language processing tasks like machine translation, text summarization, and question answering due to their ability to capture complex relationships between words. State space models are often applied in areas like time series forecasting, control systems, and scenarios where tracking the evolution of a system over time is crucial.
Recent developments:
Mamba Model: Researchers have developed architectures like "Mamba" which attempt to combine the strengths of transformers and state space models, leveraging attention mechanisms while still maintaining a fixed-size state to handle long sequences more efficiently.
Sunday, 21 July 2024
The Impact of GenAI on DevSecOps
The Impact of GenAI on DevSecOPs
DevSecOps, is inevitably impacted in this age of GenAI. As AI transforms the way we work, here are some areas where GenAI can be used in DevSecOps.
Integration with DevSecOps
tools: GenAI can integrate with DevSecOps tools, enabling real-time feedback
and continuous monitoring of security posture throughout the software
development lifecycle. This can help ensure that security is integrated into
the development process, reducing the risk of security breaches.
GenAI based coding assistants: Many organizations have already embraced AI-powered coding assistants such as Amazon Q and GitHub Copilot to improve the developer experience and speed time to deployment of software. A recent McKinsey study found developers can complete coding tasks up to twice as fast with generative AI. Coding assistants can perform at various levels of capabilities the following tasks:
- Diagnose
common errors.
- Turn comments
into code
- Completing
your next line or function in context
- Bring
knowledge to you, such as finding a useful library or API call for an
application
- Transform Legacy code into later versions of software
- Add comments
- Rewriting
code for efficiency
- Write
Software based on prompts
- Chat about
Code.
- Provide inline code suggestions.
- Scan code
for security vulnerabilities.
Automated Security Testing: GenAI can significantly enhance automated security testing by analyzing code, identifying vulnerabilities, and providing real-time feedback to developers. This can lead to faster and more accurate detection of security flaws, reducing the risk of security breaches.
Intelligent Anomaly Detection: Incorporating Generative AI into DevSecOps enables intelligent anomaly detection in real-time. AI models can continuously monitor system behavior, user activity, and network traffic, promptly identifying suspicious patterns and potential security breaches. This enhances proactive threat mitigation and incident response.
Intelligent Threat Detection:
GenAI-powered threat detection systems can analyze vast amounts of data,
identifying patterns and anomalies that may indicate potential security
threats. This can help security teams respond more effectively to emerging
threats and reduce the risk of attacks.
Enhanced Incident Response:
GenAI can help streamline incident response by analyzing large amounts of data,
identifying the root cause of incidents, and providing actionable insights to
security teams. This can lead to faster and more effective incident response,
reducing the impact of security breaches.
Improved Compliance: GenAI
can help organizations comply with regulatory requirements by automating
compliance checks, identifying potential non-compliance issues, and providing
recommendations for remediation.
Predictive Maintenance:
GenAI can predict potential security threats and vulnerabilities, enabling
proactive measures to mitigate risks. This can lead to reduced downtime,
improved system reliability, and enhanced overall security.
Enhanced Collaboration:
GenAI can facilitate collaboration between security teams, developers, and
other stakeholders by providing a shared understanding of security risks and
vulnerabilities. This can lead to more effective communication, reduced
miscommunication, and improved overall security.
Continuous Monitoring:
GenAI can continuously monitor systems, networks, and applications, identifying
potential security threats and vulnerabilities in real-time. This can help
security teams respond quickly to emerging threats and reduce the risk of
security breaches.
Reduced False Positives:
GenAI can help reduce false positives in security systems, reducing the risk of
false alarms and improving the overall effectiveness of security measures.
Improved Security
Orchestration: GenAI can help orchestrate security tools and systems,
enabling more effective incident response, threat hunting, and security
operations.
Automating Security Patching: GenAI can expedite security patching by automating the analysis and application of patches. AI models can scan codebases, identify vulnerabilities, and suggest appropriate patches, accelerating the patching process and reducing the window of exposure to potential threats
As GenAI continues to evolve, its applications in DevSecOps will help organizations stay ahead of emerging threats and vulnerabilities. The integration of generative AI into DevSecOps promises a future of faster, more secure, and more efficient software development. By automating tasks, enhancing security, and improving software quality, generative AI empowers developers build faster, cheaper and better.
The risks of over reliance remains, developers and security teams must remember that AI coding tools are not a substitute for human oversight and testing. For example, a code generated by an AI assistant cannot be merged to the master blindly without proper validation by a human. Being aware of the limitations enables DevSecOps teams gain efficiencies.
Wednesday, 22 November 2023
Airport Metaverse Mundane Benefits
Here are some potential benefits of using metaverse technologies for airports:
- Improved passenger experience. The metaverse could allow passengers to virtually navigate airports before their trip. This could help reduce confusion and stress upon arrival. Passengers could find gates, shops, restaurants, etc. in a realistic 3D environment.
- Enhanced wayfinding. Detailed 3D maps and guides in the metaverse could make it easier for passengers to find their way through large, complex airports. Real-time directions, notifications, and maps could minimize getting lost.
- New advertising and retail opportunities. Airports could showcase stores, products, and services in immersive 3D spaces. Passengers may be more inclined to shop or browse offers in a fun, engaging virtual environment. Retailers gain new ways to promote their brands.
- Remote assistance solutions. Passengers could access live virtual assistants, information booths, or customer service representatives within metaverse airports no matter their physical location. This could help address questions or issues without having to search the actual airport.
- Environmental impact reduction. The metaverse may allow some passenger interactions, simulations, or information sharing to occur remotely rather than requiring physical presence. This could potentially reduce congestion, energy use, emissions from travel to/from airports in some situations.
- Training and education benefits. Airports could use metaverse platforms to provide virtual training to employees, demonstrate new procedures before implementation, or educate passengers on airport policies and processes in an immersive way.
- Future testing ground. The metaverse may give airports an environment to experiment with and test potential future technologies, designs, or operational changes before physical implementation. This can inform long-term strategic planning and capital investment decisions.
Friday, 3 November 2023
Define Reliability in a minute
I was asked to define Reliability in a minute at a recent conference. This was my reply.
Thinking beyond software, hardware and networks, resilience is about how we deisign, build and operate systems, who does this. what processes we use and how consistently do we do this? It is about having a wholistic mental model and removing barriers from all aspects, always keeping the end user business outcomes in mind.
Reliability engineering is about anticipating failures, building emergency responses, building guardrails and mechanisms such as quick-heal and self-heal into the ecosystems. Eventually when failures do happen (they will always happen), how can we quickly recover and go back to normalcy, how do we retrospect the failure to derive learnings, and how do we apply the learnings from a people-process-technoogy perspective back into the ecosystem, and build improvements in a continuous manner.
It is also about having a frugal mindset, and building cost-effectiveness throughout the conceptaulisation to operational phases. Its not about over-sizing and over engineering to achieve outcomes, rather how intelligently can we achieve goals with minimum costs.
This is Reliability Engineering in a nutshell. Not a ground breaking answer, but I believe this simple ground-truth is what organisations struggle to implement in spirit. #devsecops #reliabilityengineering
Sunday, 17 September 2023
The Next Evolution of the Digital Government
The Next Evolution of the Digital Government
Over the past decade Governments, both federal and state have embarked on digital transformations to reduce cost and to enhance citizen services. Governments are investing in building key digital components that are required for large scale transformations such as building a solid digital id infrastructure, and enabling easy digital payment infrastructures.
There has been varied levels of successes for Governments, many focusing primarily in building digital services for government citizen interactions - for example for immigration, or id renewals, health vaccinations, driving licenses, vehicle registrations etc. The transformation to link individual services into one-stop-shop portals with omni-channel experience with a mobile-first vision and has led Governments in countries such as Singapore, Dubai to achieve higher rates of digitization.
However, the expectations of end users are continuously is rising based on their experience with the social and commercial platforms, where features such as personalization, recommendations and seamless omni-channel experience are taken for granted. In addition, these one-stop-shop for government services end users now expect a level of service personalization and recommendations based on their circumstances.
Users also expect seamless journey-like, end to end integrated experience (from child birth registration to death), and all services in between seamless integrated (Citizen ID linked medical benefits, school benefits, driving license, vehicle registration,housing taxes, income taxes, water and electricity taxes, municipality taxes, family benefit schemes, fuel and food subsidies, flood and natural disaster compensation etc.)
In this blog post we look at 6 key principles that helps the evolution of government platforms toward end-user centricity and personalization:
1/Building Citizen platform - Resiliency (millions of concurrency), Multi-tenancy, Security, Availability
2/Cross government data-sharing: e.g. government data lakes linked with data meshes, e.g. Amazon DataZone, etc
3/Use AI/ML for personalisation (Amazon Personalize) and benefit from Generative AI for intelligent assistant and chatbots (Amazon Bedrock)
4/Omni-channel experience beyond traditional channels including IoT, Biometrics, Metaverse, AI/ML
5/Integration with the private sector through government APIs and open datasets
6/Move towards serverless and Cloud Native services to reduce the heavylifiting and build innovative solutionsInformation Architectures - Central, Federated/Brokered, and Self-sovereign systems
- Identification factors - Biometrics, Document scanning/verification, Pseudonymous identifiers, etc.
- Online Authentication factors - Passwords, OTPs, MFA, password less (email links, biometrics (including behavioral), soft tokens, Contactless cards etc.)
We have identified three distinct mental models for the evolution of Government citizen services, each with its own framing, its own purpose, and its own defining question. These are five orthogonal mental models of identity. By understanding them, we can better understand how apparently disjoint ideas of identity how government can evolve identity each other, enabling the discussion and engineering of better, more broadly useful, and more secure identity systems.
The first mental model is the Government starting to build Digital identity to better connecting citizens to their daily needs. Digital ID systems also present an opportunity to provide better accessibility of public and social services, helping disadvantaged communities to participate more fully in social, economic, and political life. By enhancing the capacity of governments to extend public services to the less fortunate citizens of a country, digital ID can be a powerful equalizer to communities, if well implemented.
Digital ID improves the interaction between citizens and both public and private institutions, by bolstering institutional efficiency and strengthening transparency, efficacy, effectiveness, innovation, and the agile delivery of public services and program.
The digitalisation of self-identity can also render public services more transparent and reduce fraud in payments between governments and citizens such as public wages, pensions, social welfare programs, unemployment benefits, child support, and conditional cash transfers. A robust and secure digital ID system removes the possibility of errors or to impersonate someone else for a social benefit, and it makes it easier for public employees to rule out ineligible candidates.
Government sometimes extends this to the delivery of standalone services. While they might excel at ensuring high service quality or a superior user experience for individual services, the services are standalone and specific to an entity, and cross-department integration is not present. Thus, government departments provide digital services independently and communicate with citizens in a siloed manner.
The second mental model is building the Governments distribute welfare schemes through payment of benefits. The common benefit schemes may include medical benefits, food and hunger programs, education, childcare, housing, cash assistance and income support etc. The payments take many forms and are directed towards different legal entities such as persons, families, corporations, private service providers, public service organizations etc. When the welfare is distributed, the state faces multiple challenges due to the reasons listed below (non-limited to):
- Legacy systems with details of beneficiaries managed by multiple departments.
- Incomplete and inaccurate details of the beneficiaries and lack of single identity
- Lack of continuous update of details of the beneficiaries
- Lack of unique identifiers of various entities including beneficiaries
- Identification of family / household tree to better manage family-oriented schemes.
- Identification of concentration of benefits paid at various entity levels at individual, family, location etc.
- Ability to cross check with other govt. reference databases.
- Movement of citizens across states and double dipping of schemes.
With the second mental model, Governments start focusing on the scaled adoption of digital services, ensuring that they are accessible to everyone. At this stage, governments focus on digital inclusion and accessibility. The efforts now shift toward whole-of-government alignment and enabling citizens to interact with different government departments as a single entity, oftentimes through a single platform. At this stage, governments work on breaking down the barriers of interoperability, incompatible standards, siloed processes, and disparate data sets that have been hindering seamless digital government
The third mental model is a stage when governments will often realise that interactions with citizens are typically initiated by so-called life events i.e. changes in circumstances that trigger a need for a product or service. Such life events may include a birth, death, change of employment status, change of marital status, etc. Different life events trigger the need for different services, and most of these services require the intervention of more than one government agency. Thus, governments realize that, for true citizen-centricity, a whole-of-life approach is required. The government shift their mindsets towards the citizen models, aligning their service delivery and government processes to citizens’ lives, rather than expecting the citizens to fit into governments’ processes. At this stage, services from different government agencies are structured around citizen life events in a seamless and predictive fashion, where minimal intervention and communication is required from the citizen. In the event of a certain life event, the various government agencies involved will be triggered to offer their different services to the citizen through a single channel. For example, a birth would trigger various ministries such as the Ministry of Health, Identity Authority and Public Insurance Authority to issue a birth certificate, trigger changes in identity documents and trigger changes in health and life insurance policies
How can Governments benefit from AI?
AI and government together have the potential to create a major impact on how societies are run and governed. AI could help public servants become more efficient in their work by taking on tasks which are time-consuming or require specialist knowledge. AI-powered automation of administrative tasks would free up time for government employees to focus on more complex tasks, providing a higher quality of service to citizens.
In addition, AI could be used to process large volumes of data to identify patterns and trends that would otherwise be undetectable. This could be used to improve the delivery of services, or to detect potential issues such as fraud or corruption.
AI also has the potential to improve the democratic process by providing greater transparency and accessibility of information. For example, AI-powered chatbots could be used to provide citizens with direct access to their representatives, or AI could be used to automatically generate transcripts of parliamentary proceedings.
Ultimately, AI has the potential to transform how governments operate, providing significant benefits for both citizens and public servants alike.
What are some potential applications of AI in government?
AI is being used more and more in government as decision-makers realize the benefits of using AI technologies to automate repetitive tasks, improve efficiency and accuracy, and obtain insights from data. Here are few potential areas where AI can be applied:
#1: AI for Tax Collection
One of the primary challenges in tax collection is the sheer volume of data that needs to be analyzed in order to identify potential instances of tax evasion or fraud. This task can be extremely time-consuming and labor-intensive, requiring significant investment in human resources and expertise. AI systems can help automate this process by leveraging advanced data analytics and machine learning techniques to analyze large amounts of financial and other relevant data.
By identifying patterns and trends within this data, AI can help governments more accurately identify potential cases of tax evasion or fraud.
#2: AI for Law Enforcement
One of the key use cases for AI in government is its ability to help with law enforcement by analyzing CCTV footage, monitoring social media activity, and other tasks that can help to identify suspects and catch criminals.
This is a problem that has long plagued law enforcement agencies, who often lack the resources and manpower needed to sift through large volumes of data or monitor large numbers of potential suspects. By using AI technologies such as machine learning algorithms and image recognition tools, these agencies are now able to more effectively analyze surveillance footage, detect patterns of criminal behavior on social media, and locate potential suspects based on their online activity.
Not only does this help to streamline the process of finding criminals, but it also allows law enforcement agencies to focus their efforts on investigating more serious crimes by freeing up time and resources that would have otherwise been spent on lower priority cases.
#3: AI for Traffic Management
As one of the most pressing challenges faced by governments and urban planners today, managing traffic is an area where AI can be extremely valuable. AI technologies such as machine learning and computer vision can detect patterns in traffic data, allowing authorities to identify areas of congestion and take action to address them. For example, AI might identify road closures or accidents that are causing disruptions, or predict where bottlenecks are likely to occur based on historical data.Aside from helping to improve traffic flow, using AI for traffic management also offers a number of benefits. For one thing, it can help mitigate the effects of urbanization by reducing commuting times and improving fuel efficiency. It can also lead to less pollution and lower greenhouse gas emissions, as vehicles spend less time idling in traffic jams.
#4: AI for Cybersecurity
One of the main challenges facing government agencies today is the growing number of cyber attacks, which can cause significant damage to critical systems and put sensitive data at risk.
To address this problem, many government agencies have started using AI technologies to monitor network traffic for signs of malicious activity and block potential threats before they can do any damage. This helps to protect against a wide range of attacks, such as those that rely on malware or phishing scams. In addition to protecting against external cyber threats, AI can also be used to encrypt sensitive data to make it more difficult for hackers to access it. By improving the security of important data, government agencies are better able to keep their systems and networks running smoothly without interruption from outside attackers.
#5: AI for Disaster Relief
Another promising use cases for artificial intelligence in government is in disaster relief. One approach that has been successfully used in this area is the use of sensors that are equipped with AI technologies like machine learning or computer vision. These sensors can automatically detect fires, floods, earthquakes, and other critical events, allowing government agencies to allocate resources more efficiently and respond more quickly to unfolding events. Another important application of AI in disaster relief is the monitoring of social media activity during emergencies. By analyzing social media posts and other data sources, AI systems can provide valuable information about how people are affected by disasters, helping governments better understand where their aid efforts are needed most urgently.
#6: AI for Benefits Administration
One major challenge that governments face with regard to benefit administration is detecting and preventing fraud and abuse. Fraudulent or abusive claims can lead to significant losses for government agencies, as well as reduced support for those who are truly in need.
Fortunately, AI systems have the ability to analyze large amounts of data and identify patterns that may indicate fraudulent activity. For example, these systems could analyze financial records, employment information, and other data points to identify discrepancies or unusual patterns that suggest improper behavior. This could help government agencies more effectively target fraudulent claims and prevent them from occurring in the first place.
#7: AI for Healthcare Management
The use of artificial intelligence (AI) in government has the potential to greatly improve healthcare management. By analyzing large quantities of data from healthcare providers and patients, AI systems can identify patterns that indicate areas for improvement or problems that need to be addressed. This can help agencies better allocate resources and optimize care delivery, ultimately leading to improved patient outcomes and lower costs.
There are several different AI technologies that are used in healthcare management, including machine learning algorithms, natural language processing, and predictive analytics. All of these allow for more sophisticated analysis of data than is possible with traditional manual approaches, leading to more accurate insights into key metrics like patient demographics, treatment outcomes, facility utilization, and more.
#8: AI for Policy making
There is growing interest among governments around the world in using artificial intelligence (AI) to help with policymaking. This is due to the fact that AI technologies are well-suited for tasks such as sensing patterns of need, developing evidence-based programs, forecasting outcomes, and analyzing effectiveness. In addition, AI can provide a more comprehensive, faster, and rigorous approach to policymaking by helping policymakers make better decisions based on the latest data and insights.
One common use case for AI in government is in identifying patterns of need within communities. For example, many cities have used machine learning algorithms to analyze real-time crime data and identify areas where increased police presence may be needed. This helps policymakers better address issues like crime and public safety, while also enabling them to use resources more effectively.
Another use case involves using predictive analytics tools to forecast outcomes and inform policy decisions related to issues like economic development or healthcare access. For example, governments may use machine learning algorithms to analyze real-time health data from hospitals or clinical trials to predict outbreaks of infectious diseases or other health risks. This allows them to quickly identify challenges and take action before they become major problems.
Risks
One of the main risks associated with using AI in government is that it may be biased against certain groups of people. For example, if AI is used to make decisions about who should receive government benefits, it may inadvertently discriminate against low-income or minority groups. This could have serious consequences for these individuals and potentially undermine the trust that citizens have in their government.
To mitigate this risk, governments should take steps to audit and evaluate the algorithms used by their AI systems to ensure that they are not unintentionally biased against certain groups of people. Additionally, governments should work with civil society groups and academic experts to develop clear guidelines for how AI systems should be designed and operated in order to minimize any potential biases.
Another risk associated with using AI in government is that it may be used to surveillance citizens without their knowledge or consent. For example, some governments have been known to deploy facial recognition technology on public streets or cameras on buses and trains so that they can track individuals’ movements throughout the city. This type of surveillance poses a major threat to citizens’ privacy and liberties and can also lead to discrimination based on perceived demographic traits such as race or gender identity.
To mitigate this risk, governments should adopt strong privacy protections and transparency measures when deploying AI technologies for surveillance purposes. For example, governments could require all surveillance technologies to encrypt all data collection and storage so that no personally identifiable information can be tied back to individuals without their consent. Additionally, governments should work with civil society organizations to ensure that surveillance technologies do not disproportionately target specific communities or demographics.
The future of AI in government is one that holds great promise for improving the efficiency and effectiveness of government services. Many experts believe that AI has the potential to streamline bureaucratic processes, improve decision-making, and enhance public services. Additionally, as AI continues to advance, it may even be able to help address some of the most complex challenges facing governments today, such as climate change and political polarization.
Overall, while there may be some obstacles that need to be overcome in order for government agencies to fully embrace AI technologies, the promise of these technologies is too great to ignore. As more governments begin adopting these new technologies in the coming years, we can expect significant improvements in areas like service delivery and policymaking.
-
This poem in Sanskrit has a beautiful expression that stands out in Vivekachudamani, the crown jewel of Adi shankara's work on Vedanta...
-
People who have been reading my previous blogs may get a bit surprised by this Title. We spoke about little and subtle things in life, abo...
-
Nidhidyasanam is referenced in many areas in Vedanta, the reference here is from the great Brihadaraynaka Upanishad - widely acknowledged ...