What Is the Ruling on Developing an AI System Using Conventional Banking and Loan Data?

Question: As-salamu alaykum. We are CS students building a neutral math framework to verify if AI systems are fair and unbiased. Our supervisor wants us to test it using real loan and banking data as it's the best benchmark. We intend for this technology to be used everywhere—banks, university admissions, hiring, healthcare, and more. While the algorithm is general purpose, it would help normal banks a lot. If we refuse, companies or teams without ethical constraints might build it first. Question: Is it permissible to build this neutral algorithm and use loan data for our academic proof-of-concept, knowing it will benefit normal banks too? Or must we avoid it entirely, even if it means abandoning the work to others? Jazakum Allahu khayran.

Summary:

The basic principle regarding the development of general-purpose algorithms and software tools is that they are permissible because they are lawful means. They only become prohibited if they are specifically designed to assist in something unlawful, or if their predominant use is for unlawful purposes. Therefore, if the algorithm you are developing is neutral and general-purpose, suitable for use in many permissible fields such as healthcare, education, employment, and others, and the use of loan data is solely for academic research and proof of concept, without participating in the creation, operation, or promotion of an interest-based system, then there does not appear to be anything impermissible in doing so. However, if the project is specifically intended to serve a particular conventional bank, or to develop a system that is used directly to issue, improve, or manage interest-based loans, then it is not permissible because it constitutes cooperation in sin and transgression.

Answer:

First: The Evidence from the Quran

From the Qur'an:

  • [Surah Al-Ma'idah: 2]
    "Cooperate in righteousness and piety, and do not cooperate in sin and transgression."
  • [Surah Al-Baqarah: 275]
    "Allah has permitted trade and prohibited interest."

    These two verses establish the obligation of avoiding anything that directly assists interest-based transactions.

Second: The Evidence from the Sunnah

From the Sunnah:

  • Narrated by Muslim.It is reported on the authority of Abdullah ibn Masud رضي الله عنه that:
    "The Messenger of Allah cursed the one who consumes interest, the one who pays it, the one who records it, and its two witnesses." He said: "They are all the same."

    This hadith indicates the prohibition of directly participating in an interest-based contract or in the activities that form part of the interest-based transaction itself.

Third: Does a General-Purpose Algorithm Constitute Cooperation in Sin? The answer is no, provided that it is genuinely a general-purpose algorithm. An algorithm that can be used in: -Hospitals. -Universities. -Companies. -Government institutions. -Islamic banks. -Conventional banks. is not inherently prohibited because it is a general tool, and the ruling on such tools depends upon how they are used. The mere possibility that a conventional bank might benefit from it does not make its development prohibited, so long as the developer did not intend to assist interest-based transactions and did not design it specifically for that purpose. Fourth: Statements of the Scholars

From the Scholars:

  • 1. The Permanent Committee for Scholarly Research and Ifta
    The hadith concerning the curse upon the one who records interest is general. It includes the one who originally writes the interest contract, the one who recopies it if it becomes worn out, the one who records the amount in accounting records, the accountant who calculates the interest on the principal, the one who sends it to the depositor, and others who perform similar functions.
  • 2. Shaykh Abd al-Aziz ibn Baz رحمه الله
    "It is not permissible to work in banks that deal with interest. Working in interest-based banks is not permissible because it is cooperation in sin and transgression. The one who records interest, the witness to it, and anyone who assists them, whether as an accountant, a correspondent, or even in another supporting role, is aiding them in their falsehood."

Fifth: Applying the Ruling to This Case. According to the description provided: -The project is university research. -The algorithm is not specific to banks. -Its objective is to measure fairness and reduce bias. -The loan data is being used only because it is a well-known benchmark dataset in academic research. -There is no participation in issuing loans, managing them, or improving a particular interest-based banking system. In this case, it does not appear to fall under recording interest or directly assisting it. Rather, it is the development of a general-purpose tool that can be used in many lawful applications. However, the following should be observed: The project should not be for the benefit of a particular conventional bank or commissioned by one. The algorithm should not be developed specifically to improve the issuance of interest-based loans or increase the profits derived from them. If possible, the researcher should seek to use datasets from permissible fields or open datasets that are not related to interest whenever suitable alternatives become available that achieve the same academic objective. Conclusion: If the algorithm is genuinely general-purpose, and the use of loan data is solely for academic research and proof of concept, without participating in the creation, operation, or improvement of an interest-based system, and without designing it specifically to serve a conventional bank, then the basic ruling is that such work is permissible because it does not constitute direct cooperation in interest-based transactions. However, if the project is specifically directed toward serving conventional banks or improving their systems for issuing or managing interest-based loans, then it is not permissible because it falls under cooperation in sin and transgression, as indicated by the general evidences prohibiting assistance in interest-based dealings.

And Allah knows best.

← Back to Questions

Related Answers

Participating in Bank Promotions and Interest-Based Offers

I recently opened a student checking account with an American Bank for a debit card. After completing 10 qualifying transactions (worth $100), they offer a one-time $100 promotional bonus/gift for opening an account with them. Is it halal to use the money acquired from this?

Read full answer

Buying a house with mortgage

Is paying mortgage interest to buy a house considered riba (usury)? What should we do if we did not know this for many years, and it is difficult for us to move now?

Read full answer

Can I Use a Refund from a Mixed Student Grant and Interest Based Loan?

A questioner asks: I was forced by my father to take out a student loan that involved ribā (interest). We received both interest-free grants and an interest-based loan, and these funds were used to pay for my college tuition. Now there is an excess amount of more than $2,000 remaining in my college account from the loan and grant money, and this amount has been refunded to me. However, I am unable to determine which portion came from the grant (interest-free) funds and which portion came from the interest-based loan. Is it permissible for me to use this money? And is it permissible for me to use it in general, including to pay off a debt that I currently owe? JazakAllahu khayran.

Read full answer

Is It Permissible to Sign a Student Loan Agreement That Includes Interest Penalties For Late Repayment?

Can a student sign a contract that stipulates interest on a loan if the student doesn’t pay back their loan on time? They can avoid it if they do indeed payback on time, but interest applies if they are late. This works like a credit card; if you payback the amount you borrowed on time, no interest applies. Thank you.

Read full answer

Is It Permissible to Study Interest Calculations and Constitutional Law for Exams?

اَلسَلامُ عَلَيْكُم I am student of general line. For government exam like railway we have answer some question at exam paper based Interest calculation only Or some time question come on indian constitution? Can we study this just give right answer to that. I believe in Islamic Shariah and we have ruled by Allaah's law. Not all question come from interest or indian constitution

Read full answer

What Is The Ruling On Donating Unintentionally Received Interest?

I unintentionally recieved interest from the bank through some kind of saving account, After realizing this i dont want to gain any benefit from this money. Can i donate the amount to needy people or to my siblings or parents. Is that permissible?

Read full answer